API

Class ThreeMfModelBuilder

Fluent builder for a 3MF model, the root part of a 3MF document. It aggregates the resources (materials, meshes and components) and the build items that reference them.

Index
_model: ThreeMfModel = ...

The 3MF model currently being built.

_objects: Map<string, I3mfObject> = ...

The object resources added to the model, indexed by resource id.

KnownMetaSet: Set<string> = ...

The lower cased set of the metadata names defined by the 3MF specification.

  • Adds a metadata entry to the model.

    Parameters

    • name: string

      The metadata name. Names outside of the 3MF specification must be namespace qualified.

    • value: string

      The metadata value.

    • Optionalpreserve: boolean

      Whether consumers must preserve this entry when editing the document.

    • Optionaltype: string

      The XML schema type of the value. Defaults to xs:string.

    Returns ThreeMfModelBuilder

    This builder, to allow chaining.