nicklockwood / ShapeScript

The ShapeScript 3D modeling app for macOS and iOS
https://shapescript.info
MIT License
393 stars 18 forks source link

feature request: 2d vector graphics export #16

Closed mrmasterplan closed 6 months ago

mrmasterplan commented 7 months ago

Hi, I just discovered your software as a replacement for OpenScad, which I cannot run on my company mac "because the developer cannot be verified". ShapeScript seems very nice but I am only working with laser cutting, not with 3D print. Laser cutting requires export of 2D geometry, typically to PDF. You can see how OpenSCAD does it. They only export what crosses the x-y plane when you export to pdf.

I will buy the export option if you ever get round to adding a 2d vector graphics export. Pdf, svg, whatever...

Best of luck and thank you for the excellent documentation that you created. Simon


Edit: I meant svg, which is a 2D vector format, not stl.

nicklockwood commented 7 months ago

Hi Simon,

I've been looking into this feature and it seems very doable. It seems with OpenSCAD what they actually do is require you to use a projection() command to flatten the scene, then export as SVG/PDF.

I think it's actually going to be simpler for ShapeScript to implement it as you suggested, where anything crossing the XY plane will be converted to a path and everything else is discarded. Do you think that would be sufficient for your requirements?

Also, would you be interested in beta testing the feature before I release it?

mrmasterplan commented 7 months ago

You are right. I must have misremembered how it was done in OpenSCAD. This would absolutely be sufficient for my needs. I would be happy to beta-test. I must say, however, that this is a hobby for me and I sometimes I don't work with 3D models for months at a time. If this is ok, for you then sign me up :)

nicklockwood commented 6 months ago

@mrmasterplan the SVG export feature is included in the latest ShapeScript release on the App Store.