ObjectAttributes

class py3dm.ObjectAttributes

Bases: OpenNURBSObject

Python bindings for the openNURBS ON_3dmObjectAttributes class.

ON_3dmObjectAttributes: Top level OpenNURBS objects have geometry and attributes. The geometry is stored in some class derived from ON_Geometry and the attributes are stored in an ON_3dmObjectAttributes class. Examples of attributes are object name, object id, display attributes, group membership, layer membership, and so on.

__eq__(other: object) bool
__ne__(other: object) bool
color: tuple[int, int, int, int]
layer_index: int
line_type_index: int
material_index: int
plot_color: tuple[int, int, int, int]
property color_source: ObjectColorSource
property is_visible: bool
property mode: ObjectMode
property plot_color_source: PlotColorSource
default() None

Initializes all attributes to the default values.

get_name() str

From ON_3dmObjectAttributes:

The m_name member is public to avoid breaking the SDK. Use set_name and get_name for proper validation. OpenNURBS object have optional text names. More than one object in a model can have the same name and some objects may have no name.

set_name(name: str, fix_invalid_name: bool = False) bool

From ON_3dmObjectAttributes:

The m_name member is public to avoid breaking the SDK. Use set_name and get_name for proper validation. OpenNURBS object have optional text names. More than one object in a model can have the same name and some objects may have no name.