Important note:
This extension is no longer compatible with the new version of CadQuery Server. Until this is resolved, please use the LivePreview extension instead:
ctrl+shift+P
-> Simple Browser: Show127.0.0.1:5000
).VSCode extension that integrates CadQuery Server in VSCode.
CadQuery Server is a web server used to render 3d models from CadQuery code loaded dynamically.
The extension works both on VSCodium or VSCode.
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.
Read installation instructions.
You can configure the server url in the VSCode extension settings (which is http://127.0.0.1:5000
by default).
source venv/bin/activate # required if you used a virtual environment
cq-server
Read usage instructions for advanced use.
Hit f7
to enable the viewer. Alternatively you can use the VSCode command palette (Ctrl+Shift+P
) and search for Open CadQuery viewer
.
The preview should be updated each time your CadQuery Python script is saved.
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 nameLong
value to Visual Studio Code
in your product.json
(located at /usr/share/codium/resources/app/product.json
on Linux).
You can make the UI lighter by enabling VSCode Zen mode by hitting Ctrl+K
then Z
.