VSCode CadQuery extensionBuild parametric 2D/3D CAD models in VSCode with the CadQuery library. Features
About CadQueryFrom the CadQuery readme:
How it worksWhen 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). The viewer is based on the three-cad-viewer (the same used in jupyter-cadquery) and display the object returned by the server. 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). InstallationInstall the IDEThe extension works both on VSCodium or VSCode. Install the extensionIn 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 serverEventually create a virtual environment first:
Install cadquery if not installed on your system:
Install cadquery server:
Usage1. Run the CadQuery serverYou can configure the server url in the VSCode extension settings (which is
2. Activate the extensionHit The preview should be updated each time your CadQuery Python script is saved. 3. Tips and tricksYou 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 About |