BuildingSession.
Import
Example
Notes
- Start the geometry kernel first.
- The
rootof the result is already a child of the parent that you give. elementsByIdgives the element for an id in the model.sourceByLiveIdgives the model id for a live element.- Read
warningsafter the build. - A door, a window or a hole that does not fit on its wall at its saved
offsetis drawn there without a hole. The build does not change the model. It gives the warningopening-does-not-fit: itsopeningFitgives the offsets where the opening fits and the nearest one. Move the opening to such an offset to remove the warning. - Call
disposeBuildResultwhen you replace or remove the build. - Give the content of external assets in
assetSources. The function does not download them.
Signature
Parameters
BuildingModel
required
THREE.Object3D
required
BuildOptions
Default:
{}.Returns
disposeBuildResult
Release a completed build after replacing it or closing its owner.BmBuildError
Types
BuildOptions
boolean
Skip revalidation for a document already checked this tick.
boolean
Stamp
storeyId/buildingId onto every element’s propertySet. Default true.Record<string, string | OpenElementDefinition>
.op sources for the document’s external-op assets, keyed by their uri, as either a raw
buffer or an already-parsed definition. Fetching is the CALLER’s pre-step so this function stays
synchronous — the same split .opbase uses (OPBaseOptions.assetSources). An embedded-op asset
needs nothing here.Readonly<Record<string, BmColor>>
The colour of a mass part by its use,
#rrggbb by use name, used for a part when neither it nor
its mass has a color. Replaces MASS_COLORS_BY_USE whole; a use it does not list takes
#a0b8c8. Pass it where the project is opened (ProjectManager build) so that the live build,
the plan drawings and the sheets take the same colours.BuildResult
THREE.Group
required
One group per build, already added to the parent, at identity — elements are in world coordinates.
Map<string, OPElement>
required
BuildingModel id -> live element, so a caller can edit without re-parsing the document.
Map<string, CompiledModelObject>
required
Saved basic geometry, kept separate from BIM elements and their exporter contract.
Map<string, BuildingSourceRef>
required
Live element ID -> authored BuildingModel identity and feature.
Map<string, THREE.Group>
required
Map<string, WallNetwork>
required
BmIssue[]
required
BuildingModelSpatialStructure
required
CompiledModelObject
Extend this discriminated union alongside BmModelObject.BuildingModelSpatialStructure
The non-geometric ownership context returned by a BuildingModel build.CompiledLineObject
A compiled line and its authored ownership, kept separate from BIM elements. The package does not export this type by name.'line'
required
string
required
string
required
string
required
string
required
Vec3
required
Vec3
required
string
Saved #rrggbb stroke, independent of the live THREE material.
LinePrimitive
required