@solid-labs/fab-one-widget 1.1.13 → 1.1.15

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.
@@ -5,7 +5,7 @@ export type { GirthManagerCoreProps, GirthManagerResult } from "./GirthManagerCo
5
5
  export { useMeasurementStore } from "./store";
6
6
  export type { WasmModule, LandmarkPoint, MeasurementData, SliceResult, Seg } from "./processing/types";
7
7
  export { WIDGET_VERSION, LABEL_X_OFFSET_RATIO, BVH_MAX_LEAF_TRIS, WELD_EPSILON, MM_PER_INCH, ABOVE_POINT_OFFSET_INCHES, AUTO_SCALE_VOLUME_THRESHOLD, RETRY_OFFSETS } from "./processing/constants";
8
- export { diag, logEnvDiagnostics, logMeshStats } from "./processing/diagnostics";
8
+ export { diag, logEnvDiagnostics, logMeshStats, logAbsoluteBounds, logVertexPrecision, verifyWasmAbi } from "./processing/diagnostics";
9
9
  export { parseObjVertexColors, transferVertexColors } from "./processing/vertex-colors";
10
10
  export { computeSliceAtYOnce, computeSliceAtY, buildBVH, calcLineLength, computeCircumferenceAtPlane } from "./processing/slice";
11
11
  export { intersectMeshWithPlane, findBestCutPlane } from "./processing/cut-plane";
@@ -1,4 +1,4 @@
1
- export declare const WIDGET_VERSION = "1.1.13";
1
+ export declare const WIDGET_VERSION = "1.1.15";
2
2
  export declare const LABEL_X_OFFSET_RATIO = 0.45;
3
3
  export declare const BVH_MAX_LEAF_TRIS = 3;
4
4
  export declare const WELD_EPSILON = 0.001;
@@ -9,3 +9,27 @@ export declare function diag(message: string, data?: unknown): void;
9
9
  export declare function logEnvDiagnostics(wasmModule: unknown): void;
10
10
  /** Log mesh size at a pipeline stage so we can see if welding collapsed the model. */
11
11
  export declare function logMeshStats(stage: string, vertexCount: number, triangleCount: number): void;
12
+ /**
13
+ * Log the model's ABSOLUTE position in space (not just bbox size). A scan sitting
14
+ * far from the origin loses float32 precision: every vertex has ~|coord| * 2^-23 mm
15
+ * of resolution, so an off-origin model gets snapped to a coarse grid and the weld
16
+ * step collapses it. This is the usual cause of "low-poly/broken" when the bbox
17
+ * size itself looks normal. Computed in float64 from the float32 input.
18
+ */
19
+ export declare function logAbsoluteBounds(positions: Float32Array): void;
20
+ /**
21
+ * How many genuinely distinct vertex positions does the mesh have, and what do the
22
+ * raw coordinates look like? If a 200k-vertex scan has only a few dozen distinct
23
+ * positions, the geometry was quantized BEFORE it reached the widget (e.g. serialized
24
+ * with toFixed(2) while in meter units), and that is what collapses during welding.
25
+ */
26
+ export declare function logVertexPrecision(positions: Float32Array): void;
27
+ /**
28
+ * Verify the loaded wasm's parameter layout matches this JS bundle. The cm-scaling
29
+ * release added a parameter to preprocess_mesh; if a host app serves a stale
30
+ * geo_wasm_bg.wasm built before that change, the arguments shift by one and the
31
+ * weld tolerance becomes ~100mm, silently collapsing every scan to a low-poly blob.
32
+ * This runs a tiny probe mesh once at load and returns false (with a loud error)
33
+ * if the wasm is out of date. Returns true when the wasm is fine or uncheckable.
34
+ */
35
+ export declare function verifyWasmAbi(wasmModule: unknown): boolean;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G as a, a as c, c as i, g as s } from "./GirthManagerWidget-ByQnd9Wb.js";
1
+ import { G as a, a as c, c as i, g as s } from "./GirthManagerWidget-CThclgpq.js";
2
2
  export {
3
3
  a as GirthManagerWidget,
4
4
  c as arrayToCircumference,
@@ -1,6 +1,6 @@
1
1
  import { createElement as n } from "react";
2
2
  import { createRoot as i } from "react-dom/client";
3
- import { u as a, G as u, __tla as __tla_0 } from "./GirthManagerWidget-ByQnd9Wb.js";
3
+ import { u as a, G as u, __tla as __tla_0 } from "./GirthManagerWidget-CThclgpq.js";
4
4
  import "react/jsx-runtime";
5
5
  import "@react-three/fiber";
6
6
  import "@react-three/drei";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solid-labs/fab-one-widget",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",