ElementSet
class compolyx.ElementSet(graph, obj=None, parent=None)
Element set class.
- Exemplary usage:
>>> m=db.models.values()[-1]
>>> eset=m.element_sets['DECK']
>>> eset.modify(op='none')
>>> eset.modify(op='new', element_labels=[1,2,3,4])
>>> eset.modify(op='add', element_sets=[ m.element_sets['Deck_layup-1'] ])
>>> eset.modify(op='intersect', x=[-6.5,-5.5])
Attributes
| Name | Description |
|---|---|
ElementSet.active | Active status of object |
ElementSet.boundaries | Get the boundaries of the element set |
ElementSet.element_labels | |
ElementSet.enabled | Whether this object is currently enabled or not |
ElementSet.id | ID of object |
ElementSet.is_dict_item | Specifies whether the object is an item of a dict |
ElementSet.is_list_item | Specifies whether the object is an item of a list |
ElementSet.link_path | Root path of the current node in the tree for links to this object |
ElementSet.locked | Element Set is imported and cannot be changed |
ElementSet.middle_offset | Middle offset flag |
ElementSet.name | Name of object |
ElementSet.normals | Get the normals of the element set |
ElementSet.orientable | True if the element set has an orientable topology |
ElementSet.parent | Parent object in tree |
ElementSet.planar | True if the element set has a planar topology |
ElementSet.root_path | Root path of the current node in the tree |
ElementSet.size | Number of entities |
ElementSet.status | Status of the object |
ElementSet.status_changed | Boolean flag which is set to true in C++ when up-to-date status of object changes |
ElementSet.uid | UID of object |
ElementSet.vertex | Throws an error if the object has been removed from the graph |
Methods
| Name | Description |
|---|---|
ElementSet.add(entity) | Add entity to the set |
ElementSet.clear() | |
ElementSet.find_parent(type) | Steps up the tree and returns the first parent with given type |
ElementSet.get_short_description() | |
ElementSet.modify([op, element_labels, ...]) | General method to modify the elements in an element set |
ElementSet.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 |
ElementSet.partition() | Partitions this ElementSet into new ElementSets with an orientable topology |
ElementSet.remove(entity) | Remove entity from the set |
ElementSet.serialize() | Serialize to Python string |
ElementSet.serialize_name_and_id() | Helper function to serialize name and ID |
ElementSet.update() | |
ElementSet.visit(visitor) | Walk through the tree and let the visitor perform action on every descendant node |
ElementSet.write_boundaries(filename[, format]) | Write boundaries in .iges/.step format |