Sensor
Last update: 16.07.2026class compolyx.Sensor(graph, obj, parent=None)
Sensor object for measuring areas, prices, weights, and centers of gravity.
Attributes
| Name | Description |
|---|---|
Sensor.active |
Whether the sensor is computed on update or not. |
Sensor.area |
Area covered by all Entities of the Sensor. |
Sensor.center_of_gravity |
Center of Gravity over all Entities of the Sensor. |
Sensor.enabled |
Indicates whether the object is enabled. |
Sensor.entities |
Entities of the Sensor. |
Sensor.id |
ID of the object. |
Sensor.is_dict_item |
Indicates whether the object is an item in a dictionary. |
Sensor.is_list_item |
Indicates whether the object is an item of a list. |
Sensor.link_path |
Root path of the current node in the tree for links to this object. |
Sensor.locked |
Sensor cut was imported and cannot be changed. |
Sensor.modeling_ply_area |
Cumulated area of all modeling-plies involved. |
Sensor.name |
Name of the object. |
Sensor.parent |
Parent object in the tree. |
Sensor.price |
Price over all Entities of the Sensor. |
Sensor.production_ply_area |
Cumulated area of all production-plies involved. |
Sensor.root_path |
Root path of the current node in the tree. |
Sensor.sensor_type |
Sensor type. |
Sensor.status |
Status of the object. |
Sensor.status_changed |
Boolean flag which is set to true in C++ when up-to-date status of object changes. |
Sensor.uid |
UID of the object. |
Sensor.vertex |
Raises an error if the object has been removed from the graph. |
Sensor.weight |
Weight over all Entities of the Sensor. |
Methods
| Name | Description |
|---|---|
Sensor.add_entity(entity) |
Add entity to sensor. |
Sensor.clear_entities() |
Clear all entities of this sensor. |
Sensor.find_parent(type) |
Steps up the tree and returns the first parent with given type. |
Sensor.obj_exists() |
Checks if __obj still references the c++ object (has not been reset to None by self._delete) and exists in the graph. |
Sensor.remove_entity(entity) |
Remove entity from sensor. |
Sensor.serialize() |
|
Sensor.serialize_name_and_id() |
Serializes the name and ID. |
Sensor.update() |
|
Sensor.visit(visitor) |
Walk through the tree and let the visitor perform action on every descendant node. |