IfcGeometryBuilder
Index
Properties
Accessors
Methods
Properties
publicreadonlygeometryBuildId
The ID of the geometry build.
publicreadonlyloaderElements
The loader elements to build geometries from.
publicstaticreadonlyoptions
Options to control for how long the geometry builder should execute before sleeping when performing heavy operations such as create and build. These options can be useful to avoid blocking the main thread for too long. Decreasing deadlineMs and sleepInMs will make the operations faster but will also increase the risk of blocking the main thread for too long. Increasing makes the main thread (UI) more responsive but the operations will take longer to complete.
Accessors
publicgeometryCount
The number of geometries that will be built when build is called.
Returns number
The number of geometries.
publicifcProductMeshCount
The number of IFC product meshes this builder will build geometries for.
Returns number
The number of meshes.
publicindiceCount
Gets the number of indices in the geometry. The number of triangles in the geometry is this number divided by 3.
Returns number
The total number of indices.
Methods
publicbuild
Builds Geometry3d instance from all BimProduct instances that was included during the call to create. This is a very CPU intensive operation.
Parameters
action: (eventData: GeometryBuilderBuildEventData) => void
The action to be invoked for each built Geometry3d instance. Call addOrReplaceMesh to add the geometry to the viewer. The
eventData
parameter contains both the current Geometry3d instance that was built and information such as the current progress of the build operation. See GeometryBuilderBuildEventData for more information.
Returns Promise<Geometry3dHandle[]>
A promise that resolves to an array of Geometry3dHandle objects. These can be used to unload the geometries from TwinfinityViewer by calling removeMesh.
publicstaticcreate
Creates an instance of IfcGeometryBuilder.
Parameters
o: IfcGeometryBuilderCreateOptions
The options for creating the geometry builder.
Returns Promise<IfcGeometryBuilder>
A promise that resolves to an instance of
IfcGeometryBuilder
.
Represents a builder for creating geometries from IFC product meshes.