IFClite TypeScript API
    Preparing search index...

    Interface AnonymizeResult

    The result of one exportAnonymizedSubset call.

    interface AnonymizeResult {
        content: Uint8Array;
        guidMap: Map<string, string>;
        stats: {
            droppedPropertyReferenceIds: number[];
            droppedPropertySetIds: number[];
            entityCount: number;
            includedRootEntityCount: number;
            prunedRelationshipIds: number[];
            warnings: string[];
            zeroedPlacements: { expressId: number; translation: number[] }[];
        };
    }
    Index
    content: Uint8Array

    The anonymized STEP file content.

    guidMap: Map<string, string>

    Old GlobalId → new GlobalId, for every regenerated IfcRoot. Kept out of the exported file itself — it is exactly the mapping back to the original, identifying model, so it is the caller's responsibility to keep it separate (and typically NOT share it alongside the file).

    stats: {
        droppedPropertyReferenceIds: number[];
        droppedPropertySetIds: number[];
        entityCount: number;
        includedRootEntityCount: number;
        prunedRelationshipIds: number[];
        warnings: string[];
        zeroedPlacements: { expressId: number; translation: number[] }[];
    }

    Type Declaration

    • droppedPropertyReferenceIds: number[]

      ExpressIds of emitted IfcPropertyReferenceValue entities whose optional PropertyReference was nulled because it named an entity the subset excluded.

    • droppedPropertySetIds: number[]

      ExpressIds of IfcPropertySet/IfcElementQuantity entities excluded from includedIds because keepPropertySets was falsy (the default) — reported distinctly, the same way prunedRelationshipIds is, so a caller can tell "this id is missing because it is a property set" from any other exclusion reason without grepping warnings text. Empty when keepPropertySets was true.

    • entityCount: number

      Total entities in the exported file.

    • includedRootEntityCount: number

      How many IfcRoot entities from includedIds actually made it into the export (after subset-root exclusion and relationship pruning).

    • prunedRelationshipIds: number[]

      ExpressIds of IfcRel* entities dropped because their mandatory, single-valued reference named an entity the exclusion left out — relationshipRefsSurviveExclusion (reference-collector.ts) already decides this for the closure walk; this is that same decision, reported so a caller can see WHICH associations the anonymization cost, not just that some file that changed.

    • warnings: string[]

      Non-fatal notices: a placement chain this export could not safely zero (e.g. an IfcGridPlacement/IfcLinearPlacement root, left untouched), multiple root placements collapsing onto one origin, or anything else AnonymizeOptions asked for that this export could not fully deliver. Same string[] shape as StepExportResult.stats.warnings.

    • zeroedPlacements: { expressId: number; translation: number[] }[]

      Each root IfcLocalPlacement this export zeroed, and the translation it zeroed (the ORIGINAL, pre-zero coordinates) — reported because the translation was real coordinate data the caller may still want to log or compare against, even though it is deliberately not in the file.