Class ThreeMfComponentsBuilder
Hierarchy (View Summary)
- ThreeMfObjectBuilder
- ThreeMfComponentsBuilder
Constructors
constructor
-
Creates a new components object builder.
Parameters
- id: number
The unique resource id of the object within the model.
- type: ST_ObjectType = ST_ObjectType.model
The 3MF object type. Defaults to
ST_ObjectType.model.
Returns ThreeMfComponentsBuilder
- id: number
Methods
build
reset
-
Discards the current object and starts building a new one.
Parameters
- id: number
The unique resource id of the new object.
- type: ST_ObjectType
The 3MF object type of the new object.
Returns void
- id: number
with Component
-
Adds a component referencing another object resource.
Parameters
- id: number
The resource id of the referenced object.
Optionalt: Matrix3dThe optional transform applied to the referenced object.
Returns ThreeMfComponentsBuilder
This builder, to allow chaining.
- id: number
with Name
-
Sets the human readable name of the object.
Parameters
- name: string
The name to assign to the object.
Returns ThreeMfObjectBuilder
This builder, to allow chaining.
- name: string
with Property
-
Assigns the property resource used by the object.
Parameters
- id: number
The resource id of the property group (for example a base materials group).
- index: number = 0
The zero based index of the property within the group. Defaults to 0.
Returns ThreeMfObjectBuilder
This builder, to allow chaining.
- id: number
with Thumbnail
-
Sets the thumbnail of the object.
Parameters
- thumbnail: string
The package relative path of the thumbnail part.
Returns ThreeMfObjectBuilder
This builder, to allow chaining.
- thumbnail: string
Fluent builder for a 3MF object made of components. A components object references other objects instead of defining its own geometry.