2D SVG Export

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

2D SVG Export

fractorr
This is probably a silly question but I am going to ask anyway.

I have created a library that allows me to basically generate 3D cubes with some holes through the cubes and I can pass various parameters for width, length and thickness of the cube.  I was looking at having some pieces laser cut out of metal but the company requires flat 2D SVG files.  Without rewriting my library is there any way to generate a SVG from what I have?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2D SVG Export

fred_dot_u
I'm not so sure about the not-rewriting part, as some code is necessary to accomplish your objective.

The projection() feature will allow you to create an outline as if one had a parallel light beam directly over the model and traced the shadow. One can translate, rotate, scale as desired to develop the necessary section of the model to outline.

The summary is located in the wiki manual and is quite easy to understand.

Experiment with various locations/rotations and cut=true or cut=false.

The export menu entry supports SVG files. I was able to create a couple test files and open them in Inkscape.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2D SVG Export

nophead
In reply to this post by fractorr
You can use projection() to convert a 3D object to 2D and then export an SVG.

On 19 July 2017 at 22:18, fractorr <[hidden email]> wrote:
This is probably a silly question but I am going to ask anyway.

I have created a library that allows me to basically generate 3D cubes with
some holes through the cubes and I can pass various parameters for width,
length and thickness of the cube.  I was looking at having some pieces laser
cut out of metal but the company requires flat 2D SVG files.  Without
rewriting my library is there any way to generate a SVG from what I have?




--
View this message in context: http://forum.openscad.org/2D-SVG-Export-tp21870.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 2D SVG Export

fractorr
In reply to this post by fred_dot_u
That is exactly what I need!!!!!  And only adding 1 line of code!!!!!  OpenSCAD never ceases to amaze me with what you can do with it.
Loading...