OpenJsCad parser
Drop your .jscad file here
Instructions:
Create a new file in your favorite text editor. To get started enter the following text:
function main() {
var cube = CSG.roundedCube({radius: 10, roundradius: 2, resolution: 16});
var sphere = CSG.sphere({radius: 10, resolution: 16}).translate([5, 5, 5]);
return cube.union(sphere);
}
Save this to a file on your desktop with .jscad extension. Then drag & drop the file from your desktop
to the box above (marked with 'drop your .jscad file here).
The 3d model should now appear. You can continue to make changes to your .jscad file. Just press Reload
to parse the changes, you do not need to drag & drop the file again.
When finished press Generate STL to generate the STL file. Then click Save STL and save it to
a file with .stl extension.
For more information about OpenJsCad see the introduction.
Debugging
By default your .jscad file is parsed in a separate thread (in a Web Worker). This allows long running
scripts to be executed while the web browser stays responsive. The web browser's debugger does not
have access to scripts running in web workers however. To allow debugging you can use the Debug button above to execute
your jscad code in the main thread instead of in a web worker.
To debug your code in Google Chrome: open the Developer Tools by typing Ctrl+Shift+I (or Command+Option+I on mac).
Then press the Debug button above. The debugger will stop just before executing your main() function.
For more information about debugging in Chrome see
Chrome Developer Tools: Overview
You can output log messages from your script using:
OpenJsCad.log("Hello");
The log messages will appear in the browser's console (shown using Ctrl+Shift+I in Chrome). They will appear
even while not actually debugging.