@ifc-lite/parser 5.1.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/dist/classification-resolver.d.ts.map +1 -1
  2. package/dist/classification-resolver.js +35 -10
  3. package/dist/classification-resolver.js.map +1 -1
  4. package/dist/columnar-entity-preparation.d.ts +25 -0
  5. package/dist/columnar-entity-preparation.d.ts.map +1 -0
  6. package/dist/columnar-entity-preparation.js +282 -0
  7. package/dist/columnar-entity-preparation.js.map +1 -0
  8. package/dist/columnar-parser-indexes.d.ts +17 -1
  9. package/dist/columnar-parser-indexes.d.ts.map +1 -1
  10. package/dist/columnar-parser-indexes.js +31 -21
  11. package/dist/columnar-parser-indexes.js.map +1 -1
  12. package/dist/columnar-parser-root-attributes.d.ts +66 -0
  13. package/dist/columnar-parser-root-attributes.d.ts.map +1 -0
  14. package/dist/columnar-parser-root-attributes.js +245 -0
  15. package/dist/columnar-parser-root-attributes.js.map +1 -0
  16. package/dist/columnar-parser.d.ts +26 -63
  17. package/dist/columnar-parser.d.ts.map +1 -1
  18. package/dist/columnar-parser.js +384 -751
  19. package/dist/columnar-parser.js.map +1 -1
  20. package/dist/compact-entity-index-columns.d.ts +17 -0
  21. package/dist/compact-entity-index-columns.d.ts.map +1 -0
  22. package/dist/compact-entity-index-columns.js +15 -0
  23. package/dist/compact-entity-index-columns.js.map +1 -0
  24. package/dist/compact-entity-index-transport.d.ts +2 -12
  25. package/dist/compact-entity-index-transport.d.ts.map +1 -1
  26. package/dist/compact-entity-index-transport.js +1 -11
  27. package/dist/compact-entity-index-transport.js.map +1 -1
  28. package/dist/compact-entity-index.d.ts +6 -0
  29. package/dist/compact-entity-index.d.ts.map +1 -1
  30. package/dist/compact-entity-index.js +12 -20
  31. package/dist/compact-entity-index.js.map +1 -1
  32. package/dist/cost-extractor.d.ts +10 -0
  33. package/dist/cost-extractor.d.ts.map +1 -0
  34. package/dist/cost-extractor.js +369 -0
  35. package/dist/cost-extractor.js.map +1 -0
  36. package/dist/cost-schedule-2x3.d.ts +31 -0
  37. package/dist/cost-schedule-2x3.d.ts.map +1 -0
  38. package/dist/cost-schedule-2x3.js +75 -0
  39. package/dist/cost-schedule-2x3.js.map +1 -0
  40. package/dist/cost-types.d.ts +105 -0
  41. package/dist/cost-types.d.ts.map +1 -0
  42. package/dist/cost-types.js +5 -0
  43. package/dist/cost-types.js.map +1 -0
  44. package/dist/data-store-transport.d.ts +3 -2
  45. package/dist/data-store-transport.d.ts.map +1 -1
  46. package/dist/data-store-transport.js +10 -34
  47. package/dist/data-store-transport.js.map +1 -1
  48. package/dist/drop-census.d.ts +136 -0
  49. package/dist/drop-census.d.ts.map +1 -0
  50. package/dist/drop-census.js +53 -0
  51. package/dist/drop-census.js.map +1 -0
  52. package/dist/entity-refs-from-index.d.ts +10 -0
  53. package/dist/entity-refs-from-index.d.ts.map +1 -1
  54. package/dist/entity-refs-from-index.js +52 -36
  55. package/dist/entity-refs-from-index.js.map +1 -1
  56. package/dist/entity-scanner.d.ts +5 -0
  57. package/dist/entity-scanner.d.ts.map +1 -1
  58. package/dist/entity-scanner.js +30 -12
  59. package/dist/entity-scanner.js.map +1 -1
  60. package/dist/entity-type-byte-interner.d.ts +12 -0
  61. package/dist/entity-type-byte-interner.d.ts.map +1 -0
  62. package/dist/entity-type-byte-interner.js +66 -0
  63. package/dist/entity-type-byte-interner.js.map +1 -0
  64. package/dist/generated/ifc2x3/schema-registry.d.ts +50 -0
  65. package/dist/generated/ifc2x3/schema-registry.d.ts.map +1 -0
  66. package/dist/generated/ifc2x3/schema-registry.js +50052 -0
  67. package/dist/generated/ifc2x3/schema-registry.js.map +1 -0
  68. package/dist/generated/ifc4x3/schema-registry.d.ts +50 -0
  69. package/dist/generated/ifc4x3/schema-registry.d.ts.map +1 -0
  70. package/dist/generated/ifc4x3/schema-registry.js +71299 -0
  71. package/dist/generated/ifc4x3/schema-registry.js.map +1 -0
  72. package/dist/generated/schema-registry-by-version.d.ts +61 -0
  73. package/dist/generated/schema-registry-by-version.d.ts.map +1 -0
  74. package/dist/generated/schema-registry-by-version.js +86 -0
  75. package/dist/generated/schema-registry-by-version.js.map +1 -0
  76. package/dist/group-assignment-factor.d.ts +13 -0
  77. package/dist/group-assignment-factor.d.ts.map +1 -0
  78. package/dist/group-assignment-factor.js +30 -0
  79. package/dist/group-assignment-factor.js.map +1 -0
  80. package/dist/ifczip.d.ts +6 -0
  81. package/dist/ifczip.d.ts.map +1 -1
  82. package/dist/ifczip.js +20 -11
  83. package/dist/ifczip.js.map +1 -1
  84. package/dist/index.d.ts +10 -6
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +17 -7
  87. package/dist/index.js.map +1 -1
  88. package/dist/on-demand-extractors.d.ts +1 -0
  89. package/dist/on-demand-extractors.d.ts.map +1 -1
  90. package/dist/on-demand-extractors.js +2 -1
  91. package/dist/on-demand-extractors.js.map +1 -1
  92. package/dist/parser.worker.d.ts +6 -3
  93. package/dist/parser.worker.d.ts.map +1 -1
  94. package/dist/parser.worker.js +24 -12
  95. package/dist/parser.worker.js.map +1 -1
  96. package/dist/prepass-source-fingerprint.d.ts +3 -0
  97. package/dist/prepass-source-fingerprint.d.ts.map +1 -0
  98. package/dist/prepass-source-fingerprint.js +13 -0
  99. package/dist/prepass-source-fingerprint.js.map +1 -0
  100. package/dist/property-value-parser.d.ts +10 -0
  101. package/dist/property-value-parser.d.ts.map +1 -1
  102. package/dist/property-value-parser.js +40 -1
  103. package/dist/property-value-parser.js.map +1 -1
  104. package/dist/scan-entities-balanced.d.ts.map +1 -1
  105. package/dist/scan-entities-balanced.js +8 -6
  106. package/dist/scan-entities-balanced.js.map +1 -1
  107. package/dist/scan-worker-lexing.d.ts +14 -0
  108. package/dist/scan-worker-lexing.d.ts.map +1 -0
  109. package/dist/scan-worker-lexing.js +101 -0
  110. package/dist/scan-worker-lexing.js.map +1 -0
  111. package/dist/scan-worker-source.d.ts +1 -1
  112. package/dist/scan-worker-source.d.ts.map +1 -1
  113. package/dist/scan-worker-source.js +61 -59
  114. package/dist/scan-worker-source.js.map +1 -1
  115. package/dist/schedule-extractor.d.ts +2 -80
  116. package/dist/schedule-extractor.d.ts.map +1 -1
  117. package/dist/schedule-extractor.js +100 -225
  118. package/dist/schedule-extractor.js.map +1 -1
  119. package/dist/schedule-serializer-builders.d.ts +28 -0
  120. package/dist/schedule-serializer-builders.d.ts.map +1 -0
  121. package/dist/schedule-serializer-builders.js +163 -0
  122. package/dist/schedule-serializer-builders.js.map +1 -0
  123. package/dist/schedule-serializer.d.ts +6 -0
  124. package/dist/schedule-serializer.d.ts.map +1 -1
  125. package/dist/schedule-serializer.js +26 -165
  126. package/dist/schedule-serializer.js.map +1 -1
  127. package/dist/schedule-types.d.ts +211 -0
  128. package/dist/schedule-types.d.ts.map +1 -0
  129. package/dist/schedule-types.js +221 -0
  130. package/dist/schedule-types.js.map +1 -0
  131. package/dist/select-entity-columns.d.ts +7 -0
  132. package/dist/select-entity-columns.d.ts.map +1 -0
  133. package/dist/select-entity-columns.js +43 -0
  134. package/dist/select-entity-columns.js.map +1 -0
  135. package/dist/spatial-hierarchy-ambiguity.d.ts +39 -0
  136. package/dist/spatial-hierarchy-ambiguity.d.ts.map +1 -0
  137. package/dist/spatial-hierarchy-ambiguity.js +25 -0
  138. package/dist/spatial-hierarchy-ambiguity.js.map +1 -0
  139. package/dist/spatial-hierarchy-attributes.d.ts +54 -0
  140. package/dist/spatial-hierarchy-attributes.d.ts.map +1 -0
  141. package/dist/spatial-hierarchy-attributes.js +145 -0
  142. package/dist/spatial-hierarchy-attributes.js.map +1 -0
  143. package/dist/spatial-hierarchy-builder.d.ts +6 -38
  144. package/dist/spatial-hierarchy-builder.d.ts.map +1 -1
  145. package/dist/spatial-hierarchy-builder.js +48 -166
  146. package/dist/spatial-hierarchy-builder.js.map +1 -1
  147. package/dist/spatial-hierarchy-canonical-parent.d.ts +86 -0
  148. package/dist/spatial-hierarchy-canonical-parent.d.ts.map +1 -0
  149. package/dist/spatial-hierarchy-canonical-parent.js +212 -0
  150. package/dist/spatial-hierarchy-canonical-parent.js.map +1 -0
  151. package/dist/step-lexing.d.ts +1 -1
  152. package/dist/step-lexing.d.ts.map +1 -1
  153. package/dist/step-lexing.js +1 -56
  154. package/dist/step-lexing.js.map +1 -1
  155. package/dist/step-record-boundary.d.ts +28 -0
  156. package/dist/step-record-boundary.d.ts.map +1 -0
  157. package/dist/step-record-boundary.js +108 -0
  158. package/dist/step-record-boundary.js.map +1 -0
  159. package/dist/step-record-boundary.vectors.d.ts +58 -0
  160. package/dist/step-record-boundary.vectors.d.ts.map +1 -0
  161. package/dist/step-record-boundary.vectors.js +80 -0
  162. package/dist/step-record-boundary.vectors.js.map +1 -0
  163. package/dist/structural-extractor.d.ts +9 -0
  164. package/dist/structural-extractor.d.ts.map +1 -0
  165. package/dist/structural-extractor.js +310 -0
  166. package/dist/structural-extractor.js.map +1 -0
  167. package/dist/structural-load-extractor.d.ts +147 -0
  168. package/dist/structural-load-extractor.d.ts.map +1 -0
  169. package/dist/structural-load-extractor.js +178 -0
  170. package/dist/structural-load-extractor.js.map +1 -0
  171. package/dist/structural-step-values.d.ts +51 -0
  172. package/dist/structural-step-values.d.ts.map +1 -0
  173. package/dist/structural-step-values.js +109 -0
  174. package/dist/structural-step-values.js.map +1 -0
  175. package/dist/structural-types.d.ts +145 -0
  176. package/dist/structural-types.d.ts.map +1 -0
  177. package/dist/structural-types.js +5 -0
  178. package/dist/structural-types.js.map +1 -0
  179. package/dist/tokenizer.d.ts +11 -5
  180. package/dist/tokenizer.d.ts.map +1 -1
  181. package/dist/tokenizer.js +75 -21
  182. package/dist/tokenizer.js.map +1 -1
  183. package/dist/wasm-init-retry.d.ts +6 -42
  184. package/dist/wasm-init-retry.d.ts.map +1 -1
  185. package/dist/wasm-init-retry.js +6 -99
  186. package/dist/wasm-init-retry.js.map +1 -1
  187. package/dist/wasm-panic-forward.d.ts +7 -63
  188. package/dist/wasm-panic-forward.d.ts.map +1 -1
  189. package/dist/wasm-panic-forward.js +7 -100
  190. package/dist/wasm-panic-forward.js.map +1 -1
  191. package/dist/worker-index-publication.d.ts +43 -0
  192. package/dist/worker-index-publication.d.ts.map +1 -0
  193. package/dist/worker-index-publication.js +129 -0
  194. package/dist/worker-index-publication.js.map +1 -0
  195. package/dist/worker-parser.d.ts +5 -2
  196. package/dist/worker-parser.d.ts.map +1 -1
  197. package/dist/worker-parser.js +22 -10
  198. package/dist/worker-parser.js.map +1 -1
  199. package/package.json +5 -4
@@ -1 +1 @@
1
- {"version":3,"file":"classification-resolver.d.ts","sourceRoot":"","sources":["../src/classification-resolver.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,GACjB,kBAAkB,EAAE,CAsFtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,yBAAyB;IACtC;;uCAEmC;IACnC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;;OAOG;IACH,UAAU,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,YAAY,GAAG,yBAAyB,CA2BnG"}
1
+ {"version":3,"file":"classification-resolver.d.ts","sourceRoot":"","sources":["../src/classification-resolver.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,GACjB,kBAAkB,EAAE,CA6GtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,yBAAyB;IACtC;;uCAEmC;IACnC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;;OAOG;IACH,UAAU,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,YAAY,GAAG,yBAAyB,CA2BnG"}
@@ -46,16 +46,41 @@ export function extractClassificationsOnDemand(store, entityId) {
46
46
  if (!classRefIds || classRefIds.length === 0)
47
47
  return [];
48
48
  if (!store.source?.length) {
49
- // Server-parsed / source-empty store: the relationship graph above
50
- // already proves this entity (or its type) IS classified — the ids
51
- // resolved into `classRefIds` are real `IfcRelAssociatesClassification`
52
- // targets. But turning an id into system/identification/name/path
53
- // needs raw STEP bytes (`EntityExtractor`), which this store doesn't
54
- // have. Previously this silently returned `[]` here, making a
55
- // classified entity byte-identical to a genuinely unclassified one
56
- // (issue #3948). Surface one unresolved marker per resolved id
57
- // instead, so callers the IDS bridge in particular can tell
58
- // "classified, but this data source can't say more" from "none".
49
+ // Server-parsed / source-empty store: no source bytes to decode the
50
+ // classification reference's own attributes. The relationship graph
51
+ // above already proved this entity (or its type) IS classified — the
52
+ // ids resolved into `classRefIds` are real
53
+ // `IfcRelAssociatesClassification` targets.
54
+ //
55
+ // If the server also forwarded the resolved attributes (issue
56
+ // #3955), prefer those real system/identification/name data beats
57
+ // a marker. Roll up the entity's own row plus its type's (mirroring
58
+ // the classRefIds roll-up above) so a type-level classification is
59
+ // not dropped.
60
+ if (store.resolvedClassifications) {
61
+ const resolved = [...(store.resolvedClassifications.get(entityId) || [])];
62
+ if (store.relationships) {
63
+ const typeIds = store.relationships.getRelated(entityId, RelationshipType.DefinesByType, 'inverse');
64
+ for (const typeId of typeIds) {
65
+ const typeResolved = store.resolvedClassifications.get(typeId);
66
+ if (typeResolved)
67
+ resolved.push(...typeResolved);
68
+ }
69
+ }
70
+ // The server resolves these rows from the same immutable input
71
+ // as its graph. Repeated relationships emit repeated rows while
72
+ // the graph deduplicates edges, so their counts need not match.
73
+ if (resolved.length > 0)
74
+ return resolved;
75
+ }
76
+ // No forwarded resolved data. Turning an id into
77
+ // system/identification/name/path needs raw STEP bytes
78
+ // (`EntityExtractor`), which this store doesn't have. Previously
79
+ // this silently returned `[]` here, making a classified entity
80
+ // byte-identical to a genuinely unclassified one (issue #3948).
81
+ // Surface one unresolved marker per resolved id instead, so callers
82
+ // — the IDS bridge in particular — can tell "classified, but this
83
+ // data source can't say more" from "none".
59
84
  return classRefIds.map(() => ({ unresolved: true }));
60
85
  }
61
86
  const extractor = new EntityExtractor(store.source);
@@ -1 +1 @@
1
- {"version":3,"file":"classification-resolver.js","sourceRoot":"","sources":["../src/classification-resolver.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAsBlD;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC1C,KAAmB,EACnB,QAAgB;IAEhB,IAAI,WAAiC,CAAC;IAEtC,IAAI,KA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;QAC5C,IAAI,CAAC,MAAM;YAAE,MAAM;QAEnB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAEtC,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;YACpC,oEAAoE;YACpE,MAAM,UAAU,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;QACjC,CAAC;QAED,IAAI,SAAS,KAAK,4BAA4B,EAAE,CAAC;YAC7C,qFAAqF;YACrF,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,IAAI,IAAI;gBAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE9B,SAAS,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,CAAC;aAAM,CAAC;YACJ,MAAM;QACV,CAAC;IACL,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,CAAC;AACrB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { EntityRef } from './types.js';
2
+ import type { ScannedEntityColumns } from './entity-refs-from-index.js';
3
+ import { type DropCensus } from './drop-census.js';
4
+ export type ColumnarEntityInput = EntityRef[] | ScannedEntityColumns;
5
+ export declare function assertRootDerivationIsLive(): void;
6
+ /** Shared categorization for scanned objects and pre-pass columns. #3985 */
7
+ export declare function prepareColumnarEntities(input: ColumnarEntityInput, deferPropertyAtomIndex: boolean, yieldIfNeeded: () => Promise<void>): Promise<{
8
+ byType: Map<string, number[]>;
9
+ getTypeUpper: (type: string) => string;
10
+ indexedCount: number;
11
+ propertyAtomCount: number;
12
+ dropCensus: DropCensus;
13
+ spatialRefs: EntityRef[];
14
+ geometryRefs: EntityRef[];
15
+ relationshipRefs: EntityRef[];
16
+ propertyRelRefs: EntityRef[];
17
+ propertyContainerRefs: EntityRef[];
18
+ associationRelRefs: EntityRef[];
19
+ typeObjectRefs: EntityRef[];
20
+ otherRelevantRefs: EntityRef[];
21
+ groupRefs: EntityRef[];
22
+ buildPrimaryIndex(): Promise<import("./compact-entity-index.js").CompactEntityIndex>;
23
+ buildDeferredIndex(): Promise<import("./compact-entity-index.js").CompactEntityIndex | undefined>;
24
+ }>;
25
+ //# sourceMappingURL=columnar-entity-preparation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columnar-entity-preparation.d.ts","sourceRoot":"","sources":["../src/columnar-entity-preparation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AASxE,OAAO,EAAmB,KAAK,UAAU,EAAqB,MAAM,kBAAkB,CAAC;AAEvF,MAAM,MAAM,mBAAmB,GAAG,SAAS,EAAE,GAAG,oBAAoB,CAAC;AAgBrE,wBAAgB,0BAA0B,IAAI,IAAI,CAYjD;AAED,4EAA4E;AAC5E,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,sBAAsB,EAAE,OAAO,EAC/B,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;;yBASN,MAAM;;;;;;;;;;;;;;;GAkOnC"}
@@ -0,0 +1,282 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { compactEntityIndexFromColumns } from './compact-entity-index-transport.js';
5
+ import { buildCompactEntityIndexAsync } from './compact-entity-index.js';
6
+ import { selectEntityColumns } from './select-entity-columns.js';
7
+ import { getInheritanceChain, isKnownType } from './ifc-schema.js';
8
+ import { GEOMETRY_TYPES, SPATIAL_TYPES, HIERARCHY_REL_TYPES, PROPERTY_REL_TYPES, PROPERTY_ENTITY_TYPES, PROPERTY_CONTAINER_TYPES, ASSOCIATION_REL_TYPES, isIfcTypeLikeEntity, } from './columnar-parser-indexes.js';
9
+ import { buildDropCensus } from './drop-census.js';
10
+ // Fail loud, once, if the schema registry cannot derive IfcRoot descent at
11
+ // all — a broken/empty generated registry would otherwise make every
12
+ // `isSubtypeOfAny(upper, ROOT_TYPES)` check silently return false, and
13
+ // every non-product, non-group IfcRoot entity would fall to CAT_SKIP with
14
+ // no error (#4204). IFCWALL is a stand-in for "the registry loaded and its
15
+ // inheritance chain reaches the root at all", not a claim about walls
16
+ // specifically.
17
+ //
18
+ // Exported (only) so `test/root-derivation-guard-4204.test.ts` can call it
19
+ // directly against a mocked `ifc-schema.js` and prove the throw path
20
+ // actually fires — the module-level `rootDerivationVerified` latch means a
21
+ // real parse elsewhere in the same test file would otherwise make this a
22
+ // permanent no-op.
23
+ let rootDerivationVerified = false;
24
+ export function assertRootDerivationIsLive() {
25
+ if (rootDerivationVerified)
26
+ return;
27
+ const chain = getInheritanceChain('IFCWALL').map(c => c.toUpperCase());
28
+ if (!chain.includes('IFCROOT')) {
29
+ throw new Error('IfcRoot-descendant retention (#4204) derives from the schema registry, and its ' +
30
+ "sanity check failed: getInheritanceChain('IFCWALL') did not reach IFCROOT " +
31
+ `(got: [${chain.join(', ')}]). This would silently CAT_SKIP every IfcRoot ` +
32
+ 'descendant instead of retaining it — refusing to parse rather than drop entities silently.');
33
+ }
34
+ rootDerivationVerified = true;
35
+ }
36
+ /** Shared categorization for scanned objects and pre-pass columns. #3985 */
37
+ export async function prepareColumnarEntities(input, deferPropertyAtomIndex, yieldIfNeeded) {
38
+ assertRootDerivationIsLive();
39
+ // Single pass: build byType index AND categorize entities simultaneously.
40
+ // Uses a type-name cache to avoid calling .toUpperCase() on 4.4M refs
41
+ // (only ~776 unique type names in IFC4).
42
+ const byType = new Map();
43
+ const typeUpperCache = new Map();
44
+ const getTypeUpper = (type) => {
45
+ let upper = typeUpperCache.get(type);
46
+ if (upper === undefined) {
47
+ upper = type.toUpperCase();
48
+ typeUpperCache.set(type, upper);
49
+ }
50
+ return upper;
51
+ };
52
+ // Non-product helper entities that on-demand extraction / StepExporter
53
+ // need addressable in `byId`. These are not IfcProduct subtypes so the
54
+ // schema-driven IFCPRODUCT subtype check below cannot capture them.
55
+ // Without them, findPreferredGeometricRepresentationContextId() and
56
+ // findLengthUnitReference() fail because the entities are missing from
57
+ // the compact entity index.
58
+ const RELEVANT_NON_PRODUCT_HELPERS = new Set([
59
+ 'IFCGEOMETRICREPRESENTATIONCONTEXT', 'IFCGEOMETRICREPRESENTATIONSUBCONTEXT',
60
+ 'IFCUNITASSIGNMENT', 'IFCSIUNIT', 'IFCCONVERSIONBASEDUNIT',
61
+ 'IFCDERIVEDUNIT', 'IFCDERIVEDUNITELEMENT', 'IFCMEASUREWITHUNIT',
62
+ 'IFCDIMENSIONALEXPONENTS',
63
+ 'IFCMAPCONVERSION', 'IFCPROJECTEDCRS',
64
+ 'IFCMATERIALLAYER', 'IFCMATERIALLAYERSET', 'IFCMATERIALLAYERSETUSAGE',
65
+ 'IFCMATERIALCONSTITUENTSET', 'IFCMATERIALCONSTITUENT',
66
+ 'IFCMATERIALPROFILESET', 'IFCMATERIALPROFILE', 'IFCMATERIAL',
67
+ 'IFCCLASSIFICATION', 'IFCCLASSIFICATIONREFERENCE',
68
+ 'IFCDOCUMENTINFORMATION', 'IFCDOCUMENTREFERENCE',
69
+ ]);
70
+ // Schema-driven inclusion: every IfcRoot descendant belongs in the
71
+ // EntityTable — not just IfcProduct subtypes. The previous rule tested
72
+ // IFCPRODUCT specifically plus an `IFCREL` name-prefix test, so anything
73
+ // rooted but neither a product nor named "IfcRel*" (IfcTask, IfcActor,
74
+ // IfcCostItem, IfcResource, IfcStructural*, IfcProjectLibrary,
75
+ // IfcPropertySetTemplate, …) fell through to CAT_SKIP and stayed
76
+ // unaddressable: `getGlobalId`/`getTypeName` answered '' / 'Unknown' for
77
+ // them (#4204).
78
+ //
79
+ // IfcRelationship is itself an IfcRoot subtype, so for every entity the
80
+ // schema registry actually knows, `isSubtypeOfAny(upper, ROOT_TYPES)`
81
+ // alone covers what the old `IFCREL` prefix test covered. But it does
82
+ // NOT fully subsume that test lexically: `IfcRelaxation` is a real
83
+ // IFC2X3 entity (a prestressing/material-property resource, not a
84
+ // relationship — `entities-ifc2x3.ts` records `parent: undefined,
85
+ // source: "Ifc2x3.MaterialPropertyResource"`) that happens to start
86
+ // with "IfcRel" and matched the old rule lexically without ever being
87
+ // an IfcRoot descendant. And any name absent from the bundled registry
88
+ // — a vendor extension such as `IfcRelSomethingCustom` — makes
89
+ // `getInheritanceChain` return `[]`, so the schema-derived check alone
90
+ // answers `false` for it even though the old lexical test retained it.
91
+ // Keep both: the schema-derived check for its added coverage, the
92
+ // `IFCREL` prefix as the safety net for names the registry can't
93
+ // resolve.
94
+ const ROOT_TYPES = new Set(['IFCROOT']);
95
+ // IfcGroup family (IfcZone, IfcSystem, IfcDistributionSystem,
96
+ // IfcBuildingSystem, IfcDistributionCircuit, …). These are NOT
97
+ // IfcProduct subtypes, so without an explicit branch they fall through
98
+ // to CAT_SKIP and never enter the EntityTable — leaving their Name
99
+ // unresolvable (`getName` → '') and making them invisible to
100
+ // `getByType`. The Relationships card then shows "Group #<id>" and the
101
+ // lens/lists can't surface them. Route them into their own bucket so we
102
+ // can extract Name/LongName/ObjectType for the group label (#1075).
103
+ const GROUP_ROOTS = new Set(['IFCGROUP']);
104
+ // Category constants for the lookup cache
105
+ const CAT_SKIP = 0, CAT_SPATIAL = 1, CAT_GEOMETRY = 2, CAT_HIERARCHY_REL = 3, CAT_PROPERTY_REL = 4, CAT_PROPERTY_ENTITY = 5, CAT_ASSOCIATION_REL = 6, CAT_TYPE_OBJECT = 7, CAT_RELEVANT = 8, CAT_GROUP = 9;
106
+ /** Returns true if `upper` (already uppercased) is a subtype of any type in `set`. */
107
+ function isSubtypeOfAny(upper, set) {
108
+ const chain = getInheritanceChain(upper);
109
+ return chain.some(ancestor => set.has(ancestor.toUpperCase()));
110
+ }
111
+ // Cache: type name → category (avoids 4.4M .toUpperCase() calls)
112
+ const typeCategoryCache = new Map();
113
+ function getCategory(type) {
114
+ let cat = typeCategoryCache.get(type);
115
+ if (cat !== undefined)
116
+ return cat;
117
+ const upper = getTypeUpper(type);
118
+ if (SPATIAL_TYPES.has(upper) || isSubtypeOfAny(upper, SPATIAL_TYPES))
119
+ cat = CAT_SPATIAL;
120
+ else if (GEOMETRY_TYPES.has(upper) || isSubtypeOfAny(upper, GEOMETRY_TYPES))
121
+ cat = CAT_GEOMETRY;
122
+ else if (HIERARCHY_REL_TYPES.has(upper))
123
+ cat = CAT_HIERARCHY_REL;
124
+ else if (PROPERTY_REL_TYPES.has(upper))
125
+ cat = CAT_PROPERTY_REL;
126
+ else if (PROPERTY_ENTITY_TYPES.has(upper))
127
+ cat = CAT_PROPERTY_ENTITY;
128
+ else if (ASSOCIATION_REL_TYPES.has(upper))
129
+ cat = CAT_ASSOCIATION_REL;
130
+ else if (isIfcTypeLikeEntity(upper))
131
+ cat = CAT_TYPE_OBJECT;
132
+ else if (isSubtypeOfAny(upper, GROUP_ROOTS))
133
+ cat = CAT_GROUP;
134
+ else if (RELEVANT_NON_PRODUCT_HELPERS.has(upper)
135
+ || isSubtypeOfAny(upper, ROOT_TYPES)
136
+ || upper.startsWith('IFCREL'))
137
+ cat = CAT_RELEVANT;
138
+ else
139
+ cat = CAT_SKIP;
140
+ typeCategoryCache.set(type, cat);
141
+ return cat;
142
+ }
143
+ const refs = Array.isArray(input) ? input : undefined;
144
+ const columns = Array.isArray(input) ? undefined : input;
145
+ const count = refs ? refs.length : columns.expressIds.length;
146
+ const spatialRefs = [];
147
+ const geometryRefs = [];
148
+ const relationshipRefs = [];
149
+ const propertyRelRefs = [];
150
+ const propertyContainerRefs = [];
151
+ const propertyAtomRefs = [];
152
+ const deferredRows = [];
153
+ let propertyAtomCount = 0;
154
+ const associationRelRefs = [];
155
+ const typeObjectRefs = [];
156
+ const otherRelevantRefs = [];
157
+ const groupRefs = [];
158
+ // Semantic drop census (#4208) accumulators. Labels mirror the CAT_*
159
+ // constants above by index — keep the two in sync.
160
+ const CAT_LABELS = [
161
+ 'skip', 'spatial', 'geometry', 'hierarchy-rel', 'property-rel',
162
+ 'property-entity', 'association-rel', 'type-object', 'relevant', 'group',
163
+ ];
164
+ const censusScannedByType = new Map();
165
+ const censusCategoryByType = new Map();
166
+ const censusKnownByType = new Map();
167
+ const censusRootDescendantByType = new Map();
168
+ const censusRelSeenTypes = new Set();
169
+ const censusRelUnindexedTypes = new Set();
170
+ for (let i = 0; i < count; i++) {
171
+ if ((i & 0x3FF) === 0)
172
+ await yieldIfNeeded();
173
+ const type = refs ? refs[i].type : columns.typeStrings[columns.typeIndices[i]];
174
+ const id = refs ? refs[i].expressId : columns.expressIds[i];
175
+ const cat = getCategory(type);
176
+ // Every scanned record is counted for the drop census regardless of
177
+ // deferral or CAT_SKIP — a census that only sees what survived
178
+ // categorisation couldn't tell "dropped" from "never scanned".
179
+ const censusTypeKey = getTypeUpper(type);
180
+ const prevScanned = censusScannedByType.get(censusTypeKey);
181
+ if (prevScanned === undefined) {
182
+ censusScannedByType.set(censusTypeKey, 1);
183
+ censusCategoryByType.set(censusTypeKey, CAT_LABELS[cat]);
184
+ censusKnownByType.set(censusTypeKey, isKnownType(censusTypeKey));
185
+ // Same inheritance walk `isSubtypeOfAny` uses above, reused here to
186
+ // tell "a resource record with no GlobalId" (never IfcRoot) apart
187
+ // from "an entity with its own identity that still got dropped" —
188
+ // see ClassCensusEntry.isRootDescendant in drop-census.ts.
189
+ censusRootDescendantByType.set(censusTypeKey, getInheritanceChain(censusTypeKey).some(ancestor => ancestor.toUpperCase() === 'IFCROOT'));
190
+ if (censusTypeKey.startsWith('IFCREL')) {
191
+ censusRelSeenTypes.add(censusTypeKey);
192
+ if (cat !== CAT_HIERARCHY_REL && cat !== CAT_PROPERTY_REL && cat !== CAT_ASSOCIATION_REL) {
193
+ censusRelUnindexedTypes.add(censusTypeKey);
194
+ }
195
+ }
196
+ }
197
+ else {
198
+ censusScannedByType.set(censusTypeKey, prevScanned + 1);
199
+ }
200
+ const atom = cat === CAT_PROPERTY_ENTITY && !PROPERTY_CONTAINER_TYPES.has(getTypeUpper(type));
201
+ if (!deferPropertyAtomIndex || !atom) {
202
+ const typeKey = getTypeUpper(type);
203
+ let list = byType.get(typeKey);
204
+ if (!list) {
205
+ list = [];
206
+ byType.set(typeKey, list);
207
+ }
208
+ list.push(id);
209
+ }
210
+ if (atom) {
211
+ propertyAtomCount++;
212
+ if (deferPropertyAtomIndex) {
213
+ if (refs)
214
+ propertyAtomRefs.push(refs[i]);
215
+ else
216
+ deferredRows.push(i);
217
+ }
218
+ continue;
219
+ }
220
+ // Helper records still remain in both complete indexes. They do not need
221
+ // a transient EntityRef merely to copy their numeric fields back out.
222
+ if (cat === CAT_SKIP)
223
+ continue;
224
+ const ref = refs ? refs[i] : {
225
+ expressId: id, type, byteOffset: columns.byteOffsets[i],
226
+ byteLength: columns.byteLengths[i], lineNumber: 0,
227
+ };
228
+ if (cat === CAT_SPATIAL)
229
+ spatialRefs.push(ref);
230
+ else if (cat === CAT_GEOMETRY)
231
+ geometryRefs.push(ref);
232
+ else if (cat === CAT_HIERARCHY_REL)
233
+ relationshipRefs.push(ref);
234
+ else if (cat === CAT_PROPERTY_REL)
235
+ propertyRelRefs.push(ref);
236
+ else if (cat === CAT_PROPERTY_ENTITY)
237
+ propertyContainerRefs.push(ref);
238
+ else if (cat === CAT_ASSOCIATION_REL)
239
+ associationRelRefs.push(ref);
240
+ else if (cat === CAT_TYPE_OBJECT)
241
+ typeObjectRefs.push(ref);
242
+ else if (cat === CAT_GROUP)
243
+ groupRefs.push(ref);
244
+ else if (cat === CAT_RELEVANT)
245
+ otherRelevantRefs.push(ref);
246
+ }
247
+ const isPrimary = (type) => !deferPropertyAtomIndex
248
+ || getCategory(type) !== CAT_PROPERTY_ENTITY || PROPERTY_CONTAINER_TYPES.has(getTypeUpper(type));
249
+ const indexedCount = count - (deferPropertyAtomIndex ? propertyAtomCount : 0);
250
+ const dropCensus = buildDropCensus({
251
+ scannedByType: censusScannedByType,
252
+ categoryByType: censusCategoryByType,
253
+ knownByType: censusKnownByType,
254
+ rootDescendantByType: censusRootDescendantByType,
255
+ alwaysRelevantTypes: RELEVANT_NON_PRODUCT_HELPERS,
256
+ relSeenTypes: censusRelSeenTypes,
257
+ relUnindexedTypes: censusRelUnindexedTypes,
258
+ });
259
+ return {
260
+ byType, getTypeUpper, indexedCount, propertyAtomCount, dropCensus,
261
+ spatialRefs, geometryRefs, relationshipRefs, propertyRelRefs,
262
+ propertyContainerRefs, associationRelRefs, typeObjectRefs, otherRelevantRefs, groupRefs,
263
+ async buildPrimaryIndex() {
264
+ if (refs)
265
+ return buildCompactEntityIndexAsync(deferPropertyAtomIndex ? refs.filter(ref => isPrimary(ref.type)) : refs);
266
+ if (!deferPropertyAtomIndex || propertyAtomCount === 0)
267
+ return compactEntityIndexFromColumns({
268
+ ...columns, typeIndices: columns.typeIndices instanceof Uint16Array
269
+ ? columns.typeIndices : Uint16Array.from(columns.typeIndices),
270
+ });
271
+ return selectEntityColumns(columns, indexedCount, isPrimary);
272
+ },
273
+ async buildDeferredIndex() {
274
+ if (!deferPropertyAtomIndex || propertyAtomCount === 0)
275
+ return undefined;
276
+ if (refs)
277
+ return buildCompactEntityIndexAsync(propertyAtomRefs, undefined, 1024, 2);
278
+ return selectEntityColumns(columns, propertyAtomCount, undefined, deferredRows, 1024, 2);
279
+ },
280
+ };
281
+ }
282
+ //# sourceMappingURL=columnar-entity-preparation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columnar-entity-preparation.js","sourceRoot":"","sources":["../src/columnar-entity-preparation.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAI/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EACtE,qBAAqB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,mBAAmB,GAC5F,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAsC,MAAM,kBAAkB,CAAC;AAIvF,2EAA2E;AAC3E,qEAAqE;AACrE,uEAAuE;AACvE,0EAA0E;AAC1E,2EAA2E;AAC3E,sEAAsE;AACtE,gBAAgB;AAChB,EAAE;AACF,2EAA2E;AAC3E,qEAAqE;AACrE,2EAA2E;AAC3E,yEAAyE;AACzE,mBAAmB;AACnB,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,MAAM,UAAU,0BAA0B;IACxC,IAAI,sBAAsB;QAAE,OAAO;IACnC,MAAM,KAAK,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,iFAAiF;YACjF,4EAA4E;YAC5E,UAAU,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,iDAAiD;YA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S,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACpF,OAAO,mBAAmB,CAAC,OAAQ,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC5F,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -22,8 +22,24 @@ export type EntityByIdIndex = {
22
22
  [Symbol.iterator](): IterableIterator<[number, EntityRef]>;
23
23
  };
24
24
  export declare const GEOMETRY_TYPES: Set<string>;
25
- export declare const RELATIONSHIP_TYPES: Set<string>;
26
25
  export declare const REL_TYPE_MAP: Record<string, RelationshipType>;
26
+ /**
27
+ * A second, distinct edge recorded IN ADDITION TO the primary one above for
28
+ * the two IfcRelationship subtypes that {@link REL_TYPE_MAP} intentionally
29
+ * folds into a broader bucket for backward compatibility. Absent from this
30
+ * map means "no second edge" — every STEP keyword handled here still gets
31
+ * its primary edge from `REL_TYPE_MAP`. Consumed by the relationship-parsing
32
+ * loop in `columnar-parser.ts` right after the primary-edge loop.
33
+ *
34
+ * Keeping both a broad bucket (existing consumers keep working unchanged)
35
+ * and a precise one (a new consumer can ask for exactly this STEP class) is
36
+ * cheaper and lower-risk than migrating every existing Aggregates/AssignsToGroup
37
+ * consumer to also check the narrower type — see #4205, which named
38
+ * `spatial-hierarchy-builder.ts`, `decomposition.ts`, `owning-project.ts` and
39
+ * the IDS `partOf`/ancestors bridge as call sites that must keep seeing
40
+ * IfcRelNests through the Aggregates bucket.
41
+ */
42
+ export declare const SECONDARY_REL_TYPE_MAP: Record<string, RelationshipType>;
27
43
  export declare const QUANTITY_TYPE_MAP: Record<string, QuantityType>;
28
44
  export declare const SPATIAL_TYPES: Set<string>;
29
45
  export declare const HIERARCHY_REL_TYPES: Set<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"columnar-parser-indexes.d.ts","sourceRoot":"","sources":["../src/columnar-parser-indexes.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EA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AAC,MAAM,EAAE,YAAY,CAS1D,CAAC;AAGF,eAAO,MAAM,aAAa,aAOxB,CAAC;AAGH,eAAO,MAAM,mBAAmB,aAqB9B,CAAC;AAGH,eAAO,MAAM,kBAAkB,aAE7B,CAAC;AAGH,eAAO,MAAM,qBAAqB,aAGhC,CAAC;AAGH,eAAO,MAAM,kBAAkB,aAAsH,CAAC;AAGtJ,eAAO,MAAM,qBAAqB,aAQhC,CAAC;AAEH,eAAO,MAAM,wBAAwB,aAGnC,CAAC;AAEH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE9D"}
@@ -25,25 +25,6 @@ export const GEOMETRY_TYPES = new Set([
25
25
  'IFCFLOWCONTROLLER', 'IFCFLOWFITTING', 'IFCSPACE', 'IFCOPENINGELEMENT',
26
26
  'IFCSITE', 'IFCBUILDING', 'IFCBUILDINGSTOREY', 'IFCCOVERING',
27
27
  ]);
28
- // IMPORTANT: This set MUST include ALL RelationshipType enum values to prevent semantic loss
29
- // Missing types will be skipped during parsing, causing incomplete relationship graphs
30
- export const RELATIONSHIP_TYPES = new Set([
31
- 'IFCRELCONTAINEDINSPATIALSTRUCTURE', 'IFCRELAGGREGATES',
32
- 'IFCRELDEFINESBYPROPERTIES', 'IFCRELDEFINESBYTYPE',
33
- 'IFCRELASSOCIATESMATERIAL', 'IFCRELASSOCIATESCLASSIFICATION',
34
- 'IFCRELASSOCIATESDOCUMENT',
35
- 'IFCRELVOIDSELEMENT', 'IFCRELFILLSELEMENT',
36
- 'IFCRELCONNECTSPATHELEMENTS', 'IFCRELCONNECTSELEMENTS',
37
- 'IFCRELCONNECTSPORTTOELEMENT', 'IFCRELCONNECTSPORTS',
38
- 'IFCRELSPACEBOUNDARY',
39
- // IfcRelAssignsToGroupByFactor is a subtype of IfcRelAssignsToGroup
40
- // (adds a proportional Factor attribute, e.g. zone occupancy share) and
41
- // is written to STEP with its own distinct entity keyword — it does not
42
- // match the 'IFCRELASSIGNSTOGROUP' string, so it needs its own entry or
43
- // every membership assigned through it is silently invisible.
44
- 'IFCRELASSIGNSTOGROUP', 'IFCRELASSIGNSTOGROUPBYFACTOR', 'IFCRELASSIGNSTOPRODUCT',
45
- 'IFCRELREFERENCEDINSPATIALSTRUCTURE',
46
- ]);
47
28
  // Map IFC relationship type strings to RelationshipType enum
48
29
  // MUST cover ALL RelationshipType enum values (15 types total)
49
30
  export const REL_TYPE_MAP = {
@@ -51,7 +32,11 @@ export const REL_TYPE_MAP = {
51
32
  'IFCRELAGGREGATES': RelationshipType.Aggregates,
52
33
  // IfcRelNests is semantically a decomposition relationship; map it
53
34
  // onto the same edge bucket so partOf checks for either traverse
54
- // the same graph.
35
+ // the same graph. This is the PRIMARY edge only — SECONDARY_REL_TYPE_MAP
36
+ // below also records every IfcRelNests edge under the distinct
37
+ // RelationshipType.Nests, so a caller that needs to tell "nested" apart
38
+ // from "aggregated" can, without disturbing anything that already reads
39
+ // the Aggregates bucket (#4205).
55
40
  'IFCRELNESTS': RelationshipType.Aggregates,
56
41
  'IFCRELDEFINESBYPROPERTIES': RelationshipType.DefinesByProperties,
57
42
  'IFCRELDEFINESBYTYPE': RelationshipType.DefinesByType,
@@ -67,11 +52,36 @@ export const REL_TYPE_MAP = {
67
52
  'IFCRELSPACEBOUNDARY': RelationshipType.SpaceBoundary,
68
53
  'IFCRELASSIGNSTOGROUP': RelationshipType.AssignsToGroup,
69
54
  // Subtype of IfcRelAssignsToGroup (adds a Factor); same RelatingGroup /
70
- // RelatedObjects membership semantics, so it shares the same edge type.
55
+ // RelatedObjects membership semantics, so it shares this PRIMARY edge
56
+ // type — existing group-membership traversal (extractGroupMembersOnDemand,
57
+ // extractRelationshipsOnDemand) is unchanged. SECONDARY_REL_TYPE_MAP below
58
+ // also records it under the distinct RelationshipType.AssignsToGroupByFactor
59
+ // so a caller can tell it apart from a plain assignment and look its
60
+ // Factor value up on the relationship entity itself (#4205).
71
61
  'IFCRELASSIGNSTOGROUPBYFACTOR': RelationshipType.AssignsToGroup,
72
62
  'IFCRELASSIGNSTOPRODUCT': RelationshipType.AssignsToProduct,
73
63
  'IFCRELREFERENCEDINSPATIALSTRUCTURE': RelationshipType.ReferencedInSpatialStructure,
74
64
  };
65
+ /**
66
+ * A second, distinct edge recorded IN ADDITION TO the primary one above for
67
+ * the two IfcRelationship subtypes that {@link REL_TYPE_MAP} intentionally
68
+ * folds into a broader bucket for backward compatibility. Absent from this
69
+ * map means "no second edge" — every STEP keyword handled here still gets
70
+ * its primary edge from `REL_TYPE_MAP`. Consumed by the relationship-parsing
71
+ * loop in `columnar-parser.ts` right after the primary-edge loop.
72
+ *
73
+ * Keeping both a broad bucket (existing consumers keep working unchanged)
74
+ * and a precise one (a new consumer can ask for exactly this STEP class) is
75
+ * cheaper and lower-risk than migrating every existing Aggregates/AssignsToGroup
76
+ * consumer to also check the narrower type — see #4205, which named
77
+ * `spatial-hierarchy-builder.ts`, `decomposition.ts`, `owning-project.ts` and
78
+ * the IDS `partOf`/ancestors bridge as call sites that must keep seeing
79
+ * IfcRelNests through the Aggregates bucket.
80
+ */
81
+ export const SECONDARY_REL_TYPE_MAP = {
82
+ 'IFCRELNESTS': RelationshipType.Nests,
83
+ 'IFCRELASSIGNSTOGROUPBYFACTOR': RelationshipType.AssignsToGroupByFactor,
84
+ };
75
85
  export const QUANTITY_TYPE_MAP = {
76
86
  'IFCQUANTITYLENGTH': QuantityType.Length,
77
87
  'IFCQUANTITYAREA': QuantityType.Area,
@@ -1 +1 @@
1
- {"version":3,"file":"columnar-parser-indexes.js","sourceRoot":"","sources":["../src/columnar-parser-indexes.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAU/D,OAAO,EACH,gBAAgB,EAChB,YAAY,GACf,MAAM,gBAAgB,CAAC;AAmBxB,2CAA2C;AAC3C,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,0EAA0E;AAC1E,mEAAmE;AACnE,yEAAyE;AACzE,kEAAkE;AAClE,qEAAqE;AACrE,oEAAoE;AACp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AAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAEtJ,yDAAyD;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACzC,gBAAgB,EAAE,oBAAoB;IACtC,wBAAwB,EAAE,4BAA4B;IACtD,yBAAyB,EAAE,uBAAuB;IAClD,sBAAsB,EAAE,2BAA2B;IACnD,mBAAmB,EAAE,iBAAiB,EAAE,mBAAmB;IAC3D,kBAAkB,EAAE,mBAAmB,EAAE,iBAAiB;IAC1D,mBAAmB;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IAC5C,gBAAgB;IAChB,oBAAoB;CACvB,CAAC,CAAC;AAEH,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACjD,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { EntityRef } from './types.js';
2
+ import type { IfcEntity, IfcAttributeValue } from '@ifc-lite/data';
3
+ import type { IfcDataStore } from './columnar-parser.js';
4
+ export declare function getEntityRefFromStore(store: IfcDataStore, expressId: number): EntityRef | undefined;
5
+ /**
6
+ * Extract entity attributes on-demand from source buffer.
7
+ * Returns globalId, name, description, objectType, tag mapped by schema name
8
+ * (see {@link extractRootAttributesFromEntity}), so the result stays correct
9
+ * for entity types whose attribute order differs from the IfcElement layout.
10
+ * This is used for entities that weren't fully parsed during initial load.
11
+ */
12
+ export declare function extractEntityAttributesOnDemand(store: IfcDataStore, entityId: number): {
13
+ globalId: string;
14
+ name: string;
15
+ description: string;
16
+ objectType: string;
17
+ tag: string;
18
+ };
19
+ /**
20
+ * Extract ALL named entity attributes on-demand from source buffer.
21
+ * Uses the IFC schema to map attribute indices to names.
22
+ * Returns only string/enum attributes, skipping references and structural attributes.
23
+ */
24
+ export declare function extractAllEntityAttributes(store: IfcDataStore, entityId: number): Array<{
25
+ name: string;
26
+ value: string | number | boolean;
27
+ }>;
28
+ /**
29
+ * Returns named raw attribute pairs for an entity, filtered to display-relevant attributes.
30
+ * Skips structural/reference attributes using the IFC schema. Used by query layer for coercion.
31
+ */
32
+ export declare function getRawNamedAttributes(entity: IfcEntity): Array<{
33
+ name: string;
34
+ raw: IfcAttributeValue;
35
+ }>;
36
+ /**
37
+ * Resolve the common IfcRoot-family display attributes (GlobalId, Name,
38
+ * Description, ObjectType, Tag) from an entity's raw attribute array.
39
+ *
40
+ * These are mapped by schema-derived attribute *name*, not fixed index. The
41
+ * fixed indices `[0],[2],[3],[4],[7]` only hold for the IfcElement layout: for
42
+ * a spatial element `attrs[7]` is LongName (not Tag), and for a resource entity
43
+ * like IfcMaterial `attrs[0]` is Name (not GlobalId). Name-mapping keeps all of
44
+ * these correct for every entity type, returning '' for attributes the type
45
+ * does not declare.
46
+ *
47
+ * For types the schema registry does not recognise (e.g. an IFC4x3 infra leaf
48
+ * outside the codegen pin, or a vendor extension) we fall back to the canonical
49
+ * IfcRoot/IfcElement positions so we never regress vs. the old fixed-index path.
50
+ */
51
+ export declare function extractRootAttributesFromEntity(entity: IfcEntity): {
52
+ globalId: string;
53
+ name: string;
54
+ description: string;
55
+ objectType: string;
56
+ tag: string;
57
+ };
58
+ /**
59
+ * Resolve an entity's LongName (IfcZone, IfcSystem subtypes, IfcSpatialZone,
60
+ * IfcBuildingSystem, …) by schema attribute name. Groups frequently leave Name
61
+ * empty and carry their human label in LongName, so consumers fall back to this
62
+ * for the display label. Returns '' when the type does not declare LongName.
63
+ * (#1075)
64
+ */
65
+ export declare function pickLongName(entity: IfcEntity): string;
66
+ //# sourceMappingURL=columnar-parser-root-attributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columnar-parser-root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