CadQuery GUI editor based on PyQT supports Linux, Windows and Mac.
- OCCT based
- Graphical debugger for CadQuery scripts
- Step through script and watch how your model changes
- CadQuery object stack inspector
- Visual inspection of current workplane and selected items
- Insight into evolution of the model
- Export to various formats
- STL
- STEP
Use conda to install:
conda install -c cadquery -c conda-forge cq-editor=master
and then simply type cq-editor
to run it. This installs the latest version built directly from the HEAD of this repository.
Alternatively clone this git repository and set up the following conda environment:
conda env create -f cqgui_env.yml -n cqgui
conda activate cqgui
python run.py
On some linux distributions (e.g. Ubuntu 18.04
) it might be necessary to install additonal packages:
sudo apt install libglu1-mesa libgl1-mesa-dri mesa-common-dev libglu1-mesa-dev
On Fedora 29 the packages can be installed as follows:
dnf install -y mesa-libGLU mesa-libGL mesa-libGLU-devel
By default, CQ-editor will display a 3D representation of all Workplane
objects in a script with a default color and alpha (transparency). To have more control over what is shown, and what the color and alpha settings are, the show_object
method can be used. show_object
tells CQ-editor to explicity display an object, and accepts the options
parameter. The options
parameter is a dictionary of rendering options named alpha
and color
. alpha
is scaled between 0.0 and 1.0, with 0.0 being completely opaque and 1.0 being completely transparent. The color is set using R (red), G (green) and B (blue) values, and each one is scaled from 0 to 255. Either option or both can be omitted.
show_object(result, options={"alpha":0.5, "color": (64, 164, 223)})
Note that show_object
works for Shape
and TopoDS_Shape
objects too. In order to display objects from the embedded Python console use show
.