VSCode CadQuery extension
Build parametric 2D/3D CAD models in VSCode with the CadQuery library.
From the CadQuery readme:
How it works
When reloading the view, the VSCode extension sends the current Python script on a CadQuery server, that executes its and returns a low-level threejs object representing the model (since the server loads the CadQuery module at start, the response time is acceptable).
Type checking and code completion is made using CadQuery stubs bundled in the extension, generated with MyPy (so it works even if you don't have a local CadQuery installation).
Install the IDE
Install the extension
In VSCode, search for cadquery in Extensions tab in the sidebar.
The extension is available in:
Alternatively, you can manually install the extension in VSCode by downloading the vsix file from one on both registries.
Install the CadQuery server
Eventually create a virtual environment first:
Install cadquery if not installed on your system:
Install cadquery server:
1. Run the CadQuery server
You can configure the server url in the VSCode extension settings (which is
2. Activate the extension
The preview should be updated each time your CadQuery Python script is saved.
3. Tips and tricks
You should use a language server to activate code completion, such as Pylance. Note that in order to make it work on VSCodium, you must set the
You can make the UI lighter by enabling VSCode Zen mode by hitting