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

Constructors

Properties

Methods

arrayToSharedHeap arrayToWasmHeap convertPrefix convertToMetres createParamsGetBooleanResultPool createParamsGetPolyCurvePool createParamsGetTriangulatedFaceSetPool createParamsTransformProfilePool destroy doTransforms dropAllNativeIndexedPolygonalFaceVector dropNonSceneGeometry extractAdvancedFace extractAP214Circle extractAP214Ellipse extractAP214FaceBasedSurfaceModel extractAP214FacetedBrep extractAP214GeometryData extractAP214ShellBasedSurfaceModel extractAP214TrimmedCurve extractAxis1Placement3D extractAxis2Placement2D extractAxis2Placement3D extractBooleanOperand extractBooleanResult extractBSplineCurve extractBSplineSurface extractCartesianTransformOperator2D extractCartesianTransformOperator3D extractCompositeCurve extractConicalSurface extractConnectedFaceSets extractCurve extractCylindricalSurface extractEllipseProfileCurve extractExtrudedAreaSolid extractFace extractFaces extractHalfspaceSolid extractLine extractManifoldSolidBrep extractMappedItem extractPlacement extractPlane extractPointList3D extractPointListList3D extractPolyline extractProfile extractPScurve1 extractRawPlacement extractRepresentationItem extractSphericalSurface extractStyledItem extractStyledItemWithProcessing extractSurface extractSurfaceOfLinearExtrusion extractSurfaceOfRevolution extractSurfaceStyle extractToDoubleVector extractToDoubleVectorVector extractToroidalSurface finalizeStagedFaces flattenCartesianPointsToWasmFiltered flattenPointsToFloat32Array freeNativeIndexedPolygonalFaceVector getAP214ProductName getLinearScalingFactor getWasmModule initializeMemoryPools isInitialized lengthUnitConversionRatio nativeBound3DVector nativeCurve nativeIndexedPolygonalFaceVector nativeSegmentVector nativeUintVector nativeULongVector nativeVectorCurve nativeVectorGeometry nativeVectorGeometryCollection nativeVectorGlmdVec2 nativeVectorGlmdVec3 nativeVectorGlmVec2 nativeVectorGlmVec3 nativeVectorProfile nativeVectorVectorGlmdVec3 notPresent populateStyledItemsMap extractDirection

Constructors

  • Construct a geometry extraction from an AP214 step model and conway model

    Parameters

    • conwayModel: ConwayGeometry
    • model: default
    • limitCSGDepth: boolean = true

      Whether to limit the depth of CSG operations.

    • csgDepthLimit: number = 20

      The maximum depth for CSG operations when limit CSG depth is used, or the maximum level for CSG memoization if it is not.

    • lowMemoryMode: boolean = false

      Whether to enable low memory mode for geometry extraction.

    Returns AP214GeometryExtraction

Properties

csgOperations: CsgMemoization
curves: default
geometryTypeCounts: Map<string, number> = ...

Count of representation items by AP214 entity type name — the geometry breakdown for the load report (issue #301 follow-up). Copied into Statistics by the loader/proxies after extraction.

model: default
pointBuffer: null | FlattenedPointsResult = null
productShapeMap: AP214ProductShapeMap

Methods

  • Parameters

    • array: Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>

    Returns Uint8Array<ArrayBufferLike>

  • Parameters

    • array: Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>

    Returns any

    Pointer/memory address

  • Parameters

    • Optionalprefix: null | si_prefix

    Returns number

  • Parameters

    • fromUnit: length_unit

    Returns undefined | number

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

    Returns void

  • Creates a memory pool for ParamsGetPolyCurve 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

  • Destroy geometry processor and deinitialize

    Parameters

    • modelId: number = 0

    Returns void

  • Process the transforms for a shape relationship.

    Parameters

    • shapeRelationship: shape_representation_relationship

      The shape relationship to process.

    • sourceShape: shape_representation

      The source shape.

    • targetShape: shape_representation

      The target shape.

    • owningLocalID: number

      The owning local ID.

    • flipTransformItems: boolean = false

      When the caller swapped the relationship's rep_1/rep_2 reading (a parent-first assembly placement — see the CDSR orientation check), the item_defined_transformation's placement pair must swap with it: transform_item_1 lives in rep_1's context and transform_item_2 in rep_2's, and the composed transform must always map the child (source) frame into the parent (target) frame.

    Returns [undefined | NativeTransform4x4, boolean]

    The transform and a boolean indicating if the processing should continue inside the loop.

  • Drop and delete all the indexed polygonal face vectors.

    Returns void

  • Drop geometry that isn't in the scene.

    Parameters

    • localID: number

      The id of the mesh to drop.

    Returns void

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

    Parameters

    • from: advanced_face
    • geometry: GeometryObject
    • OptionalparentLocalID: number

    Returns void

  • Parameters

    • from: circle
    • isEdge: boolean = false
    • parentSense: boolean = true
    • parametersTrimmedCurve: ParamsGetIfcTrimmedCurve = ...

    Returns undefined | CurveObject

  • Parameters

    • from: ellipse
    • isEdge: boolean = false
    • parentSense: boolean = true
    • parametersTrimmedCurve: ParamsGetIfcTrimmedCurve = ...

    Returns undefined | CurveObject

  • Parameters

    • from: face_based_surface_model

    Returns void

  • Parameters

    • from: faceted_brep
    • temporary: boolean = false

    Returns void

  • Parameters

    • from: shell_based_surface_model

    Returns void

  • Parameters

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

    Returns undefined | CurveObject

  • Extract a placement, adding it to the scene.

    Parameters

    • from: axis1_placement

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    Returns void

  • Extract a placement (no memoization/scene creation)

    Parameters

    • from: axis1_placement

      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: axis2_placement_2d

      The axis 2 placement to extract.

    Returns NativeTransform3x3

    The native placement transform.

  • Extract a placement, adding it to the scene.

    Parameters

    • from: axis2_placement_3d

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    • extractOnly: false
    • OptionalmappedItem: boolean

    Returns AP214SceneTransform

  • Extract a placement (no memoization/scene creation)

    Parameters

    • from: axis2_placement_3d

      The transform to extract.

    • parentLocalId: number

      The parent's local ID.

    • extractOnly: true

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

    • OptionalmappedItem: boolean

    Returns ParamsAxis2Placement3D

    The extracted placement.

  • Extract a boolean operand from a boolean result.

    Parameters

    • from:
          | boolean_result
          | half_space_solid
          | extruded_area_solid
          | faceted_brep

      The operand to extract.

    Returns void

  • Accepts AP214BooleanResult and AP214BooleanClippingResult

    Parameters

    • from: boolean_result

    Returns void

  • Exctact a BSpline Curve

    Parameters

    • from: b_spline_curve

      The bspline curve, potentially with knots/rational.

    • parentSense: boolean = true
    • isEdge: boolean = false
    • parametersTrimmedCurve: ParamsGetIfcTrimmedCurve = ...

    Returns CurveObject

    The constructed curve object.

  • Extract a bspline surface

    Parameters

    • from: b_spline_surface

      The bspline surface to extract

    Returns BSplineSurface

    The extracted surface

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

    Parameters

    • from: cartesian_transformation_operator_2d

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

    Returns NativeTransform3x3

    The resulting transformation operator parameters.

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

    Parameters

    • from: cartesian_transformation_operator_3d

      The AP214 cartesian transform to extract from.

    Returns any

    The internal matrix type extract.

  • Parameters

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

    Returns undefined | CurveObject

  • Extract a cylindrical surface.

    Parameters

    • from: conical_surface

      The AP214 object to extract from.

    • nativeSurface: SurfaceObject

      The native surface representation.

    Returns void

  • Parameters

    • from: connected_face_set[]

      array of AP214ConnectedFaceSet

    • parentLocalID: number

      parent element local ID

    Returns void

  • Parameters

    • from:
          | curve
          | trimmed_curve
          | line
          | b_spline_curve
          | polyline
          | circle
          | b_spline_curve_with_knots
          | rational_b_spline_curve
    • parentSense: boolean = true
    • isEdge: boolean = false
    • trimmingArguments: undefined | TrimmingArguments = ...

    Returns undefined | CurveObject

  • Extract a cylindrical surface.

    Parameters

    • from: cylindrical_surface

      The AP214 object to extract from.

    • nativeSurface: SurfaceObject

      The native surface representation.

    Returns void

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

    Parameters

    • from: ellipse

      The AP214 ellipse profile definition to extract the curve from.

    Returns undefined | CurveObject

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

  • Parameters

    • from: extruded_area_solid

      Geometry source

    • temporary: boolean = false

      Is this extracted mesh temporary

    Returns void

  • Parameters

    • from: face
    • geometry: GeometryObject

    Returns void

  • Parameters

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

    Returns GeometryObject

  • Parameters

    • from: half_space_solid

      Geometry source

    • temporary: boolean = false

      Is the extracted mesh temporary

    Returns void

  • Extract a line

    Parameters

    • from: line

      The line to extract.

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

    Returns undefined | CurveObject

    The curve object for the line.

  • Extract geometry from a manifold solid brep.

    Parameters

    • from: manifold_solid_brep

      The brep to extract from.

    Returns void

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

    Parameters

    • from: mapped_item

      The mapped item to extract.

    • OptionalowningElementLocalID: number
    • parents: undefined | mapped_item[] = ...

      The parent mapped items, if any.

    Returns void

  • Extract a placement, adding it to the scene.

    Parameters

    • from: placement

      The placement to extract.

    • mappedItem: boolean = false

      Whether the placement is a mapped item.

    Returns undefined | AP214SceneTransform

    The extracted placement or undefined if the placement is not a axis2_placement_3d.

  • Extract an AP214 plane.

    Parameters

    • from: plane

      The plane to extract from

    Returns NativeTransform4x4

    The transform matching the plane.

  • Extract a pointlist to a native vector.

    Parameters

    • from: cartesian_point[]

    Returns StdVector<Vector3>

    The native vector of 3D vectors.

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

    Parameters

    • from: cartesian_point[][]

      the list of lists of cartesian points

    • to: StdVector<StdVector<Vector3>>

      {out} the native vector of vector of points.

    Returns void

  • Parameters

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

    Returns undefined | CurveObject

  • Extract a canonical profile from a profile definition.

    Parameters

    • from: curve

      The profile definition to extract from.

    Returns undefined | CanonicalProfile

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

  • Parameters

    • from: pcurve

    Returns undefined | CurveObject

  • Parameters

    • from: placement

    Returns undefined | NativeTransform4x4

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

    Note - memoized result for instancing.

    Parameters

    • from: representation_item

      The representation to extract from.

    • OptionalowningElementLocalID: number
    • isMappedItem: boolean = false

      Whether this is a mapped item.

    Returns void

  • Extract a cylindrical surface.

    Parameters

    • from: spherical_surface

      The AP214 object to extract from.

    • nativeSurface: SurfaceObject

      The native surface representation.

    Returns void

  • Parameters

    • from: styled_item

      The styled item to extract from

    • OptionalrepresentationItem: representation_item

    Returns undefined | number

    surafceStyleId or undefined if could not be determined

  • Parameters

    • from: styled_item
    • OptionalowningElementLocalID: number

    Returns void

  • Extract a surface

    Parameters

    • from: surface
    • nativeSurface: SurfaceObject

    Returns void

  • Extract a linear extrusion/sweep surface

    Parameters

    • from: surface_of_linear_extrusion
    • nativeSurface: SurfaceObject

    Returns void

  • Extract a surface of revolution/rotational sweep surface

    Parameters

    • from: surface_of_revolution
    • nativeSurface: SurfaceObject

    Returns void

  • Extract a canonical material from a surface style.

    Parameters

    • from: surface_style_usage

      The surface style to extract a material from.

    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

  • Extract a cylindrical surface.

    Parameters

    • from: toroidal_surface

      The AP214 object to extract from.

    • nativeSurface: SurfaceObject

      The native surface representation.

    Returns void

  • Flush any staged (deferred) face tessellation jobs, tessellating them in parallel on the native thread pool and appending the results to their target geometry objects in staging order.

    This must be called before triangle data is read from (or native memory freed for) any geometry that faces have been staged into — i.e. before CSG evaluation and before extraction returns.

    Returns void

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

    Parameters

    • points: cartesian_point[]

      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: cartesian_point[]

      Array of AP214CartesianPoint

    • dimensions: number

      dimensions of points

    Returns Float32Array<ArrayBufferLike>

  • Free the native indexed polygon face.

    Parameters

    Returns void

  • Get the product name for this.

    Returns string

    The product name or an empty struct if none can be found.

  • Returns number

    linear matrix scaling factor for geometry

  • Returns any

    • A handle to the loaded wasm module
  • Initializes memory pools for various parameter objects.

    Returns void

  • Has the wasm module been initialised?

    Returns boolean

    indicating if the wasm module has been initialized

  • Parameters

    • fromUnit: length_unit
    • toUnit: length_unit

    Returns undefined | number

  • Returns CurveObject

  • Create a native vector of indexed polygonal faces uint vector.

    Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeVectorIndexedPolygonalFace

    • a native object from the wasm module
  • Create a native vector of segments.

    Parameters

    • Optionalinitialize: number

      number - initial size of the vector (optional)

    Returns NativeVectorSegment

    • a native object from the wasm module
  • Create a native 32bit uint vector.

    Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeUintVector

    • a native std::vector<uint32_t> from the wasm module
  • Create a native 32bit size_t vector.

    Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeULongVector

    • a native std::vector<size_t> from the wasm module
  • 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
  • Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeVectorGlmVec2

    • a native std::vectorglm::vec3 from the wasm module
  • Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeVectorGlmVec3

    • a native std::vectorglm::vec3 from the wasm module
  • Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeVectorGlmVec2

    • a native std::vectorglm::vec2 from the wasm module
  • Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeVectorGlmVec3

    • a native std::vectorglm::vec3 from the wasm module
  • Create a native vector profile to pass across the boundary.

    Parameters

    • OptionalinitialSize: number

      number - initial size of the vector (optional)

    Returns NativeVectorProfile

    • 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.

  • Returns void

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

    Parameters

    • from: null | direction

      The AP214 direction to extract the vector from.

    Returns undefined | Vector3

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