brepkit-wasm 2.88.0 → 2.89.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/brepkit_wasm.d.ts CHANGED
@@ -1121,6 +1121,28 @@ export class BrepKernel {
1121
1121
  * non-positive, or the normal vector is zero.
1122
1122
  */
1123
1123
  makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
1124
+ /**
1125
+ * Create a closed circular edge with a caller-supplied reference x-direction.
1126
+ *
1127
+ * Like [`makeCircleEdge`](Self::make_circle_edge), but `ref_dir = (rx, ry, rz)`
1128
+ * is projected onto the plane perpendicular to the normal to fix the
1129
+ * circle's `u_axis` — which controls the seam vertex position at
1130
+ * `circle.evaluate(0.0)`. Use when downstream code (PCurve computation,
1131
+ * extrusion frame) depends on a specific seam placement.
1132
+ *
1133
+ * `ref_dir` must be non-zero (rejected at this boundary) and ideally
1134
+ * not parallel to the normal — `Frame3::from_normal_and_ref` falls
1135
+ * back to an arbitrary perpendicular when the projection of `ref_dir`
1136
+ * onto the plane is degenerate, defeating the purpose of this call.
1137
+ *
1138
+ * Returns an edge handle (`u32`).
1139
+ *
1140
+ * # Errors
1141
+ *
1142
+ * Returns an error if any coordinate is NaN/infinite, `radius` is
1143
+ * non-positive, or the normal vector or `ref_dir` is zero.
1144
+ */
1145
+ makeCircleEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, rx: number, ry: number, rz: number): number;
1124
1146
  /**
1125
1147
  * Create a circular face on the XY plane (using NURBS arcs).
1126
1148
  *
@@ -1169,6 +1191,31 @@ export class BrepKernel {
1169
1191
  * the normal vector is zero.
1170
1192
  */
1171
1193
  makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semi_major: number, semi_minor: number): number;
1194
+ /**
1195
+ * Create a closed elliptical edge with a caller-supplied reference major-axis.
1196
+ *
1197
+ * Like [`makeEllipseEdge`](Self::make_ellipse_edge), but `ref_dir = (rx, ry, rz)`
1198
+ * is projected onto the plane perpendicular to the normal to fix the
1199
+ * ellipse's major-axis direction (`u_axis`, carrying `semi_major`).
1200
+ * Use this when the caller has an intended major-axis orientation —
1201
+ * otherwise the default-frame variant chooses an arbitrary
1202
+ * perpendicular, which can cause adapters to fall back to NURBS
1203
+ * approximations to preserve their requested orientation.
1204
+ *
1205
+ * `ref_dir` must be non-zero (rejected at this boundary) and ideally
1206
+ * not parallel to the normal — `Frame3::from_normal_and_ref` falls
1207
+ * back to an arbitrary perpendicular when the projection of `ref_dir`
1208
+ * onto the plane is degenerate, defeating the purpose of this call.
1209
+ *
1210
+ * Returns an edge handle (`u32`).
1211
+ *
1212
+ * # Errors
1213
+ *
1214
+ * Returns an error if any coordinate is NaN/infinite, either
1215
+ * semi-axis is non-positive, `semi_minor` exceeds `semi_major`, or
1216
+ * the normal vector or `ref_dir` is zero.
1217
+ */
1218
+ makeEllipseEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semi_major: number, semi_minor: number, rx: number, ry: number, rz: number): number;
1172
1219
  /**
1173
1220
  * Create an ellipsoid solid centered at the origin.
1174
1221
  *
@@ -2471,6 +2471,45 @@ export class BrepKernel {
2471
2471
  }
2472
2472
  return ret[0] >>> 0;
2473
2473
  }
2474
+ /**
2475
+ * Create a closed circular edge with a caller-supplied reference x-direction.
2476
+ *
2477
+ * Like [`makeCircleEdge`](Self::make_circle_edge), but `ref_dir = (rx, ry, rz)`
2478
+ * is projected onto the plane perpendicular to the normal to fix the
2479
+ * circle's `u_axis` — which controls the seam vertex position at
2480
+ * `circle.evaluate(0.0)`. Use when downstream code (PCurve computation,
2481
+ * extrusion frame) depends on a specific seam placement.
2482
+ *
2483
+ * `ref_dir` must be non-zero (rejected at this boundary) and ideally
2484
+ * not parallel to the normal — `Frame3::from_normal_and_ref` falls
2485
+ * back to an arbitrary perpendicular when the projection of `ref_dir`
2486
+ * onto the plane is degenerate, defeating the purpose of this call.
2487
+ *
2488
+ * Returns an edge handle (`u32`).
2489
+ *
2490
+ * # Errors
2491
+ *
2492
+ * Returns an error if any coordinate is NaN/infinite, `radius` is
2493
+ * non-positive, or the normal vector or `ref_dir` is zero.
2494
+ * @param {number} cx
2495
+ * @param {number} cy
2496
+ * @param {number} cz
2497
+ * @param {number} nx
2498
+ * @param {number} ny
2499
+ * @param {number} nz
2500
+ * @param {number} radius
2501
+ * @param {number} rx
2502
+ * @param {number} ry
2503
+ * @param {number} rz
2504
+ * @returns {number}
2505
+ */
2506
+ makeCircleEdgeWithRef(cx, cy, cz, nx, ny, nz, radius, rx, ry, rz) {
2507
+ const ret = wasm.brepkernel_makeCircleEdgeWithRef(this.__wbg_ptr, cx, cy, cz, nx, ny, nz, radius, rx, ry, rz);
2508
+ if (ret[2]) {
2509
+ throw takeFromExternrefTable0(ret[1]);
2510
+ }
2511
+ return ret[0] >>> 0;
2512
+ }
2474
2513
  /**
2475
2514
  * Create a circular face on the XY plane (using NURBS arcs).
2476
2515
  *
@@ -2572,6 +2611,49 @@ export class BrepKernel {
2572
2611
  }
2573
2612
  return ret[0] >>> 0;
2574
2613
  }
2614
+ /**
2615
+ * Create a closed elliptical edge with a caller-supplied reference major-axis.
2616
+ *
2617
+ * Like [`makeEllipseEdge`](Self::make_ellipse_edge), but `ref_dir = (rx, ry, rz)`
2618
+ * is projected onto the plane perpendicular to the normal to fix the
2619
+ * ellipse's major-axis direction (`u_axis`, carrying `semi_major`).
2620
+ * Use this when the caller has an intended major-axis orientation —
2621
+ * otherwise the default-frame variant chooses an arbitrary
2622
+ * perpendicular, which can cause adapters to fall back to NURBS
2623
+ * approximations to preserve their requested orientation.
2624
+ *
2625
+ * `ref_dir` must be non-zero (rejected at this boundary) and ideally
2626
+ * not parallel to the normal — `Frame3::from_normal_and_ref` falls
2627
+ * back to an arbitrary perpendicular when the projection of `ref_dir`
2628
+ * onto the plane is degenerate, defeating the purpose of this call.
2629
+ *
2630
+ * Returns an edge handle (`u32`).
2631
+ *
2632
+ * # Errors
2633
+ *
2634
+ * Returns an error if any coordinate is NaN/infinite, either
2635
+ * semi-axis is non-positive, `semi_minor` exceeds `semi_major`, or
2636
+ * the normal vector or `ref_dir` is zero.
2637
+ * @param {number} cx
2638
+ * @param {number} cy
2639
+ * @param {number} cz
2640
+ * @param {number} nx
2641
+ * @param {number} ny
2642
+ * @param {number} nz
2643
+ * @param {number} semi_major
2644
+ * @param {number} semi_minor
2645
+ * @param {number} rx
2646
+ * @param {number} ry
2647
+ * @param {number} rz
2648
+ * @returns {number}
2649
+ */
2650
+ makeEllipseEdgeWithRef(cx, cy, cz, nx, ny, nz, semi_major, semi_minor, rx, ry, rz) {
2651
+ const ret = wasm.brepkernel_makeEllipseEdgeWithRef(this.__wbg_ptr, cx, cy, cz, nx, ny, nz, semi_major, semi_minor, rx, ry, rz);
2652
+ if (ret[2]) {
2653
+ throw takeFromExternrefTable0(ret[1]);
2654
+ }
2655
+ return ret[0] >>> 0;
2656
+ }
2575
2657
  /**
2576
2658
  * Create an ellipsoid solid centered at the origin.
2577
2659
  *
Binary file
@@ -2473,6 +2473,45 @@ class BrepKernel {
2473
2473
  }
2474
2474
  return ret[0] >>> 0;
2475
2475
  }
2476
+ /**
2477
+ * Create a closed circular edge with a caller-supplied reference x-direction.
2478
+ *
2479
+ * Like [`makeCircleEdge`](Self::make_circle_edge), but `ref_dir = (rx, ry, rz)`
2480
+ * is projected onto the plane perpendicular to the normal to fix the
2481
+ * circle's `u_axis` — which controls the seam vertex position at
2482
+ * `circle.evaluate(0.0)`. Use when downstream code (PCurve computation,
2483
+ * extrusion frame) depends on a specific seam placement.
2484
+ *
2485
+ * `ref_dir` must be non-zero (rejected at this boundary) and ideally
2486
+ * not parallel to the normal — `Frame3::from_normal_and_ref` falls
2487
+ * back to an arbitrary perpendicular when the projection of `ref_dir`
2488
+ * onto the plane is degenerate, defeating the purpose of this call.
2489
+ *
2490
+ * Returns an edge handle (`u32`).
2491
+ *
2492
+ * # Errors
2493
+ *
2494
+ * Returns an error if any coordinate is NaN/infinite, `radius` is
2495
+ * non-positive, or the normal vector or `ref_dir` is zero.
2496
+ * @param {number} cx
2497
+ * @param {number} cy
2498
+ * @param {number} cz
2499
+ * @param {number} nx
2500
+ * @param {number} ny
2501
+ * @param {number} nz
2502
+ * @param {number} radius
2503
+ * @param {number} rx
2504
+ * @param {number} ry
2505
+ * @param {number} rz
2506
+ * @returns {number}
2507
+ */
2508
+ makeCircleEdgeWithRef(cx, cy, cz, nx, ny, nz, radius, rx, ry, rz) {
2509
+ const ret = wasm.brepkernel_makeCircleEdgeWithRef(this.__wbg_ptr, cx, cy, cz, nx, ny, nz, radius, rx, ry, rz);
2510
+ if (ret[2]) {
2511
+ throw takeFromExternrefTable0(ret[1]);
2512
+ }
2513
+ return ret[0] >>> 0;
2514
+ }
2476
2515
  /**
2477
2516
  * Create a circular face on the XY plane (using NURBS arcs).
2478
2517
  *
@@ -2574,6 +2613,49 @@ class BrepKernel {
2574
2613
  }
2575
2614
  return ret[0] >>> 0;
2576
2615
  }
2616
+ /**
2617
+ * Create a closed elliptical edge with a caller-supplied reference major-axis.
2618
+ *
2619
+ * Like [`makeEllipseEdge`](Self::make_ellipse_edge), but `ref_dir = (rx, ry, rz)`
2620
+ * is projected onto the plane perpendicular to the normal to fix the
2621
+ * ellipse's major-axis direction (`u_axis`, carrying `semi_major`).
2622
+ * Use this when the caller has an intended major-axis orientation —
2623
+ * otherwise the default-frame variant chooses an arbitrary
2624
+ * perpendicular, which can cause adapters to fall back to NURBS
2625
+ * approximations to preserve their requested orientation.
2626
+ *
2627
+ * `ref_dir` must be non-zero (rejected at this boundary) and ideally
2628
+ * not parallel to the normal — `Frame3::from_normal_and_ref` falls
2629
+ * back to an arbitrary perpendicular when the projection of `ref_dir`
2630
+ * onto the plane is degenerate, defeating the purpose of this call.
2631
+ *
2632
+ * Returns an edge handle (`u32`).
2633
+ *
2634
+ * # Errors
2635
+ *
2636
+ * Returns an error if any coordinate is NaN/infinite, either
2637
+ * semi-axis is non-positive, `semi_minor` exceeds `semi_major`, or
2638
+ * the normal vector or `ref_dir` is zero.
2639
+ * @param {number} cx
2640
+ * @param {number} cy
2641
+ * @param {number} cz
2642
+ * @param {number} nx
2643
+ * @param {number} ny
2644
+ * @param {number} nz
2645
+ * @param {number} semi_major
2646
+ * @param {number} semi_minor
2647
+ * @param {number} rx
2648
+ * @param {number} ry
2649
+ * @param {number} rz
2650
+ * @returns {number}
2651
+ */
2652
+ makeEllipseEdgeWithRef(cx, cy, cz, nx, ny, nz, semi_major, semi_minor, rx, ry, rz) {
2653
+ const ret = wasm.brepkernel_makeEllipseEdgeWithRef(this.__wbg_ptr, cx, cy, cz, nx, ny, nz, semi_major, semi_minor, rx, ry, rz);
2654
+ if (ret[2]) {
2655
+ throw takeFromExternrefTable0(ret[1]);
2656
+ }
2657
+ return ret[0] >>> 0;
2658
+ }
2577
2659
  /**
2578
2660
  * Create an ellipsoid solid centered at the origin.
2579
2661
  *
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "brepkit-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for brepkit — browser-native B-Rep solid modeling",
5
- "version": "2.88.0",
5
+ "version": "2.89.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",