brepkit-wasm 3.4.0 → 3.4.2

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
@@ -44,17 +44,17 @@ export class BrepKernel {
44
44
  */
45
45
  adjacentFaces(solid: number, face: number): Uint32Array;
46
46
  /**
47
- * Approximate a curve through points (least-squares).
47
+ * Approximate a curve through points using LSPIA (progressive iteration).
48
48
  *
49
49
  * Returns an edge handle.
50
50
  */
51
- approximateCurve(coords: Float64Array, degree: number, num_control_points: number): number;
51
+ approximateCurveLspia(coords: Float64Array, degree: number, num_control_points: number, tolerance: number, max_iterations: number): number;
52
52
  /**
53
- * Approximate a curve through points using LSPIA (progressive iteration).
53
+ * Approximate a curve through points (least-squares).
54
54
  *
55
55
  * Returns an edge handle.
56
56
  */
57
- approximateCurveLspia(coords: Float64Array, degree: number, num_control_points: number, tolerance: number, max_iterations: number): number;
57
+ approximateCurve(coords: Float64Array, degree: number, num_control_points: number): number;
58
58
  /**
59
59
  * Approximate a grid of points into a NURBS surface using LSPIA.
60
60
  *
@@ -109,16 +109,6 @@ export class BrepKernel {
109
109
  * Returns an error if the solid has zero volume or tessellation fails.
110
110
  */
111
111
  centerOfMass(solid: number, deflection: number): Float64Array;
112
- /**
113
- * Chamfer edges of a solid.
114
- *
115
- * `edge_handles` is an array of edge handles. Returns a solid handle.
116
- *
117
- * # Errors
118
- *
119
- * Returns an error if distance is non-positive or edges are invalid.
120
- */
121
- chamfer(solid: number, edge_handles: Uint32Array, distance: number): number;
122
112
  /**
123
113
  * Cut corners of a 2D polygon with flat bevels.
124
114
  *
@@ -149,6 +139,20 @@ export class BrepKernel {
149
139
  * blend computation fails.
150
140
  */
151
141
  chamferV2(solid: number, edge_handles: Uint32Array, d1: number, d2: number): number;
142
+ /**
143
+ * Chamfer edges of a solid.
144
+ *
145
+ * `edge_handles` is an array of edge handles. Returns a solid handle.
146
+ *
147
+ * # Errors
148
+ *
149
+ * Returns an error if distance is non-positive or edges are invalid.
150
+ */
151
+ chamfer(solid: number, edge_handles: Uint32Array, distance: number): number;
152
+ /**
153
+ * Returns the number of saved checkpoints.
154
+ */
155
+ checkpointCount(): number;
152
156
  /**
153
157
  * Save a snapshot of the current kernel state.
154
158
  *
@@ -159,26 +163,12 @@ export class BrepKernel {
159
163
  * Existing entity handles remain valid after restore.
160
164
  */
161
165
  checkpoint(): number;
162
- /**
163
- * Returns the number of saved checkpoints.
164
- */
165
- checkpointCount(): number;
166
166
  /**
167
167
  * Create a circular pattern of a solid around an axis.
168
168
  *
169
169
  * Returns a compound handle.
170
170
  */
171
171
  circularPattern(solid: number, ax: number, ay: number, az: number, count: number): number;
172
- /**
173
- * Classify a point relative to a solid: inside, outside, or on boundary.
174
- *
175
- * Returns `"inside"`, `"outside"`, or `"boundary"`.
176
- *
177
- * # Errors
178
- *
179
- * Returns an error if the solid handle is invalid.
180
- */
181
- classifyPoint(solid: number, x: number, y: number, z: number, tolerance: number): string;
182
172
  /**
183
173
  * Classify a point using robust dual-method (winding + ray casting).
184
174
  *
@@ -191,6 +181,16 @@ export class BrepKernel {
191
181
  * Returns "inside", "outside", or "boundary".
192
182
  */
193
183
  classifyPointWinding(solid: number, x: number, y: number, z: number, tolerance: number): string;
184
+ /**
185
+ * Classify a point relative to a solid: inside, outside, or on boundary.
186
+ *
187
+ * Returns `"inside"`, `"outside"`, or `"boundary"`.
188
+ *
189
+ * # Errors
190
+ *
191
+ * Returns an error if the solid handle is invalid.
192
+ */
193
+ classifyPoint(solid: number, x: number, y: number, z: number, tolerance: number): string;
194
194
  /**
195
195
  * Find common (shared) edges between two adjacent 2D polygons.
196
196
  *
@@ -331,36 +331,36 @@ export class BrepKernel {
331
331
  */
332
332
  curveSplit(edge: number, u: number): Uint32Array;
333
333
  /**
334
- * Cut (subtract) solid `b` from solid `a`.
334
+ * Cut (subtract) solid `b` from solid `a` and return evolution tracking data.
335
335
  *
336
- * Returns a new solid handle (`u32`).
336
+ * Returns a JSON string: `{"solid": <u32>, "evolution": {...}}`.
337
337
  *
338
338
  * # Errors
339
339
  *
340
340
  * Returns an error if either solid handle is invalid or the operation
341
341
  * produces an empty or non-manifold result.
342
342
  */
343
- cut(a: number, b: number): number;
343
+ cutWithEvolution(a: number, b: number): any;
344
344
  /**
345
- * Cut (subtract) solid `b` from solid `a` and return evolution tracking data.
346
- *
347
- * Returns a JSON string: `{"solid": <u32>, "evolution": {...}}`.
345
+ * Cut (subtract) solid `b` from solid `a` with post-processing options.
348
346
  *
349
347
  * # Errors
350
348
  *
351
349
  * Returns an error if either solid handle is invalid or the operation
352
350
  * produces an empty or non-manifold result.
353
351
  */
354
- cutWithEvolution(a: number, b: number): any;
352
+ cutWithOptions(a: number, b: number, simplify: boolean): number;
355
353
  /**
356
- * Cut (subtract) solid `b` from solid `a` with post-processing options.
354
+ * Cut (subtract) solid `b` from solid `a`.
355
+ *
356
+ * Returns a new solid handle (`u32`).
357
357
  *
358
358
  * # Errors
359
359
  *
360
360
  * Returns an error if either solid handle is invalid or the operation
361
361
  * produces an empty or non-manifold result.
362
362
  */
363
- cutWithOptions(a: number, b: number, simplify: boolean): number;
363
+ cut(a: number, b: number): number;
364
364
  /**
365
365
  * Remove specified faces from a solid (defeaturing).
366
366
  *
@@ -435,12 +435,6 @@ export class BrepKernel {
435
435
  * Returns a JSON string: `{"edgeId": [faceId, ...], ...}`.
436
436
  */
437
437
  edgeToFaceMap(solid: number): string;
438
- /**
439
- * Evaluate a point on an edge curve at parameter `t`.
440
- *
441
- * Returns `[x, y, z]`.
442
- */
443
- evaluateEdgeCurve(edge: number, t: number): Float64Array;
444
438
  /**
445
439
  * Evaluate a point and tangent on an edge curve at parameter `t`.
446
440
  *
@@ -448,17 +442,23 @@ export class BrepKernel {
448
442
  */
449
443
  evaluateEdgeCurveD1(edge: number, t: number): Float64Array;
450
444
  /**
451
- * Evaluate a point on a face surface at (u, v).
445
+ * Evaluate a point on an edge curve at parameter `t`.
452
446
  *
453
447
  * Returns `[x, y, z]`.
454
448
  */
455
- evaluateSurface(face: number, u: number, v: number): Float64Array;
449
+ evaluateEdgeCurve(edge: number, t: number): Float64Array;
456
450
  /**
457
451
  * Evaluate a surface normal at (u, v) on a face.
458
452
  *
459
453
  * Returns `[nx, ny, nz]`.
460
454
  */
461
455
  evaluateSurfaceNormal(face: number, u: number, v: number): Float64Array;
456
+ /**
457
+ * Evaluate a point on a face surface at (u, v).
458
+ *
459
+ * Returns `[x, y, z]`.
460
+ */
461
+ evaluateSurface(face: number, u: number, v: number): Float64Array;
462
462
  /**
463
463
  * Execute a batch of operations, crossing the JS/WASM boundary once.
464
464
  *
@@ -539,25 +539,25 @@ export class BrepKernel {
539
539
  */
540
540
  exportStep(solid: number): Uint8Array;
541
541
  /**
542
- * Export a solid to binary STL format.
542
+ * Export a solid to STL ASCII format.
543
543
  *
544
- * Returns a `Uint8Array` containing the `.stl` file.
544
+ * Returns the ASCII STL as UTF-8 bytes.
545
545
  *
546
546
  * # Errors
547
547
  *
548
548
  * Returns an error if the solid handle is invalid or export fails.
549
549
  */
550
- exportStl(solid: number, deflection: number): Uint8Array;
550
+ exportStlAscii(solid: number, deflection: number): Uint8Array;
551
551
  /**
552
- * Export a solid to STL ASCII format.
552
+ * Export a solid to binary STL format.
553
553
  *
554
- * Returns the ASCII STL as UTF-8 bytes.
554
+ * Returns a `Uint8Array` containing the `.stl` file.
555
555
  *
556
556
  * # Errors
557
557
  *
558
558
  * Returns an error if the solid handle is invalid or export fails.
559
559
  */
560
- exportStlAscii(solid: number, deflection: number): Uint8Array;
560
+ exportStl(solid: number, deflection: number): Uint8Array;
561
561
  /**
562
562
  * Extrude a planar face along a direction vector to create a solid.
563
563
  *
@@ -598,17 +598,6 @@ export class BrepKernel {
598
598
  * Returns a face handle.
599
599
  */
600
600
  fillCoonsPatch(boundary_coords: Float64Array, curve_lengths: Uint32Array): number;
601
- /**
602
- * Fillet (round) edges of a solid.
603
- *
604
- * `edge_handles` is an array of edge handles. Returns a solid handle.
605
- *
606
- * # Errors
607
- *
608
- * Returns an error if radius is non-positive, edges are invalid, or no
609
- * fillet engine can produce a valid changed solid.
610
- */
611
- fillet(solid: number, edge_handles: Uint32Array, radius: number): number;
612
601
  /**
613
602
  * Round corners of a 2D polygon by inserting arc-approximation vertices.
614
603
  *
@@ -654,6 +643,17 @@ export class BrepKernel {
654
643
  * the fillet fails.
655
644
  */
656
645
  filletWithEvolution(solid: number, edge_handles: Uint32Array, radius: number): any;
646
+ /**
647
+ * Fillet (round) edges of a solid.
648
+ *
649
+ * `edge_handles` is an array of edge handles. Returns a solid handle.
650
+ *
651
+ * # Errors
652
+ *
653
+ * Returns an error if radius is non-positive, edges are invalid, or no
654
+ * fillet engine can produce a valid changed solid.
655
+ */
656
+ fillet(solid: number, edge_handles: Uint32Array, radius: number): number;
657
657
  /**
658
658
  * Fix face orientations to ensure consistent outward normals.
659
659
  *
@@ -675,17 +675,6 @@ export class BrepKernel {
675
675
  * Returns an error if the data is invalid or reconstruction fails.
676
676
  */
677
677
  fromBREP(data: string): number;
678
- /**
679
- * Fuse (union) two solids into one.
680
- *
681
- * Returns a new solid handle (`u32`).
682
- *
683
- * # Errors
684
- *
685
- * Returns an error if either solid handle is invalid or the operation
686
- * produces an empty or non-manifold result.
687
- */
688
- fuse(a: number, b: number): number;
689
678
  /**
690
679
  * Fuse (union) many solids into one in a single call.
691
680
  *
@@ -724,6 +713,17 @@ export class BrepKernel {
724
713
  * produces an empty or non-manifold result.
725
714
  */
726
715
  fuseWithOptions(a: number, b: number, simplify: boolean): number;
716
+ /**
717
+ * Fuse (union) two solids into one.
718
+ *
719
+ * Returns a new solid handle (`u32`).
720
+ *
721
+ * # Errors
722
+ *
723
+ * Returns an error if either solid handle is invalid or the operation
724
+ * produces an empty or non-manifold result.
725
+ */
726
+ fuse(a: number, b: number): number;
727
727
  /**
728
728
  * Get the analytic surface parameters of a face.
729
729
  *
@@ -837,17 +837,6 @@ export class BrepKernel {
837
837
  * `multiplicities`, `rational`, `closed` / `periodic`, and `domain`.
838
838
  */
839
839
  getNurbsCurveData(edge: number): string;
840
- /**
841
- * Read-only canonical NURBS data for the surface underlying a face.
842
- *
843
- * Analytic surfaces are converted to NURBS (planes/cylinders exact;
844
- * cones/spheres/tori via the exact rational forms). Returns a JSON
845
- * string with `degreeU`/`degreeV`, the row-major `controlPoints` grid,
846
- * the matching `weights` grid, flat `knotsU`/`knotsV`, compressed
847
- * distinct-knots/multiplicities per direction, `rational`,
848
- * `periodicU`/`periodicV`, and `domainU`/`domainV`.
849
- */
850
- getNurbsSurfaceData(face: number): string;
851
840
  /**
852
841
  * Type-gated read-only B-Spline/NURBS surface data for a face.
853
842
  *
@@ -860,6 +849,17 @@ export class BrepKernel {
860
849
  * `multiplicitiesV`, `isPeriodicU`/`isPeriodicV`, and `isRational`.
861
850
  */
862
851
  getNurbsSurfaceDataParity(face: number): string;
852
+ /**
853
+ * Read-only canonical NURBS data for the surface underlying a face.
854
+ *
855
+ * Analytic surfaces are converted to NURBS (planes/cylinders exact;
856
+ * cones/spheres/tori via the exact rational forms). Returns a JSON
857
+ * string with `degreeU`/`degreeV`, the row-major `controlPoints` grid,
858
+ * the matching `weights` grid, flat `knotsU`/`knotsV`, compressed
859
+ * distinct-knots/multiplicities per direction, `rational`,
860
+ * `periodicU`/`periodicV`, and `domainU`/`domainV`.
861
+ */
862
+ getNurbsSurfaceData(face: number): string;
863
863
  /**
864
864
  * Get the orientation of a shape.
865
865
  *
@@ -1074,17 +1074,6 @@ export class BrepKernel {
1074
1074
  * Returns a face handle.
1075
1075
  */
1076
1076
  interpolateSurface(coords: Float64Array, rows: number, cols: number, degree_u: number, degree_v: number): number;
1077
- /**
1078
- * Intersect two solids, keeping only their common volume.
1079
- *
1080
- * Returns a new solid handle (`u32`).
1081
- *
1082
- * # Errors
1083
- *
1084
- * Returns an error if either solid handle is invalid or the operation
1085
- * produces an empty result.
1086
- */
1087
- intersect(a: number, b: number): number;
1088
1077
  /**
1089
1078
  * Compute the boolean intersection of two 2D polygons.
1090
1079
  *
@@ -1115,6 +1104,17 @@ export class BrepKernel {
1115
1104
  * produces an empty or non-manifold result.
1116
1105
  */
1117
1106
  intersectWithOptions(a: number, b: number, simplify: boolean): number;
1107
+ /**
1108
+ * Intersect two solids, keeping only their common volume.
1109
+ *
1110
+ * Returns a new solid handle (`u32`).
1111
+ *
1112
+ * # Errors
1113
+ *
1114
+ * Returns an error if either solid handle is invalid or the operation
1115
+ * produces an empty result.
1116
+ */
1117
+ intersect(a: number, b: number): number;
1118
1118
  /**
1119
1119
  * Check if an edge is forward-oriented in a given wire.
1120
1120
  *
@@ -1146,17 +1146,6 @@ export class BrepKernel {
1146
1146
  * Returns an error if inputs are invalid.
1147
1147
  */
1148
1148
  linearPattern(solid: number, dx: number, dy: number, dz: number, spacing: number, count: number): number;
1149
- /**
1150
- * Loft two or more profile faces into a solid.
1151
- *
1152
- * Takes an array of face handles. Returns a solid handle (`u32`).
1153
- *
1154
- * # Errors
1155
- *
1156
- * Returns an error if fewer than 2 faces or profiles have
1157
- * different vertex counts.
1158
- */
1159
- loft(faces: Uint32Array): number;
1160
1149
  /**
1161
1150
  * Loft profiles with smooth NURBS interpolation.
1162
1151
  *
@@ -1182,27 +1171,26 @@ export class BrepKernel {
1182
1171
  */
1183
1172
  loftWithOptions(faces: Uint32Array, options: string): number;
1184
1173
  /**
1185
- * Create a box solid with the given dimensions, centered at the origin.
1174
+ * Loft two or more profile faces into a solid.
1186
1175
  *
1187
- * Returns a solid handle (`u32`).
1176
+ * Takes an array of face handles. Returns a solid handle (`u32`).
1188
1177
  *
1189
1178
  * # Errors
1190
1179
  *
1191
- * Returns an error if any dimension is non-positive or non-finite.
1180
+ * Returns an error if fewer than 2 faces or profiles have
1181
+ * different vertex counts.
1192
1182
  */
1193
- makeBox(dx: number, dy: number, dz: number): number;
1183
+ loft(faces: Uint32Array): number;
1194
1184
  /**
1195
- * Create a circular polygon approximation on the XY plane.
1185
+ * Create a box solid with the given dimensions, centered at the origin.
1196
1186
  *
1197
- * The circle is centered at the origin with the given `radius`,
1198
- * approximated by `segments` straight edges.
1199
- * Returns a face handle (`u32`).
1187
+ * Returns a solid handle (`u32`).
1200
1188
  *
1201
1189
  * # Errors
1202
1190
  *
1203
- * Returns an error if fewer than 3 segments are specified.
1191
+ * Returns an error if any dimension is non-positive or non-finite.
1204
1192
  */
1205
- makeCircle(radius: number, segments: number): number;
1193
+ makeBox(dx: number, dy: number, dz: number): number;
1206
1194
  /**
1207
1195
  * Create a circular arc edge between two points.
1208
1196
  *
@@ -1213,22 +1201,6 @@ export class BrepKernel {
1213
1201
  * Returns an edge handle (`u32`).
1214
1202
  */
1215
1203
  makeCircleArc3d(start_x: number, start_y: number, start_z: number, end_x: number, end_y: number, end_z: number, center_x: number, center_y: number, center_z: number, axis_x: number, axis_y: number, axis_z: number): number;
1216
- /**
1217
- * Create a closed circular edge with true `Circle` curve geometry.
1218
- *
1219
- * Unlike `makeCircle` (which returns a polygon face approximation),
1220
- * this creates a single closed edge with an [`EdgeCurve::Circle`]
1221
- * backing curve and parameter domain `[0, 2π]`. The start and end
1222
- * vertex are shared at the seam point `circle.evaluate(0.0)`.
1223
- *
1224
- * Returns an edge handle (`u32`).
1225
- *
1226
- * # Errors
1227
- *
1228
- * Returns an error if any coordinate is NaN/infinite, `radius` is
1229
- * non-positive, or the normal vector is zero.
1230
- */
1231
- makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
1232
1204
  /**
1233
1205
  * Create a closed circular edge with a caller-supplied reference x-direction.
1234
1206
  *
@@ -1251,12 +1223,40 @@ export class BrepKernel {
1251
1223
  * non-positive, or the normal vector or `ref_dir` is zero.
1252
1224
  */
1253
1225
  makeCircleEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, rx: number, ry: number, rz: number): number;
1226
+ /**
1227
+ * Create a closed circular edge with true `Circle` curve geometry.
1228
+ *
1229
+ * Unlike `makeCircle` (which returns a polygon face approximation),
1230
+ * this creates a single closed edge with an [`EdgeCurve::Circle`]
1231
+ * backing curve and parameter domain `[0, 2π]`. The start and end
1232
+ * vertex are shared at the seam point `circle.evaluate(0.0)`.
1233
+ *
1234
+ * Returns an edge handle (`u32`).
1235
+ *
1236
+ * # Errors
1237
+ *
1238
+ * Returns an error if any coordinate is NaN/infinite, `radius` is
1239
+ * non-positive, or the normal vector is zero.
1240
+ */
1241
+ makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
1254
1242
  /**
1255
1243
  * Create a circular face on the XY plane (using NURBS arcs).
1256
1244
  *
1257
1245
  * Returns a face handle.
1258
1246
  */
1259
1247
  makeCircleFace(radius: number, segments: number): number;
1248
+ /**
1249
+ * Create a circular polygon approximation on the XY plane.
1250
+ *
1251
+ * The circle is centered at the origin with the given `radius`,
1252
+ * approximated by `segments` straight edges.
1253
+ * Returns a face handle (`u32`).
1254
+ *
1255
+ * # Errors
1256
+ *
1257
+ * Returns an error if fewer than 3 segments are specified.
1258
+ */
1259
+ makeCircle(radius: number, segments: number): number;
1260
1260
  /**
1261
1261
  * Create a compound from multiple solid handles.
1262
1262
  *
@@ -1301,22 +1301,6 @@ export class BrepKernel {
1301
1301
  * a zero vector.
1302
1302
  */
1303
1303
  makeEllipseArc3d(start_x: number, start_y: number, start_z: number, end_x: number, end_y: number, end_z: number, center_x: number, center_y: number, center_z: number, axis_x: number, axis_y: number, axis_z: number, ref_x: number, ref_y: number, ref_z: number, semi_major: number, semi_minor: number): number;
1304
- /**
1305
- * Create a closed elliptical edge with true `Ellipse` curve geometry.
1306
- *
1307
- * Creates a single closed edge with an [`EdgeCurve::Ellipse`] backing
1308
- * curve and parameter domain `[0, 2π]`. The start and end vertex are
1309
- * shared at the seam point `ellipse.evaluate(0.0)`.
1310
- *
1311
- * Returns an edge handle (`u32`).
1312
- *
1313
- * # Errors
1314
- *
1315
- * Returns an error if any coordinate is NaN/infinite, either
1316
- * semi-axis is non-positive, `semi_minor` exceeds `semi_major`, or
1317
- * the normal vector is zero.
1318
- */
1319
- makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semi_major: number, semi_minor: number): number;
1320
1304
  /**
1321
1305
  * Create a closed elliptical edge with a caller-supplied reference major-axis.
1322
1306
  *
@@ -1342,6 +1326,22 @@ export class BrepKernel {
1342
1326
  * the normal vector or `ref_dir` is zero.
1343
1327
  */
1344
1328
  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;
1329
+ /**
1330
+ * Create a closed elliptical edge with true `Ellipse` curve geometry.
1331
+ *
1332
+ * Creates a single closed edge with an [`EdgeCurve::Ellipse`] backing
1333
+ * curve and parameter domain `[0, 2π]`. The start and end vertex are
1334
+ * shared at the seam point `ellipse.evaluate(0.0)`.
1335
+ *
1336
+ * Returns an edge handle (`u32`).
1337
+ *
1338
+ * # Errors
1339
+ *
1340
+ * Returns an error if any coordinate is NaN/infinite, either
1341
+ * semi-axis is non-positive, `semi_minor` exceeds `semi_major`, or
1342
+ * the normal vector is zero.
1343
+ */
1344
+ makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semi_major: number, semi_minor: number): number;
1345
1345
  /**
1346
1346
  * Create an ellipsoid solid centered at the origin.
1347
1347
  *
@@ -1385,6 +1385,12 @@ export class BrepKernel {
1385
1385
  * Returns a face handle (`u32`).
1386
1386
  */
1387
1387
  makePlanarFaceFromWire(wire: number): number;
1388
+ /**
1389
+ * Create a closed polygon wire from flat coordinates.
1390
+ *
1391
+ * Returns a wire handle.
1392
+ */
1393
+ makePolygonWire(coords: Float64Array): number;
1388
1394
  /**
1389
1395
  * Create a polygonal face from flat coordinate triples `[x,y,z, ...]`.
1390
1396
  *
@@ -1397,12 +1403,6 @@ export class BrepKernel {
1397
1403
  * fewer than 3 points are provided, or the face normal is degenerate.
1398
1404
  */
1399
1405
  makePolygon(coords: Float64Array): number;
1400
- /**
1401
- * Create a closed polygon wire from flat coordinates.
1402
- *
1403
- * Returns a wire handle.
1404
- */
1405
- makePolygonWire(coords: Float64Array): number;
1406
1406
  /**
1407
1407
  * Create a rectangular face on the XY plane centered at the origin.
1408
1408
  *
@@ -1495,6 +1495,13 @@ export class BrepKernel {
1495
1495
  * Returns a `JsMesh` with the result.
1496
1496
  */
1497
1497
  meshBoolean(positions_a: Float64Array, indices_a: Uint32Array, positions_b: Float64Array, indices_b: Uint32Array, op: string, tolerance: number): JsMesh;
1498
+ /**
1499
+ * Sample ALL edges of a solid (no smooth-edge filtering).
1500
+ *
1501
+ * Same as `meshEdges` but includes edges between co-surface faces.
1502
+ * Useful for debugging topology.
1503
+ */
1504
+ meshEdgesAll(solid: number, deflection: number, angular_tolerance?: number | null): JsEdgeLines;
1498
1505
  /**
1499
1506
  * Sample edges of a solid into polylines for wireframe rendering.
1500
1507
  *
@@ -1506,13 +1513,6 @@ export class BrepKernel {
1506
1513
  * arise from boolean face-splitting and don't represent visible creases.
1507
1514
  */
1508
1515
  meshEdges(solid: number, deflection: number, angular_tolerance?: number | null): JsEdgeLines;
1509
- /**
1510
- * Sample ALL edges of a solid (no smooth-edge filtering).
1511
- *
1512
- * Same as `meshEdges` but includes edges between co-surface faces.
1513
- * Useful for debugging topology.
1514
- */
1515
- meshEdgesAll(solid: number, deflection: number, angular_tolerance?: number | null): JsEdgeLines;
1516
1516
  /**
1517
1517
  * Number of boolean operations that have used the mesh (co-refinement)
1518
1518
  * fallback since module load.
@@ -1586,16 +1586,6 @@ export class BrepKernel {
1586
1586
  * Returns a flat array of offset polygon coordinates.
1587
1587
  */
1588
1588
  offsetPolygon2d(coords: Float64Array, distance: number, tolerance: number): Float64Array;
1589
- /**
1590
- * Offset (shell) a solid by a distance.
1591
- *
1592
- * Returns a new solid handle.
1593
- *
1594
- * # Errors
1595
- *
1596
- * Returns an error if the distance is zero or the solid is invalid.
1597
- */
1598
- offsetSolid(solid: number, distance: number): number;
1599
1589
  /**
1600
1590
  * Offset all faces of a solid outward or inward (V2 pipeline).
1601
1591
  *
@@ -1607,11 +1597,15 @@ export class BrepKernel {
1607
1597
  */
1608
1598
  offsetSolidV2(solid: number, distance: number): number;
1609
1599
  /**
1610
- * Offset a wire on a planar face.
1600
+ * Offset (shell) a solid by a distance.
1611
1601
  *
1612
- * Returns a new wire handle.
1602
+ * Returns a new solid handle.
1603
+ *
1604
+ * # Errors
1605
+ *
1606
+ * Returns an error if the distance is zero or the solid is invalid.
1613
1607
  */
1614
- offsetWire(face: number, distance: number): number;
1608
+ offsetSolid(solid: number, distance: number): number;
1615
1609
  /**
1616
1610
  * Offset a planar wire directly by a distance with a specific join type.
1617
1611
  *
@@ -1644,6 +1638,12 @@ export class BrepKernel {
1644
1638
  * is unrecognized, or the offset operation fails.
1645
1639
  */
1646
1640
  offsetWireWithJoinType(face: number, distance: number, join_type: string): number;
1641
+ /**
1642
+ * Offset a wire on a planar face.
1643
+ *
1644
+ * Returns a new wire handle.
1645
+ */
1646
+ offsetWire(face: number, distance: number): number;
1647
1647
  /**
1648
1648
  * Pipe sweep: sweep a profile along a NURBS path (no guide).
1649
1649
  *
@@ -1914,23 +1914,6 @@ export class BrepKernel {
1914
1914
  * Returns an error if the solid handle is invalid or tessellation fails.
1915
1915
  */
1916
1916
  surfaceArea(solid: number, deflection: number): number;
1917
- /**
1918
- * Sweep a planar face along a NURBS curve path to create a solid.
1919
- *
1920
- * The path is specified as flat arrays for JS interop:
1921
- * - `path_degree` — polynomial degree of the path curve
1922
- * - `path_knots` — knot vector
1923
- * - `path_control_points` — flat `[x,y,z, ...]` control point coordinates
1924
- * - `path_weights` — per-control-point weights
1925
- *
1926
- * Returns a solid handle (`u32`).
1927
- *
1928
- * # Errors
1929
- *
1930
- * Returns an error if the face handle is invalid, the NURBS arrays have
1931
- * inconsistent lengths, or the sweep operation fails.
1932
- */
1933
- sweep(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
1934
1917
  /**
1935
1918
  * Sweep a face along a path defined by a chain of edges.
1936
1919
  *
@@ -1969,6 +1952,23 @@ export class BrepKernel {
1969
1952
  * Returns a solid handle.
1970
1953
  */
1971
1954
  sweepWithOptions(profile: number, path_edge: number, contact_mode: string, scale_values: Float64Array, segments: number, corner_mode: string): number;
1955
+ /**
1956
+ * Sweep a planar face along a NURBS curve path to create a solid.
1957
+ *
1958
+ * The path is specified as flat arrays for JS interop:
1959
+ * - `path_degree` — polynomial degree of the path curve
1960
+ * - `path_knots` — knot vector
1961
+ * - `path_control_points` — flat `[x,y,z, ...]` control point coordinates
1962
+ * - `path_weights` — per-control-point weights
1963
+ *
1964
+ * Returns a solid handle (`u32`).
1965
+ *
1966
+ * # Errors
1967
+ *
1968
+ * Returns an error if the face handle is invalid, the NURBS arrays have
1969
+ * inconsistent lengths, or the sweep operation fails.
1970
+ */
1971
+ sweep(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
1972
1972
  /**
1973
1973
  * Tessellate an edge curve into polyline segments.
1974
1974
  *
@@ -1987,15 +1987,19 @@ export class BrepKernel {
1987
1987
  */
1988
1988
  tessellateFace(face: number, deflection: number, angular_tolerance?: number | null): JsMesh;
1989
1989
  /**
1990
- * Tessellate all faces of a solid into a single merged triangle mesh.
1990
+ * Tessellate a solid with per-face grouping, returned as packed binary
1991
+ * buffers ([`JsGroupedMesh`]) instead of a JSON string.
1991
1992
  *
1992
- * Includes both the outer shell and any inner shells (voids).
1993
+ * Identical geometry to [`tessellate_solid_grouped`](Self::tessellate_solid_grouped),
1994
+ * but the mesh crosses the WASM boundary as `Float32Array`/`Uint32Array`
1995
+ * bulk copies rather than a (potentially multi-megabyte) JSON string that
1996
+ * the caller must `JSON.parse` and re-pack — far cheaper for large meshes.
1993
1997
  *
1994
1998
  * # Errors
1995
1999
  *
1996
2000
  * Returns an error if the solid handle is invalid or tessellation fails.
1997
2001
  */
1998
- tessellateSolid(solid: number, deflection: number, angular_tolerance?: number | null): JsMesh;
2002
+ tessellateSolidGroupedBinary(solid: number, deflection: number, angular_tolerance?: number | null): JsGroupedMesh;
1999
2003
  /**
2000
2004
  * Tessellate a solid with per-face triangle grouping.
2001
2005
  *
@@ -2009,32 +2013,28 @@ export class BrepKernel {
2009
2013
  */
2010
2014
  tessellateSolidGrouped(solid: number, deflection: number, angular_tolerance?: number | null): any;
2011
2015
  /**
2012
- * Tessellate a solid with per-face grouping, returned as packed binary
2013
- * buffers ([`JsGroupedMesh`]) instead of a JSON string.
2016
+ * Tessellate a solid and include per-vertex UV coordinates.
2014
2017
  *
2015
- * Identical geometry to [`tessellate_solid_grouped`](Self::tessellate_solid_grouped),
2016
- * but the mesh crosses the WASM boundary as `Float32Array`/`Uint32Array`
2017
- * bulk copies rather than a (potentially multi-megabyte) JSON string that
2018
- * the caller must `JSON.parse` and re-pack far cheaper for large meshes.
2018
+ * Returns a JSON string containing `{ positions, normals, indices, uvs }`.
2019
+ * `uvs` is a flat array of `[u0, v0, u1, v1, ...]` values, two per vertex.
2020
+ * For analytic and NURBS surfaces, these are the parametric (u, v) values.
2021
+ * For planar faces, UVs are computed by projection onto the face plane.
2019
2022
  *
2020
2023
  * # Errors
2021
2024
  *
2022
2025
  * Returns an error if the solid handle is invalid or tessellation fails.
2023
2026
  */
2024
- tessellateSolidGroupedBinary(solid: number, deflection: number, angular_tolerance?: number | null): JsGroupedMesh;
2027
+ tessellateSolidUV(solid: number, deflection: number, angular_tolerance?: number | null): any;
2025
2028
  /**
2026
- * Tessellate a solid and include per-vertex UV coordinates.
2029
+ * Tessellate all faces of a solid into a single merged triangle mesh.
2027
2030
  *
2028
- * Returns a JSON string containing `{ positions, normals, indices, uvs }`.
2029
- * `uvs` is a flat array of `[u0, v0, u1, v1, ...]` values, two per vertex.
2030
- * For analytic and NURBS surfaces, these are the parametric (u, v) values.
2031
- * For planar faces, UVs are computed by projection onto the face plane.
2031
+ * Includes both the outer shell and any inner shells (voids).
2032
2032
  *
2033
2033
  * # Errors
2034
2034
  *
2035
2035
  * Returns an error if the solid handle is invalid or tessellation fails.
2036
2036
  */
2037
- tessellateSolidUV(solid: number, deflection: number, angular_tolerance?: number | null): any;
2037
+ tessellateSolid(solid: number, deflection: number, angular_tolerance?: number | null): JsMesh;
2038
2038
  /**
2039
2039
  * Thicken a face into a solid by offsetting it by the given distance.
2040
2040
  *
@@ -2113,16 +2113,6 @@ export class BrepKernel {
2113
2113
  * Returns a new face handle.
2114
2114
  */
2115
2115
  untrimFace(face: number, samples_per_curve: number, interior_samples: number): number;
2116
- /**
2117
- * Validate a solid, returning the number of errors found.
2118
- *
2119
- * Returns 0 if the solid is valid.
2120
- *
2121
- * # Errors
2122
- *
2123
- * Returns an error if the solid handle is invalid.
2124
- */
2125
- validateSolid(solid: number): number;
2126
2116
  /**
2127
2117
  * Validate a solid with relaxed checks suitable for assembled geometry.
2128
2118
  *
@@ -2153,6 +2143,16 @@ export class BrepKernel {
2153
2143
  * Returns an error if the solid handle is invalid.
2154
2144
  */
2155
2145
  validateSolidWithOptions(solid: number, tolerance_scale: number): number;
2146
+ /**
2147
+ * Validate a solid, returning the number of errors found.
2148
+ *
2149
+ * Returns 0 if the solid is valid.
2150
+ *
2151
+ * # Errors
2152
+ *
2153
+ * Returns an error if the solid handle is invalid.
2154
+ */
2155
+ validateSolid(solid: number): number;
2156
2156
  /**
2157
2157
  * Compute the volume of a solid.
2158
2158
  *