{"id":27626,"library":"build123d","title":"build123d","description":"A Python CAD programming library for creating parametric 3D models using a scripting approach. Current version is 0.10.0, requiring Python >=3.10 and <3.14. It provides both algebra and builder modes for constructing solids, and is built on top of cadquery-ocp (OpenCascade Python bindings). Release cadence is irregular, with major versions around every few months.","status":"active","version":"0.10.0","language":"python","source_language":"en","source_url":"https://github.com/gumyr/build123d","tags":["cad","3d-printing","parametric","openscad-alternative"],"install":[{"cmd":"pip install build123d","lang":"bash","label":"Standard pip install"},{"cmd":"conda install -c conda-forge build123d","lang":"bash","label":"Conda install (if available)"}],"dependencies":[{"reason":"OpenCascade Python bindings used for geometric operations","package":"cadquery-ocp","optional":false},{"reason":"Visualisation in VSCode (recommended for Jupyter or VSCode)","package":"ocp_vscode","optional":true}],"imports":[{"note":null,"wrong":null,"symbol":"Box","correct":"from build123d import Box"},{"note":null,"wrong":null,"symbol":"Location","correct":"from build123d import Location"},{"note":null,"wrong":null,"symbol":"Cylinder","correct":"from build123d import Cylinder"},{"note":null,"wrong":null,"symbol":"Sphere","correct":"from build123d import Sphere"},{"note":null,"wrong":null,"symbol":"BuildPart","correct":"from build123d import BuildPart"},{"note":null,"wrong":null,"symbol":"export_stl","correct":"from build123d import export_stl"},{"note":"In Jupyter/VSCode, you need the ocp_vscode extension to use show_object. Otherwise use export_stl.","wrong":null,"symbol":"show_object","correct":"from build123d import show_object"}],"quickstart":{"code":"from build123d import *\n\nwith BuildPart() as part:\n    Box(10, 10, 10)\n    with Locations((0, 0, 5)):\n        Cylinder(radius=2, height=6, mode=Mode.SUBTRACT)\n\n# Export to STL\nexport_stl(part.part, \"example.stl\")\n\n# To view in Jupyter (requires ocp_vscode):\n# show_object(part.part)","lang":"python","description":"Creates a 10x10x10 box and subtracts a cylinder from its top face. Then exports the result as STL."},"warnings":[{"fix":"Change `shape.is_valid()` to `shape.is_valid`, `shape.is_null()` to `shape.is_null`, `shape.shape_type()` to `shape.shape_type`.","message":"In v0.10.0, methods `is_null`, `is_valid`, `shape_type` were changed to properties – remove parentheses from calls like `shape.is_valid()` -> `shape.is_valid`.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Use current names: `Solid` instead of `S`, `Face` instead of `F`, etc.","message":"In v0.9.0, several previously deprecated items were removed, including old-style `S` prefix aliases (e.g., `Solid` instead of `S`). Check release notes for full list.","severity":"deprecated","affected_versions":">=0.9.0"},{"fix":"Either create a fresh virtual environment, or uninstall VTK and reinstall a compatible version: `pip uninstall vtk && pip install vtk==9.3.1`.","message":"VTK version conflict when upgrading from build123d <=0.8.0 to 0.9.0 or later – old VTK from cadquery-ocp can cause import errors.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Install `pip install ocp_vscode` or use `export_stl`/`export_step` to save files.","message":"`show_object` only works with the ocp_vscode viewer; if not installed, you'll get an ImportError or runtime error.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Check your geometry operations – ensure the objects actually intersect or that you're not cutting the entire part away.","cause":"The operation did not produce a shape (e.g., subtraction removed everything, or a cut was misaligned).","error":"AttributeError: 'NoneType' object has no attribute 'location'"},{"fix":"Upgrade: `pip install -U build123d`; for viewing, install ocp_vscode: `pip install ocp_vscode` and use `from build123d import show_object`.","cause":"Older version of build123d or missing ocp_vscode for Jupyter viewing.","error":"ImportError: cannot import name 'show_object' from 'build123d'"},{"fix":"Install Microsoft Visual C++ Redistributable for Visual Studio 2015-2022 (x64).","cause":"Missing C++ redistributables on Windows (OpenCascade DLLs not found).","error":"OSError: [WinError 126] The specified module could not be found when importing build123d"},{"fix":"Ensure you're not nesting builder contexts incorrectly – use separate `with` blocks or close the inner context before starting another.","cause":"Nested BuildPart or BuildSketch without proper context management.","error":"RuntimeError: Builder mode only allows one pending shape at a time"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}