@bldrs-ai/conway 1.514.1452 → 1.516.1463

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 (28) hide show
  1. package/compiled/examples/browser-bundled.cjs +1 -1
  2. package/compiled/examples/cli-bundled.cjs +1 -1
  3. package/compiled/examples/cli-step-bundled.cjs +1 -1
  4. package/compiled/examples/validator-bundled.cjs +1 -1
  5. package/compiled/src/compat/web-ifc/coordination_f64.d.ts +20 -0
  6. package/compiled/src/compat/web-ifc/coordination_f64.d.ts.map +1 -1
  7. package/compiled/src/compat/web-ifc/coordination_f64.js +25 -0
  8. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts.map +1 -1
  9. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.js +38 -13
  10. package/compiled/src/compat/web-ifc/spatial_imposter.d.ts +79 -3
  11. package/compiled/src/compat/web-ifc/spatial_imposter.d.ts.map +1 -1
  12. package/compiled/src/compat/web-ifc/spatial_imposter.js +220 -18
  13. package/compiled/src/compat/web-ifc/spatial_imposter.test.js +242 -3
  14. package/compiled/src/compat/web-ifc/store_preview_channel.d.ts.map +1 -1
  15. package/compiled/src/compat/web-ifc/store_preview_channel.js +2 -3
  16. package/compiled/src/compat/web-ifc/store_preview_channel.test.js +4 -1
  17. package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts +10 -4
  18. package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts.map +1 -1
  19. package/compiled/src/compat/web-ifc/streamed_preview_channel.js +2 -4
  20. package/compiled/src/version/version.js +1 -1
  21. package/compiled/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +1 -1
  23. package/compiled/src/compat/web-ifc/parse_aabb_imposter.d.ts +0 -41
  24. package/compiled/src/compat/web-ifc/parse_aabb_imposter.d.ts.map +0 -1
  25. package/compiled/src/compat/web-ifc/parse_aabb_imposter.js +0 -161
  26. package/compiled/src/compat/web-ifc/parse_aabb_imposter.test.d.ts +0 -2
  27. package/compiled/src/compat/web-ifc/parse_aabb_imposter.test.d.ts.map +0 -1
  28. package/compiled/src/compat/web-ifc/parse_aabb_imposter.test.js +0 -39
@@ -30,7 +30,7 @@ var import_node_process = require("node:process");
30
30
  var readline = __toESM(require("node:readline"), 1);
31
31
 
32
32
  // compiled/src/version/version.js
33
- var versionString = "Conway v1.514.1452";
33
+ var versionString = "Conway v1.516.1463";
34
34
 
35
35
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
36
36
  var wasmType = "";
@@ -14965,7 +14965,7 @@ ${t5.join("\n")}` : "";
14965
14965
  var import_process = require("process");
14966
14966
 
14967
14967
  // compiled/src/version/version.js
14968
- var versionString = "Conway v1.514.1452";
14968
+ var versionString = "Conway v1.516.1463";
14969
14969
 
14970
14970
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
14971
14971
  function pThreadsAllowed() {
@@ -15943,7 +15943,7 @@ var ParsingBuffer = class {
15943
15943
  };
15944
15944
 
15945
15945
  // compiled/src/version/version.js
15946
- var versionString = "Conway v1.514.1452";
15946
+ var versionString = "Conway v1.516.1463";
15947
15947
 
15948
15948
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
15949
15949
  function pThreadsAllowed() {
@@ -944,7 +944,7 @@ var EntityTypesIfcCount = 909;
944
944
  var entity_types_ifc_gen_default = EntityTypesIfc;
945
945
 
946
946
  // compiled/src/version/version.js
947
- var versionString = "Conway v1.514.1452";
947
+ var versionString = "Conway v1.516.1463";
948
948
 
949
949
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
950
950
  var wasmType = "";
@@ -25,6 +25,26 @@
25
25
  * to well under a micron — stay bit-comparable across the
26
26
  * classic / deferred / preview paths that share this recentre.
27
27
  */
28
+ /**
29
+ * The Z-up -> Y-up normalize matrix baked into every coordination frame
30
+ * (column-major).
31
+ *
32
+ * Every producer of a coordination frame MUST use the same matrix, or
33
+ * the frames it derives disagree with the durable walk's — which is
34
+ * exactly how the spatial-imposter plates ended up in a different space
35
+ * from the meshes (conway#515).
36
+ *
37
+ * This is the definition for everything that imports it: both preview
38
+ * channels and the spatial-imposter walk. Three identical literals
39
+ * remain, the public `NormalizeMat` field on `IfcAPI`, `IfcApiProxyIfc`
40
+ * and `IfcApiProxyAP214` — the web-ifc shim surface, typed
41
+ * `glmatrix.mat4`. They are the durable frame's producers, so they must
42
+ * stay bit-identical to this; folding them in is worth doing and was
43
+ * left out of conway#516 only to keep that diff to the imposter path.
44
+ */
45
+ export declare const NORMALIZE_MAT_F64: readonly number[];
46
+ /** Identity, for callers that need a "no coordination" frame. */
47
+ export declare const IDENTITY_MAT4: readonly number[];
28
48
  /**
29
49
  * A 3D point with double-precision components, as delivered by
30
50
  * conway-geom's `getPoint` / `normalize` (glm::dvec3 across the boundary).
@@ -1 +1 @@
1
- {"version":3,"file":"coordination_f64.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/coordination_f64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAiDH;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAkBxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,mBAAmB,OAAM,CAAA;AAoCtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,EACxC,KAAK,EAAE,UAAU,EACjB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,EAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,EAA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AAC,EAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAgCjC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAC/B,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,EAC/B,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,EACxC,UAAU,CAAC,EAAE,UAAU,GAAG,MAAM,EAAE,CAerC;AAGD,eAAO,MAAM,aAAa,KAAK,CAAA;AAC/B,eAAO,MAAM,aAAa,KAAK,CAAA;AAC/B,eAAO,MAAM,aAAa,KAAK,CAAA;AAE/B;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAM,CAAA"}
@@ -26,6 +26,31 @@
26
26
  * classic / deferred / preview paths that share this recentre.
27
27
  */
28
28
  const IDENTITY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
29
+ /**
30
+ * The Z-up -> Y-up normalize matrix baked into every coordination frame
31
+ * (column-major).
32
+ *
33
+ * Every producer of a coordination frame MUST use the same matrix, or
34
+ * the frames it derives disagree with the durable walk's — which is
35
+ * exactly how the spatial-imposter plates ended up in a different space
36
+ * from the meshes (conway#515).
37
+ *
38
+ * This is the definition for everything that imports it: both preview
39
+ * channels and the spatial-imposter walk. Three identical literals
40
+ * remain, the public `NormalizeMat` field on `IfcAPI`, `IfcApiProxyIfc`
41
+ * and `IfcApiProxyAP214` — the web-ifc shim surface, typed
42
+ * `glmatrix.mat4`. They are the durable frame's producers, so they must
43
+ * stay bit-identical to this; folding them in is worth doing and was
44
+ * left out of conway#516 only to keep that diff to the imposter path.
45
+ */
46
+ export const NORMALIZE_MAT_F64 = [
47
+ 1, 0, 0, 0,
48
+ 0, 0, -1, 0,
49
+ 0, 1, 0, 0,
50
+ 0, 0, 0, 1,
51
+ ];
52
+ /** Identity, for callers that need a "no coordination" frame. */
53
+ export const IDENTITY_MAT4 = IDENTITY;
29
54
  /**
30
55
  * Smallest positive magnitude representable in single precision
31
56
  * (2 ** -149, the smallest float32 subnormal). The previous code path
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_api_proxy_ifc.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_proxy_ifc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,YAAY,MAAM,0BAA0B,CAAA;AACnD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,MAAM,EACP,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,qBAAqB,EAA8B,MAAM,iCAAiC,CAAA;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAkBrD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AA4BzE;;;;;GAKG;AACH,UAAU,iBAAiB;IACzB,UAAU,EAAE,cAAc,CAAA;IAC1B,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;uEACmE;IACnE,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAA;IACpC,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,eAAe,CAAA;IACtB,cAAc,EAAE,qBAAqB,CAAA;IACrC,gBAAgB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;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,gBAAgB;IAmLxB;;;;OAIG;IACH,eAAe,CAAE,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;IAqLvD;;;;;OAKG;IACH,wBAAwB,CACpB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;IAgK1C;;;;OAIG;IACH,eAAe,IAAI,MAAM,CAAC,QAAQ,CAAC;IA2MnC;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ;IAqDxC;;;;;OAKG;IACH,4BAA4B,IAAI,IAAI;CAwBrC"}
@@ -2,7 +2,7 @@ import { ConwayGeometry, } from "../../index.js";
2
2
  import IfcStepModel from "../../ifc/ifc_step_model.js";
3
3
  import { WindowedStepBufferProvider } from "../../step/step_buffer_provider.js";
4
4
  import * as glmatrix from "gl-matrix";
5
- import { LARGE_COORDINATE_BUDGET_M, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, composeTransformF64, deriveCoordinationF64 } from "./coordination_f64.js";
5
+ import { IDENTITY_MAT4, LARGE_COORDINATE_BUDGET_M, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, composeTransformF64, deriveCoordinationF64 } from "./coordination_f64.js";
6
6
  import { IfcProperties } from "./ifc_properties.js";
7
7
  import Logger from "../../logging/logger.js";
8
8
  import { ProgressTracker } from "../../core/progress.js";
@@ -41,6 +41,24 @@ const STREAMED_PARSE_POOL_BYTES = 1024 * 1024;
41
41
  const STORE_PARSE_POOL_BYTES = 16 * 1024 * 1024;
42
42
  // eslint-disable-next-line no-magic-numbers
43
43
  const BYTES_PER_MIB = 1024 * 1024;
44
+ /**
45
+ * The coordination frame spatial-structure imposters compose under.
46
+ *
47
+ * With COORDINATE_TO_ORIGIN on, that is whatever frame the preview
48
+ * channel latched (undefined when it never captured an instance — the
49
+ * imposter walk then derives an equivalent one itself). With it OFF the
50
+ * durable capture composes against a bare identity, so the plates must
51
+ * too, or they would be the only thing in the scene in metres and Y-up.
52
+ *
53
+ * @param settings The open's loader settings.
54
+ * @param previewCoordination The preview channel's latched frame.
55
+ * @return {ArrayLike<number> | undefined} The frame, or undefined to let
56
+ * the imposter walk derive one.
57
+ */
58
+ function imposterCoordination(settings, previewCoordination) {
59
+ return settings?.COORDINATE_TO_ORIGIN === true ?
60
+ previewCoordination : IDENTITY_MAT4;
61
+ }
44
62
  /**
45
63
  * The proxy for IFC from the shim.
46
64
  */
@@ -560,15 +578,21 @@ export class IfcApiProxyIfc {
560
578
  // batch pump populates. `scene` is the same object streamAllMeshes
561
579
  // walks, so meshes appear to consumers as batches extract.
562
580
  if (deferGeometry) {
581
+ conwayGeometry.prepareDemandExtraction();
563
582
  if (settings?.ON_PREVIEW_MESH !== void 0) {
564
583
  try {
565
- await emitSpatialStructureImposters(model, settings.ON_PREVIEW_MESH);
584
+ // After prepareDemandExtraction, not before: the plates are
585
+ // composed under the coordination frame, whose scaling comes
586
+ // from getLinearScalingFactor() — which reads 1 until the
587
+ // extraction maps (and with them the unit assignment) are
588
+ // prepared. Both calls run in the same synchronous stretch
589
+ // after the parse, so nothing reaches the screen any later.
590
+ await emitSpatialStructureImposters(model, settings.ON_PREVIEW_MESH, imposterCoordination(settings, previewChannel?.coordinationMatrix), conwayGeometry.getLinearScalingFactor());
566
591
  }
567
592
  catch {
568
593
  // Spatial imposters must never break a deferred open.
569
594
  }
570
595
  }
571
- conwayGeometry.prepareDemandExtraction();
572
596
  statistics?.setProductCount(model.typeCount(IfcProduct));
573
597
  return {
574
598
  conwaywasm,
@@ -681,14 +705,6 @@ export class IfcApiProxyIfc {
681
705
  const provider = new WindowedStepBufferProvider(store);
682
706
  const model = new IfcStepModel(void 0, columns, provider);
683
707
  statistics?.setParseTime(parseEndTime - parseStartTime);
684
- if (settings?.ON_PREVIEW_MESH !== void 0) {
685
- try {
686
- await emitSpatialStructureImposters(model, settings.ON_PREVIEW_MESH);
687
- }
688
- catch {
689
- // Spatial imposters must never break a store-backed open.
690
- }
691
- }
692
708
  const conwayGeometry = new IfcGeometryExtraction(conwaywasm, model);
693
709
  const prepPins = await conwayGeometry.ensureResidentForDemandPrep();
694
710
  try {
@@ -698,6 +714,16 @@ export class IfcApiProxyIfc {
698
714
  model.releaseSourceViews(prepPins);
699
715
  model.unpinLocalIDs(prepPins);
700
716
  }
717
+ if (settings?.ON_PREVIEW_MESH !== void 0) {
718
+ try {
719
+ // Emitted after demand prep so getLinearScalingFactor() reports
720
+ // the model's real units — see the resident path's note.
721
+ await emitSpatialStructureImposters(model, settings.ON_PREVIEW_MESH, imposterCoordination(settings, storePreview?.coordinationMatrix), conwayGeometry.getLinearScalingFactor());
722
+ }
723
+ catch {
724
+ // Spatial imposters must never break a store-backed open.
725
+ }
726
+ }
701
727
  if (deferGeometry) {
702
728
  statistics?.setProductCount(model.typeCount(IfcProduct));
703
729
  return {
@@ -869,8 +895,7 @@ export class IfcApiProxyIfc {
869
895
  return clone;
870
896
  }
871
897
  else {
872
- Logger.error(`[GetGeometry]: Geometry Object not found for expressID:
873
- ${geometryExpressID}`);
898
+ Logger.error(`[GetGeometry]: Geometry Object not found for expressID: \n ${geometryExpressID}`);
874
899
  }
875
900
  }
876
901
  }
@@ -1,5 +1,4 @@
1
1
  import type IfcStepModel from "../../ifc/ifc_step_model.js";
2
- import type { Aabb3 } from "./parse_aabb_imposter.js";
3
2
  import type { PreviewMeshPayload } from "./streamed_preview_channel.js";
4
3
  /** Black, almost transparent — Share honours `w` as opacity. */
5
4
  export declare const SPATIAL_IMPOSTER_COLOR: {
@@ -8,6 +7,34 @@ export declare const SPATIAL_IMPOSTER_COLOR: {
8
7
  z: number;
9
8
  w: number;
10
9
  };
10
+ /** An axis-aligned box in raw IFC source-unit space (Z-up). */
11
+ export interface Aabb3 {
12
+ min: [
13
+ number,
14
+ number,
15
+ number
16
+ ];
17
+ max: [
18
+ number,
19
+ number,
20
+ number
21
+ ];
22
+ }
23
+ /**
24
+ * Column-major 4x4 mapping a centred unit cube onto `aabb`, entirely in
25
+ * RAW IFC space: `translate(centre) * scale(size)`.
26
+ *
27
+ * Deliberately carries NO Z-up -> Y-up flip and NO unit scaling: both of
28
+ * those live in the coordination matrix this is composed under (see
29
+ * {@link emitSpatialStructureImposters}), exactly as they do for real
30
+ * meshes. Baking the flip here — which the parse-time point-list
31
+ * imposter this replaced used to do — put the plates in a frame the
32
+ * durable geometry never shares (conway#515).
33
+ *
34
+ * @param aabb The IFC-space bounds.
35
+ * @return {number[]} 16-element matrix.
36
+ */
37
+ export declare function aabbBoxMatrix(aabb: Aabb3): number[];
11
38
  /**
12
39
  * Deepest spatial depth we still emit (never Spaces). Halfway down the
13
40
  * tree, plus every BuildingStorey — floor plates are the useful cut.
@@ -32,9 +59,14 @@ export declare function shouldEmitSpatialNode(depth: number, maxDepth: number, t
32
59
  * @param a First box.
33
60
  * @param b Second box.
34
61
  * @param rel Relative slack.
62
+ * @param minEdge Span floor, in the same source units as `a` and `b`.
63
+ * The walk always passes {@link minEdgeSourceUnits}' converted value;
64
+ * the default is the unconverted MIN_EDGE_M, which is only correct on a
65
+ * metre model — a caller that omits it on a millimetre one gets a
66
+ * one-millimetre floor, the very bug MIN_EDGE_M removed.
35
67
  * @return {boolean} True if they match.
36
68
  */
37
- export declare function aabbMostlyEqual(a: Aabb3, b: Aabb3, rel?: number): boolean;
69
+ export declare function aabbMostlyEqual(a: Aabb3, b: Aabb3, rel?: number, minEdge?: number): boolean;
38
70
  /**
39
71
  * Union of boxes; ignores undefined.
40
72
  *
@@ -50,9 +82,53 @@ export declare function unionAabb(...boxes: (Aabb3 | undefined)[]): Aabb3 | unde
50
82
  * depth, and storeys are always drawn when present. Nested wrappers
51
83
  * whose box matches their only child are collapsed.
52
84
  *
85
+ * **Frame.** Every box is measured in raw IFC source units and Z-up,
86
+ * because that is what the placement chains this walk reads carry. The
87
+ * emitted `flatTransformation` is `C * M_box`, where `M_box` is that raw
88
+ * box ({@link aabbBoxMatrix}) and `C` is the durable coordination frame —
89
+ * metres, Y-up, recentred per the quantized model-zero policy. So the
90
+ * plates land exactly where the real meshes do, which they did not
91
+ * before (raw units, a locally baked axis flip, no coordination: on a
92
+ * millimetre model the plates came out 1000x too big, and a
93
+ * georeferenced one put them a site-offset away — conway#515).
94
+ * `payload.aabb` stays in raw IFC space as the consumer's reference.
95
+ *
96
+ * **Call it after `prepareDemandExtraction()`, never before.** The frame
97
+ * needs `getLinearScalingFactor()`, which reads 1 until the extraction
98
+ * maps — and with them the unit assignment — are prepared, and
99
+ * `extractLinearScalingFactor()` is `*=`-accumulating, so it cannot be
100
+ * pulled forward on its own without squaring the unit prefix. The cost
101
+ * is latency on the model's first visible feedback: on the resident path
102
+ * the plates now follow the prep instead of preceding it, and on the
103
+ * store-backed path they also follow an awaited
104
+ * `ensureResidentForDemandPrep()`, so on a large model they land
105
+ * measurably later than they used to. Accepted deliberately — a plate at
106
+ * 1000x the model's scale is worse than a plate slightly late.
107
+ *
108
+ * **The latched frame is adopted, not guaranteed.** The deferred durable
109
+ * pump re-derives its own when the composed placement overruns
110
+ * LARGE_COORDINATE_BUDGET_M (`validatePreviewFrame`, Share#1634). Plates
111
+ * emitted here are not re-emitted, so on that path they keep the
112
+ * rejected frame and sit a site-offset from the durable meshes — the
113
+ * conway#515 symptom again, now confined to a case the preview meshes
114
+ * beside them share, and to scenery Share tears down at load end.
115
+ * Re-emitting on rejection is the fix if it ever shows up live.
116
+ *
53
117
  * @param model Parsed IFC model (windowed or resident).
54
118
  * @param onMesh Preview consumer.
119
+ * @param coordinationMatrix The frame already latched by the preview
120
+ * channel (the one the durable pump adopts). When it is `undefined` — no
121
+ * preview instance was ever captured — the walk derives the same frame
122
+ * from an identity placement anchored on the root spatial box's centre.
123
+ * That is best-effort by construction: below LARGE_COORDINATE_BUDGET_M
124
+ * the policy recentres nothing, so it agrees with the durable derivation
125
+ * exactly; above it, both snap to COORDINATION_SNAP_M and agree as long
126
+ * as the spatial root and the first geometry share a grid cell.
127
+ * @param linearScalingFactor Source units -> metres, from
128
+ * `IfcGeometryExtraction.getLinearScalingFactor()`. Only consulted for
129
+ * the fallback derivation and the minimum-edge padding; when
130
+ * `coordinationMatrix` is supplied its own scaling is already baked in.
55
131
  * @return {Promise<number>} Boxes emitted.
56
132
  */
57
- export declare function emitSpatialStructureImposters(model: IfcStepModel, onMesh: (mesh: PreviewMeshPayload) => void): Promise<number>;
133
+ export declare function emitSpatialStructureImposters(model: IfcStepModel, onMesh: (mesh: PreviewMeshPayload) => void, coordinationMatrix?: ArrayLike<number>, linearScalingFactor?: number): Promise<number>;
58
134
  //# sourceMappingURL=spatial_imposter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spatial_imposter.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/spatial_imposter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAA;AAWxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAKpE,gEAAgE;AAChE,eAAO,MAAM,sBAAsB;;;;;CAA+B,CAAA;AA8ClE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAE,QAAQ,EAAE,MAAM,GAAI,MAAM,CAGlE;AAGD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GAAI,OAAO,CAW5B;AAGD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,GAAE,MAAqB,GAAI,OAAO,CAiBzF;AAGD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAE,GAAG,KAAK,EAAE,CAAE,KAAK,GAAG,SAAS,CAAE,EAAE,GAAI,K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