Skip to main content
Version: 2026R2

CADReference

class compolyx.CADReference(graph, obj, parent=None)

ComPoLyX Class to represent CAD Reference.

Attributes

NameDescription
CADReference.activeActive status of object
CADReference.bounding_box_maxMaximum of the bounding box
CADReference.bounding_box_minMinimum of the bounding box
CADReference.cogCenter of gravity of the linked shape
CADReference.dimensionDimension of the linked shape (1 for lines, 2 for surfaces and 3 for solids)
CADReference.enabledWhether this object is currently enabled or not
CADReference.idID of object
CADReference.is_dict_itemSpecifies whether the object is an item of a dict
CADReference.is_list_itemSpecifies whether the object is an item of a list
CADReference.link_pathRoot path of the current node in the tree for links to this object
CADReference.nameName of object
CADReference.parentParent object in tree
CADReference.pathPath to the linked CAD component
CADReference.root_pathRoot path of the current node in the tree
CADReference.sizeSize of the linked cad shape
CADReference.statusStatus of the CADReference
CADReference.status_changedBoolean flag which is set to true in C++ when up-to-date status of object changes
CADReference.uidUID of object
CADReference.vertexThrows an error if the object has been removed from the graph

Methods

NameDescription
CADReference.find_parent(type)Steps up the tree and returns the first parent with given type
CADReference.get_short_description()
CADReference.obj_exists()Checks if __obj still references the C++ object (i.e. has not been reset to None by self._delete) and exists in the graph
CADReference.serialize()
CADReference.serialize_name_and_id()Helper function to serialize name and ID
CADReference.update()
CADReference.visit(visitor)Walk through the tree and let the visitor perform an action on every descendant node