Skip to main content
Version: 2026R1

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

NameDescription
ElementSet.activeActive status of object
ElementSet.boundariesGet the boundaries of the element set
ElementSet.element_labels
ElementSet.enabledWhether this object is currently enabled or not
ElementSet.idID of object
ElementSet.is_dict_itemSpecifies whether the object is an item of a dict
ElementSet.is_list_itemSpecifies whether the object is an item of a list
ElementSet.link_pathRoot path of the current node in the tree for links to this object
ElementSet.lockedElement Set is imported and cannot be changed
ElementSet.middle_offsetMiddle offset flag
ElementSet.nameName of object
ElementSet.normalsGet the normals of the element set
ElementSet.orientableTrue if the element set has an orientable topology
ElementSet.parentParent object in tree
ElementSet.planarTrue if the element set has a planar topology
ElementSet.root_pathRoot path of the current node in the tree
ElementSet.sizeNumber of entities
ElementSet.statusStatus of the object
ElementSet.status_changedBoolean flag which is set to true in C++ when up-to-date status of object changes
ElementSet.uidUID of object
ElementSet.vertexThrows an error if the object has been removed from the graph

Methods

NameDescription
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