jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.61k stars 511 forks source link

[Feature proposal] Rendering multiple objects #282

Open Ph1r3ph0x opened 7 years ago

Ph1r3ph0x commented 7 years ago

I have a little feature proposal: A lot of designs I make in OpenSCAD consist of multiple parts. Especially if I want to 3D-print in multiple colors. It would be great to have a OpenJsCad like feature (returning multiple objects) for exporting multiple parts in OpenJSCad! Maybe to even have the ability to download a .zip file (found this: https://stuk.github.io/jszip/) containign all the stl files. Sadly I can't program javascript. If I have spare time I might give it a go though.

z3dev commented 7 years ago

Thanks. I added such a feature but it wasn't accepted. I'll try again.

gilboonet commented 7 years ago

What I do to render from scripts with multiple parts is adding a parameter to choose the part, then I make a batch file where I invoke openjscad for each part (just changing the parameter and output file) and gather the result into a file.

kaosat-dev commented 7 years ago

pretty much everything already returns an array, so it would make sense to support it as output as well

z3dev commented 3 years ago

These are the external formats that can convert multiple geometries into multiple objects (external format).

The only format that does not support multiple geometries is STL, which makes sense. STL by definition is just a raw, unstructured triangulated surface.

z3dev commented 3 years ago

@Ph1r3ph0x Is this a specific feature for STL exports?

I once had a discussion about color printing with Mr. Prusa. He mentioned the above formats, but preferred 3MF for multi-color prints. The Prusa slicer handles 3MF files very nicely.

z3dev commented 3 years ago

@Ph1r3ph0x please respond, otherwise this issue will be closed. Of course, you can reopen anytime.