pyproject.toml · v1.2.3

version
1.2.3
python
>=3.12
license
MIT
dependencies 6
  • build123d>=0.13,<0.14
  • slimgui>=0.8.3,<0.9
  • glfw>=2.7,<3
  • moderngl>=5.10,<6
  • numpy>=1.26,<3
  • pytypehint==1.2.0
installs 63
6 declared, 57 pulled in by them · python 3.13, linux
  • anytree 2.13.0 via build123d
  • asttokens 3.0.2 via stack-data
  • bd-materials 0.2.4 via build123d
  • build123d 0.13.0
  • cadquery-ocp-novtk 8.0.1.0.0 via build123d
  • cadquery-ocp-proxy 8.0.1.0.0 via cadquery-ocp-novtk, ocp-gordon, ocpsvg
  • certifi 2026.7.22 via requests
  • charset-normalizer 3.5.1 via requests
  • cloudpickle 3.1.2 via joblib
  • dataclasses-json 0.6.7 via pygltflib
  • deprecated 3.0.0 via pygltflib
  • executing 2.2.1 via stack-data
  • ezdxf 1.4.4 via build123d
  • fonttools 4.66.1 via build123d, ezdxf
  • glcontext 3.0.0 via moderngl
  • glfw 2.10.2
  • idna 3.20 via requests
  • ipython 9.17.1 via build123d
  • ipython-pygments-lexers 1.1.1 via ipython
  • jedi 0.20.0 via ipython
  • joblib 1.6.0 via scikit-learn
  • lib3mf 2.5.0 via build123d
  • marshmallow 3.26.2 via dataclasses-json
  • matplotlib-inline 0.2.2 via ipython
  • moderngl 5.12.0
  • mpmath 1.3.0 via sympy
  • mypy-extensions 1.1.0 via typing-inspect
  • narwhals 2.26.0 via scikit-learn
  • numpy 2.5.3
  • ocp-gordon 0.3.1 via build123d
  • ocpsvg 0.7.0 via build123d
  • packaging 26.3 via marshmallow
  • parso 0.8.7 via jedi
  • pexpect 4.9.0 via ipython
  • pillow 12.2.0 via threejs-materials
  • platformdirs 4.12.2 via threejs-materials
  • prompt-toolkit 3.0.53 via ipython
  • psutil 7.2.2 via ipython
  • ptyprocess 0.7.0 via pexpect
  • pure-eval 0.2.4 via stack-data
  • pygltflib 1.16.5 via threejs-materials
  • pygments 2.21.0 via ipython, ipython-pygments-lexers
  • pyparsing 3.3.3 via ezdxf
  • pytypehint 1.2.0
  • requests 2.34.2 via build123d, threejs-materials
  • scikit-learn 1.9.1 via build123d
  • scipy 1.18.1 via build123d, ocp-gordon, scikit-learn, svgpathtools
  • slimgui 0.8.3
  • stack-data 0.6.3 via ipython
  • svgelements 1.9.6 via ocpsvg
  • svgpathtools 1.8.0 via build123d
  • svgwrite 1.4.3 via svgpathtools
  • sympy 1.14.0 via build123d
  • threadpoolctl 3.7.0 via scikit-learn
  • threejs-materials 1.2.4 via bd-materials, build123d
  • traitlets 5.16.1 via ipython, matplotlib-inline
  • trianglesolver 1.2 via build123d
  • typing-extensions 4.16.0 via build123d, ezdxf, typing-inspect
  • typing-inspect 0.9.0 via dataclasses-json
  • urllib3 2.8.0 via requests
  • wcwidth 0.9.1 via prompt-toolkit
  • webcolors 24.8.0 via bd-materials, build123d
  • wrapt 2.5.0 via deprecated
commands
  • pycodecad

# pycodecad

Code-CAD with build123d: write a Python script, see the part, export it for 3D printing.

A desktop window shows the files of a part, its code and parameters next to the 3D view, and runs the script only when you press Run. The same script runs from the command line, so an AI assistant can check its own work with check and render.

The pycodecad window: the files of the folder, parameters and code on the left, a gear in the 3D view on the right

from build123d import Box, Cylinder
from pycodecad import show

plate = Box(40, 30, 8) - Cylinder(5, 8)
show(plate, name="plate", color="#F4B02A")

A part is one plain Python script that builds shapes with build123d and passes them to show(). pycodecad opens a window on it, runs it in a fresh child process, and exports what it shows. The window, the command line and an AI assistant all look at the same scene, so what an assistant checks is what you see and what you print.

# What you get

  • A window on a part: its files, the code and the part side by side. It runs the part once when it opens, then only when you press Run, and writes only when you press Save. Errors point at the line, and the last good part stays on screen. See The window.
  • Parameters: expose(fn) turns the arguments of a function into sliders, number boxes and checkboxes. See Parameters.
  • Animations: frame() saves the scene as a frame; the window plays them. Parts built once and moved with Pos are not computed again, so mechanisms play in real time. See Scripts.
  • A command line: check, render and export run the same script without a window, and pycodecad examples copies the bundled examples to a folder and opens them. See Command line.
  • An AI workflow: an assistant edits the file and checks its own work with check and render, which draws the part from several views in one picture. See Working with an AI assistant.
  • Exports to STL, 3MF (also a profile for Bambu Studio), STEP, GLB and BREP, from the window or the command line.
  • Parts for your own app (experimental): the window's code, parameters and 3D view as Dear ImGui components, in pycodecad.embed. See Embedding pycodecad in your app.

pycodecad is small on purpose: thin glue over well-tested libraries, readable in an afternoon. See Design.

# Requirements

A graphics card with OpenGL 3.3. Linux is the native, tested platform; Windows and macOS are compatible targets, with the differences listed in Limitations.

# Credits