Skip to content


Subversion checkout URL

You can clone with
Download ZIP
CadQuery-- a parametric cad script framework
Python HTML
Latest commit 4c1a91b @jmwright jmwright Merge pull request #125 from dcowden/v3updates
Made changes in preparation for the release of v0.3.0.
Failed to load latest commit information.
cadquery.egg-info Made changes in preparation for the release of v0.3.0.
cadquery Made changes in preparation for the release of v0.3.0.
doc Moved cheatsheet out of Sphinx documentation directory.
examples/FreeCAD Added toFreecad function and modified the examples to use it. Also cl…
tests Removed incorrectly used hash function from Vector and commented out …
.coverage Added a few more test cases for
.gitignore ignore cadquery.egg-info
.travis.yml Trying to get Travis CI to ignore the pythonocc branch Update
LICENSE Updated copyright dates and fixed a few docstring errors.
MANIFEST Fixed copyright dates, added the STEP file importer, and added the su… make pip installer Made changes in preparation for the release of v0.3.0.
README.txt Made changes in preparation for the release of v0.3.0. Made changes in preparation for the release of v0.3.0.
registering.txt added missing rst files. published 0.1.7
requirements.txt initial try at the layout Fixed copyright dates, added the STEP file importer, and added the su…
setup.cfg initial try at the layout Made changes in preparation for the release of v0.3.0.

What is a CadQuery?

Travis Build Status Coverage Status GitHub version License

CadQuery is an intuitive, easy-to-use python based language for building parametric 3D CAD models. CadQuery is for 3D CAD what jQuery is for javascript. Imagine selecting Faces of a 3d object the same way you select DOM objects with JQuery!

CadQuery has several goals:

  • Build models with scripts that are as close as possible to how you'd describe the object to a human.
  • Create parametric models that can be very easily customized by end users
  • Output high quality CAD formats like STEP and AMF in addition to traditional STL
  • Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser

Using CadQuery, you can write short, simple scripts that produce high quality CAD models. It is easy to make many different objects using a single script that can be customized.

Getting Started With CadQuery

The easiest way to get started with CadQuery is to Install FreeCAD (version 14+) (, and then to use our great CadQuery-FreeCAD plugin here:

It includes the latest version of cadquery alreadby bundled, and has super-easy installation on Mac, Windows, and Unix.

It has tons of awesome features like integration with FreeCAD so you can see your objects, code-autocompletion, an examples bundle, and script saving/loading. Its definitely the best way to kick the tires!

We also have a Google Group to make it easy to get help from other CadQuery users. Please join the group and introduce yourself, and we would also love to hear what you are doing with CadQuery.!forum/cadquery

Why CadQuery instead of OpenSCAD?

CadQuery is based on OpenCasCade. CadQuery shares many features with OpenSCAD, another open source, script based, parametric model generator.

The primary advantage of OpenSCAD is the large number of already existing model libaries that exist already. So why not simply use OpenSCAD?

CadQuery scripts have several key advantages over OpenSCAD:

  1. The scripts use a standard programming language, python, and thus can benefit from the associated infrastructure. This includes many standard libraries and IDEs

  2. More powerful CAD kernel OpenCascade is much more powerful than CGAL. Features supported natively by OCC include NURBS, splines, surface sewing, STL repair, STEP import/export, and other complex operations, in addition to the standard CSG operations supported by CGAL

  3. Ability to import/export STEP We think the ability to begin with a STEP model, created in a CAD package, and then add parametric features is key. This is possible in OpenSCAD using STL, but STL is a lossy format

  4. Less Code and easier scripting CadQuery scripts require less code to create most objects, because it is possible to locate features based on the position of other features, workplanes, vertices, etc.

  5. Better Performance CadQuery scripts can build STL, STEP, and AMF faster than OpenSCAD.


CadQuery is licensed under the terms of the LGPLv3.

Where is the GUI?

If you would like IDE support, you can use CadQuery inside of FreeCAD. There's an excellent plugin module here

CadQuery also provides the backbone of, so the easiest way to see it in action is to review the samples and objects there.

Installing -- FreeStanding Installation

Use these steps if you would like to write CadQuery scripts as a python API. In this case, FreeCAD is used only as a CAD kernel.

  1. install FreeCAD, version 0.12 or greater for your platform.

  2. adjust your path if necessary. FreeCAD bundles a python interpreter, but you'll probably want to use your own, preferably one that has virtualenv available. To use FreeCAD from any python interpreter, just append the FreeCAD lib directory to your path. On (*Nix)::

    import sys

    or on Windows::

    import sys

    NOTE FreeCAD on Windows will not work with python 2.7-- you must use pthon 2.6.X!!!!

  3. install cadquery::

    pip install cadquery
  4. test your installation::

    from cadquery import *
    box = Workplane("XY").box(1,2,3)

You're up and running!

Installing -- Using CadQuery from Inside FreeCAD

Use the Excellent CadQuery-FreeCAD plugin here:

It includes a distribution of the latest version of cadquery.

Where does the name CadQuery come from?

CadQuery is inspired by ( jQuery <>_ ), a popular framework that revolutionized web development involving javascript.

If you are familiar with how jQuery, you will probably recognize several jQuery features that CadQuery uses:

  • A fluent api to create clean, easy to read code
  • Language features that make selection and iteration incredibly easy *
  • Ability to use the library along side other python libraries
  • Clear and complete documentation, with plenty of samples.
Something went wrong with that request. Please try again.