Handles Geometry data extraction from a populated IfcStepModel Can export to OBJ, GLTF (Draco), GLB (Draco)

Constructors

Properties

Methods

applyRelVoidToRepresentation arrayToSharedHeap arrayToWasmHeap convertPrefix createParamsGetBooleanResultPool createParamsGetPolyCurvePool createParamsGetTriangulatedFaceSetPool createParamsTransformProfilePool destroy dropAllNativeIndexedPolygonalFaceVector dropNonSceneGeometry dumpGeometry extractAdvancedFace extractAxis1Placement3D extractAxis2Placement2D extractAxis2Placement3D extractAxis2Placement3DRelVoid extractBooleanOperand extractBooleanResult extractBSplineCurve extractBSplineSurface extractBSplineSurfaceWithKnots extractCartesianTransformOperator2D extractCartesianTransformOperator3D extractCircleCurve extractCircleHollowHoleCurve extractCompositeCurve extractConnectedFaceSets extractCShapeCurve extractCurve extractCylindricalSurface extractEllipseProfileCurve extractExtrudedAreaSolid extractFace extractFaces extractHalfspaceSolid extractIfcAdvancedBrep extractIfcCircle extractIfcEllipse extractIfcFaceBasedSurfaceModel extractIfcFacetedBrep extractIFCGeometryData extractIfcLine extractIfcPolyline extractIfcShellBasedSurfaceModel extractIfcTrimmedCurve extractIndexedPolyCurve extractIShapeCurve extractLinearScalingFactor extractLShapeCurve extractMappedItem extractMaterial extractMaterialStyle extractPlacement extractPlane extractPointList3D extractPointListList3D extractPolygonalBoundedHalfSpace extractProfile extractRationalBSplineSurfaceWithKnots extractRectangleCurve extractRectangleHollowHoleCurve extractRelVoids extractRepresentationItem extractStyledItem extractSurface extractSurfaceOfLinearExtrusion extractSurfaceOfRevolution extractSurfaceStyle extractSweptDiskSolid extractToDoubleVector extractToDoubleVectorVector extractTShapeCurve extractUShapeCurve extractZShapeCurve flattenCartesianPointsToFloat64ArrayFiltered flattenCartesianPointsToWasmFiltered flattenPointsToFloat64Array freeNativeIndexedPolygonalFaceVector getIfcProjectName getLinearScalingFactor getWasmModule initializeMemoryPools isInitialized nativeBound3DVector nativeIndexedPolygonalFaceVector nativeSegmentVector nativeUintVector nativeULongVector nativeVectorCurve nativeVectorGeometry nativeVectorGeometryCollection nativeVectorGlmdVec2 nativeVectorGlmdVec3 nativeVectorGlmVec2 nativeVectorGlmVec3 nativeVectorProfile nativeVectorVectorGlmdVec3 notPresent populateMaterialDefinitionsMap populateRelVoidsMap populateStyledItemsMap extractDirection

Constructors

Properties

csgOperations: CsgMemoization
curves: default
materials: IfcMaterialCache
model: default
pointBuffer: null | FlattenedPointsResult = null
voidMaterials: IfcMaterialCache
voidScene: IfcSceneBuilder

Methods

  • Parameters

    • from: IfcRepresentationItem
    • relVoidMeshVector: NativeVectorGeometry
    • owningElementLocalID: number
    • relVoidLocalIDs: number[]
    • OptionalmaterialOverrideId: number
    • isSpace: boolean = false

    Returns void

  • Parameters

    • array: Uint32Array | Float32Array | Float64Array

    Returns Uint8Array

  • Parameters

    • array: Uint32Array | Float32Array | Float64Array

    Returns any

    Pointer/memory address

  • Creates a memory pool for ParamsGetBooleanResult objects if it does not exist.

    Returns void

  • Creates a memory pool for ParamsGetTriangulatedFaceSet objects if it does not exist.

    Returns void

  • Creates a memory pool for ParamsTransformProfile objects if it does not exist.

    Returns void

  • Drop geometry that isn't in the scene.

    Parameters

    • localID: number

      The id of the mesh to drop.

    Returns void

  • Parameters

    • outputFilePath: string
    • geometry: GeometryObject

    Returns void

  • Extract an advanced (NURBS) b-rep face.

    Parameters

    • from: IfcAdvancedFace
    • geometry: GeometryObject

    Returns void

  • Extract a placement, adding it to the scene.

    Parameters

    • from: IfcAxis1Placement

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    Returns void

  • Extract a placement (no memoization/scene creation)

    Parameters

    • from: IfcAxis1Placement

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    • extractOnly: true

      {true} Only extract, don't memoize and add to the scene

    Returns ParamsAxis1Placement3D

    The extracted placement.

  • Extract an axis placement 2D native object.

    Parameters

    • from: IfcAxis2Placement2D

      The axis 2 placement to extract.

    Returns any

    The native placement transform.

  • Extract a placement, adding it to the scene.

    Parameters

    • from: IfcAxis2Placement3D

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    Returns void

  • Extract a placement (no memoization/scene creation)

    Parameters

    • from: IfcAxis2Placement3D

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    • extractOnly: true

      {true} Only extract, don't memoize and add to the scene

    Returns ParamsAxis2Placement3D

    The extracted placement.

  • Extract a placement, adding it to the scene.

    Parameters

    • from: IfcAxis2Placement3D

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    Returns void

  • Extract a placement (no memoization/scene creation)

    Parameters

    • from: IfcAxis2Placement3D

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    • extractOnly: true

      {true} Only extract, don't memoize and add to the scene

    Returns ParamsAxis2Placement3D

    The extracted placement.

  • Extract a boolean operand from a boolean result.

    Parameters

    • from:
          | IfcBooleanResult
          | IfcHalfSpaceSolid
          | IfcBooleanClippingResult
          | IfcExtrudedAreaSolid
          | IfcFacetedBrep
          | IfcPolygonalFaceSet

      The operand to extract.

    • isRelVoid: boolean = false
    • OptionalrepresentationItem: IfcRepresentationItem
    • isSecondOperand: boolean = false

    Returns void

  • Accepts IfcBooleanResult and IfcBooleanClippingResult

    Parameters

    • from: IfcBooleanResult | IfcBooleanClippingResult
    • isRelVoid: boolean = false

    Returns void

  • Exctact a BSpline Curve

    Parameters

    • from: IfcBSplineCurve

      The bspline curve, potentially with knots/rational.

    • parentSense: boolean = true
    • isEdge: boolean = false

    Returns CurveObject

    The constructed curve object.

  • Extract a bspline surface

    Parameters

    • from: IfcBSplineSurface

      The bspline surface to extract

    Returns BSplineSurface

  • Extract a bspline surface

    Parameters

    • from: IfcBSplineSurfaceWithKnots

      The bspline surface to extract

    Returns BSplineSurface

  • Extracts a 2D Cartesian transformation operator from an IFC Cartesian transformation operator definition. The transformation can be uniform or non-uniform.

    Parameters

    • from:
          | IfcCartesianTransformationOperator2D
          | IfcCartesianTransformationOperator2DnonUniform

      The IFC Cartesian transformation operator definition, which can be either uniform or non-uniform.

    Returns any

    The resulting transformation operator parameters.

  • Extract an IFC 3D cartesian transform operator as a transform matrix.

    Parameters

    • from: IfcCartesianTransformationOperator3D

      The IFC cartesian transform to extract from.

    Returns any

    The internal matrix type extract.

  • Extract a curve object from a circle profile.

    Parameters

    • from: IfcCircleProfileDef

      The circle definition to extract from.

    Returns undefined | CurveObject

    The extracted circle curve, or undefined if one cannot be extracted.

  • Extracts the curve for a circle with a hollow hole from an IFC circle hollow profile definition.

    Parameters

    • from: IfcCircleHollowProfileDef

      The IFC circle hollow profile definition to extract the curve from.

    Returns CurveObject

    A CurveObject representing the hollow circle curve.

  • Parameters

    • from: IfcCompositeCurve
    • parentSense: boolean = true
    • close: boolean = false

    Returns undefined | CurveObject

  • Parameters

    • from: IfcConnectedFaceSet[]

      array of IfcConnectedFaceSet

    • parentLocalID: number

      parent element local ID

    • isRelVoid: boolean = false

      is from a relative void (default false)

    Returns void

  • Extracts a C-shape curve from an IFC C-shape profile definition.

    Parameters

    • from: IfcCShapeProfileDef

      The IFC C-shape profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the C-shape curve, or undefined if not extractable.

  • Parameters

    • from: IfcCurve
    • parentSense: boolean = true
    • isEdge: boolean = false
    • trimmingArguments: undefined | TrimmingArguments = ...

    Returns undefined | CurveObject

  • Extract a cylindrical surface.

    Parameters

    • from: IfcCylindricalSurface

      The IFC object to extract from.

    • nativeSurface: SurfaceObject

      The native surface representation.

    Returns void

  • Extracts the curve for an ellipse from an IFC ellipse profile definition.

    Parameters

    • from: IfcEllipseProfileDef

      The IFC ellipse profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the ellipse curve, or undefined if not extractable.

  • Parameters

    • from: IfcExtrudedAreaSolid
    • temporary: boolean = false
    • isRelVoid: boolean = false

    Returns void

  • Parameters

    • from: IfcFace[]
    • parentLocalID: number
    • Optionalgeometry_: GeometryObject
    • temporary: boolean = false
    • isRelVoid: boolean = false

    Returns GeometryObject

  • Parameters

    • from: IfcHalfSpaceSolid
    • temporary: boolean = false
    • isRelVoid: boolean = false

    Returns void

  • Extract an advanced b-rep (NURBS)

    Parameters

    • from: IfcAdvancedBrep

      The brep to extract

    • isRelVoid: boolean

      Is this b-rep a relative void?

    Returns void

  • Parameters

    • from: IfcCircle
    • parentSense: boolean = true
    • OptionalparametersTrimmedCurve: ParamsGetIfcTrimmedCurve

    Returns undefined | CurveObject

  • Parameters

    • from: IfcEllipse
    • parentSense: boolean = true
    • OptionalparametersTrimmedCurve: ParamsGetIfcTrimmedCurve

    Returns undefined | CurveObject

  • Parameters

    • from: IfcFaceBasedSurfaceModel
    • isRelVoid: boolean = false

    Returns void

  • Parameters

    • from: IfcFacetedBrep
    • temporary: boolean = false
    • isRelVoid: boolean = false

    Returns void

  • Extract a IfcLine curve

    Parameters

    • from: IfcLine

      IfcLine

    • parentSense: boolean = true

      sense agreement

    • isEdge: boolean = false

      is curve an edge curve

    • OptionalparametersTrimmedCurve: ParamsGetIfcTrimmedCurve

      trimmed curve parameters

    Returns undefined | CurveObject

    The constructed curve object.

  • Parameters

    • from: IfcPolyline
    • parentSense: boolean = true
    • isEdge: boolean = false

    Returns undefined | CurveObject

  • Parameters

    • from: IfcShellBasedSurfaceModel
    • OptionalowningElementLocalID: number
    • isRelVoid: boolean = false
    • isSpace: boolean = false

    Returns void

  • Parameters

    • from: IfcTrimmedCurve
    • parentSense: boolean = true
    • isEdge: boolean = false

    Returns undefined | CurveObject

  • Extract an indexed poly curve and turn it into a curve object.

    Parameters

    • from: IfcIndexedPolyCurve

      IfcIndexedPolyCurve to process

    Returns undefined | CurveObject

    The extracted curve or undefined if it can't be extracted.

  • Extracts an I-shape curve from an IFC I-shape profile definition.

    Parameters

    • from: IfcIShapeProfileDef

      The IFC I-shape profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the I-shape curve, or undefined if not extractable.

  • Extracts an L-shape curve from an IFC L-shape profile definition.

    Parameters

    • from: IfcLShapeProfileDef

      The IFC L-shape profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the L-shape curve, or undefined if not extractable.

  • Extract a mapped item to add its transform to instance an item.

    Parameters

    • from: IfcMappedItem

      The mapped item to extract.

    • owningElement: IfcProduct
    • isRelVoid: boolean = false
    • isSpace: boolean = false
    • parents: undefined | IfcMappedItem[] = ...

    Returns void

  • Parameters

    • from:
          | IfcMaterialLayerSet
          | IfcMaterial
          | IfcMaterialList
          | IfcMaterialConstituent
          | IfcMaterialConstituentSet
          | IfcMaterialProfile
          | IfcMaterialProfileSet
          | IfcMaterialLayerSetUsage

    Returns undefined | number

  • Parameters

    • from: IfcObjectPlacement
    • isRelVoid: boolean = false

    Returns void

  • Extract an IFC plane.

    Parameters

    • from: IfcPlane

      The plane to extract from

    Returns NativeTransform4x4

    The transform matching the plane.

  • Extract a pointlist to a native vector.

    Parameters

    • from: IfcCartesianPoint[]

    Returns StdVector<Vector3>

    The native vector of 3D vectors.

  • Extract a list of a list of points to a native object.

    Parameters

    • from: IfcCartesianPoint[][]

      the list of lists of cartesian points

    • to: StdVector<StdVector<Vector3>>

      {out} the native vector of vector of points.

    Returns void

  • Parameters

    • from: IfcPolygonalBoundedHalfSpace
    • temporary: boolean = false
    • isRelVoid: boolean = false

    Returns void

  • Extract a canonical profile from a profile definition.

    Parameters

    • from: IfcProfileDef

      The profile definition to extract from.

    Returns undefined | CanonicalProfile

    The extracted profile, or undefined if one cannot be extracted.

  • Extract a bspline surface

    Parameters

    • from: IfcRationalBSplineSurfaceWithKnots

      The bspline surface to extract

    Returns BSplineSurface

    The extracted surface

  • Parameters

    • from: IfcRectangleProfileDef | IfcRectangleHollowProfileDef

    Returns undefined | CurveObject

  • Parameters

    • from: IfcRectangleHollowProfileDef

    Returns undefined | CurveObject

  • Extract a representation item, including its geometry if necessary, adding it to the current scene walk.

    Note - memoized result for instancing.

    Parameters

    • from: IfcRepresentationItem

      The representation to extract from.

    • OptionalowningElementLocalID: number
    • isRelVoid: boolean = false
    • isSpace: boolean = false
    • isMappedItem: boolean = false

    Returns void

  • Extract a style item.

    Parameters

    • from: IfcStyledItem

      The styled item to extract from

    • OptionalrepresentationItem: IfcRepresentationItem
    • OptionalmappedItem: IfcMappedItem

    Returns undefined | number

  • Extract a surface

    Parameters

    • surface: IfcSurface
    • nativeSurface: SurfaceObject

    Returns void

  • Extract a linear extrusion/sweep surface

    Parameters

    • from: IfcSurfaceOfLinearExtrusion
    • nativeSurface: SurfaceObject

    Returns void

  • Extract a surface of revolution/rotational sweep surface

    Parameters

    • from: IfcSurfaceOfRevolution
    • nativeSurface: SurfaceObject

    Returns void

  • Extract a canonical material from a surface style.

    Parameters

    • from: IfcSurfaceStyle

      The surface style to extract a material from.

    Returns void

  • Parameters

    • from: IfcSweptDiskSolid

      ifc type to extract

    • temporary: boolean = false

      is geometry temporary

    • isRelVoid: boolean = false

      is it a relative void

    Returns void

  • Extract a bspline surface

    Parameters

    • from: number[]

      The bspline surface to extract

    • to: StdVector<number>

      The surface to extract to

    • start: number = 0
    • end: number = from.length

    Returns void

  • Extract a bspline surface

    Parameters

    • from: number[][]

      The bspline surface to extract

    • to: StdVector<StdVector<number>>

      The surface to extract to

    Returns void

  • Extracts a T-shape curve from an IFC T-shape profile definition.

    Parameters

    • from: IfcTShapeProfileDef

      The IFC T-shape profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the T-shape curve, or undefined if not extractable.

  • Extracts a U-shape curve from an IFC U-shape profile definition.

    Parameters

    • from: IfcUShapeProfileDef

      The IFC U-shape profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the U-shape curve, or undefined if not extractable.

  • Extracts a Z-shape curve from an IFC Z-shape profile definition.

    Parameters

    • from: IfcZShapeProfileDef

      The IFC Z-shape profile definition to extract the curve from.

    Returns undefined | CurveObject

    A CurveObject representing the Z-shape curve, or undefined if not extractable.

  • Efficiently flatten the points into a Float64Array while skipping consecutive points with the same localID.

    Parameters

    • points: IfcCartesianPoint[]

      Array of IfcCartesianPoint

    • dimensions: number

      Number of coordinates per point (e.g. 3 for x,y,z)

    Returns Float64Array

  • Flatten the points into WASM memory (skipping consecutive duplicates). Reuses an existing WASM buffer if provided and large enough.

    Parameters

    • points: IfcCartesianPoint[]

      Array of IfcCartesianPoint

    • dimensions: number

      Number of coordinates per point (e.g. 3 for x,y,z)

    • OptionalexistingPtr: number

      (Optional) Pointer to an existing WASM buffer

    • OptionalexistingCapacity: number

      (Optional) Capacity of that buffer in Float64 elements

    Returns FlattenedPointsResult

    pointer, length used, total capacity

  • Efficiently flatten the points into a Float32Array

    Parameters

    • points: IfcCartesianPoint[]

      Array of IfcCartesianPoint

    • dimensions: number

      dimensions of points

    Returns Float64Array

  • Has the wasm module been initialised?

    Returns boolean

    indicating if the wasm module has been initialized

  • Create a native version of a vector curve to parse across the boundary.

    Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns StdVector<CurveObject>

    • a native std::vector from the wasm module
  • Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns StdVector<GeometryObject>

    • a native std::vector from the wasm module
  • Checks if a given point is not present in a collection of points.

    Parameters

    • pt: Vector3

      The point to check for presence.

    • points: NativeVectorGlmVec3

      A collection of points to compare against.

    Returns boolean

    A boolean indicating whether the point is not present in the collection.

  • Extract a 3D direction vector from an IFC direction.

    Parameters

    • from: null | IfcDirection

      The IFC direction to extract the vector from.

    Returns undefined | Vector3

    The vector, or undefined if it can't be extracted.