ModelComponent¶
- class py3dm.ModelComponent¶
Bases:
OpenNURBSObjectPython bindings for the openNURBS
ON_ModelComponentclass.ON_ModelComponent: base class for all components in a model and manages the index, uuid and other information common to all components in a model.- get_index() int¶
- get_index(index: int) int
Value of the runtime model component index attribute.
- Parameters:
index (int) – Value to return if the index has not been set.
ON_UNSET_INT_INDEXor indices of default components are often used for this parameter.
Notes
If the component is in a model, then the index is unique for all components of identical type in the model and is locked. If the index has not been set,
ON_UNSET_INT_INDEXis returned. Theget_index()value can change when saved in an archive (.3dm file). Use the get_uuid() when you need to reference model components in an archive.
- get_uuid() uuid.UUID¶
Value of the
ON_UUIDattribute.Notes
If the component is in a model, then the
ON_UUIDis unique for all components in the model and is locked.