OpenSCAD language plugin for IntelliJ Platform IDEs (Idea, PyCharm, etc). It provides :
- Preview split panel, based on OpenSCAD rendering with viewstl
- Syntax highlighting
- Code completion
- Code navigation
- Formatting
- Code folding support
- Structure views
- Library support
- Color picking
- Actions for opening OpenSCAD and exporting model
- Color scheme close to the built-in OpenSCAD editor
OpenSCAD needs to be installed on your machine for the preview editor and the context menu actions.
The plugin will search for an OpenSCAD executable in standard installation paths at startup.
Go in Settings -> Languages & Frameworks -> OpenSCAD to manually set your installation path and activate/deactivate the preview editor.
The libraries configured in OpenSCAD are automatically added as libraries in your IDE. You will be able to access them through navigation and code completion with take them into account.
The formatting options are located in Settings -> Editor -> Code Style -> OpenSCAD.
The OpenSCAD color scheme can be loaded in Settings -> Editor -> Color Scheme -> OpenSCAD -> Scheme -> OpenSCAD.Default.
The plugin split preview editor will allow you to modify your code and easily check its result in the IDE.
The preview is done with an STL file, generated using OpenSCAD command line, then displayed in an HTML page using viewstl. Due to the conversion into an STL file, some information like colors are lost.
You can refresh the preview by clicking on the refresh button at the top right of the preview panel. The STL file generation can take some time if your model is complex. For faster preview, you can temporarily lower the $fn variable.
Temporary files are kept in a temporary folder (out, temp, tmp or .tmp folder depending on your IDE) at your project root. If you are using a CVS (i.e. git), best is to ignore this folder. The plugins automatically deletes the temporary files. If your IDE has crashed or if you encounter preview errors, you can close all scad editors and delete the temporary folder to restart from scratch.
Right-clicking on a scad file will give you access to two context menu actions :
- Open in OpenSCAD : To open an OpenSCAD instance for the given file.
- Export as... : To export your model in various format using OpenSCAD command line.
Issues and requests are tracked in the Issues tab.
It is a free and opened plugin. Any help for coding, testing and reviewing are welcome ! Have a look at dedicated page.