# cadquery/cadquery

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cadquery-cadquery).**

5,351 stars · 503 forks · Python · NOASSERTION

## Links

- GitHub: https://github.com/CadQuery/cadquery
- Homepage: https://cadquery.org
- awesome-repositories: https://awesome-repositories.com/repository/cadquery-cadquery.md

## Topics

`3d` `brep` `cad` `cadquery` `dxf` `modeling` `occt` `opencascade` `parametric` `python` `step` `stl`

## Description

CadQuery is a programmatic 3D modeling library and parametric CAD framework that allows for the generation of complex geometric solids and assemblies using a fluent Python API. It functions as a B-Rep geometry engine, enabling the construction of models through code rather than a graphical user interface.

The project is built on the Open CASCADE Technology kernel and utilizes a method-chaining API to link geometric commands in sequence. It distinguishes itself through a workplane-based coordinate system and a powerful selection system that uses topological and spatial filtering to target specific faces, edges, or vertices for operations.

The library covers a comprehensive range of capabilities, including 2D parametric sketching, 3D solid generation via extrusion and lofting, and hierarchical assembly management with geometric constraints. It also provides tools for geometry refinement, such as filleting and shelling, and supports the import and export of industry-standard formats including STEP and DXF.

The framework includes a built-in rendering engine for interactive model visualization and inspection during the scripting process.

## Tags

### Graphics & Multimedia

- [Parametric Modeling Engines](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/parametric-modeling-engines.md) — Implements a parametric modeling engine using constrained sketches and a fluent API for precise engineering control. ([source](https://cdn.jsdelivr.net/gh/cadquery/cadquery@master/README.md))
- [B-Rep Geometry Generation](https://awesome-repositories.com/f/graphics-multimedia/programmatic-cad-generation/b-rep-geometry-generation.md) — Uses the Open CASCADE Technology B-Rep kernel as the foundational engine for all topological operations.
- [3D Feature Profiles](https://awesome-repositories.com/f/graphics-multimedia/2d-and-3d-graphics-rendering/3d-feature-profiles.md) — Constructs 2D shapes and paths using lines and arcs to serve as the foundation for 3D features. ([source](https://cadquery.readthedocs.io/en/latest/_static/cadquery_cheatsheet.html))
- [2D Vector Geometries](https://awesome-repositories.com/f/graphics-multimedia/2d-vector-geometries.md) — Generates basic 2D shapes including lines, arcs, circles, and polygons on a coordinate system. ([source](https://cadquery.readthedocs.io/en/latest/apireference.html))
- [3D Assembly Management](https://awesome-repositories.com/f/graphics-multimedia/3d-assembly-management.md) — Groups multiple 3D objects into single assemblies by defining initial positions and visual properties. ([source](https://cadquery.readthedocs.io/en/latest/assy.html))
- [3D Geometry Editing](https://awesome-repositories.com/f/graphics-multimedia/3d-geometry-editing.md) — Implements tools for refining and manipulating 3D model geometry, including fillets, chamfers, and shelling. ([source](https://cadquery.readthedocs.io/en/latest/apireference.html))
- [3D Geometry Generators](https://awesome-repositories.com/f/graphics-multimedia/3d-geometry-generators.md) — Provides tools to create 3D shapes and solids programmatically without requiring low-level vertex manipulation. ([source](https://cadquery.readthedocs.io/en/latest/primer.html))
- [3D Object Transform Management](https://awesome-repositories.com/f/graphics-multimedia/3d-object-transform-management.md) — Implements tools for positioning, rotating, and arraying 3D objects within local coordinate frames. ([source](https://cadquery.readthedocs.io/en/latest/free-func.html))
- [Algorithmic 3D Model Generators](https://awesome-repositories.com/f/graphics-multimedia/algorithmic-3d-model-generators.md) — Generates complex geometric solids and assemblies using a fluent Python API and algorithmic parameters.
- [Assembly Hierarchies](https://awesome-repositories.com/f/graphics-multimedia/assembly-hierarchies.md) — Combines multiple simple models into nested parent-child hierarchies for complex assembly management. ([source](https://cadquery.readthedocs.io/en/latest/primer.html))
- [B-Rep Element Selection](https://awesome-repositories.com/f/graphics-multimedia/b-rep-element-selection.md) — Isolates specific geometric components like vertices, faces, or solids using selectors and set operations. ([source](https://cadquery.readthedocs.io/en/latest/free-func.html))
- [CAD Automation Libraries](https://awesome-repositories.com/f/graphics-multimedia/cad-automation-libraries.md) — Enables the automated generation and export of industry-standard 3D files like STEP and DXF via Python.
- [CAD Model Export Pipelines](https://awesome-repositories.com/f/graphics-multimedia/cad-model-export-pipelines.md) — Implements pipelines for serializing complex CAD geometric data into industry-standard exchange formats. ([source](https://cadquery.readthedocs.io/en/latest/_static/cadquery_cheatsheet.html))
- [CAD Modeling Kernels](https://awesome-repositories.com/f/graphics-multimedia/cad-modeling-kernels.md) — Integrates and executes operations through the underlying CAD modeling kernel. ([source](https://cadquery.readthedocs.io/en/latest/extending.html))
- [Constrained Sketching Engines](https://awesome-repositories.com/f/graphics-multimedia/constrained-sketching-engines.md) — Provides a system for defining 2D geometry through geometric constraints to drive 3D parametric modeling. ([source](https://cadquery.readthedocs.io/en/latest/_static/cadquery_cheatsheet.html))
- [Geometric Feature Selection](https://awesome-repositories.com/f/graphics-multimedia/geometric-feature-selection.md) — Identifies specific vertices, edges, faces, or solids to serve as the anchor for modeling operations. ([source](https://cadquery.readthedocs.io/en/latest/primer.html))
- [Geometric Type Filtering](https://awesome-repositories.com/f/graphics-multimedia/geometric-type-filtering.md) — Selects faces, edges, or vertices based on spatial orientation, distance, or geometric type. ([source](https://cadquery.readthedocs.io/en/latest/selectors.html))
- [Constructive Solid Geometry Kernels](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/3d-math-and-geometry-toolkits/geometry-primitives/constructive-solid-geometry-kernels.md) — Uses a B-Rep geometry engine to build complex physical parts via boolean operations on solids. ([source](https://cadquery.readthedocs.io/en/latest/classreference.html))
- [B-Rep Topology Construction](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/3d-math-and-geometry-toolkits/geometry-primitives/constructive-solid-geometry-kernels/b-rep-topology-construction.md) — Builds complex solids by assembling a hierarchy of vertices, edges, wires, and faces. ([source](https://cadquery.readthedocs.io/en/latest/free-func.html))
- [Edge Modifications](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/3d-math-and-geometry-toolkits/geometry-primitives/constructive-solid-geometry-kernels/edge-modifications.md) — Provides tools for refining 3D models through edge fillets, chamfers, and boolean-based hole drilling. ([source](https://cadquery.readthedocs.io/en/latest/quickstart.html))
- [Local Workplane Definitions](https://awesome-repositories.com/f/graphics-multimedia/local-workplane-definitions.md) — Establishes new 2D sketching surfaces on specific faces of 3D objects for localized feature creation. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Mechanical 3D Modeling](https://awesome-repositories.com/f/graphics-multimedia/mechanical-3d-modeling.md) — Enables precise geometric modeling of mechanical components and parts through a programmatic Python interface.
- [Construction Operations](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/solid-primitives/construction-operations.md) — Creates complex 3D forms through programmatic extrusion, sweeping, and lofting of profiles. ([source](https://cadquery.readthedocs.io/en/latest/workplane.html))
- [Prismatic Extrusions](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/solid-primitives/prismatic-extrusions.md) — Extrudes 2D profiles into 3D solids along a specified axis to create prismatic parts. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Subtractive Feature Cutting](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/solid-primitives/subtractive-feature-cutting.md) — Removes material from solids by extruding 2D profiles or drilling holes through parts. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Programmatic CAD Generation](https://awesome-repositories.com/f/graphics-multimedia/programmatic-cad-generation.md) — Generates complex 3D geometry and solids programmatically through a Python API without requiring a GUI. ([source](https://cadquery.readthedocs.io/en/latest/intro.html))
- [Spatial Geometry Filtering](https://awesome-repositories.com/f/graphics-multimedia/spatial-geometry-filtering.md) — Identifies specific faces, edges, or vertices using spatial criteria or boolean logic to target operations. ([source](https://cadquery.readthedocs.io/en/latest/_static/cadquery_cheatsheet.html))
- [Target Geometry Selection](https://awesome-repositories.com/f/graphics-multimedia/target-geometry-selection.md) — Filters and identifies specific faces, edges, or vertices based on spatial location or geometric properties. ([source](https://cadquery.readthedocs.io/en/latest/apireference.html))
- [Topological Geometry Filtering](https://awesome-repositories.com/f/graphics-multimedia/topological-geometry-filtering.md) — Employs lambda functions and sorting logic to select geometry based on properties such as volume. ([source](https://cadquery.readthedocs.io/en/latest/selectors.html))
- [Topological Geometry Selectors](https://awesome-repositories.com/f/graphics-multimedia/topological-geometry-selectors.md) — Identifies specific faces, edges, or vertices using spatial criteria and boolean logic to target operations.
- [Topological Relationship Selection](https://awesome-repositories.com/f/graphics-multimedia/topological-relationship-selection.md) — Identifies geometric elements based on their structural relationship in the model hierarchy. ([source](https://cadquery.readthedocs.io/en/latest/selectors.html))
- [Workplane Coordinate Systems](https://awesome-repositories.com/f/graphics-multimedia/workplane-coordinate-systems.md) — Provides a workplane-based coordinate system to establish precise 2D sketching surfaces on 3D objects. ([source](https://cadquery.readthedocs.io/en/latest/_static/cadquery_cheatsheet.html))
- [2D Boolean Operations](https://awesome-repositories.com/f/graphics-multimedia/2d-boolean-operations.md) — Merges or subtracts multiple sketches using boolean operations to create complex 2D geometries. ([source](https://cadquery.readthedocs.io/en/latest/sketch.html))
- [2D Profile Offsetting](https://awesome-repositories.com/f/graphics-multimedia/2d-profile-offsetting.md) — Transforms 2D profiles by shifting their boundaries inward or outward to create offsets. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Assembly Export](https://awesome-repositories.com/f/graphics-multimedia/3d-assembly-management/assembly-export.md) — Saves complex 3D assemblies to standard industry formats while preserving critical metadata like color information. ([source](https://cadquery.readthedocs.io/en/latest/importexport.html))
- [2D Parametric Shape Generators](https://awesome-repositories.com/f/graphics-multimedia/3d-geometry-engines/parametric-mesh-generation/2d-parametric-shape-generators.md) — Generates precise 2D profiles for specialized parts using mathematical parametric equations. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Advanced Parametric Features](https://awesome-repositories.com/f/graphics-multimedia/3d-geometry-generators/advanced-parametric-features.md) — Produces advanced geometric shapes using fillets, curvilinear extrudes, and parametric curves. ([source](https://cdn.jsdelivr.net/gh/cadquery/cadquery@master/README.md))
- [3D Model Visualizers](https://awesome-repositories.com/f/graphics-multimedia/3d-model-visualizers.md) — Provides a built-in viewer for rendering and inspecting 3D geometry and structure during the design process. ([source](https://cdn.jsdelivr.net/gh/cadquery/cadquery@master/README.md))
- [CAD Assembly Export](https://awesome-repositories.com/f/graphics-multimedia/cad-assembly-export.md) — Saves the final assembly configuration as a standard file for use in other CAD tools. ([source](https://cadquery.readthedocs.io/en/latest/assy.html))
- [Contextual Solid Management](https://awesome-repositories.com/f/graphics-multimedia/contextual-solid-management.md) — Streamlines the creation of complex parts by combining new features with the primary solid object. ([source](https://cadquery.readthedocs.io/en/latest/workplane.html))
- [DXF Drawing Exporters](https://awesome-repositories.com/f/graphics-multimedia/design-to-image-exporters/dxf-drawing-exporters.md) — Generates DXF and SVG files from 2D sections or sketches using specific projection options. ([source](https://cadquery.readthedocs.io/en/latest/importexport.html))
- [DXF Profile Imports](https://awesome-repositories.com/f/graphics-multimedia/design-to-image-exporters/dxf-drawing-exporters/dxf-profile-imports.md) — Loads 2D DXF files into a workplane with granular control over which layers are included. ([source](https://cadquery.readthedocs.io/en/latest/importexport.html))
- [Geometric Mirroring](https://awesome-repositories.com/f/graphics-multimedia/geometric-mirroring.md) — Creates a symmetric copy of 2D profiles or 3D objects across a specified plane or face. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [2D Technical Drawing Editors](https://awesome-repositories.com/f/graphics-multimedia/graphics-and-media/shape-drawing/technical-drawing-generators/2d-technical-drawing-editors.md) — Constructs precise 2D boundaries for parts using complex elements like splines and polylines. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Construction Geometries](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/3d-math-and-geometry-toolkits/geometry-primitives/constructive-solid-geometry-kernels/geometry-kernel-foundations/construction-geometries.md) — Allows the creation of temporary shapes and vertices to act as precise anchors for subsequent modeling operations. ([source](https://cadquery.readthedocs.io/en/latest/quickstart.html))
- [Solid Shelling](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/3d-math-and-geometry-toolkits/geometry-primitives/constructive-solid-geometry-kernels/solid-shelling.md) — Converts solid objects into hollow shells of uniform thickness by removing specified faces. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Geometry Instancing](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines/geometry-instancing.md) — Creates multiple instances of a geometric feature at specified coordinates simultaneously via geometry instancing. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Mechanical Feature Generation](https://awesome-repositories.com/f/graphics-multimedia/mechanical-feature-generation.md) — Generates standard mechanical features like counterbored and countersunk holes in single operations. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Surface Trimming](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/parametric-modeling-engines/surface-trimming.md) — Allows cutting edges and faces using rectangular trims or arbitrary wires mapped to the parametric domain. ([source](https://cadquery.readthedocs.io/en/latest/free-func.html))
- [Solid Primitives](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/solid-primitives.md) — Provides standard 3D solid primitives like boxes and cylinders as the basis for complex model generation. ([source](https://cadquery.readthedocs.io/en/latest/apireference.html))
- [Lofting Operations](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/3d-modeling-software/solid-primitives/lofting-operations.md) — Sweeps a 3D volume between multiple 2D profiles to create smooth geometric transitions. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))
- [Mesh Exporters](https://awesome-repositories.com/f/graphics-multimedia/mesh-exporters.md) — Saves 3D B-Rep shapes to mesh formats with configurable tolerances for quality control. ([source](https://cadquery.readthedocs.io/en/latest/importexport.html))
- [Real-Time Viewport Previews](https://awesome-repositories.com/f/graphics-multimedia/real-time-viewport-previews.md) — Offers a real-time viewport preview via a web browser for immediate visualization of scripted 3D models. ([source](https://cadquery.readthedocs.io/en/latest/vis.html))

### Part of an Awesome List

- [Object Selection Filters](https://awesome-repositories.com/f/awesome-lists/security/file-encryption/remote-file-managers/object-storage-file-operations/object-operation-filtering/object-selection-filters.md) — Provides criteria-based selection to isolate specific model elements based on spatial proximity and dimensional properties. ([source](https://cadquery.readthedocs.io/en/latest/classreference.html))
- [STEP File Imports](https://awesome-repositories.com/f/awesome-lists/ai/unified-3d-models/3d-file-importers/step-file-imports.md) — Loads 3D STEP files with automatic unit conversion to the target coordinate system. ([source](https://cadquery.readthedocs.io/en/latest/importexport.html))

### Business & Productivity Software

- [CAD File Importers and Exporters](https://awesome-repositories.com/f/business-productivity-software/cad-document-workflows/cad-file-importers-and-exporters.md) — Supports importing and exporting industry-standard CAD formats like STEP for interoperability with other engineering software. ([source](https://cadquery.readthedocs.io/en/latest/apireference.html))
- [Mechanical Assembly Systems](https://awesome-repositories.com/f/business-productivity-software/mechanical-assembly-systems.md) — Defines complex relationships and constraints between 3D parts to build mechanical assemblies.
- [CAD Document Workflows](https://awesome-repositories.com/f/business-productivity-software/cad-document-workflows.md) — Integrates geometry generation into software pipelines to batch produce 3D files and industry exports.

### Data & Databases

- [Profile Extrusions and Revolves](https://awesome-repositories.com/f/data-databases/sqlite-drivers/sqlite-storage-adapters/sqlite-or-postgresql-storage/profile-extrusions-and-revolves.md) — Generates 3D volumes by applying 2D sketches to workplanes through extrusion, revolving, or sweeping. ([source](https://cadquery.readthedocs.io/en/latest/sketch.html))
- [3D Model Part Splitting](https://awesome-repositories.com/f/data-databases/multi-part-upload-orchestration/3d-model-part-splitting.md) — Divides a 3D object into parts using a workplane to retain one or both halves. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))

### Programming Languages & Runtimes

- [Assembly Tree Organizers](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/hierarchical-tree-structures/hierarchical-tree-visualizers/assembly-tree-organizers.md) — Organizes individual parts and sub-assemblies into a hierarchical tree to create complex mechanical systems. ([source](https://cdn.jsdelivr.net/gh/cadquery/cadquery@master/README.md))
- [Script-Based Geometry Modeler](https://awesome-repositories.com/f/programming-languages-runtimes/script-based-geometry-modeler.md) — Provides a framework for transforming programmable Python scripts into precise three-dimensional solid representations. ([source](https://cadquery.readthedocs.io/en/latest/intro.html))
- [Object Tagging](https://awesome-repositories.com/f/programming-languages-runtimes/object-metadata-management/object-tagging.md) — Assigns string identifiers to geometric objects or workplanes for easy referencing in method chains. ([source](https://cadquery.readthedocs.io/en/latest/examples.html))

### Scientific & Mathematical Computing

- [Geometric Constraint Solvers](https://awesome-repositories.com/f/scientific-mathematical-computing/geometric-constraint-solvers.md) — Calculates precise component locations within assemblies by solving geometric relationships between points and axes.
- [Constructive Solid Geometry Operations](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/computational-geometry/geometric-operations/constructive-solid-geometry-operations.md) — Provides robust constructive solid geometry operations for merging, subtracting, and intersecting 3D solids. ([source](https://cadquery.readthedocs.io/en/latest/apireference.html))
- [Operation Chaining](https://awesome-repositories.com/f/scientific-mathematical-computing/operation-chaining.md) — Links multiple geometric operations in a sequence where each step transforms the model state. ([source](https://cadquery.readthedocs.io/en/latest/workplane.html))

### Software Engineering & Architecture

- [Object Assembly Management](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/object-assembly-management.md) — Manages the grouping of 3D objects into assemblies with defined locations, colors, and geometric constraints. ([source](https://cadquery.readthedocs.io/en/latest/_static/cadquery_cheatsheet.html))
- [CAD File Format Support](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/plugin-format-adapters/file-format-plugin-support/cad-file-format-support.md) — Ensures high-quality output by supporting industry-standard CAD file formats for engineering software. ([source](https://cdn.jsdelivr.net/gh/cadquery/cadquery@master/README.md))
- [CAD Capability Extensions](https://awesome-repositories.com/f/software-engineering-architecture/cad-capability-extensions.md) — Integrates external libraries and feature builders to add new parametric modeling functions to the system. ([source](https://cadquery.readthedocs.io/en/latest/designprinciples.html))
- [Fluent Configuration APIs](https://awesome-repositories.com/f/software-engineering-architecture/fluent-configuration-apis.md) — Provides a fluent API that allows linking multiple geometric commands in a readable sequence.
- [Geometric Operation History](https://awesome-repositories.com/f/software-engineering-architecture/geometric-operation-history.md) — Records a sequence of operations to allow referencing, querying, or modifying shapes generated in previous steps. ([source](https://cadquery.readthedocs.io/en/latest/free-func.html))
- [Geometric Primitives](https://awesome-repositories.com/f/software-engineering-architecture/object-oriented-models/graphics-primitives/geometric-primitives.md) — Generates fundamental 1D, 2D, and 3D geometric primitives to serve as modeling building blocks. ([source](https://cadquery.readthedocs.io/en/latest/free-func.html))
- [Mechanical Part Assemblies](https://awesome-repositories.com/f/software-engineering-architecture/reusable-component-architectures/mechanical-part-assemblies.md) — Defines parametric relationships between parts using point and axis constraints to automate component positioning. ([source](https://cadquery.readthedocs.io/en/latest/primer.html))
- [Geometric Constraint Solving](https://awesome-repositories.com/f/software-engineering-architecture/reusable-component-architectures/mechanical-part-assemblies/geometric-constraint-solving.md) — Calculates optimal object locations by solving systems of geometric relationships like points and axes. ([source](https://cadquery.readthedocs.io/en/latest/assy.html))

### Development Tools & Productivity

- [Geometric Operation Automation](https://awesome-repositories.com/f/development-tools-productivity/cli-workflow-automations/geometric-operation-automation.md) — Applies a single operation across all selected geometric elements in a stack to eliminate manual loops. ([source](https://cadquery.readthedocs.io/en/latest/workplane.html))
- [Geometric Plugin Development](https://awesome-repositories.com/f/development-tools-productivity/native-compilation/abi-compatible-compilers/plugin-creation/geometric-plugin-development.md) — Wraps complex geometry scripts into reusable functions that attach to main classes to enable method chaining. ([source](https://cadquery.readthedocs.io/en/latest/extending.html))

### User Interface & Experience

- [Sketch-Conditioned Generators](https://awesome-repositories.com/f/user-interface-experience/sketch-to-html-converters/sketch-conditioned-generators.md) — Generates new profiles by offsetting the edges of existing sketches, a key part of the parametric design process. ([source](https://cadquery.readthedocs.io/en/latest/sketch.html))
- [Logical Selection Combination](https://awesome-repositories.com/f/user-interface-experience/text-selection-control/regex-based-selection/selection-filtering/logical-selection-combination.md) — Groups multiple geometric filters using logical operators to refine the selection of specific model elements. ([source](https://cadquery.readthedocs.io/en/latest/selectors.html))
