Best strategy for exporting slices of an OpenSCAD object as a .dxf

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Best strategy for exporting slices of an OpenSCAD object as a .dxf

William Adams-2
Was thinking on this and came across:

http://rasterweb.net/raster/2012/07/16/openscad-to-dxf/

Is there a better technique for exporting slices of an OpenSCAD object as a .dxf? Anything especial I should know of to do this?

If I understand http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/3D_to_2D_Projection then I can shift the object up and down along the Z-axis and the slice will be taken at Z-0?

(unfortunately FreeCAD 0.13 didn't work on my machine when I installed it)

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Best strategy for exporting slices of an OpenSCAD object as a .dxf

William Adams-2
On Jun 17, 2013, at 10:23 AM, William Adams wrote:

> If I understand http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/3D_to_2D_Projection then I can shift the object up and down along the Z-axis and the slice will be taken at Z-0?

Oh.

Here: http://sourceforge.net/apps/mediawiki/pycam/index.php?title=Hints_for_2D_modeling_with_OpenSCAD_(DXF)

The following example code creates a sectional drawing of a sphere at a specific z-level:
projection(cut=true) translate([0, 0, -3]) sphere(r=10);

My apologies for the noise.

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Best strategy for exporting slices of an OpenSCAD object as a .dxf

matthew venn
In reply to this post by William Adams-2
take a look at this: https://github.com/mattvenn/cad/tree/master/openscad/layer_demo
The shell script automates the movement of a 3d object through the z axis and making dxf slices.
Cheers,
Matt

--
Matthew Venn
mattvenn.net

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Best strategy for exporting slices of an OpenSCAD object as a .dxf

William Adams-2
On Jun 17, 2013, at 10:27 AM, matthew venn wrote:

> take a look at this: https://github.com/mattvenn/cad/tree/master/openscad/layer_demo
> The shell script automates the movement of a 3d object through the z axis and making dxf slices.

Thanks!

Unfortunately, the script doesn't work on a default Mac OS X 10.6 install.

Since it was a relatively flat piece, I went ahead and did it by hand using a variation of:

projection(cut=true) translate([0, 0, -3]) sphere(r=10);

which worked fine --- had to do it in the original file though, since exporting to a .stl and re-importing the .stl to flatten it created errors (probably related to the difficulties w/ applying projection() to the more complex tools). There were some artifacts (notably in the hex wrenches which I thought was rather odd), but I've got a set of ~20 files I'm compositing in Macromedia FreeHand so as to re-try cutting this in both positive and negative so I can force felt into the depressions as opposed to using flocking.

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Best strategy for exporting slices of an OpenSCAD object as a .dxf

clothbot

On 2013-06-28, at 8:49 AM, William Adams <[hidden email]> wrote:

On Jun 17, 2013, at 10:27 AM, matthew venn wrote:

take a look at this: https://github.com/mattvenn/cad/tree/master/openscad/layer_demo
The shell script automates the movement of a 3d object through the z axis and making dxf slices.

Thanks!

Unfortunately, the script doesn't work on a default Mac OS X 10.6 install.
[deletia]

Try replacing the "openscad" command in the script with the full path "/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD"

Andrew.

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/




_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Best strategy for exporting slices of an OpenSCAD object as a .dxf

William Adams-2
On Jun 28, 2013, at 12:01 PM, Andrew Plumb wrote:

> Try replacing the "openscad" command in the script with the full path "/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD"

Actually, the problem was the shell not understand ``seq'' --- I found a number of pages on it, but didn't want to fiddle w/ the settings on my wife's machine too much.

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566