OpenSCAD to JS with ManifoldCAD
This project aims to build a reliable OpenSCAD to JavaScript compiler using ManifoldCAD, making it possible to run existing OpenSCAD code in a modern JavaScript environment. The main challenge is that OpenSCAD works in its own ecosystem, while ManifoldCAD cannot directly execute OpenSCAD programs. Current tools are limited and often don’t handle modern features or correct semantics. To solve this, I will develop a proper compiler that accurately models OpenSCAD behavior instead of relying on JavaScript shortcuts. Building on my existing prototype, I will design a structured pipeline with parsing, semantic analysis, and an intermediate representation (IR) to ensure correctness. Key areas include handling modules vs functions, children(), special variables, and improving debugging through source mapping. The final result will be a robust, production-ready compiler integrated into the Manifold ecosystem, enabling developers to reuse OpenSCAD libraries with confidence.
Project details
Technologies
Not listed in the archive