Defines a leaf node in the scene graph hierarchy.
A part corresponds to mechanical part or a product in the product structure hierarchy.
new Part(
name?):Part
Name of the model element.
string | null
Part
material:
VisualMaterial|null=null
The model element material. null if the element has no material (by default).
get bodies():
ReadonlySet<Body>
Returns a set of added bodies.
ReadonlySet<Body>
get id():
bigint
Returns object id.
bigint
get name():
string|null
Returns name of the model element. null if the element has no name (by default).
string | null
set name(
name):void
Sets name of the model element.
Name of the model element.
string | null
void
get numberOfBodies():
number
Returns number of child bodies.
Deprecated. Use bodies.size instead.
number
get uuid():
`${string}-${string}-${string}-${string}-${string}`|null
Returns uuid of the model element. null if the element has no assigned uuid (by default).
`${string}-${string}-${string}-${string}-${string}` | null
set uuid(
uuid):void
Sets uui of the model element.
Uuid of the model element.
`${string}-${string}-${string}-${string}-${string}` | null
void
accept(
visitor):void
Accepts an element visitor.
The order of visiting depends on the type of this object:
true then visits the referred element. Then leaves the instance calling visitInstanceLeave().true then visits all the assembly children. Then leaves the assembly calling visitAssemblyLeave().Accepted visitor.
void
addBody(
body):void
Adds a new body to the part. If the body already presents in this object children, it won't be added.
Added body.
void