Skip to main content
Version: Next

CADCompound

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

ComPoLyX Class to represent CADCompound.

Attributes

NameDescription
CADCompound.activeActive status of object
CADCompound.enabledWhether this object is currently enabled or not
CADCompound.idID of object
CADCompound.is_dict_itemSpecifies whether the object is an item of a dict
CADCompound.is_freeBoolean whether the shape is free or not
CADCompound.is_list_itemSpecifies whether the object is an item of a list
CADCompound.link_pathRoot path of the current node in the tree for links to this object
CADCompound.lockedLocked status of the CAD component
CADCompound.map_indexMap index of the shape
CADCompound.nameName of object
CADCompound.parentParent object in tree
CADCompound.pathReturns topology path of the CADComponent
CADCompound.root_pathRoot path of the current node in the tree
CADCompound.statusStatus of the object
CADCompound.status_changedBoolean flag which is set to true in C++ when up-to-date status of object changes
CADCompound.sub_shapesSub faces of the CAD compound
CADCompound.uidUID of object
CADCompound.vertexThrows an error if the object has been removed from the graph

Methods

NameDescription
CADCompound.find_parent(type)Steps up the tree and returns the first parent with given type
CADCompound.get_short_description()
CADCompound.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
CADCompound.serialize_name_and_id()Helper function to serialize name and ID
CADCompound.update()Update the CadComponent
CADCompound.visit(visitor)Walk through the tree and let the visitor perform an action on every descendant node