zalo / CascadeStudio

A Full Live-Scripted CAD Kernel in the Browser
https://zalo.github.io/CascadeStudio/
MIT License
1.01k stars 126 forks source link

Execution via node.js, is it possible? #43

Open brad-jones opened 3 years ago

brad-jones commented 3 years ago

This might already be possible but I couldn't see any docs or obvious entrypoint CLI tool to do this? Can WASM be used with node???

Say I have a JS/TS script that defines my model can I use node.js (not the browser) to then export an STL/STEP/SVG/etc file? Similar to the example given by CadQuery https://cadquery.readthedocs.io/en/latest/installation.html#test-your-installation

I like the idea of using say VsCode on one screen to edit the JS/TS script and then having a simple STL viewer open on another screen watching for changes. This is similar to how I can use both OpenSCAD and CadQuery.

Other use cases would be the ability to have a CI/CD pipeline that say automatically generates various exports like an STL, 2d plans, bill of materials, slices it into gcode if your 3d printing & then creates a new github release with such assets just like you would if it were a traditional software package that your pipeline was compiling & releasing.

zalo commented 3 years ago

I believe node.js can execute WebAssembly, but I've never used node.js so I wouldn't know where to start 🙃

A barebones cli version of CascadeStudio that just uses the StandardLibrary and the WASM to generate .stl's would be interesting though...

Irev-Dev commented 3 years ago

I think VS-code extension and generalising this all a bit more, node etc would be awesome.

I'm tempted to attempt so of this. I can't in the immediate future.

gabrielgriesser commented 1 year ago

Any news for that ?

I'm trying to use Cascade Studio as a VueJS component. But it's complicated to export main elements and reuse them in VueJS