Geometry tree#

The geometry tree object and its methods are used to define and modify the Motor-CAD Adaptive Templates geometry using PyMotorCAD. Geometry trees were introduced in Motor-CAD v2026R1 and are not compatible with earlier versions of Motor-CAD. In earlier versions of Motor-CAD, you should use the geometry objects and functions under Geometry objects and functions.

More information on Adaptive Templates is available in the User guide under Motor-CAD adaptive templates scripting.

API reference for the Motor-CAD methods used for getting and setting the geometry tree is available under Adaptive Geometry.

Geometry tree objects#

GeometryTree([mc, create_root_node])

Class used to build geometry trees.

TreeRegion(tree, region_type[, ...])

Subclass of Region used for entries in GeometryTree.

TreeRegionMagnet(tree[, motorcad_instance])

Class for magnets in tree.