Boots on the Ground
- Jump right in
At the OpenJSCAD.org website you can edit code and see the output right in your browser. Try modifying the sample code to get a feel for how things work. Warning: This isn’t the best way to work long-term, because reloading the page will wipe out your code!
- Get set up locally
- Write code in your own editor and view mesh output in your browser
Now open up a new file in your favorite coding editor (for example Sublime), and copy in the example code from OpenJSCAD.org. Save this document. Open Chrome and load the index.html file that is inside your OpenJSCAD.org folder. Then drag your code file into the input box in the lower left, and check “Auto Reload”. Now when you change things in your code editor and save, it should automatically reload the mesh in your browser.
- Turn off the in-browser editor
Since you’re not using the editor inside your browser, you can turn it off and get more visual real estate for your mesh. One way to do this is to right-click to “Inspect Element” and then use the Developer Tools in Chrome to find the part of the code that controls the editor box. Find the top-level of code that highlights the editor and then Delete it! (Note this is the “hacktastic” way to do this – really we should just edit out the editor in the html code so that we don’t have to delete the editor each time we reload the page later. We’ll do that another day…)
Learning to Code with OpenJSCAD
- Start with the User Guide walkthrough
Work through the OpenJSCAD User Guide, starting with the “Anatomy of a JSCAD file” section and then working through the descriptions of the basic primitives, transformations, and functions.
- OpenJSCAD Google+ Community
Ask and answer questions, hear the latest news, see what there is to see at the OpenJSCAD Community on Google+.
CSG.roundedCubeis one of the default primitives, so it’s easy to get rounded objects in OpenJSCAD, hooray!