VirtualGeometry
class compolyx.VirtualGeometry(graph, obj, parent=None)
ComPoLyX class to represent VirtualGeometry.
Attributes
| Name | Description |
|---|---|
VirtualGeometry.active | Active status of object |
VirtualGeometry.cad_geometry | Returns the linked CADGeometry |
VirtualGeometry.cad_references | Dictionary of all cad references |
VirtualGeometry.dimension | Highest dimension of all cad references |
VirtualGeometry.enabled | Whether this object is currently enabled or not |
VirtualGeometry.id | ID of object |
VirtualGeometry.is_dict_item | Specifies whether the object is an item of a dict |
VirtualGeometry.is_list_item | Specifies whether the object is an item of a list |
VirtualGeometry.link_path | Root path of the current node in the tree for links to this object |
VirtualGeometry.name | Name of object |
VirtualGeometry.parent | Parent object in tree |
VirtualGeometry.root_path | Root path of the current node in the tree |
VirtualGeometry.status | Status of the object |
VirtualGeometry.status_changed | Boolean flag which is set to true in C++ when up-to-date status of object changes |
VirtualGeometry.sub_shapes | Sub components of the VirtualGeometry |
VirtualGeometry.uid | UID of object |
VirtualGeometry.vertex | This will throw an error if the object has been removed from the graph |
Methods
| Name | Description |
|---|---|
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 |