@ifc-lite/parser 4.3.1 → 5.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 (176) hide show
  1. package/dist/attribute-helpers.d.ts +38 -4
  2. package/dist/attribute-helpers.d.ts.map +1 -1
  3. package/dist/attribute-helpers.js +71 -4
  4. package/dist/attribute-helpers.js.map +1 -1
  5. package/dist/columnar-parser-attributes.d.ts.map +1 -1
  6. package/dist/columnar-parser-attributes.js +35 -5
  7. package/dist/columnar-parser-attributes.js.map +1 -1
  8. package/dist/columnar-parser-indexes.d.ts.map +1 -1
  9. package/dist/columnar-parser-indexes.js +17 -2
  10. package/dist/columnar-parser-indexes.js.map +1 -1
  11. package/dist/columnar-parser-relationships.d.ts.map +1 -1
  12. package/dist/columnar-parser-relationships.js +6 -1
  13. package/dist/columnar-parser-relationships.js.map +1 -1
  14. package/dist/columnar-parser.d.ts +3 -1
  15. package/dist/columnar-parser.d.ts.map +1 -1
  16. package/dist/columnar-parser.js +27 -76
  17. package/dist/columnar-parser.js.map +1 -1
  18. package/dist/compact-entity-index-transport.d.ts +23 -0
  19. package/dist/compact-entity-index-transport.d.ts.map +1 -0
  20. package/dist/compact-entity-index-transport.js +28 -0
  21. package/dist/compact-entity-index-transport.js.map +1 -0
  22. package/dist/compact-entity-index.d.ts +0 -10
  23. package/dist/compact-entity-index.d.ts.map +1 -1
  24. package/dist/compact-entity-index.js +31 -24
  25. package/dist/compact-entity-index.js.map +1 -1
  26. package/dist/data-store-transport.d.ts +2 -12
  27. package/dist/data-store-transport.d.ts.map +1 -1
  28. package/dist/data-store-transport.js +7 -20
  29. package/dist/data-store-transport.js.map +1 -1
  30. package/dist/entity-extractor.d.ts.map +1 -1
  31. package/dist/entity-extractor.js +101 -6
  32. package/dist/entity-extractor.js.map +1 -1
  33. package/dist/entity-refs-from-index.d.ts.map +1 -1
  34. package/dist/entity-refs-from-index.js +12 -2
  35. package/dist/entity-refs-from-index.js.map +1 -1
  36. package/dist/entity-scanner.d.ts +63 -0
  37. package/dist/entity-scanner.d.ts.map +1 -1
  38. package/dist/entity-scanner.js +79 -2
  39. package/dist/entity-scanner.js.map +1 -1
  40. package/dist/express-id.d.ts +47 -0
  41. package/dist/express-id.d.ts.map +1 -0
  42. package/dist/express-id.js +57 -0
  43. package/dist/express-id.js.map +1 -0
  44. package/dist/generated/entities.d.ts +1 -1
  45. package/dist/generated/entities.d.ts.map +1 -1
  46. package/dist/generated/schema-registry.js +146 -146
  47. package/dist/generated/schema-registry.js.map +1 -1
  48. package/dist/georef-epset.d.ts +25 -0
  49. package/dist/georef-epset.d.ts.map +1 -0
  50. package/dist/georef-epset.js +214 -0
  51. package/dist/georef-epset.js.map +1 -0
  52. package/dist/georef-extractor.d.ts +9 -12
  53. package/dist/georef-extractor.d.ts.map +1 -1
  54. package/dist/georef-extractor.js +66 -304
  55. package/dist/georef-extractor.js.map +1 -1
  56. package/dist/georef-map-conversion.d.ts +29 -0
  57. package/dist/georef-map-conversion.d.ts.map +1 -0
  58. package/dist/georef-map-conversion.js +75 -0
  59. package/dist/georef-map-conversion.js.map +1 -0
  60. package/dist/georef-transform.d.ts +25 -0
  61. package/dist/georef-transform.d.ts.map +1 -0
  62. package/dist/georef-transform.js +97 -0
  63. package/dist/georef-transform.js.map +1 -0
  64. package/dist/ifc-schema.d.ts +4 -2
  65. package/dist/ifc-schema.d.ts.map +1 -1
  66. package/dist/ifc-schema.js +15 -5
  67. package/dist/ifc-schema.js.map +1 -1
  68. package/dist/index.d.ts +5 -2
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +5 -2
  71. package/dist/index.js.map +1 -1
  72. package/dist/map-unit-label.d.ts +43 -0
  73. package/dist/map-unit-label.d.ts.map +1 -0
  74. package/dist/map-unit-label.js +140 -0
  75. package/dist/map-unit-label.js.map +1 -0
  76. package/dist/material-extractor.d.ts +2 -17
  77. package/dist/material-extractor.d.ts.map +1 -1
  78. package/dist/material-extractor.js +12 -37
  79. package/dist/material-extractor.js.map +1 -1
  80. package/dist/material-layer-reader.d.ts +45 -0
  81. package/dist/material-layer-reader.d.ts.map +1 -0
  82. package/dist/material-layer-reader.js +63 -0
  83. package/dist/material-layer-reader.js.map +1 -0
  84. package/dist/material-resolver.d.ts.map +1 -1
  85. package/dist/material-resolver.js +14 -14
  86. package/dist/material-resolver.js.map +1 -1
  87. package/dist/measure-unit-scale.d.ts +41 -0
  88. package/dist/measure-unit-scale.d.ts.map +1 -0
  89. package/dist/measure-unit-scale.js +53 -0
  90. package/dist/measure-unit-scale.js.map +1 -0
  91. package/dist/on-demand-cache.d.ts +3 -0
  92. package/dist/on-demand-cache.d.ts.map +1 -0
  93. package/dist/on-demand-cache.js +25 -0
  94. package/dist/on-demand-cache.js.map +1 -0
  95. package/dist/on-demand-extractors.d.ts +5 -21
  96. package/dist/on-demand-extractors.d.ts.map +1 -1
  97. package/dist/on-demand-extractors.js +64 -437
  98. package/dist/on-demand-extractors.js.map +1 -1
  99. package/dist/on-demand-georeferencing.d.ts +19 -0
  100. package/dist/on-demand-georeferencing.d.ts.map +1 -0
  101. package/dist/on-demand-georeferencing.js +139 -0
  102. package/dist/on-demand-georeferencing.js.map +1 -0
  103. package/dist/owning-project.d.ts +54 -0
  104. package/dist/owning-project.d.ts.map +1 -0
  105. package/dist/owning-project.js +76 -0
  106. package/dist/owning-project.js.map +1 -0
  107. package/dist/parser.worker.d.ts +14 -0
  108. package/dist/parser.worker.d.ts.map +1 -1
  109. package/dist/parser.worker.js +2 -0
  110. package/dist/parser.worker.js.map +1 -1
  111. package/dist/project-units-symbols.d.ts +33 -0
  112. package/dist/project-units-symbols.d.ts.map +1 -0
  113. package/dist/project-units-symbols.js +265 -0
  114. package/dist/project-units-symbols.js.map +1 -0
  115. package/dist/project-units.d.ts +11 -19
  116. package/dist/project-units.d.ts.map +1 -1
  117. package/dist/project-units.js +9 -267
  118. package/dist/project-units.js.map +1 -1
  119. package/dist/property-set-merge.d.ts +65 -8
  120. package/dist/property-set-merge.d.ts.map +1 -1
  121. package/dist/property-set-merge.js +130 -29
  122. package/dist/property-set-merge.js.map +1 -1
  123. package/dist/property-value-parser.d.ts +55 -0
  124. package/dist/property-value-parser.d.ts.map +1 -0
  125. package/dist/property-value-parser.js +277 -0
  126. package/dist/property-value-parser.js.map +1 -0
  127. package/dist/quantity-collect.d.ts +135 -0
  128. package/dist/quantity-collect.d.ts.map +1 -0
  129. package/dist/quantity-collect.js +253 -0
  130. package/dist/quantity-collect.js.map +1 -0
  131. package/dist/query-backend-maps.d.ts +5 -8
  132. package/dist/query-backend-maps.d.ts.map +1 -1
  133. package/dist/query-backend-maps.js +159 -15
  134. package/dist/query-backend-maps.js.map +1 -1
  135. package/dist/relationship-extractor.d.ts.map +1 -1
  136. package/dist/relationship-extractor.js +18 -0
  137. package/dist/relationship-extractor.js.map +1 -1
  138. package/dist/scan-entities-balanced.d.ts +38 -0
  139. package/dist/scan-entities-balanced.d.ts.map +1 -0
  140. package/dist/scan-entities-balanced.js +258 -0
  141. package/dist/scan-entities-balanced.js.map +1 -0
  142. package/dist/scan-worker-inline.d.ts +17 -11
  143. package/dist/scan-worker-inline.d.ts.map +1 -1
  144. package/dist/scan-worker-inline.js +9 -235
  145. package/dist/scan-worker-inline.js.map +1 -1
  146. package/dist/scan-worker-source.d.ts +9 -0
  147. package/dist/scan-worker-source.d.ts.map +1 -0
  148. package/dist/scan-worker-source.js +383 -0
  149. package/dist/scan-worker-source.js.map +1 -0
  150. package/dist/source-header.d.ts +23 -1
  151. package/dist/source-header.d.ts.map +1 -1
  152. package/dist/source-header.js +133 -43
  153. package/dist/source-header.js.map +1 -1
  154. package/dist/spatial-hierarchy-builder.js +3 -3
  155. package/dist/spatial-hierarchy-builder.js.map +1 -1
  156. package/dist/step-lexing.d.ts +94 -0
  157. package/dist/step-lexing.d.ts.map +1 -1
  158. package/dist/step-lexing.js +292 -25
  159. package/dist/step-lexing.js.map +1 -1
  160. package/dist/step-trivia.d.ts +60 -0
  161. package/dist/step-trivia.d.ts.map +1 -0
  162. package/dist/step-trivia.js +63 -0
  163. package/dist/step-trivia.js.map +1 -0
  164. package/dist/tokenizer.d.ts +20 -21
  165. package/dist/tokenizer.d.ts.map +1 -1
  166. package/dist/tokenizer.js +164 -203
  167. package/dist/tokenizer.js.map +1 -1
  168. package/dist/unit-extractor.d.ts +56 -1
  169. package/dist/unit-extractor.d.ts.map +1 -1
  170. package/dist/unit-extractor.js +80 -6
  171. package/dist/unit-extractor.js.map +1 -1
  172. package/dist/worker-parser.d.ts +11 -1
  173. package/dist/worker-parser.d.ts.map +1 -1
  174. package/dist/worker-parser.js +16 -2
  175. package/dist/worker-parser.js.map +1 -1
  176. package/package.json +6 -6
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The IFC2x3 property-set georeferencing path.
3
+ *
4
+ * IFC2x3 has no `IfcMapConversion`, so buildingSMART's geo-referencing guide
5
+ * puts the same six numbers in a property set named `ePSet_MapConversion`,
6
+ * paired with an `ePSet_ProjectedCRS` for the CRS metadata. This file reads
7
+ * that pair; `georef-map-conversion.ts` reads the IFC4 entity. The two are
8
+ * twins and must stay in step — most of all in what they REFUSE, which is why
9
+ * the property list below is written against that file's slot list.
10
+ *
11
+ * Split out of `georef-extractor.ts` for the same reason the entity reader
12
+ * was: that file is at its module-size budget, and this is the half of it a
13
+ * schema revision keeps touching.
14
+ */
15
+ import type { IfcEntity } from './entity-extractor.js';
16
+ import type { GeoreferenceInfo } from './georef-extractor.js';
17
+ /**
18
+ * IFC2x3 fallback: a property set named `ePSet_MapConversion` (any casing)
19
+ * carrying Eastings/Northings/OrthogonalHeight (+ optional
20
+ * XAxisAbscissa/XAxisOrdinate/Scale/TargetCRS), optionally paired with an
21
+ * `ePSet_ProjectedCRS` set carrying the EPSG `Name`. Mirrors
22
+ * `GeoRefExtractor::extract_from_pset` in rust/core/src/georef.rs.
23
+ */
24
+ export declare function extractEPSetMapConversion(entities: Map<number, IfcEntity>, entitiesByType: Map<string, number[]>): GeoreferenceInfo | null;
25
+ //# sourceMappingURL=georef-epset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"georef-epset.d.ts","sourceRoot":"","sources":["../src/georef-epset.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAA+B,MAAM,uBAAuB,CAAC;AAyH3F;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAChC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACpC,gBAAgB,GAAG,IAAI,CA2GzB"}
@@ -0,0 +1,214 @@
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 { computeTransformMatrix } from './georef-transform.js';
5
+ import { getString, getNumber, getReference, isUnrepresentableNumericValue, } from './attribute-helpers.js';
6
+ import { inferMapUnitScaleFromLabel } from './map-unit-label.js';
7
+ /**
8
+ * Unwrap an IfcValue `NominalValue`. The columnar/on-demand extractor delivers
9
+ * typed values as a `[TYPENAME, value]` tuple (e.g.
10
+ * `["IFCLENGTHMEASURE", 160073528]`, `["IFCLABEL", "EPSG:7415"]`), which
11
+ * `getNumber`/`getString` don't see through; raw scalars (used by the
12
+ * entity-map callers) pass through untouched.
13
+ */
14
+ function unwrapNominalValue(value) {
15
+ if (Array.isArray(value) && value.length >= 2 && typeof value[0] === 'string') {
16
+ return value[1];
17
+ }
18
+ return value;
19
+ }
20
+ /**
21
+ * Read an `IfcPropertySet`'s `IfcPropertySingleValue` children into a
22
+ * name → raw-value map, keeping the value as-is (string or number) so both
23
+ * numeric (Eastings) and string (TargetCRS, EPSG Name) properties survive.
24
+ */
25
+ function readPsetSingleValues(entities, pset) {
26
+ const values = {};
27
+ // IfcPropertySet: GlobalId (0), OwnerHistory (1), Name (2), Description (3), HasProperties (4)
28
+ const props = pset.attributes[4];
29
+ if (Array.isArray(props)) {
30
+ for (const propRef of props) {
31
+ const propId = getReference(propRef);
32
+ if (!propId)
33
+ continue;
34
+ const prop = entities.get(propId);
35
+ if (!prop)
36
+ continue;
37
+ // IfcPropertySingleValue: Name (0), Description (1), NominalValue (2)
38
+ const propName = getString(prop.attributes[0]);
39
+ if (!propName)
40
+ continue;
41
+ const raw = unwrapNominalValue(prop.attributes[2]);
42
+ if (typeof raw === 'number') {
43
+ values[propName] = raw;
44
+ }
45
+ else if (typeof raw === 'string') {
46
+ // Keep the raw string verbatim. Coordinate fields are coerced on read
47
+ // via `asNumber` (some writers store Eastings/Scale as strings), while
48
+ // CRS metadata that merely looks numeric — `Name: "7415"`, `MapZone:
49
+ // "31N"` — must stay a string so `asString` doesn't discard it.
50
+ values[propName] = raw;
51
+ }
52
+ }
53
+ }
54
+ return values;
55
+ }
56
+ /**
57
+ * Find the first `IfcPropertySet` whose Name matches `targetName`
58
+ * case-insensitively. buildingSMART's geo-referencing guide spells the
59
+ * IFC2x3 property sets `ePSet_…` (capital S), but real authoring tools (e.g.
60
+ * the `ifc-georeferencer` post-processor) write `ePset_…` (lowercase) — an
61
+ * exact match silently dropped those models to the legacy IfcSite/EPSG:4326
62
+ * fallback, so they displayed the wrong CRS.
63
+ */
64
+ function findPsetByName(entities, entitiesByType, targetName) {
65
+ const target = targetName.toLowerCase();
66
+ const psetIds = entitiesByType.get('IfcPropertySet') || [];
67
+ for (const psetId of psetIds) {
68
+ const pset = entities.get(psetId);
69
+ if (!pset)
70
+ continue;
71
+ const name = getString(pset.attributes[2]);
72
+ if (name && name.toLowerCase() === target)
73
+ return pset;
74
+ }
75
+ return null;
76
+ }
77
+ function asString(value) {
78
+ if (typeof value === 'string')
79
+ return value.length > 0 ? value : undefined;
80
+ if (typeof value === 'number')
81
+ return String(value);
82
+ return undefined;
83
+ }
84
+ /**
85
+ * Delegates outright rather than short-circuiting an already-`number` value.
86
+ *
87
+ * It used to read `typeof value === 'number' ? value : getNumber(value)`,
88
+ * which is the same hole `getNumber` itself was just closed for: `Infinity`
89
+ * and `NaN` are `typeof 'number'`, so the short circuit handed them straight
90
+ * back and this helper's contract read "finite, unless the pset already held
91
+ * a number". `getNumber`'s number branch now returns the value when finite and
92
+ * `undefined` otherwise, which is what the short circuit was approximating —
93
+ * so there is nothing left for it to save, and one guard is easier to keep
94
+ * true than two.
95
+ */
96
+ function asNumber(value) {
97
+ return getNumber(value);
98
+ }
99
+ /**
100
+ * The ePSet placement components, mirroring `TRANSFORM_NUMERIC_SLOTS` in
101
+ * `georef-map-conversion.ts` — the IFC2x3 property-set spelling of the same
102
+ * six `IfcMapConversion` attributes, read by name instead of by slot.
103
+ */
104
+ const EPSET_TRANSFORM_PROPERTIES = [
105
+ 'Eastings',
106
+ 'Northings',
107
+ 'OrthogonalHeight',
108
+ 'XAxisAbscissa',
109
+ 'XAxisOrdinate',
110
+ 'Scale',
111
+ ];
112
+ /**
113
+ * IFC2x3 fallback: a property set named `ePSet_MapConversion` (any casing)
114
+ * carrying Eastings/Northings/OrthogonalHeight (+ optional
115
+ * XAxisAbscissa/XAxisOrdinate/Scale/TargetCRS), optionally paired with an
116
+ * `ePSet_ProjectedCRS` set carrying the EPSG `Name`. Mirrors
117
+ * `GeoRefExtractor::extract_from_pset` in rust/core/src/georef.rs.
118
+ */
119
+ export function extractEPSetMapConversion(entities, entitiesByType) {
120
+ const pset = findPsetByName(entities, entitiesByType, 'ePSet_MapConversion');
121
+ if (!pset)
122
+ return null;
123
+ const values = readPsetSingleValues(entities, pset);
124
+ // The IFC2x3 twin of the refusal in `georef-map-conversion.ts`, and it has
125
+ // to be here rather than there because this path never builds an
126
+ // `IfcMapConversion` entity to hand over. The two are the same fix: a
127
+ // placement component the double range cannot hold refuses the placement
128
+ // instead of substituting a plausible number for it.
129
+ //
130
+ // Without this the `?? 0` below put a `0` easting into a `MapConversion`
131
+ // that still claimed `hasGeoreference: true`, with no diagnostic — the
132
+ // model silently placed at the projection origin. That is the exact failure
133
+ // the native path was changed to stop, and it was reachable here the moment
134
+ // `getNumber` began answering `undefined` for an overflowing literal
135
+ // (before that it answered `Infinity`, which is not nullish, so `?? 0` never
136
+ // fired and the poison at least stayed visible).
137
+ const refusedProperty = EPSET_TRANSFORM_PROPERTIES.find((name) => isUnrepresentableNumericValue(values[name]));
138
+ // Resolve the CRS name from ePSet_ProjectedCRS.Name, falling back to the
139
+ // MapConversion's TargetCRS (the ifc-georeferencer tool writes both as the
140
+ // same EPSG label). Without this the EPSG code in the file was never
141
+ // surfaced on the IFC2x3 path.
142
+ const crsPset = findPsetByName(entities, entitiesByType, 'ePSet_ProjectedCRS');
143
+ const crsValues = crsPset ? readPsetSingleValues(entities, crsPset) : {};
144
+ const crsName = asString(crsValues['Name']) ?? asString(values['TargetCRS']);
145
+ if (refusedProperty !== undefined) {
146
+ console.warn(`[georef-extractor] ePSet_MapConversion #${pset.expressId} ${refusedProperty} is ` +
147
+ `outside the IEEE-754 double range (${String(values[refusedProperty])}); refusing the ` +
148
+ `map conversion rather than placing the model at a substituted origin.`);
149
+ }
150
+ // Some writers store the offsets as strings, so coerce on read.
151
+ const eastings = asNumber(values['Eastings']) ?? 0;
152
+ const northings = asNumber(values['Northings']) ?? 0;
153
+ const orthogonalHeight = asNumber(values['OrthogonalHeight']) ?? 0;
154
+ // Reject only when there is nothing to georeference by: no CRS name AND the
155
+ // placement sits at the local origin. Mirrors `has_georef()` in rust/core
156
+ // (a CRS name OR any non-zero offset is sufficient) so a valid zero-origin
157
+ // placement at a real projected CRS is kept rather than dropping to the
158
+ // legacy IfcSite/EPSG:4326 fallback.
159
+ //
160
+ // A refused placement takes this branch too when the file names no CRS —
161
+ // there is genuinely nothing left to report — and the caller then falls
162
+ // through to the legacy IfcSite/EPSG:4326 path. That fallback is no longer
163
+ // silent: the refusal above has already said why the ePSet was discarded.
164
+ if (!crsName && (refusedProperty !== undefined
165
+ || (eastings === 0 && northings === 0 && orthogonalHeight === 0))) {
166
+ return null;
167
+ }
168
+ let projectedCRS;
169
+ if (crsName || crsPset) {
170
+ const mapUnit = asString(crsValues['MapUnit']);
171
+ projectedCRS = {
172
+ id: crsPset?.expressId ?? pset.expressId,
173
+ name: crsName ?? '',
174
+ description: asString(crsValues['Description']),
175
+ geodeticDatum: asString(crsValues['GeodeticDatum']),
176
+ verticalDatum: asString(crsValues['VerticalDatum']),
177
+ mapProjection: asString(crsValues['MapProjection']),
178
+ mapZone: asString(crsValues['MapZone']),
179
+ mapUnit,
180
+ // An explicit ePSet MapUnit carries its own scale (parity with the native
181
+ // IfcProjectedCRS path). When absent, leave it undefined so consumers fall
182
+ // back to the project length unit per the buildingSMART convention.
183
+ mapUnitScale: inferMapUnitScaleFromLabel(mapUnit),
184
+ };
185
+ }
186
+ if (refusedProperty !== undefined) {
187
+ // Parity with the native path, where a refused conversion leaves
188
+ // `mapConversion` and `transformMatrix` absent while an `IfcProjectedCRS`
189
+ // still claims `hasGeoreference` — the file does declare a CRS, it just
190
+ // carries no usable placement. `source` stays absent for the same reason
191
+ // it does there: it names where the *placement* came from, and there is
192
+ // none.
193
+ return { hasGeoreference: true, projectedCRS };
194
+ }
195
+ const mapConversion = {
196
+ id: pset.expressId,
197
+ sourceCRS: 0,
198
+ targetCRS: 0,
199
+ eastings,
200
+ northings,
201
+ orthogonalHeight,
202
+ xAxisAbscissa: asNumber(values['XAxisAbscissa']),
203
+ xAxisOrdinate: asNumber(values['XAxisOrdinate']),
204
+ scale: asNumber(values['Scale']),
205
+ };
206
+ return {
207
+ hasGeoreference: true,
208
+ source: 'ePSetMapConversion',
209
+ mapConversion,
210
+ projectedCRS,
211
+ transformMatrix: computeTransformMatrix(mapConversion),
212
+ };
213
+ }
214
+ //# sourceMappingURL=georef-epset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"georef-epset.js","sourceRoot":"","sources":["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AC,CAAC;YACnD,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;YACnD,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACvC,OAAO;YACP,0EAA0E;YAC1E,2EAA2E;YAC3E,oEAAoE;YACpE,YAAY,EAAE,0BAA0B,CAAC,OAAO,CAAC;SAClD,CAAC;IACJ,CAAC;IAED,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAClC,iEAAiE;QACjE,0EAA0E;QAC1E,wEAAwE;QACxE,yEAAyE;QACzE,wEAAwE;QACxE,QAAQ;QACR,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACjD,CAAC;IAED,MAAM,aAAa,GAAkB;QACnC,EAAE,EAAE,IAAI,CAAC,SAAS;QAClB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,CAAC;QACZ,QAAQ;QACR,SAAS;QACT,gBAAgB;QAChB,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAChD,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAChD,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;KACjC,CAAC;IAEF,OAAO;QACL,eAAe,EAAE,IAAI;QACrB,MAAM,EAAE,oBAAoB;QAC5B,aAAa;QACb,YAAY;QACZ,eAAe,EAAE,sBAAsB,CAAC,aAAa,CAAC;KACvD,CAAC;AACJ,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { transformToWorld, transformToLocal, getCoordinateSystemDescription, } from './georef-transform.js';
1
2
  /**
2
3
  * Georeferencing Extractor
3
4
  *
@@ -57,19 +58,15 @@ export interface GeoreferenceInfo {
57
58
  transformMatrix?: number[];
58
59
  }
59
60
  /**
60
- * Extract georeferencing information from IFC entities
61
- */
62
- export declare function extractGeoreferencing(entities: Map<number, IfcEntity>, entitiesByType: Map<string, number[]>): GeoreferenceInfo;
63
- /**
64
- * Transform a point from local to world coordinates
61
+ * Every concrete class that carries an IfcMapConversion's attributes, in the
62
+ * mixed-case spelling `entitiesByType` is keyed by. `IfcMapConversionScaled`
63
+ * is IFC4X3's scaled variant and the only subtype in any bundled schema; it is
64
+ * listed here rather than folded into the caller so that every consumer of the
65
+ * exported `extractGeoreferencing` widens identically.
65
66
  */
66
- export declare function transformToWorld(localPoint: [number, number, number], georef: GeoreferenceInfo): [number, number, number] | null;
67
+ export declare const MAP_CONVERSION_TYPE_NAMES: readonly string[];
67
68
  /**
68
- * Transform a point from world to local coordinates
69
- */
70
- export declare function transformToLocal(worldPoint: [number, number, number], georef: GeoreferenceInfo): [number, number, number] | null;
71
- /**
72
- * Get coordinate system description
69
+ * Extract georeferencing information from IFC entities
73
70
  */
74
- export declare function getCoordinateSystemDescription(georef: GeoreferenceInfo): string;
71
+ export declare function extractGeoreferencing(entities: Map<number, IfcEntity>, entitiesByType: Map<string, number[]>): GeoreferenceInfo;
75
72
  //# sourceMappingURL=georef-extractor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"georef-extractor.d.ts","sourceRoot":"","sources":["../src/georef-extractor.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKvD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,CAAC,EAAE,MAAM,EACtB,a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