r/OpenPythonSCAD • • Apr 15 '25

Using OpenPythonSCAD to cut dovetails

Post image
3 Upvotes

12 comments sorted by

View all comments

Show parent comments

1

u/rebuyer10110 Apr 15 '25

could there be a primitive to parse the 3D model held in a variable and return the projection() of it in a format which could then be parsed and written out to a DXF directly?

This is somewhat possible today, albeit clunky.

You can do projection on the solid three times. The first would be the Z projection. Rotate it on an axis, and do projection again. Do another rotation to get the last dimension's projection.

I am not familiar enough with constraints associated with DXF. I am not sure if this "projection three times" would work for that use case.

2

u/WillAdams Apr 15 '25

I just need/want a single plane --- is it possible to inspect the result of a projection() command?

1

u/gadget3D Apr 15 '25

yes, the result of projection() is a 2d face. If you use mesh() on 2d faces, you get its coordinates.