@ifc-lite/export 3.0.1 → 4.0.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 (163) hide show
  1. package/README.md +37 -1
  2. package/dist/anonymize-export.d.ts +60 -0
  3. package/dist/anonymize-export.d.ts.map +1 -0
  4. package/dist/anonymize-export.js +217 -0
  5. package/dist/anonymize-export.js.map +1 -0
  6. package/dist/anonymize-placement.d.ts +71 -0
  7. package/dist/anonymize-placement.d.ts.map +1 -0
  8. package/dist/anonymize-placement.js +266 -0
  9. package/dist/anonymize-placement.js.map +1 -0
  10. package/dist/anonymize-scrub.d.ts +64 -0
  11. package/dist/anonymize-scrub.d.ts.map +1 -0
  12. package/dist/anonymize-scrub.js +315 -0
  13. package/dist/anonymize-scrub.js.map +1 -0
  14. package/dist/anonymize-types.d.ts +235 -0
  15. package/dist/anonymize-types.d.ts.map +1 -0
  16. package/dist/anonymize-types.js +5 -0
  17. package/dist/anonymize-types.js.map +1 -0
  18. package/dist/declared-property-type.d.ts +15 -0
  19. package/dist/declared-property-type.d.ts.map +1 -1
  20. package/dist/declared-property-type.js +43 -0
  21. package/dist/declared-property-type.js.map +1 -1
  22. package/dist/entity-type-sets.d.ts +47 -0
  23. package/dist/entity-type-sets.d.ts.map +1 -0
  24. package/dist/entity-type-sets.js +91 -0
  25. package/dist/entity-type-sets.js.map +1 -0
  26. package/dist/georef-closure.d.ts +55 -0
  27. package/dist/georef-closure.d.ts.map +1 -0
  28. package/dist/georef-closure.js +95 -0
  29. package/dist/georef-closure.js.map +1 -0
  30. package/dist/glb.d.ts.map +1 -1
  31. package/dist/glb.js +26 -2
  32. package/dist/glb.js.map +1 -1
  33. package/dist/ifc5-classification.d.ts +36 -0
  34. package/dist/ifc5-classification.d.ts.map +1 -0
  35. package/dist/ifc5-classification.js +46 -0
  36. package/dist/ifc5-classification.js.map +1 -0
  37. package/dist/ifc5-export-helpers.d.ts +32 -0
  38. package/dist/ifc5-export-helpers.d.ts.map +1 -0
  39. package/dist/ifc5-export-helpers.js +84 -0
  40. package/dist/ifc5-export-helpers.js.map +1 -0
  41. package/dist/ifc5-exporter.d.ts.map +1 -1
  42. package/dist/ifc5-exporter.js +14 -86
  43. package/dist/ifc5-exporter.js.map +1 -1
  44. package/dist/ifc5-material.d.ts +38 -0
  45. package/dist/ifc5-material.d.ts.map +1 -0
  46. package/dist/ifc5-material.js +32 -0
  47. package/dist/ifc5-material.js.map +1 -0
  48. package/dist/index.d.ts +5 -1
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +7 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/merged-context.d.ts +100 -0
  53. package/dist/merged-context.d.ts.map +1 -0
  54. package/dist/merged-context.js +211 -0
  55. package/dist/merged-context.js.map +1 -0
  56. package/dist/merged-empty-containers.d.ts +63 -0
  57. package/dist/merged-empty-containers.d.ts.map +1 -0
  58. package/dist/merged-empty-containers.js +354 -0
  59. package/dist/merged-empty-containers.js.map +1 -0
  60. package/dist/merged-exporter.d.ts +28 -67
  61. package/dist/merged-exporter.d.ts.map +1 -1
  62. package/dist/merged-exporter.js +134 -258
  63. package/dist/merged-exporter.js.map +1 -1
  64. package/dist/merged-guid.d.ts +48 -0
  65. package/dist/merged-guid.d.ts.map +1 -0
  66. package/dist/merged-guid.js +128 -0
  67. package/dist/merged-guid.js.map +1 -0
  68. package/dist/merged-rel-aggregates.d.ts +63 -0
  69. package/dist/merged-rel-aggregates.d.ts.map +1 -0
  70. package/dist/merged-rel-aggregates.js +122 -0
  71. package/dist/merged-rel-aggregates.js.map +1 -0
  72. package/dist/merged-remap.d.ts +18 -0
  73. package/dist/merged-remap.d.ts.map +1 -0
  74. package/dist/merged-remap.js +66 -0
  75. package/dist/merged-remap.js.map +1 -0
  76. package/dist/merged-subcontext.d.ts +41 -0
  77. package/dist/merged-subcontext.d.ts.map +1 -0
  78. package/dist/merged-subcontext.js +99 -0
  79. package/dist/merged-subcontext.js.map +1 -0
  80. package/dist/parquet-exporter-ondemand.d.ts +34 -0
  81. package/dist/parquet-exporter-ondemand.d.ts.map +1 -0
  82. package/dist/parquet-exporter-ondemand.js +89 -0
  83. package/dist/parquet-exporter-ondemand.js.map +1 -0
  84. package/dist/parquet-exporter.d.ts +1 -29
  85. package/dist/parquet-exporter.d.ts.map +1 -1
  86. package/dist/parquet-exporter.js +68 -90
  87. package/dist/parquet-exporter.js.map +1 -1
  88. package/dist/parquet-type-strings.d.ts +11 -0
  89. package/dist/parquet-type-strings.d.ts.map +1 -0
  90. package/dist/parquet-type-strings.js +40 -0
  91. package/dist/parquet-type-strings.js.map +1 -0
  92. package/dist/parquet-uint32-columns.d.ts +30 -0
  93. package/dist/parquet-uint32-columns.d.ts.map +1 -0
  94. package/dist/parquet-uint32-columns.js +38 -0
  95. package/dist/parquet-uint32-columns.js.map +1 -0
  96. package/dist/reference-collector.d.ts +47 -51
  97. package/dist/reference-collector.d.ts.map +1 -1
  98. package/dist/reference-collector.js +115 -171
  99. package/dist/reference-collector.js.map +1 -1
  100. package/dist/related-entities.d.ts +10 -0
  101. package/dist/related-entities.d.ts.map +1 -0
  102. package/dist/related-entities.js +274 -0
  103. package/dist/related-entities.js.map +1 -0
  104. package/dist/schema-converter-attr-remap.d.ts +53 -0
  105. package/dist/schema-converter-attr-remap.d.ts.map +1 -0
  106. package/dist/schema-converter-attr-remap.js +106 -0
  107. package/dist/schema-converter-attr-remap.js.map +1 -0
  108. package/dist/schema-converter.d.ts.map +1 -1
  109. package/dist/schema-converter.js +24 -1
  110. package/dist/schema-converter.js.map +1 -1
  111. package/dist/schema-untranslatable.d.ts +35 -0
  112. package/dist/schema-untranslatable.d.ts.map +1 -0
  113. package/dist/schema-untranslatable.js +60 -0
  114. package/dist/schema-untranslatable.js.map +1 -0
  115. package/dist/step-argument-parser.d.ts.map +1 -1
  116. package/dist/step-argument-parser.js +11 -1
  117. package/dist/step-argument-parser.js.map +1 -1
  118. package/dist/step-attribute-mutations.js +14 -11
  119. package/dist/step-attribute-mutations.js.map +1 -1
  120. package/dist/step-collection.d.ts.map +1 -1
  121. package/dist/step-collection.js +51 -8
  122. package/dist/step-collection.js.map +1 -1
  123. package/dist/step-export-types.d.ts +42 -0
  124. package/dist/step-export-types.d.ts.map +1 -1
  125. package/dist/step-export-types.js +10 -0
  126. package/dist/step-export-types.js.map +1 -1
  127. package/dist/step-exporter.d.ts.map +1 -1
  128. package/dist/step-exporter.js +9 -1
  129. package/dist/step-exporter.js.map +1 -1
  130. package/dist/step-header.d.ts +1 -1
  131. package/dist/step-header.d.ts.map +1 -1
  132. package/dist/step-header.js +2 -2
  133. package/dist/step-header.js.map +1 -1
  134. package/dist/step-map-unit.d.ts +2 -1
  135. package/dist/step-map-unit.d.ts.map +1 -1
  136. package/dist/step-map-unit.js.map +1 -1
  137. package/dist/step-serialization.d.ts +10 -30
  138. package/dist/step-serialization.d.ts.map +1 -1
  139. package/dist/step-serialization.js +10 -60
  140. package/dist/step-serialization.js.map +1 -1
  141. package/dist/step-source-iteration.d.ts.map +1 -1
  142. package/dist/step-source-iteration.js +21 -0
  143. package/dist/step-source-iteration.js.map +1 -1
  144. package/dist/style-closure.d.ts +91 -0
  145. package/dist/style-closure.d.ts.map +1 -0
  146. package/dist/style-closure.js +164 -0
  147. package/dist/style-closure.js.map +1 -0
  148. package/dist/subset-entity-reader.d.ts +104 -0
  149. package/dist/subset-entity-reader.d.ts.map +1 -0
  150. package/dist/subset-entity-reader.js +112 -0
  151. package/dist/subset-entity-reader.js.map +1 -0
  152. package/dist/subset-roots.d.ts +74 -0
  153. package/dist/subset-roots.d.ts.map +1 -0
  154. package/dist/subset-roots.js +168 -0
  155. package/dist/subset-roots.js.map +1 -0
  156. package/dist/type-owned-psets.d.ts +19 -0
  157. package/dist/type-owned-psets.d.ts.map +1 -1
  158. package/dist/type-owned-psets.js +31 -0
  159. package/dist/type-owned-psets.js.map +1 -1
  160. package/dist/unit-normalize.d.ts.map +1 -1
  161. package/dist/unit-normalize.js +10 -2
  162. package/dist/unit-normalize.js.map +1 -1
  163. package/package.json +8 -8
@@ -0,0 +1,66 @@
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
+ /**
5
+ * Express-id remapping for the merged exporter: rewrite every `#N` reference of
6
+ * one model's STEP line into the merged file's id space.
7
+ *
8
+ * Split out of `merged-exporter.ts` (it never used `this`) so the id-rewriting
9
+ * rule lives in one small module next to the other merge-time line surgery
10
+ * (`merged-empty-containers.ts`, `merged-subcontext.ts`).
11
+ */
12
+ /**
13
+ * Remap all #ID references in a STEP entity line.
14
+ * Applies offset to all IDs, then overrides with specific remappings.
15
+ *
16
+ * Only `#<digits>` tokens in code positions are rewritten; tokens inside
17
+ * single-quoted STEP strings (e.g. a 'Room #205' Name or a 'http://x#42'
18
+ * URL) are left untouched so string attribute values are not corrupted.
19
+ */
20
+ export function remapEntityText(entityText, offset, sharedRemap) {
21
+ const remapId = (originalId) => {
22
+ // Check if this ID has a specific remap (project, shared infrastructure)
23
+ const remapped = sharedRemap.get(originalId);
24
+ if (remapped !== undefined) {
25
+ return `#${remapped}`;
26
+ }
27
+ // Apply offset
28
+ return `#${originalId + offset}`;
29
+ };
30
+ let out = '';
31
+ let inString = false;
32
+ for (let i = 0; i < entityText.length; i++) {
33
+ const char = entityText[i];
34
+ if (inString) {
35
+ out += char;
36
+ if (char === "'") {
37
+ // STEP escapes a literal quote by doubling it ('').
38
+ if (entityText[i + 1] === "'") {
39
+ out += entityText[i + 1];
40
+ i++;
41
+ }
42
+ else {
43
+ inString = false;
44
+ }
45
+ }
46
+ continue;
47
+ }
48
+ if (char === "'") {
49
+ inString = true;
50
+ out += char;
51
+ continue;
52
+ }
53
+ if (char === '#' && entityText[i + 1] >= '0' && entityText[i + 1] <= '9') {
54
+ let j = i + 1;
55
+ while (j < entityText.length && entityText[j] >= '0' && entityText[j] <= '9')
56
+ j++;
57
+ const originalId = parseInt(entityText.slice(i + 1, j), 10);
58
+ out += remapId(originalId);
59
+ i = j - 1;
60
+ continue;
61
+ }
62
+ out += char;
63
+ }
64
+ return out;
65
+ }
66
+ //# sourceMappingURL=merged-remap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merged-remap.js","sourceRoot":"","sources":["../src/merged-remap.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAkB,EAClB,MAAc,EACd,WAAwC;IAExC,MAAM,OAAO,GAAG,CAAC,UAAkB,EAAU,EAAE;QAC7C,yEAAyE;QACzE,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,IAAI,QAAQ,EAAE,CAAC;QACxB,CAAC;QACD,eAAe;QACf,OAAO,IAAI,UAAU,GAAG,MAAM,EAAE,CAAC;IACnC,CAAC,CAAC;IAEF,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAE3B,IAAI,QAAQ,EAAE,CAAC;YACb,GAAG,IAAI,IAAI,CAAC;YACZ,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBACjB,oDAAoD;gBACpD,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;oBAC9B,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACzB,CAAC,EAAE,CAAC;gBACN,CAAC;qBAAM,CAAC;oBACN,QAAQ,GAAG,KAAK,CAAC;gBACnB,CAAC;YACH,CAAC;YACD,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,QAAQ,GAAG,IAAI,CAAC;YAChB,GAAG,IAAI,IAAI,CAAC;YACZ,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;YACzE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,GAAG;gBAAE,CAAC,EAAE,CAAC;YAClF,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5D,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;YAC3B,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACV,SAAS;QACX,CAAC;QAED,GAAG,IAAI,IAAI,CAAC;IACd,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Kind-aware `IfcGeometricRepresentationSubContext` matching for
3
+ * {@link MergedExporter} (merge invariant lens pass 3, item 1).
4
+ *
5
+ * `MergedExporter` deduplicates a unit-compatible model's shared
6
+ * infrastructure — `IfcUnitAssignment`, `IfcGeometricRepresentationContext`
7
+ * and subcontexts — onto the primary model's instance. For subcontexts that
8
+ * used to mean taking the two models' subcontext id lists **positionally**:
9
+ * this model's first subcontext (in whatever order `entityIndex.byType`
10
+ * returns them) was unified onto the primary model's first subcontext, with
11
+ * no check that the two are the same kind.
12
+ *
13
+ * A model normally declares more than one subcontext ('Body' for solid
14
+ * geometry, 'Axis' for centreline geometry, sometimes 'FootPrint'/'Box'), and
15
+ * nothing in the IFC schema or common exporter behaviour guarantees they are
16
+ * always written in the same order across two different authoring tools. A
17
+ * positional match can therefore unify this model's 'Body' subcontext onto
18
+ * the primary model's 'Axis' subcontext (or vice versa): every
19
+ * `IfcShapeRepresentation.ContextOfItems` that pointed at the dropped 'Body'
20
+ * subcontext now resolves, after the remap, to a context tagged 'Axis' — the
21
+ * wrong kind, which many viewers filter out of the 3D view entirely (the
22
+ * geometry silently vanishes), with no dangling reference to reveal it.
23
+ *
24
+ * `planSubContextUnify` fixes this by matching on the subcontext's *kind*
25
+ * (its `ContextIdentifier` *and* `TargetView`, plus `UserDefinedTargetView`
26
+ * where applicable) rather than on raw array position.
27
+ */
28
+ import type { IfcDataStore } from '@ifc-lite/parser';
29
+ /** Group `ids` (a model's subcontext express ids) by {@link subContextKey}. */
30
+ export declare function groupSubContextsByKey(dataStore: IfcDataStore, ids: readonly number[]): Map<string, number[]>;
31
+ /**
32
+ * Plan this model's subcontext dedup against the primary model, key by key:
33
+ * a subcontext in `thisIds` is remapped+skipped only against an unclaimed
34
+ * primary-model subcontext with the SAME key (never a differently ordered one
35
+ * of a different kind or TargetView). A subcontext with no same-key match in
36
+ * the primary model is left un-remapped — kept as its own (offset-only)
37
+ * entity, exactly like today's "no shared infrastructure of this type"
38
+ * fallback. Mutates `sharedRemap`/`skipEntityIds`.
39
+ */
40
+ export declare function planSubContextUnify(dataStore: IfcDataStore, thisIds: readonly number[], firstModelSubContextsByKey: ReadonlyMap<string, number[]>, firstModelOffset: number, sharedRemap: Map<number, number>, skipEntityIds: Set<number>): void;
41
+ //# sourceMappingURL=merged-subcontext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merged-subcontext.d.ts","sourceRoot":"","sources":["../src/merged-subcontext.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA8DrD,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAQ5G;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,0BAA0B,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACzD,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GACzB,IAAI,CAYN"}
@@ -0,0 +1,99 @@
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 { asSourceBytes, STEP_TRIVIA } from '@ifc-lite/parser';
5
+ import { splitTopLevelStepArguments } from './step-argument-parser.js';
6
+ /**
7
+ * `#N=TYPE(...)` record, with STEP trivia (whitespace and/or a
8
+ * `/* ... *​/` comment, #3789) tolerated between the type name and `(` —
9
+ * same adjacency fix as `entity-extractor.ts`'s `extractEntity`. Without it
10
+ * a wrapped record's attribute is silently unreadable here (`getStepAttr`
11
+ * returns `null`), which reads identically to a genuinely-absent attribute.
12
+ */
13
+ const RECORD_RE = new RegExp(`^#\\d+\\s*=\\s*\\w+${STEP_TRIVIA}\\(([\\s\\S]*)\\)\\s*;?\\s*$`);
14
+ /** 0-based attribute index of `IfcGeometricRepresentationSubContext.ContextIdentifier`. */
15
+ const CONTEXT_IDENTIFIER_ATTR = 0;
16
+ /** 0-based attribute index of `IfcGeometricRepresentationSubContext.TargetView`. */
17
+ const TARGET_VIEW_ATTR = 8;
18
+ /** 0-based attribute index of `IfcGeometricRepresentationSubContext.UserDefinedTargetView`. */
19
+ const USER_DEFINED_TARGET_VIEW_ATTR = 9;
20
+ function decodeEntity(dataStore, expressId) {
21
+ const source = dataStore.source;
22
+ if (!source)
23
+ return null;
24
+ const ref = dataStore.entityIndex.byId.get(expressId);
25
+ if (!ref)
26
+ return null;
27
+ return asSourceBytes(source).decodeUtf8(ref.byteOffset, ref.byteOffset + ref.byteLength);
28
+ }
29
+ /** Extract one 0-based STEP attribute of `expressId`'s entity, or null if unreadable. */
30
+ function getStepAttr(dataStore, expressId, index) {
31
+ const text = decodeEntity(dataStore, expressId);
32
+ const match = text?.match(RECORD_RE);
33
+ if (!match)
34
+ return null;
35
+ const args = splitTopLevelStepArguments(match[1]);
36
+ const raw = args?.[index];
37
+ return raw === undefined ? null : raw.trim();
38
+ }
39
+ /** Normalize a STEP string/enum token to a comparison key; `''` for unset/unreadable. */
40
+ function normalizeLabel(raw) {
41
+ if (!raw || raw === '$' || raw === '*')
42
+ return '';
43
+ const quoted = raw.match(/^'([\s\S]*)'$/);
44
+ const inner = quoted ? quoted[1] : raw;
45
+ return inner.replace(/\./g, '').trim().toUpperCase();
46
+ }
47
+ /**
48
+ * The matching key of one `IfcGeometricRepresentationSubContext` combines its
49
+ * `ContextIdentifier` and `TargetView`: a Body representation for MODEL_VIEW
50
+ * is not interchangeable with one for PLAN_VIEW. `UserDefinedTargetView`
51
+ * distinguishes two USERDEFINED views. Empty pieces deliberately remain part
52
+ * of the key so identifier-less subcontexts still group by their view.
53
+ */
54
+ function subContextKey(dataStore, expressId) {
55
+ const identifier = normalizeLabel(getStepAttr(dataStore, expressId, CONTEXT_IDENTIFIER_ATTR));
56
+ const targetView = normalizeLabel(getStepAttr(dataStore, expressId, TARGET_VIEW_ATTR));
57
+ const userDefinedTargetView = targetView === 'USERDEFINED'
58
+ ? normalizeLabel(getStepAttr(dataStore, expressId, USER_DEFINED_TARGET_VIEW_ATTR))
59
+ : '';
60
+ return `${identifier}\u0000${targetView}\u0000${userDefinedTargetView}`;
61
+ }
62
+ /** Group `ids` (a model's subcontext express ids) by {@link subContextKey}. */
63
+ export function groupSubContextsByKey(dataStore, ids) {
64
+ const map = new Map();
65
+ for (const id of ids) {
66
+ const key = subContextKey(dataStore, id);
67
+ const bucket = map.get(key);
68
+ if (bucket)
69
+ bucket.push(id);
70
+ else
71
+ map.set(key, [id]);
72
+ }
73
+ return map;
74
+ }
75
+ /**
76
+ * Plan this model's subcontext dedup against the primary model, key by key:
77
+ * a subcontext in `thisIds` is remapped+skipped only against an unclaimed
78
+ * primary-model subcontext with the SAME key (never a differently ordered one
79
+ * of a different kind or TargetView). A subcontext with no same-key match in
80
+ * the primary model is left un-remapped — kept as its own (offset-only)
81
+ * entity, exactly like today's "no shared infrastructure of this type"
82
+ * fallback. Mutates `sharedRemap`/`skipEntityIds`.
83
+ */
84
+ export function planSubContextUnify(dataStore, thisIds, firstModelSubContextsByKey, firstModelOffset, sharedRemap, skipEntityIds) {
85
+ const nextIndex = new Map();
86
+ for (const id of thisIds) {
87
+ const key = subContextKey(dataStore, id);
88
+ const pool = firstModelSubContextsByKey.get(key);
89
+ if (!pool || pool.length === 0)
90
+ continue;
91
+ const idx = nextIndex.get(key) ?? 0;
92
+ if (idx >= pool.length)
93
+ continue; // every same-kind primary target already claimed
94
+ nextIndex.set(key, idx + 1);
95
+ sharedRemap.set(id, pool[idx] + firstModelOffset);
96
+ skipEntityIds.add(id);
97
+ }
98
+ }
99
+ //# sourceMappingURL=merged-subcontext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merged-subcontext.js","sourceRoot":"","sources":["../src/merged-subcontext.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA+B/D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,sBAAsB,WAAW,8BAA8B,CAAC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CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAuB,EACvB,OAA0B,EAC1B,0BAAyD,EACzD,gBAAwB,EACxB,WAAgC,EAChC,aAA0B;IAE1B,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,KAAK,MAAM,EAAE,IAAI,OAAO,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,aAAa,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,IAAI,GAAG,0BAA0B,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACzC,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM;YAAE,SAAS,CAAC,iDAAiD;QACnF,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;QAC5B,WAAW,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC;QAClD,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * `Properties.parquet` / `Quantities.parquet` writers for the on-demand parse
3
+ * path, extracted from `ParquetExporter` (`parquet-exporter.ts`) to keep that
4
+ * file under its module-size budget.
5
+ *
6
+ * `IfcParser.parseColumnar` (`packages/parser`'s only parse path, used by
7
+ * every real caller) never calls `.add()` on the `PropertyTableBuilder`/
8
+ * `QuantityTableBuilder` it constructs — properties and quantities are served
9
+ * lazily through `onDemandPropertyMap`/`onDemandQuantityMap` +
10
+ * `store.getProperties()`/`store.getQuantities()` instead
11
+ * (`extractPropertiesOnDemand`/`extractQuantitiesOnDemand`, re-parsing the
12
+ * source buffer on access). `ParquetExporter`'s bulk-table writers read
13
+ * `store.properties`/`store.quantities` directly, which is only populated
14
+ * when a caller builds a store some other way (e.g. this package's own
15
+ * hand-built test fixtures) — every store from a real parse left those two
16
+ * tables at zero rows, silently, alongside a fully-populated
17
+ * `Entities.parquet`/`Relationships.parquet`. These two functions are the
18
+ * on-demand fallback `ParquetExporter` calls when the bulk table is empty:
19
+ * one flat row per property/quantity, read through the same
20
+ * `store.getProperties()`/`store.getQuantities()` accessor every other
21
+ * consumer (the query package, the viewer's property panel) uses — never a
22
+ * second copy of the pset/property walk.
23
+ */
24
+ import type { IfcDataStore } from '@ifc-lite/parser';
25
+ import type { EffectiveEntityIndex } from './effective-index.js';
26
+ export declare function writePropertiesOnDemand(store: IfcDataStore, effective: EffectiveEntityIndex | null): Promise<Uint8Array>;
27
+ /**
28
+ * `Formula` is always NULL here: the on-demand quantity reader
29
+ * (`readQuantitySet` in `@ifc-lite/parser`) reports only
30
+ * `{name, type, value}` per quantity, so there is no formula string to carry
31
+ * — `ParquetExporter`'s bulk-table path is the only one that can populate it.
32
+ */
33
+ export declare function writeQuantitiesOnDemand(store: IfcDataStore, effective: EffectiveEntityIndex | null): Promise<Uint8Array>;
34
+ //# sourceMappingURL=parquet-exporter-ondemand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parquet-exporter-ondemand.d.ts","sourceRoot":"","sources":["../src/parquet-exporter-ondemand.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAKjE,wBAAsB,uBAAuB,CACzC,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,oBAAoB,GAAG,IAAI,GACvC,OAAO,CAAC,UAAU,CAAC,CA4CrB;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CACzC,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,oBAAoB,GAAG,IAAI,GACvC,OAAO,CAAC,UAAU,CAAC,CA+BrB"}
@@ -0,0 +1,89 @@
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 { PropertyValueType } from '@ifc-lite/data';
5
+ import { columnsToParquet } from './columns-to-parquet.js';
6
+ import { PARQUET_UINT32_COLUMNS } from './parquet-uint32-columns.js';
7
+ import { propertyValueTypeToString, quantityTypeToString } from './parquet-type-strings.js';
8
+ export async function writePropertiesOnDemand(store, effective) {
9
+ const entityIdCol = [];
10
+ const psetNameCol = [];
11
+ const psetGlobalIdCol = [];
12
+ const propNameCol = [];
13
+ const propTypeCol = [];
14
+ const valueStringCol = [];
15
+ // `IfcPropertyBoundedValue` is surfaced as a display string but retains
16
+ // the REAL type tag. Only a scalar numeric value belongs in ValueReal;
17
+ // writing 0 for the display-string form fabricates a measurement.
18
+ const valueRealCol = [];
19
+ const valueIntCol = [];
20
+ const valueBoolCol = [];
21
+ for (const id of store.onDemandPropertyMap.keys()) {
22
+ if (effective?.isDeleted(id))
23
+ continue;
24
+ const psets = store.getProperties(id);
25
+ for (const pset of psets) {
26
+ for (const prop of pset.properties) {
27
+ entityIdCol.push(id);
28
+ psetNameCol.push(pset.name);
29
+ psetGlobalIdCol.push(pset.globalId ?? '');
30
+ propNameCol.push(prop.name);
31
+ propTypeCol.push(prop.type);
32
+ const v = prop.value;
33
+ valueStringCol.push(typeof v === 'string' ? v : null);
34
+ valueRealCol.push(prop.type === PropertyValueType.Real && typeof v === 'number' ? v : null);
35
+ valueIntCol.push(prop.type === PropertyValueType.Integer && typeof v === 'number' ? v : 0);
36
+ valueBoolCol.push(typeof v === 'boolean' ? v : null);
37
+ }
38
+ }
39
+ }
40
+ return columnsToParquet({
41
+ EntityId: entityIdCol,
42
+ PsetName: psetNameCol,
43
+ PsetGlobalId: psetGlobalIdCol,
44
+ PropName: propNameCol,
45
+ PropType: propTypeCol.map(t => propertyValueTypeToString(t)),
46
+ ValueString: valueStringCol,
47
+ ValueReal: valueRealCol,
48
+ ValueInt: valueIntCol,
49
+ ValueBool: valueBoolCol,
50
+ }, new Set(['ValueReal']), PARQUET_UINT32_COLUMNS);
51
+ }
52
+ /**
53
+ * `Formula` is always NULL here: the on-demand quantity reader
54
+ * (`readQuantitySet` in `@ifc-lite/parser`) reports only
55
+ * `{name, type, value}` per quantity, so there is no formula string to carry
56
+ * — `ParquetExporter`'s bulk-table path is the only one that can populate it.
57
+ */
58
+ export async function writeQuantitiesOnDemand(store, effective) {
59
+ const entityIdCol = [];
60
+ const qsetNameCol = [];
61
+ const quantityNameCol = [];
62
+ const quantityTypeCol = [];
63
+ const valueCol = [];
64
+ const formulaCol = [];
65
+ for (const id of store.onDemandQuantityMap.keys()) {
66
+ if (effective?.isDeleted(id))
67
+ continue;
68
+ const qsets = store.getQuantities(id);
69
+ for (const qset of qsets) {
70
+ for (const q of qset.quantities) {
71
+ entityIdCol.push(id);
72
+ qsetNameCol.push(qset.name);
73
+ quantityNameCol.push(q.name);
74
+ quantityTypeCol.push(q.type);
75
+ valueCol.push(q.value);
76
+ formulaCol.push(q.formula ?? null);
77
+ }
78
+ }
79
+ }
80
+ return columnsToParquet({
81
+ EntityId: entityIdCol,
82
+ QsetName: qsetNameCol,
83
+ QuantityName: quantityNameCol,
84
+ QuantityType: quantityTypeCol.map(t => quantityTypeToString(t)),
85
+ Value: valueCol,
86
+ Formula: formulaCol,
87
+ }, new Set(['Value']), PARQUET_UINT32_COLUMNS);
88
+ }
89
+ //# sourceMappingURL=parquet-exporter-ondemand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parquet-exporter-ondemand.js","sourceRoot":"","sources":["../src/parquet-exporter-ondemand.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA2B/D,OAAO,EAAE,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AAsB,CAAC,CAAC;AACnD,CAAC"}
@@ -2,7 +2,6 @@
2
2
  import type { IfcDataStore } from '@ifc-lite/parser';
3
3
  import type { GeometryResult } from '@ifc-lite/geometry';
4
4
  import type { MutablePropertyView } from '@ifc-lite/mutations';
5
- import { QuantityType } from '@ifc-lite/data';
6
5
  export interface ParquetExportOptions {
7
6
  includeGeometry?: boolean;
8
7
  }
@@ -58,35 +57,8 @@ export declare class ParquetExporter {
58
57
  private writeMeshes;
59
58
  private writeSpatialHierarchy;
60
59
  private writeMetadata;
61
- /**
62
- * Column names whose domain is an unsigned 32-bit integer.
63
- *
64
- * Every one carries an IFC EXPRESS ID or an index into a geometry buffer,
65
- * and both are `u32` everywhere else in this codebase - `Uint32Array` in
66
- * the parser's entity index and its transports, `u32` in the Rust crates.
67
- * Arrow's content inference reaches for Int32 on any whole number, so an
68
- * express id at or above 2_147_483_648 came out NEGATIVE: an id-shaped
69
- * number that joins to nothing. STEP puts no upper bound on an entity id
70
- * below the `u32` the readers use, so that is reachable input rather than a
71
- * hypothetical.
72
- */
73
- private static readonly UINT32_COLUMNS;
74
- /**
75
- * NOT in the set above, deliberately: `BuildingId`, `SiteId` and `SpaceId`
76
- * in `SpatialHierarchy.parquet` carry **-1 as "none"** (see
77
- * `writeSpatialHierarchy` - a storey directly under the project has no
78
- * building). Declaring those unsigned turned that sentinel into
79
- * 4294967295: an id-shaped number where an obviously-absent marker used to
80
- * be, which is the exact failure this class of change exists to prevent.
81
- *
82
- * The residual gap is the narrower one: a building or site id at or above
83
- * 2^31 still wraps negative in those three columns. Fixing that properly
84
- * means writing NULL rather than -1 for "none", which changes what every
85
- * consumer reads for an absent parent and is a separate decision from the
86
- * id width.
87
- */
88
60
  private toParquet;
89
61
  private createZipArchive;
90
62
  }
91
- export declare function QuantityTypeToString(type: QuantityType): string;
63
+ export { quantityTypeToString as QuantityTypeToString } from './parquet-type-strings.js';
92
64
  //# sourceMappingURL=parquet-exporter.d.ts.map
@@ -1 +1 @@
1
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