Constructor
new ObjectAttributes()
Extends
Members
activeSpace
castsShadows :bool
- Description:
- Gets or sets an object's casts shadows property, or whether or not an object casts shadows on other objects and a ground plane.
Gets or sets an object's casts shadows property, or whether or not an object casts shadows on other objects and a ground plane.
Type:
- bool
colorSource :ObjectColorSource
- Description:
- The color used to display an object is specified in one of three ways. If ColorSource is ON::color_from_layer, then the object's layer ON_Layer::Color() is used. If ColorSource is ON::color_from_object, then value of m_color is used. If ColorSource is ON::color_from_material, then the diffuse color of the object's render material is used. See ON_3dmObjectAttributes::MaterialSource() to determine where to get the definition of the object's render material.
The color used to display an object is specified in one of three ways.
If ColorSource is ON::color_from_layer, then the object's layer ON_Layer::Color() is used.
If ColorSource is ON::color_from_object, then value of m_color is used.
If ColorSource is ON::color_from_material, then the diffuse color of the object's
render material is used. See ON_3dmObjectAttributes::MaterialSource() to
determine where to get the definition of the object's render material.
Type:
- ObjectColorSource
displayOrder :int
- Description:
- Display order used to force objects to be drawn on top or behind each other. Larger numbers draw on top of smaller numbers. 0 = draw object in standard depth buffered order<0 = draw object behind "normal" draw order objects>0 = draw object on top of "normal" draw order objects
Display order used to force objects to be drawn on top or behind each other.
Larger numbers draw on top of smaller numbers.
0 = draw object in standard depth buffered order<0 = draw object behind "normal" draw order objects>0 = draw object on top of "normal" draw order objects
Type:
- int
groupCount :int
- Description:
- number of groups object belongs to.
number of groups object belongs to.
Type:
- int
id
isInstanceDefinitionObject :bool
- Description:
- Use this query to determine if an object is part of an instance definition.
Use this query to determine if an object is part of an instance definition.
Type:
- bool
isValid :bool
- Description:
- Tests an object to see if it is valid.
- Inherited From:
Tests an object to see if it is valid.
Type:
- bool
layerIndex :int
- Description:
- Gets or sets an associated layer index. Layer definitions in an OpenNURBS model are stored in a layer table. The layer table is conceptually an array of ON_Layer classes. Every OpenNURBS object in a model is on some layer. The object's layer is specified by zero based indices into the ON_Layer array.
Gets or sets an associated layer index.
Layer definitions in an OpenNURBS model are stored in a layer table.
The layer table is conceptually an array of ON_Layer classes. Every
OpenNURBS object in a model is on some layer. The object's layer
is specified by zero based indices into the ON_Layer array.
Type:
- int
linetypeSource :ObjectLinetypeSource
- Description:
- The Linetype used to display an object is specified in one of two ways. If LinetypeSource is ON::linetype_from_layer, then the object's layer ON_Layer::Linetype() is used. If LinetypeSource is ON::linetype_from_object, then value of m_linetype is used.
The Linetype used to display an object is specified in one of two ways.
If LinetypeSource is ON::linetype_from_layer, then the object's layer ON_Layer::Linetype() is used.
If LinetypeSource is ON::linetype_from_object, then value of m_linetype is used.
Type:
- ObjectLinetypeSource
materialIndex :int
- Description:
- Gets or sets the material index. If you want something simple and fast, set the index of the rendering material.
Gets or sets the material index.
If you want something simple and fast, set the index of
the rendering material.
Type:
- int
materialSource :ObjectMaterialSource
- Description:
- Determines if the simple material should come from the object or from it's layer. High quality rendering plug-ins should use m_rendering_attributes.
Determines if the simple material should come from the object or from it's layer.
High quality rendering plug-ins should use m_rendering_attributes.
Type:
- ObjectMaterialSource
mode :ObjectMode
- Description:
- An object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.
An object must be in one of three modes: normal, locked or hidden.
If an object is in normal mode, then the object's layer controls visibility
and selectability. If an object is locked, then the object's layer controls
visibility by the object cannot be selected. If the object is hidden, it is
not visible and it cannot be selected.
Type:
- ObjectMode
name :string
- Description:
- Gets or sets an object optional text name. More than one object in a model can have the same name and some objects may have no name.
Gets or sets an object optional text name.
More than one object in a model can have the same name and
some objects may have no name.
Type:
- string
objectColor :System.Drawing.Color
- Description:
- If ON::color_from_object == ColorSource, then color is the object's display color.
If ON::color_from_object == ColorSource, then color is the object's display color.
Type:
- System.Drawing.Color
objectDecoration :ObjectDecoration
- Description:
- Used to indicate an object has a decoration (like an arrowhead on a curve)
Used to indicate an object has a decoration (like an arrowhead on a curve)
Type:
- ObjectDecoration
plotColor :System.Drawing.Color
- Description:
- If plot_color_from_object == PlotColorSource, then PlotColor is the object's plotting color.
If plot_color_from_object == PlotColorSource, then PlotColor is the object's plotting color.
Type:
- System.Drawing.Color
plotColorSource :ObjectPlotColorSource
- Description:
- The color used to plot an object on paper is specified in one of three ways. If PlotColorSource is ON::plot_color_from_layer, then the object's layer ON_Layer::PlotColor() is used. If PlotColorSource is ON::plot_color_from_object, then value of PlotColor() is used.
The color used to plot an object on paper is specified in one of three ways.
If PlotColorSource is ON::plot_color_from_layer, then the object's layer ON_Layer::PlotColor() is used.
If PlotColorSource is ON::plot_color_from_object, then value of PlotColor() is used.
Type:
- ObjectPlotColorSource
plotWeight :double
- Description:
- Plot weight in millimeters. =0.0 means use the default width <0.0 means don't plot (visible for screen display, but does not show on plot)
Plot weight in millimeters.
=0.0 means use the default width
<0.0 means don't plot (visible for screen display, but does not show on plot)
Type:
- double
plotWeightSource :ObjectPlotWeightSource
Type:
- ObjectPlotWeightSource
receivesShadows :bool
- Description:
- Gets or sets an object's receives shadows property, or whether or not an object receives shadows from other objects.
Gets or sets an object's receives shadows property, or whether or not an object receives shadows from other objects.
Type:
- bool
url :string
- Description:
- Objects may have an URL. There are no restrictions on what value this URL may have. As an example, if the object came from a commercial part library, the URL might point to the definition of that part.
Objects may have an URL. There are no restrictions on what value this
URL may have. As an example, if the object came from a commercial part
library, the URL might point to the definition of that part.
Type:
- string
userStringCount
- Inherited From:
viewportId :Guid
- Description:
- If ViewportId is nil, the object is active in all viewports. If ViewportId is not nil, then this object is only active in a specific view. This field is primarily used to assign page space objects to a specific page, but it can also be used to restrict model space to a specific view.
If ViewportId is nil, the object is active in all viewports. If ViewportId is not nil, then
this object is only active in a specific view. This field is primarily used to assign page
space objects to a specific page, but it can also be used to restrict model space to a
specific view.
Type:
- Guid
visible :bool
- Description:
- Gets or sets an object's visibility.
Gets or sets an object's visibility.
Type:
- bool
wireDensity :int
- Description:
- When a surface object is displayed in wireframe, this controls how many isoparametric wires are used. value number of isoparametric wires -1 boundary wires (off) 0 boundary and knot wires 1 boundary and knot wires and, if there are no interior knots, a single interior wire. N>=2 boundary and knot wires and (N+1) interior wires.
When a surface object is displayed in wireframe, this controls
how many isoparametric wires are used.
value number of isoparametric wires
-1 boundary wires (off)
0 boundary and knot wires
1 boundary and knot wires and, if there are no interior knots, a single interior wire.
N>=2 boundary and knot wires and (N+1) interior wires.
Type:
- int
Methods
addToGroup(groupIndex)
- Description:
- Adds object to the group with specified index by appending index to group list. If the object is already in group, nothing is changed.
Parameters:
Name | Type | Description |
---|---|---|
groupIndex |
int | The index that will be added. |
decals()
- Description:
- ...
drawColor()
- Description:
- ...
encode()
- Description:
- ...
- Inherited From:
getGroupList() → {Array.<int>}
- Description:
- Returns an array of GroupCount group indices. If GroupCount is zero, then GetGroupList() returns null.
Returns:
An array of group indices. null might be returned in place of an empty array.
- Type
- Array.<int>
getUserString()
- Description:
- ...
- Inherited From:
getUserStrings()
- Description:
- ...
- Inherited From:
hasDisplayModeOverride(viewportId) → {bool}
- Description:
- Determines if an object has a display mode override for a given viewport.
Parameters:
Name | Type | Description |
---|---|---|
viewportId |
Guid | Id of a Rhino Viewport. |
Returns:
true if the object has a display mode override for the viewport; otherwise, false.
- Type
- bool
meshModifiers()
- Description:
- ...
rdkXml()
- Description:
- ...
- Inherited From:
removeFromAllGroups()
- Description:
- Removes object from all groups.
removeFromGroup(groupIndex)
- Description:
- removes object from the group with specified index. If the object is not in the group, nothing is changed.
Parameters:
Name | Type | Description |
---|---|---|
groupIndex |
int | The index that will be removed. |
setUserString()
- Description:
- ...
- Inherited From:
toJSON()
- Description:
- Create a JSON string representation of this object
- Inherited From:
transform(xform) → {bool}
- Description:
- Apply a transformation.
Parameters:
Name | Type | Description |
---|---|---|
xform |
Transform | The transformation. |
Returns:
true if successful, false otherwise.
- Type
- bool