brepkit-wasm 3.3.9 → 3.4.1

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,16 +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 or edges are invalid.
609
- */
610
- fillet(solid: number, edge_handles: Uint32Array, radius: number): number;
611
601
  /**
612
602
  * Round corners of a 2D polygon by inserting arc-approximation vertices.
613
603
  *
@@ -653,6 +643,17 @@ export class BrepKernel {
653
643
  * the fillet fails.
654
644
  */
655
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;
656
657
  /**
657
658
  * Fix face orientations to ensure consistent outward normals.
658
659
  *
@@ -674,17 +675,6 @@ export class BrepKernel {
674
675
  * Returns an error if the data is invalid or reconstruction fails.
675
676
  */
676
677
  fromBREP(data: string): number;
677
- /**
678
- * Fuse (union) two solids into one.
679
- *
680
- * Returns a new solid handle (`u32`).
681
- *
682
- * # Errors
683
- *
684
- * Returns an error if either solid handle is invalid or the operation
685
- * produces an empty or non-manifold result.
686
- */
687
- fuse(a: number, b: number): number;
688
678
  /**
689
679
  * Fuse (union) many solids into one in a single call.
690
680
  *
@@ -723,6 +713,17 @@ export class BrepKernel {
723
713
  * produces an empty or non-manifold result.
724
714
  */
725
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;
726
727
  /**
727
728
  * Get the analytic surface parameters of a face.
728
729
  *
@@ -836,17 +837,6 @@ export class BrepKernel {
836
837
  * `multiplicities`, `rational`, `closed` / `periodic`, and `domain`.
837
838
  */
838
839
  getNurbsCurveData(edge: number): string;
839
- /**
840
- * Read-only canonical NURBS data for the surface underlying a face.
841
- *
842
- * Analytic surfaces are converted to NURBS (planes/cylinders exact;
843
- * cones/spheres/tori via the exact rational forms). Returns a JSON
844
- * string with `degreeU`/`degreeV`, the row-major `controlPoints` grid,
845
- * the matching `weights` grid, flat `knotsU`/`knotsV`, compressed
846
- * distinct-knots/multiplicities per direction, `rational`,
847
- * `periodicU`/`periodicV`, and `domainU`/`domainV`.
848
- */
849
- getNurbsSurfaceData(face: number): string;
850
840
  /**
851
841
  * Type-gated read-only B-Spline/NURBS surface data for a face.
852
842
  *
@@ -859,6 +849,17 @@ export class BrepKernel {
859
849
  * `multiplicitiesV`, `isPeriodicU`/`isPeriodicV`, and `isRational`.
860
850
  */
861
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;
862
863
  /**
863
864
  * Get the orientation of a shape.
864
865
  *
@@ -1073,17 +1074,6 @@ export class BrepKernel {
1073
1074
  * Returns a face handle.
1074
1075
  */
1075
1076
  interpolateSurface(coords: Float64Array, rows: number, cols: number, degree_u: number, degree_v: number): number;
1076
- /**
1077
- * Intersect two solids, keeping only their common volume.
1078
- *
1079
- * Returns a new solid handle (`u32`).
1080
- *
1081
- * # Errors
1082
- *
1083
- * Returns an error if either solid handle is invalid or the operation
1084
- * produces an empty result.
1085
- */
1086
- intersect(a: number, b: number): number;
1087
1077
  /**
1088
1078
  * Compute the boolean intersection of two 2D polygons.
1089
1079
  *
@@ -1114,6 +1104,17 @@ export class BrepKernel {
1114
1104
  * produces an empty or non-manifold result.
1115
1105
  */
1116
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;
1117
1118
  /**
1118
1119
  * Check if an edge is forward-oriented in a given wire.
1119
1120
  *
@@ -1145,17 +1146,6 @@ export class BrepKernel {
1145
1146
  * Returns an error if inputs are invalid.
1146
1147
  */
1147
1148
  linearPattern(solid: number, dx: number, dy: number, dz: number, spacing: number, count: number): number;
1148
- /**
1149
- * Loft two or more profile faces into a solid.
1150
- *
1151
- * Takes an array of face handles. Returns a solid handle (`u32`).
1152
- *
1153
- * # Errors
1154
- *
1155
- * Returns an error if fewer than 2 faces or profiles have
1156
- * different vertex counts.
1157
- */
1158
- loft(faces: Uint32Array): number;
1159
1149
  /**
1160
1150
  * Loft profiles with smooth NURBS interpolation.
1161
1151
  *
@@ -1181,27 +1171,26 @@ export class BrepKernel {
1181
1171
  */
1182
1172
  loftWithOptions(faces: Uint32Array, options: string): number;
1183
1173
  /**
1184
- * Create a box solid with the given dimensions, centered at the origin.
1174
+ * Loft two or more profile faces into a solid.
1185
1175
  *
1186
- * Returns a solid handle (`u32`).
1176
+ * Takes an array of face handles. Returns a solid handle (`u32`).
1187
1177
  *
1188
1178
  * # Errors
1189
1179
  *
1190
- * 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.
1191
1182
  */
1192
- makeBox(dx: number, dy: number, dz: number): number;
1183
+ loft(faces: Uint32Array): number;
1193
1184
  /**
1194
- * Create a circular polygon approximation on the XY plane.
1185
+ * Create a box solid with the given dimensions, centered at the origin.
1195
1186
  *
1196
- * The circle is centered at the origin with the given `radius`,
1197
- * approximated by `segments` straight edges.
1198
- * Returns a face handle (`u32`).
1187
+ * Returns a solid handle (`u32`).
1199
1188
  *
1200
1189
  * # Errors
1201
1190
  *
1202
- * Returns an error if fewer than 3 segments are specified.
1191
+ * Returns an error if any dimension is non-positive or non-finite.
1203
1192
  */
1204
- makeCircle(radius: number, segments: number): number;
1193
+ makeBox(dx: number, dy: number, dz: number): number;
1205
1194
  /**
1206
1195
  * Create a circular arc edge between two points.
1207
1196
  *
@@ -1212,22 +1201,6 @@ export class BrepKernel {
1212
1201
  * Returns an edge handle (`u32`).
1213
1202
  */
1214
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;
1215
- /**
1216
- * Create a closed circular edge with true `Circle` curve geometry.
1217
- *
1218
- * Unlike `makeCircle` (which returns a polygon face approximation),
1219
- * this creates a single closed edge with an [`EdgeCurve::Circle`]
1220
- * backing curve and parameter domain `[0, 2π]`. The start and end
1221
- * vertex are shared at the seam point `circle.evaluate(0.0)`.
1222
- *
1223
- * Returns an edge handle (`u32`).
1224
- *
1225
- * # Errors
1226
- *
1227
- * Returns an error if any coordinate is NaN/infinite, `radius` is
1228
- * non-positive, or the normal vector is zero.
1229
- */
1230
- makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
1231
1204
  /**
1232
1205
  * Create a closed circular edge with a caller-supplied reference x-direction.
1233
1206
  *
@@ -1250,12 +1223,40 @@ export class BrepKernel {
1250
1223
  * non-positive, or the normal vector or `ref_dir` is zero.
1251
1224
  */
1252
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;
1253
1242
  /**
1254
1243
  * Create a circular face on the XY plane (using NURBS arcs).
1255
1244
  *
1256
1245
  * Returns a face handle.
1257
1246
  */
1258
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;
1259
1260
  /**
1260
1261
  * Create a compound from multiple solid handles.
1261
1262
  *
@@ -1300,22 +1301,6 @@ export class BrepKernel {
1300
1301
  * a zero vector.
1301
1302
  */
1302
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;
1303
- /**
1304
- * Create a closed elliptical edge with true `Ellipse` curve geometry.
1305
- *
1306
- * Creates a single closed edge with an [`EdgeCurve::Ellipse`] backing
1307
- * curve and parameter domain `[0, 2π]`. The start and end vertex are
1308
- * shared at the seam point `ellipse.evaluate(0.0)`.
1309
- *
1310
- * Returns an edge handle (`u32`).
1311
- *
1312
- * # Errors
1313
- *
1314
- * Returns an error if any coordinate is NaN/infinite, either
1315
- * semi-axis is non-positive, `semi_minor` exceeds `semi_major`, or
1316
- * the normal vector is zero.
1317
- */
1318
- makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semi_major: number, semi_minor: number): number;
1319
1304
  /**
1320
1305
  * Create a closed elliptical edge with a caller-supplied reference major-axis.
1321
1306
  *
@@ -1341,6 +1326,22 @@ export class BrepKernel {
1341
1326
  * the normal vector or `ref_dir` is zero.
1342
1327
  */
1343
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;
1344
1345
  /**
1345
1346
  * Create an ellipsoid solid centered at the origin.
1346
1347
  *
@@ -1384,6 +1385,12 @@ export class BrepKernel {
1384
1385
  * Returns a face handle (`u32`).
1385
1386
  */
1386
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;
1387
1394
  /**
1388
1395
  * Create a polygonal face from flat coordinate triples `[x,y,z, ...]`.
1389
1396
  *
@@ -1396,12 +1403,6 @@ export class BrepKernel {
1396
1403
  * fewer than 3 points are provided, or the face normal is degenerate.
1397
1404
  */
1398
1405
  makePolygon(coords: Float64Array): number;
1399
- /**
1400
- * Create a closed polygon wire from flat coordinates.
1401
- *
1402
- * Returns a wire handle.
1403
- */
1404
- makePolygonWire(coords: Float64Array): number;
1405
1406
  /**
1406
1407
  * Create a rectangular face on the XY plane centered at the origin.
1407
1408
  *
@@ -1494,6 +1495,13 @@ export class BrepKernel {
1494
1495
  * Returns a `JsMesh` with the result.
1495
1496
  */
1496
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;
1497
1505
  /**
1498
1506
  * Sample edges of a solid into polylines for wireframe rendering.
1499
1507
  *
@@ -1505,13 +1513,6 @@ export class BrepKernel {
1505
1513
  * arise from boolean face-splitting and don't represent visible creases.
1506
1514
  */
1507
1515
  meshEdges(solid: number, deflection: number, angular_tolerance?: number | null): JsEdgeLines;
1508
- /**
1509
- * Sample ALL edges of a solid (no smooth-edge filtering).
1510
- *
1511
- * Same as `meshEdges` but includes edges between co-surface faces.
1512
- * Useful for debugging topology.
1513
- */
1514
- meshEdgesAll(solid: number, deflection: number, angular_tolerance?: number | null): JsEdgeLines;
1515
1516
  /**
1516
1517
  * Number of boolean operations that have used the mesh (co-refinement)
1517
1518
  * fallback since module load.
@@ -1585,16 +1586,6 @@ export class BrepKernel {
1585
1586
  * Returns a flat array of offset polygon coordinates.
1586
1587
  */
1587
1588
  offsetPolygon2d(coords: Float64Array, distance: number, tolerance: number): Float64Array;
1588
- /**
1589
- * Offset (shell) a solid by a distance.
1590
- *
1591
- * Returns a new solid handle.
1592
- *
1593
- * # Errors
1594
- *
1595
- * Returns an error if the distance is zero or the solid is invalid.
1596
- */
1597
- offsetSolid(solid: number, distance: number): number;
1598
1589
  /**
1599
1590
  * Offset all faces of a solid outward or inward (V2 pipeline).
1600
1591
  *
@@ -1606,11 +1597,15 @@ export class BrepKernel {
1606
1597
  */
1607
1598
  offsetSolidV2(solid: number, distance: number): number;
1608
1599
  /**
1609
- * Offset a wire on a planar face.
1600
+ * Offset (shell) a solid by a distance.
1610
1601
  *
1611
- * 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.
1612
1607
  */
1613
- offsetWire(face: number, distance: number): number;
1608
+ offsetSolid(solid: number, distance: number): number;
1614
1609
  /**
1615
1610
  * Offset a planar wire directly by a distance with a specific join type.
1616
1611
  *
@@ -1643,6 +1638,12 @@ export class BrepKernel {
1643
1638
  * is unrecognized, or the offset operation fails.
1644
1639
  */
1645
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;
1646
1647
  /**
1647
1648
  * Pipe sweep: sweep a profile along a NURBS path (no guide).
1648
1649
  *
@@ -1913,23 +1914,6 @@ export class BrepKernel {
1913
1914
  * Returns an error if the solid handle is invalid or tessellation fails.
1914
1915
  */
1915
1916
  surfaceArea(solid: number, deflection: number): number;
1916
- /**
1917
- * Sweep a planar face along a NURBS curve path to create a solid.
1918
- *
1919
- * The path is specified as flat arrays for JS interop:
1920
- * - `path_degree` — polynomial degree of the path curve
1921
- * - `path_knots` — knot vector
1922
- * - `path_control_points` — flat `[x,y,z, ...]` control point coordinates
1923
- * - `path_weights` — per-control-point weights
1924
- *
1925
- * Returns a solid handle (`u32`).
1926
- *
1927
- * # Errors
1928
- *
1929
- * Returns an error if the face handle is invalid, the NURBS arrays have
1930
- * inconsistent lengths, or the sweep operation fails.
1931
- */
1932
- sweep(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
1933
1917
  /**
1934
1918
  * Sweep a face along a path defined by a chain of edges.
1935
1919
  *
@@ -1968,6 +1952,23 @@ export class BrepKernel {
1968
1952
  * Returns a solid handle.
1969
1953
  */
1970
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;
1971
1972
  /**
1972
1973
  * Tessellate an edge curve into polyline segments.
1973
1974
  *
@@ -1986,15 +1987,19 @@ export class BrepKernel {
1986
1987
  */
1987
1988
  tessellateFace(face: number, deflection: number, angular_tolerance?: number | null): JsMesh;
1988
1989
  /**
1989
- * 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.
1990
1992
  *
1991
- * 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.
1992
1997
  *
1993
1998
  * # Errors
1994
1999
  *
1995
2000
  * Returns an error if the solid handle is invalid or tessellation fails.
1996
2001
  */
1997
- tessellateSolid(solid: number, deflection: number, angular_tolerance?: number | null): JsMesh;
2002
+ tessellateSolidGroupedBinary(solid: number, deflection: number, angular_tolerance?: number | null): JsGroupedMesh;
1998
2003
  /**
1999
2004
  * Tessellate a solid with per-face triangle grouping.
2000
2005
  *
@@ -2008,32 +2013,28 @@ export class BrepKernel {
2008
2013
  */
2009
2014
  tessellateSolidGrouped(solid: number, deflection: number, angular_tolerance?: number | null): any;
2010
2015
  /**
2011
- * Tessellate a solid with per-face grouping, returned as packed binary
2012
- * buffers ([`JsGroupedMesh`]) instead of a JSON string.
2016
+ * Tessellate a solid and include per-vertex UV coordinates.
2013
2017
  *
2014
- * Identical geometry to [`tessellate_solid_grouped`](Self::tessellate_solid_grouped),
2015
- * but the mesh crosses the WASM boundary as `Float32Array`/`Uint32Array`
2016
- * bulk copies rather than a (potentially multi-megabyte) JSON string that
2017
- * 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.
2018
2022
  *
2019
2023
  * # Errors
2020
2024
  *
2021
2025
  * Returns an error if the solid handle is invalid or tessellation fails.
2022
2026
  */
2023
- tessellateSolidGroupedBinary(solid: number, deflection: number, angular_tolerance?: number | null): JsGroupedMesh;
2027
+ tessellateSolidUV(solid: number, deflection: number, angular_tolerance?: number | null): any;
2024
2028
  /**
2025
- * Tessellate a solid and include per-vertex UV coordinates.
2029
+ * Tessellate all faces of a solid into a single merged triangle mesh.
2026
2030
  *
2027
- * Returns a JSON string containing `{ positions, normals, indices, uvs }`.
2028
- * `uvs` is a flat array of `[u0, v0, u1, v1, ...]` values, two per vertex.
2029
- * For analytic and NURBS surfaces, these are the parametric (u, v) values.
2030
- * For planar faces, UVs are computed by projection onto the face plane.
2031
+ * Includes both the outer shell and any inner shells (voids).
2031
2032
  *
2032
2033
  * # Errors
2033
2034
  *
2034
2035
  * Returns an error if the solid handle is invalid or tessellation fails.
2035
2036
  */
2036
- tessellateSolidUV(solid: number, deflection: number, angular_tolerance?: number | null): any;
2037
+ tessellateSolid(solid: number, deflection: number, angular_tolerance?: number | null): JsMesh;
2037
2038
  /**
2038
2039
  * Thicken a face into a solid by offsetting it by the given distance.
2039
2040
  *
@@ -2112,16 +2113,6 @@ export class BrepKernel {
2112
2113
  * Returns a new face handle.
2113
2114
  */
2114
2115
  untrimFace(face: number, samples_per_curve: number, interior_samples: number): number;
2115
- /**
2116
- * Validate a solid, returning the number of errors found.
2117
- *
2118
- * Returns 0 if the solid is valid.
2119
- *
2120
- * # Errors
2121
- *
2122
- * Returns an error if the solid handle is invalid.
2123
- */
2124
- validateSolid(solid: number): number;
2125
2116
  /**
2126
2117
  * Validate a solid with relaxed checks suitable for assembled geometry.
2127
2118
  *
@@ -2152,6 +2143,16 @@ export class BrepKernel {
2152
2143
  * Returns an error if the solid handle is invalid.
2153
2144
  */
2154
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;
2155
2156
  /**
2156
2157
  * Compute the volume of a solid.
2157
2158
  *