CadQuery Scripts and Object OutputΒΆ

CadQuery scripts are pure python scripts, that may follow a few conventions.

If you are using cadquery as a library, there are no constraints.

If you are using cadquery scripts inside of a cadquery execution environment, like The CadQuery Freecad Module or parametricParts.com, there are a few conventions you need to be aware of:

  • cadquery is already imported as ‘cq’
  • to return an object to the container, you need to call the build_object() method.

Each script generally has three sections:

  • Variable Assignments and metadata definitions
  • cadquery and other python code
  • object exports, via the export_object() function

see the The CadQuery Gateway Interface section for more details.