IFClite TypeScript API
    Preparing search index...

    Interface HostAnchor

    A SpatialAnchor for an element that is cut into (or fills an opening in) an existing host. The storey fields are the HOST's containing storey, so a filling lands in the same storey as the element it is hosted by.

    interface HostAnchor {
        axisContextId: number;
        bodyContextId: number;
        guidRandom?: RandomSource;
        hostBounds: HostBounds | null;
        hostId: number;
        hostKind: HostKind;
        hostPlacementId: number;
        lengthUnitScale?: number;
        ownerHistoryId: number | null;
        rootContextId?: number | null;
        schema?: SpatialAnchorSchema;
        storeyId: number;
        storeyPlacementId: number;
    }

    Hierarchy (View Summary)

    Index
    axisContextId: number

    IfcGeometricRepresentationSubContext for 'Axis' (or its IfcGeometricRepresentationContext fallback).

    bodyContextId: number

    IfcGeometricRepresentationSubContext for 'Body' (or its IfcGeometricRepresentationContext fallback).

    guidRandom?: RandomSource

    Optional seeded randomness for the GlobalIds the builders emit (@ifc-lite/encoding's RandomSource: a Math.random-style () => number in [0, 1)). Pass a seeded generator to make in-store builds byte-reproducible - the counterpart of ProjectParams.GuidSource on IfcCreator. Omit it for the default platform CSPRNG. A seeded source trades global uniqueness for reproducibility - only use one where that is the point.

    hostBounds: HostBounds | null

    null when the host's Body is not a shape the resolver can bound.

    hostId: number
    hostKind: HostKind
    hostPlacementId: number

    The host's own IfcLocalPlacement; openings are placed relative to it.

    lengthUnitScale?: number

    Model length-unit scale: metres per native unit (1 for a metre file, 0.001 for millimetres). Builder params are always metres (renderer frame); geometry coordinates are divided by this on emit so they land in the file's native unit. Defaults to 1 when unset. Without this, a space baked into a millimetre model exported 1000× too small (its mesh looked right in-session because that one is built in metres).

    ownerHistoryId: number | null

    IfcOwnerHistory expressId, or null when the model has none. IfcRoot.OwnerHistory is OPTIONAL from IFC4 onward — minimal files legitimately omit the entity, and builders emit $ for it.

    rootContextId?: number | null

    Root 3D IfcGeometricRepresentationContext, when resolved; optional for anchors constructed by callers.

    schema?: SpatialAnchorSchema

    Target schema. Builders use this to decide which optional STEP arguments to emit — e.g. IfcColumn.PredefinedType only exists from IFC4 onward. Defaults to 'IFC4' when unset for backward compatibility.

    storeyId: number

    The target IfcBuildingStorey expressId.

    storeyPlacementId: number

    The IfcLocalPlacement that the storey itself sits on. New element placements are chained from this.