Layer¶
- class py3dm.Layer¶
Bases:
ModelComponentPython bindings for the openNURBS
ON_Layerclass.- get_name() str¶
Returns the value of the name attribute.
Notes
If the component is in a model, then the name is unique among all components in the model. Names are formatted as reference : parent::leaf. For example in
A.3dm : Z,A.3dmis the reference andZis the leaf. For a layer full pathX::Y::Z,X::Yis the parent andZis the leaf. For most models, only the leaf is present in the name. The reference portion appears when a model component originates in a reference file (a linked instance definition with reference component names or a worksession reference). Components with a tree hierarchy, like layers, can have a parent and leaf.
- set_name(name: str) bool¶
Returns
Trueif the name attribute was changed tonameor is already equal toname; returnsFalseand no changes are made if the name attribute is locked andname !=locked value ornameis not empty andON_ModelComponent::IsValidComponentName(name)isFalse.Notes
Leading and trailing non-zero unicode code points with values lower than equal
ON_wString::Spaceare ignored. Ifnameis the empty string, thename_is_statestate will still beTrue.