Skip to main content
Version: 2026R1

VirtualGeometry

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

ComPoLyX class to represent VirtualGeometry.

Attributes

NameDescription
VirtualGeometry.activeActive status of object
VirtualGeometry.cad_geometryReturns the linked CADGeometry
VirtualGeometry.cad_referencesDictionary of all cad references
VirtualGeometry.dimensionHighest dimension of all cad references
VirtualGeometry.enabledWhether this object is currently enabled or not
VirtualGeometry.idID of object
VirtualGeometry.is_dict_itemSpecifies whether the object is an item of a dict
VirtualGeometry.is_list_itemSpecifies whether the object is an item of a list
VirtualGeometry.link_pathRoot path of the current node in the tree for links to this object
VirtualGeometry.nameName of object
VirtualGeometry.parentParent object in tree
VirtualGeometry.root_pathRoot path of the current node in the tree
VirtualGeometry.statusStatus of the object
VirtualGeometry.status_changedBoolean flag which is set to true in C++ when up-to-date status of object changes
VirtualGeometry.sub_shapesSub components of the VirtualGeometry
VirtualGeometry.uidUID of object
VirtualGeometry.vertexThis will throw an error if the object has been removed from the graph

Methods

NameDescription
VirtualGeometry.add(shape)Creates a new CADReference object for the given shape
VirtualGeometry.clear_cad_references()Clear all linked references (VirtualGeometry becomes empty)
VirtualGeometry.create_cad_reference([name, ...])Creates a new CAD reference and links it with the virtual geometry
VirtualGeometry.find_parent(type)Function steps up the tree and returns the first parent with given type
VirtualGeometry.get_short_description()
VirtualGeometry.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
VirtualGeometry.remove(shape)Removes the CADReference object for the given shape
VirtualGeometry.serialize()Serialize to Python string
VirtualGeometry.serialize_name_and_id()Helper function to serialize name and ID
VirtualGeometry.set(shapes)Clears the existing CAD References and creates a new one for each given shape
VirtualGeometry.update()
VirtualGeometry.visit(visitor)Walk through the tree and let the visitor perform action on every descendant node