import type { IfcDataStore } from './columnar-parser.js'; export interface MaterialInfo { type: 'Material' | 'MaterialLayerSet' | 'MaterialProfileSet' | 'MaterialConstituentSet' | 'MaterialList'; name?: string; description?: string; /** IfcMaterial.Category (IFC4+). */ category?: string; layers?: MaterialLayerInfo[]; profiles?: MaterialProfileInfo[]; constituents?: MaterialConstituentInfo[]; /** * Members of an IfcMaterialList. Each entry surfaces the material's * Name plus optional Category — IDS material checks match against * either, so callers must propagate both. */ materials?: Array<{ name: string; category?: string; }>; } export interface MaterialLayerInfo { materialName?: string; thickness?: number; isVentilated?: boolean; name?: string; /** IfcMaterialLayer.Category. */ category?: string; /** IfcMaterial.Category — surfaced separately so IDS material checks * can match either the layer's own category or the underlying material's. */ materialCategory?: string; } export interface MaterialProfileInfo { materialName?: string; name?: string; /** IfcMaterialProfile.Category. */ category?: string; /** IfcMaterial.Category — see above. */ materialCategory?: string; } export interface MaterialConstituentInfo { materialName?: string; name?: string; fraction?: number; /** IfcMaterialConstituent.Category. */ category?: string; /** IfcMaterial.Category — see above. */ materialCategory?: string; } /** * Extract materials for a single entity ON-DEMAND. * Uses the onDemandMaterialMap built during parsing. * Falls back to relationship graph when on-demand map is not available (e.g., server-loaded models). * Also checks type-level material assignments via IfcRelDefinesByType. * Resolves the full material structure (layers, profiles, constituents, lists). */ export declare function extractMaterialsOnDemand(store: IfcDataStore, entityId: number): MaterialInfo | null; /** A base IfcMaterial reachable from an element's material association. */ export interface MaterialLeaf { /** Express id of the underlying IfcMaterial (or the definition itself when * no nested IfcMaterial could be resolved). */ id: number; name?: string; category?: string; /** Share of the element's volume attributable to this material, in [0,1]. * Leaves of one element sum to ~1 (layer thickness / constituent fraction; * equal split when no proportion data is available). */ weight: number; } /** Aggregated usage of one base material across the model. */ export interface MaterialUsage { /** Express id of the base IfcMaterial. */ id: number; name: string; category?: string; /** IFC class of the material entity (e.g. "IfcMaterial"). */ ifcClass: string; /** Every element using this material, with its volume weight. */ entries: Array<{ entityId: number; weight: number; }>; } /** * Resolve the material *definition* directly associated with an element * (IfcMaterial / IfcMaterial*Set / *Usage). Mirrors the lookup at the top of * {@link extractMaterialsOnDemand}: occurrence association first, then the * element's type. Returns the definition express id, or undefined. */ export declare function resolveMaterialDefId(store: IfcDataStore, entityId: number): number | undefined; /** * Resolve the base IfcMaterial(s) for a material definition, with a volume * weight per material. Layer sets split by layer thickness, constituent sets by * fraction, profile/list sets equally; a plain IfcMaterial yields a single * leaf with weight 1. Results are memoised per (store, defId) — a type-shared * layer set is resolved once for the whole model. */ export declare function collectMaterialLeaves(store: IfcDataStore, defId: number): MaterialLeaf[]; /** * Build (and memoise) the model-wide index of base material → using elements, * with per-element volume weights. Derived entirely from the forward * `onDemandMaterialMap` (element → definition) that the parser already builds, * so no extra parse work is required. Keyed by base IfcMaterial express id. */ export declare function buildMaterialUsageIndex(store: IfcDataStore): Map; /** Resolve a material entity's display name + IFC class for headers/labels. * Memoised per (store, materialId) — callers resolve many materials in a loop. */ export declare function getMaterialDisplay(store: IfcDataStore, materialId: number): { name: string; type: string; }; //# sourceMappingURL=material-resolver.d.ts.map