Class ThreeMfDocumentBuilder
Constructors
constructor
-
Returns ThreeMfDocumentBuilder
Methods
build
-
Validates and returns the document that has been built. A default relationship pointing at the model part is generated when none was provided.
Returns I3mfDocument
The built 3MF document.
with Content Type
-
Declares an OPC content type. Duplicate declarations are ignored.
Parameters
- type: I3mfContentType
The extension to content type mapping to declare.
Returns ThreeMfDocumentBuilder
This builder, to allow chaining.
- type: I3mfContentType
with Model
-
Sets the model part of the document and ensures the model content type is declared.
Parameters
- m: I3mfModel | ThreeMfModelBuilder
The model resource, or a builder that produces one.
Returns ThreeMfDocumentBuilder
This builder, to allow chaining.
- m: I3mfModel | ThreeMfModelBuilder
with Relationship
-
Adds an OPC relationship and ensures the relationships content type is declared. Relationships with an already registered id are ignored.
Parameters
- rel: I3mfRelationship
The relationship to add.
Returns ThreeMfDocumentBuilder
This builder, to allow chaining.
- rel: I3mfRelationship
Fluent builder for a 3MF document, the OPC package that wraps the model. It gathers the content types, the relationships and the model part.