import { IfcApiProxyAP214 } from "./ifc_api_proxy_ap214.js"; import { IncludeProperties, Node, SpatialStructureOptions } from "./properties_passthrough.js"; /** * web-ifc-compatible property/spatial surface over an AP214/AP242 step model. * * Backed by {@link AP214ProductStructureExtraction} and * {@link AP214PropertyExtraction}: `getSpatialStructure` returns the real * nested, named, occurrence-keyed tree (replacing the old flat, nameless stub); * `getItemProperties` / `getPropertySets` return the extracted attribute and * validation rows; `getAllItemsOfType` is backed by the model type index. * * This is the seam Share consumes (via `IfcApiProxyAP214`); nothing in Share * changes — it lights up the moment this returns a real tree. */ export declare class AP214Properties { private api; private structureRoots_?; private structureRootsWithSolids_?; private propertyMap_?; private ownerByExpressID_?; private nodeNameByExpressID_?; private propertyByItemId_?; /** * @param api The AP214 passthrough proxy owning the step model. */ constructor(api: IfcApiProxyAP214); /** * No-op type-name lookup retained for interface compatibility; AP214 surfaces * STEP entity names directly on the nodes. * * @param type The numeric type code. * @return {string} The empty string (AP214 has no IFC type-name map). */ getIfcType(type: number): string; /** * Resolve one express id to a web-ifc-shaped item, dispatching on what the id * denotes: * * - a **property single** (a `descriptive_/measure_representation_item` id, * referenced from a pset's `HasProperties`) → `{ expressID, Name: {type,value}, * NominalValue: {type,value} }`, the shape `unpackHelper` reads after it * dereferences a `HasProperties` handle; * - a **tree node** (NAUO occurrence id, or `product_definition[_shape]` id * for single-part files) → `{ expressID, Name: {type,value} }`, the part's * identity row that the Properties panel runs through `deref`. * * Property-single ids and node ids are disjoint (distinct STEP entities), so * the lookup is unambiguous. * * @param id Express id to resolve. * @param recursive Unused; kept for web-ifc signature parity. * @return {Promise} The web-ifc-shaped item. */ getItemProperties(id: number, recursive?: boolean): Promise; /** * Get a part's property sets: one `IfcPropertySet`-shaped set per grouping * label (plain attributes vs. validation properties). Each set's * `HasProperties` is an array of web-ifc reference handles * (`{ type: 5, value: itemExpressID }`) that Share's Properties panel resolves * back to individual properties via `getItemProperties` — emitting inline * property objects instead would trip `unpackHelper`'s reference-type guard. * * @param elementID Node express id. * @param recursive Unused; kept for web-ifc signature parity. * @return {Promise} The property sets for the element. */ getPropertySets(elementID: number, recursive?: boolean): Promise; /** * Type properties are not modeled for AP214 at the Simplified tier. * * @param elementID Node express id. * @param recursive Unused; kept for web-ifc signature parity. * @return {Promise} An empty array. */ getTypeProperties(elementID: number, recursive?: boolean): Promise; /** * Material properties are not modeled for AP214 at the Simplified tier. * * @param elementID Node express id. * @param recursive Unused; kept for web-ifc signature parity. * @return {Promise} An empty array. */ getMaterialsProperties(elementID: number, recursive?: boolean): Promise; /** * Get the real nested, named, occurrence-keyed product structure. * * @param includeProperties When true, merge each node's item properties onto * the node (mirrors the IFC surface's `includeProperties`). * @param options Optional shaping: `{ includeSolids: true }` adds the * ephemeral solid layer beneath multibody products (`type: 'solid'`, * `ephemeral: true` nodes) — see `design/new/step-nonproduct-semantics.md`. * @return {Promise} The root node. A single-root file returns its root * directly; a multi-root file is wrapped in a synthetic container root. */ getSpatialStructure(includeProperties?: IncludeProperties, options?: SpatialStructureOptions): Promise; /** * Get every element of a STEP entity type, backed by the model type index. * * @param type The numeric AP214 entity type id. * @param verbose When true, return raw line data; otherwise express ids. * @return {Promise} The matching elements (ids or raw lines). */ getAllItemsOfType(type: number, verbose: boolean): Promise; /** * Convert an extracted structure node into a spatial node for the compat * surface, recursing into children. * * @param node The extracted product-structure node. * @param includeProperties When true, merge the node's item properties. * @return {Promise} The converted spatial node. */ private toSpatialNode; /** * Resolve the property rows for an element, mapping an occurrence node id back * to its owning product definition (where properties are keyed). * * @param id Node express id. * @return {AP214PropertyRow[]} The element's property rows (possibly empty). */ private rowsForElement; /** * Lazily build and cache every index the surface reads in one pass: * - `structureRoots_` — the assembly forest; * - `ownerByExpressID_` — node id → owning product-definition id (where the * property map is keyed); * - `nodeNameByExpressID_` — node id → display name (for `getItemProperties` * identity rows); * - `propertyByItemId_` — representation-item id → property (so a pset's * `HasProperties` reference resolves back to its key/value). */ /** * Build the property/structure indexes NOW (they are otherwise built * lazily on first property access). Called before a source-buffer * spill: the index build is a full-model sweep of synchronous record * reads, so it must run while the source is resident — after it, * post-spill property reads are pure map lookups. */ primeIndexes(): void; private buildIndexes; /** * Record a node's owning product-definition id and display name, recursing * into children. * * @param node The node to index. */ private indexNodes; /** * Return the cached product-structure forest, building the indexes if needed. * * @return {ProductStructureNode[]} The cached assembly roots. */ private productStructure; /** * Return (and cache) the product-structure forest with the ephemeral solid * layer included. Built separately from the plain forest so default callers * never pay for the solid walk; the solid nodes are also indexed so * `getItemProperties` resolves a solid id to its identity row and * `getPropertySets` maps it to the owning product's rows. * * @return {ProductStructureNode[]} The cached solid-including roots. */ private productStructureWithSolids; /** * Lazily build and cache the extracted property map. * * @return {ExtractedPropertyMap} The cached per-part property map. */ private properties; } //# sourceMappingURL=ap214_properties.d.ts.map