@ifc-lite/wasm 4.6.0 → 4.7.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.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "4.6.0",
8
+ "version": "4.7.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -10,6 +10,23 @@ export class ClashIntersectionSolidJs {
10
10
  [Symbol.dispose](): void;
11
11
  /**
12
12
  * `""` when `isSolid`, otherwise one of:
13
+ * - `"malformed-operand"` — any of FOUR malformations, all rejected
14
+ * before the boolean runs, because computing on them would silently
15
+ * drop the offending triangle (or worse) rather than report the true
16
+ * operand:
17
+ * 1. `positionsA`/`positionsB` is not a flat `[x, y, z, …]` triple
18
+ * (length not a multiple of 3);
19
+ * 2. `indicesA`/`indicesB` has a length that is not a multiple of 3,
20
+ * so it does not describe whole triangles;
21
+ * 3. `indicesA`/`indicesB` references a vertex past the end of its own
22
+ * operand's positions;
23
+ * 4. a position is **non-finite** (NaN or infinity). This one is worth
24
+ * calling out to callers: a NaN coordinate is caught by neither
25
+ * length check, and left alone it can be absorbed into a
26
+ * normal-looking answer or corrupt a face enough to report a
27
+ * genuinely overlapping pair as `"no-overlap"`. So if you are
28
+ * debugging an unexpected `"no-overlap"`, check your inputs for
29
+ * NaN — it surfaces here, not there.
13
30
  * - `"empty-operand"` — an operand had no triangles.
14
31
  * - `"no-overlap"` — the exact intersection is empty. Covers a disjoint
15
32
  * pair AND a *touching* pair, including any graze below the kernel's
@@ -74,6 +91,7 @@ export class ClashRunResult {
74
91
  readonly b: Uint32Array;
75
92
  readonly bounds: Float64Array;
76
93
  readonly distance: Float64Array;
94
+ readonly distanceKind: Uint8Array;
77
95
  readonly points: Float64Array;
78
96
  readonly status: Uint8Array;
79
97
  }
@@ -1838,6 +1856,7 @@ export interface InitOutput {
1838
1856
  readonly clashrunresult_b: (a: number, b: number) => void;
1839
1857
  readonly clashrunresult_bounds: (a: number, b: number) => void;
1840
1858
  readonly clashrunresult_distance: (a: number, b: number) => void;
1859
+ readonly clashrunresult_distanceKind: (a: number, b: number) => void;
1841
1860
  readonly clashrunresult_points: (a: number, b: number) => void;
1842
1861
  readonly clashrunresult_status: (a: number, b: number) => void;
1843
1862
  readonly clashsession_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
package/pkg/ifc-lite.js CHANGED
@@ -22,6 +22,23 @@ export class ClashIntersectionSolidJs {
22
22
  }
23
23
  /**
24
24
  * `""` when `isSolid`, otherwise one of:
25
+ * - `"malformed-operand"` — any of FOUR malformations, all rejected
26
+ * before the boolean runs, because computing on them would silently
27
+ * drop the offending triangle (or worse) rather than report the true
28
+ * operand:
29
+ * 1. `positionsA`/`positionsB` is not a flat `[x, y, z, …]` triple
30
+ * (length not a multiple of 3);
31
+ * 2. `indicesA`/`indicesB` has a length that is not a multiple of 3,
32
+ * so it does not describe whole triangles;
33
+ * 3. `indicesA`/`indicesB` references a vertex past the end of its own
34
+ * operand's positions;
35
+ * 4. a position is **non-finite** (NaN or infinity). This one is worth
36
+ * calling out to callers: a NaN coordinate is caught by neither
37
+ * length check, and left alone it can be absorbed into a
38
+ * normal-looking answer or corrupt a face enough to report a
39
+ * genuinely overlapping pair as `"no-overlap"`. So if you are
40
+ * debugging an unexpected `"no-overlap"`, check your inputs for
41
+ * NaN — it surfaces here, not there.
25
42
  * - `"empty-operand"` — an operand had no triangles.
26
43
  * - `"no-overlap"` — the exact intersection is empty. Covers a disjoint
27
44
  * pair AND a *touching* pair, including any graze below the kernel's
@@ -222,6 +239,22 @@ export class ClashRunResult {
222
239
  wasm.__wbindgen_add_to_stack_pointer(16);
223
240
  }
224
241
  }
242
+ /**
243
+ * @returns {Uint8Array}
244
+ */
245
+ get distanceKind() {
246
+ try {
247
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
248
+ wasm.clashrunresult_distanceKind(retptr, this.__wbg_ptr);
249
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
250
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
251
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
252
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
253
+ return v1;
254
+ } finally {
255
+ wasm.__wbindgen_add_to_stack_pointer(16);
256
+ }
257
+ }
225
258
  /**
226
259
  * @returns {Float64Array}
227
260
  */
Binary file