skillfed

cadquery

CadQuery is a parametric scripting language for creating and traversing CAD models

cadquery v2.8.0 704.2K downloads/30d#5,276 on PyPI5,601
Permissive license Apache Public License 2.0 Active released

What it is and what it does

CadQuery is a Python library that lets you describe 3D CAD models using code rather than a graphical interface. You write scripts that define geometry—boxes, extrusions, fillets, lofts, and assemblies—and CadQuery translates them into high-quality CAD files. It wraps the OpenCASCADE kernel through its cadquery-ocp dependency, giving you access to industrial-strength modeling without leaving Python.

The library is designed for automation, integration into servers, and scientific workflows. It includes built-in visualization via trame and vtk, and works with Jupyter notebooks and the optional CQ-editor GUI. You can create parametric models where end users customize dimensions or features by editing script variables, then regenerate the entire design. Output formats include lossless STEP and DXF as well as mesh formats like STL and 3MF.

Use it for:

  • Generate STEP files programmatically for mechanical parts, enclosures, or assemblies in manufacturing workflows.
  • Build parametric design tools where non-programmers adjust dimensions in a script and re-run to produce new CAD models.
  • Automate repetitive CAD tasks—batch-generating variants, applying design rules, or integrating CAD into CI/CD pipelines.
  • Create scientific or engineering simulations that output CAD geometry for visualization or further analysis.
  • Embed 3D model generation in web services or backend systems without requiring a GUI CAD application.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

CadQuery is a Python library for writing scripts that generate parametric 3D CAD models, outputting to formats like STEP, STL, DXF, VRML, AMF, and 3MF.

Yes. CadQuery is production-stable (Development Status 5), actively maintained, permissively licensed, and has no known vulnerabilities. Install friction is low for supported Python versions (3.11+). It is the right choice if you need to generate or manipulate 3D CAD models programmatically; if you require a graphical CAD editor, use CQ-editor alongside it or choose a different tool.

Install

cadquery on PyPI

pip

pip install cadquery

uv

uv add cadquery

poetry

poetry add cadquery

Installing cadquery

Before you install

Low friction: distributed as a wheel for Python 3.9–3.12 on Linux, macOS, and Windows, though some older Linux distributions are not supported. Active maintenance with a release 54 days ago and 5601 repository stars.

License in practice

Licensed under Apache Public License 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install cadquery

from cadquery.func import box, fillet
from cadquery.vis import show

b = box(1, 1, 1)
show(fillet(b, b.edges("|Z"), 0.1))

Requires Python 3.11 or later; pip installation is limited to Python 3.9–3.12 on Linux, macOS, and Windows, with some older Linux distributions unsupported—conda installation recommended for broader compatibility.

Verify before relying

  • Whether the 13 runtime dependencies (including cadquery-ocp, trame, casadi, nlopt) are all required for basic use or only for advanced features.
  • Performance characteristics and model complexity limits for large assemblies or high-resolution exports.

Package facts

License Apache Public License 2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 13 — cadquery-ocp, ezdxf, multimethod, nlopt, runtype, casadi, trame, trame-vtk, trame-components, trame-vuetify, pyparsing, scipy, numba
Maintenance actively maintained — 54 days since the last release
Last repo commit
First released
Downloads 704,227/month — #5,276 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cadquery-2.8.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonTopic :: InternetTopic :: Scientific/EngineeringTopic :: Software Development :: Libraries :: Python Modules

Tags

parametric 3d cad modeling pythoncadquery scriptingprogrammatic step file generationpython 3d model automationcad assembly scriptingopencascade python bindingsprocedural 3d design
cad-automation3d-modelingparametric-design

More Scientific/Engineering packages