okgeometry-api 1.15.0 → 1.16.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.
@@ -153,6 +153,23 @@ export function brep_from_mesh_buffer(vertex_count: number, buffer: Float64Array
153
153
  */
154
154
  export function brep_info(json: string): Float64Array;
155
155
 
156
+ /**
157
+ * [`brep_intersection_curves_op`] with the per-face-pair pieces JOINED into
158
+ * maximal curves: greedy reversal-aware endpoint chaining, exact degree
159
+ * elevation to the chain maximum, exact `join_arcs` knot concatenation
160
+ * (junction multiplicity = degree, no re-parameterization), and a per-curve
161
+ * verification gate (dense samples within 5·tolerance of BOTH operands'
162
+ * surfaces — a chain failing the gate comes back unjoined, never corrupted).
163
+ * A closed intersection loop (e.g. plane through a cylinder) comes back as
164
+ * ONE closed curve.
165
+ *
166
+ * Packing: `[curveCount, (bufLen, curveData…)·curveCount]` (standard NURBS
167
+ * curve encoding). Returns an EMPTY buffer on failure (invalid BREP JSON or
168
+ * a pipeline error) — distinguishable from `[0]`, which means the operands
169
+ * genuinely do not intersect.
170
+ */
171
+ export function brep_intersection_curves_joined_op(a_json: string, b_json: string, tolerance: number): Float64Array;
172
+
156
173
  /**
157
174
  * TRIM-EXACT intersection curves between two BREPs (solids OR sheets): the
158
175
  * parametric boolean's SSI → clip → convergence stages run and the fitted 3D
@@ -1271,6 +1288,7 @@ export interface InitOutput {
1271
1288
  readonly brep_face_trim_bounds: (a: number, b: number, c: number) => [number, number];
1272
1289
  readonly brep_from_mesh_buffer: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1273
1290
  readonly brep_info: (a: number, b: number) => [number, number];
1291
+ readonly brep_intersection_curves_joined_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1274
1292
  readonly brep_intersection_curves_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1275
1293
  readonly brep_loft_curves: (a: number, b: number) => [number, number];
1276
1294
  readonly brep_mesh_intersection_curves_op: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
@@ -419,6 +419,36 @@ export function brep_info(json) {
419
419
  return v2;
420
420
  }
421
421
 
422
+ /**
423
+ * [`brep_intersection_curves_op`] with the per-face-pair pieces JOINED into
424
+ * maximal curves: greedy reversal-aware endpoint chaining, exact degree
425
+ * elevation to the chain maximum, exact `join_arcs` knot concatenation
426
+ * (junction multiplicity = degree, no re-parameterization), and a per-curve
427
+ * verification gate (dense samples within 5·tolerance of BOTH operands'
428
+ * surfaces — a chain failing the gate comes back unjoined, never corrupted).
429
+ * A closed intersection loop (e.g. plane through a cylinder) comes back as
430
+ * ONE closed curve.
431
+ *
432
+ * Packing: `[curveCount, (bufLen, curveData…)·curveCount]` (standard NURBS
433
+ * curve encoding). Returns an EMPTY buffer on failure (invalid BREP JSON or
434
+ * a pipeline error) — distinguishable from `[0]`, which means the operands
435
+ * genuinely do not intersect.
436
+ * @param {string} a_json
437
+ * @param {string} b_json
438
+ * @param {number} tolerance
439
+ * @returns {Float64Array}
440
+ */
441
+ export function brep_intersection_curves_joined_op(a_json, b_json, tolerance) {
442
+ const ptr0 = passStringToWasm0(a_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
443
+ const len0 = WASM_VECTOR_LEN;
444
+ const ptr1 = passStringToWasm0(b_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
445
+ const len1 = WASM_VECTOR_LEN;
446
+ const ret = wasm.brep_intersection_curves_joined_op(ptr0, len0, ptr1, len1, tolerance);
447
+ var v3 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
448
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
449
+ return v3;
450
+ }
451
+
422
452
  /**
423
453
  * TRIM-EXACT intersection curves between two BREPs (solids OR sheets): the
424
454
  * parametric boolean's SSI → clip → convergence stages run and the fitted 3D