brepkit-wasm 4.8.0 → 4.10.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
@@ -36,7 +36,7 @@ export class BrepKernel {
36
36
  *
37
37
  * Returns a new face handle (`u32`).
38
38
  */
39
- addHolesToFace(face: number, hole_wire_handles: Uint32Array): number;
39
+ addHolesToFace(face: number, hole_wire_handles: Uint32Array | number[]): number;
40
40
  /**
41
41
  * Get faces adjacent to a given face within a solid.
42
42
  *
@@ -48,31 +48,31 @@ export class BrepKernel {
48
48
  *
49
49
  * Returns an edge handle.
50
50
  */
51
- approximateCurveLspia(coords: Float64Array, degree: number, num_control_points: number, tolerance: number, max_iterations: number): number;
51
+ approximateCurveLspia(coords: Float64Array | number[], degree: number, num_control_points: number, tolerance: number, max_iterations: number): number;
52
52
  /**
53
53
  * Approximate a curve through points (least-squares).
54
54
  *
55
55
  * Returns an edge handle.
56
56
  */
57
- approximateCurve(coords: Float64Array, degree: number, num_control_points: number): number;
57
+ approximateCurve(coords: Float64Array | number[], degree: number, num_control_points: number): number;
58
58
  /**
59
59
  * Approximate a grid of points into a NURBS surface using LSPIA.
60
60
  *
61
61
  * Returns a face handle.
62
62
  */
63
- approximateSurfaceLspia(coords: Float64Array, rows: number, cols: number, degree_u: number, degree_v: number, num_cps_u: number, num_cps_v: number, tolerance: number, max_iterations: number): number;
63
+ approximateSurfaceLspia(coords: Float64Array | number[], rows: number, cols: number, degree_u: number, degree_v: number, num_cps_u: number, num_cps_v: number, tolerance: number, max_iterations: number): number;
64
64
  /**
65
65
  * Add a child component to a parent in an assembly.
66
66
  *
67
67
  * Returns the component ID.
68
68
  */
69
- assemblyAddChild(assembly: number, parent: number, name: string, solid: number, matrix: Float64Array): number;
69
+ assemblyAddChild(assembly: number, parent: number, name: string, solid: number, matrix: Float64Array | number[]): number;
70
70
  /**
71
71
  * Add a root component to an assembly.
72
72
  *
73
73
  * Returns the component ID.
74
74
  */
75
- assemblyAddRoot(assembly: number, name: string, solid: number, matrix: Float64Array): number;
75
+ assemblyAddRoot(assembly: number, name: string, solid: number, matrix: Float64Array | number[]): number;
76
76
  /**
77
77
  * Get the bill of materials for an assembly.
78
78
  *
@@ -89,6 +89,21 @@ export class BrepKernel {
89
89
  * Create a new empty assembly. Returns an assembly index.
90
90
  */
91
91
  assemblyNew(name: string): number;
92
+ /**
93
+ * Bridge two edge chains with a surface G1 or G2 continuous to the face
94
+ * beside each.
95
+ *
96
+ * Each chain lists its edges in running order, each stored either way.
97
+ * `options` is JSON: `{ "continuity": "g1" | "g2", "weights"?: [a, b] }`.
98
+ * Returns a face handle.
99
+ *
100
+ * # Errors
101
+ *
102
+ * Returns an error if a handle or the options are invalid, a weight is not
103
+ * positive, a chain breaks or leaves its face, or one chain is closed and
104
+ * the other open.
105
+ */
106
+ blendSurface(chain_a: Uint32Array | number[], face_a: number, chain_b: Uint32Array | number[], face_b: number, options: string): number;
92
107
  /**
93
108
  * Compute the axis-aligned bounding box of a solid.
94
109
  *
@@ -116,7 +131,7 @@ export class BrepKernel {
116
131
  * `distance` is the chamfer distance from each corner.
117
132
  * Returns a flat array of the chamfered polygon coordinates.
118
133
  */
119
- chamfer2d(coords: Float64Array, distance: number): Float64Array;
134
+ chamfer2d(coords: Float64Array | number[], distance: number): Float64Array;
120
135
  /**
121
136
  * Chamfer edges with distance and angle using the v2 blend engine.
122
137
  *
@@ -127,7 +142,7 @@ export class BrepKernel {
127
142
  * Returns an error if the solid or edge handles are invalid, the blend
128
143
  * computation fails, or any edge could not be blended.
129
144
  */
130
- chamferDistanceAngle(solid: number, edge_handles: Uint32Array, distance: number, angle: number): number;
145
+ chamferDistanceAngle(solid: number, edge_handles: Uint32Array | number[], distance: number, angle: number): number;
131
146
  /**
132
147
  * Chamfer edges with two distances using the v2 blend engine.
133
148
  *
@@ -138,7 +153,7 @@ export class BrepKernel {
138
153
  * Returns an error if the solid or edge handles are invalid, the blend
139
154
  * computation fails, or any edge could not be blended.
140
155
  */
141
- chamferV2(solid: number, edge_handles: Uint32Array, d1: number, d2: number): number;
156
+ chamferV2(solid: number, edge_handles: Uint32Array | number[], d1: number, d2: number): number;
142
157
  /**
143
158
  * Chamfer edges of a solid.
144
159
  *
@@ -148,7 +163,7 @@ export class BrepKernel {
148
163
  *
149
164
  * Returns an error if distance is non-positive or edges are invalid.
150
165
  */
151
- chamfer(solid: number, edge_handles: Uint32Array, distance: number): number;
166
+ chamfer(solid: number, edge_handles: Uint32Array | number[], distance: number): number;
152
167
  /**
153
168
  * Returns the number of saved checkpoints.
154
169
  */
@@ -200,7 +215,7 @@ export class BrepKernel {
200
215
  * Returns a flat array of common segment endpoints `[x1,y1, x2,y2, ...]`,
201
216
  * or an empty array if no common segments exist.
202
217
  */
203
- commonSegment2d(coords_a: Float64Array, coords_b: Float64Array): Float64Array;
218
+ commonSegment2d(coords_a: Float64Array | number[], coords_b: Float64Array | number[]): Float64Array;
204
219
  /**
205
220
  * Compose (multiply) two 4x4 transformation matrices.
206
221
  *
@@ -211,7 +226,7 @@ export class BrepKernel {
211
226
  *
212
227
  * Returns an error if either matrix doesn't have 16 elements.
213
228
  */
214
- composeTransforms(matrix_a: Float64Array, matrix_b: Float64Array): Float64Array;
229
+ composeTransforms(matrix_a: Float64Array | number[], matrix_b: Float64Array | number[]): Float64Array;
215
230
  /**
216
231
  * Cut a target solid by multiple tool solids in a single pass.
217
232
  *
@@ -225,7 +240,7 @@ export class BrepKernel {
225
240
  *
226
241
  * Returns an error if any handle is invalid or the operation fails.
227
242
  */
228
- compoundCut(target: number, tool_ids: Uint32Array): number;
243
+ compoundCut(target: number, tool_ids: Uint32Array | number[]): number;
229
244
  /**
230
245
  * Convert all analytic geometry in a solid to NURBS representation.
231
246
  *
@@ -268,7 +283,7 @@ export class BrepKernel {
268
283
  *
269
284
  * Returns an error if fewer than 4 non-coplanar points are provided.
270
285
  */
271
- convexHull(coords: Float64Array): number;
286
+ convexHull(coords: Float64Array | number[]): number;
272
287
  /**
273
288
  * Copy a solid and apply a 4×4 row-major affine transform in one pass.
274
289
  *
@@ -280,7 +295,7 @@ export class BrepKernel {
280
295
  * Returns an error if the solid handle is invalid, the matrix doesn't
281
296
  * have 16 elements, or the matrix is singular.
282
297
  */
283
- copyAndTransformSolid(solid: number, matrix: Float64Array): number;
298
+ copyAndTransformSolid(solid: number, matrix: Float64Array | number[]): number;
284
299
  /**
285
300
  * Deep copy a face, returning a new independent face handle.
286
301
  *
@@ -369,7 +384,7 @@ export class BrepKernel {
369
384
  * `face_handles` is an array of face handles to remove.
370
385
  * Returns a new solid handle.
371
386
  */
372
- defeature(solid: number, face_handles: Uint32Array): number;
387
+ defeature(solid: number, face_handles: Uint32Array | number[]): number;
373
388
  /**
374
389
  * Reconstruct a solid from a buffer produced by [`Self::serialize_solid`].
375
390
  *
@@ -377,7 +392,7 @@ export class BrepKernel {
377
392
  *
378
393
  * Returns an error if the buffer is malformed or reconstruction fails.
379
394
  */
380
- deserializeSolid(data: Uint8Array): number;
395
+ deserializeSolid(data: Uint8Array | number[]): number;
381
396
  /**
382
397
  * Detect surface-level coincident face pairs between two solids
383
398
  * without performing a boolean operation.
@@ -422,7 +437,7 @@ export class BrepKernel {
422
437
  *
423
438
  * Returns an error if angle is zero or faces are invalid.
424
439
  */
425
- draft(solid: number, face_handles: Uint32Array, pull_x: number, pull_y: number, pull_z: number, neutral_x: number, neutral_y: number, neutral_z: number, angle_degrees: number): number;
440
+ draft(solid: number, face_handles: Uint32Array | number[], pull_x: number, pull_y: number, pull_z: number, neutral_x: number, neutral_y: number, neutral_z: number, angle_degrees: number): number;
426
441
  /**
427
442
  * Compute the length of an edge.
428
443
  *
@@ -518,7 +533,7 @@ export class BrepKernel {
518
533
  *
519
534
  * Returns an error if a solid handle is invalid or export fails.
520
535
  */
521
- exportIgesSolids(solids: Uint32Array): Uint8Array;
536
+ exportIgesSolids(solids: Uint32Array | number[]): Uint8Array;
522
537
  /**
523
538
  * Export a solid to IGES format.
524
539
  *
@@ -619,6 +634,17 @@ export class BrepKernel {
619
634
  * Returns an array of wire handles.
620
635
  */
621
636
  faceWires(face: number): Uint32Array;
637
+ /**
638
+ * Smooth a surface, staying within `tolerance` of it, with its boundary
639
+ * held. A surface with no bumps to remove comes back unchanged.
640
+ *
641
+ * Returns a new face handle.
642
+ *
643
+ * # Errors
644
+ *
645
+ * Returns an error if the handle is invalid or `tolerance` is not positive.
646
+ */
647
+ fairSurface(face: number, tolerance: number): number;
622
648
  /**
623
649
  * Fill a 4-sided boundary with a Coons patch surface.
624
650
  *
@@ -626,7 +652,7 @@ export class BrepKernel {
626
652
  * `curve_lengths` is `[n0, n1, n2, n3]` — number of points per curve.
627
653
  * Returns a face handle.
628
654
  */
629
- fillCoonsPatch(boundary_coords: Float64Array, curve_lengths: Uint32Array): number;
655
+ fillCoonsPatch(boundary_coords: Float64Array | number[], curve_lengths: Uint32Array | number[]): number;
630
656
  /**
631
657
  * Round corners of a 2D polygon by inserting arc-approximation vertices.
632
658
  *
@@ -634,7 +660,22 @@ export class BrepKernel {
634
660
  * `radius` is the fillet radius.
635
661
  * Returns a flat array of the filleted polygon coordinates.
636
662
  */
637
- fillet2d(coords: Float64Array, radius: number): Float64Array;
663
+ fillet2d(coords: Float64Array | number[], radius: number): Float64Array;
664
+ /**
665
+ * Fillet edges with options at corners where three of them meet: how far
666
+ * back along each edge its round stops, and what closes the hole that
667
+ * leaves. `corners_json` is an array of
668
+ * `{"vertex": h, "setbacks": [{"edge": h, "distance": d}, ...], "corner": "rolling" | "g2"}`,
669
+ * with `setbacks` and `corner` optional: no set-backs and `"g2"` stops each
670
+ * round one radius past where a ball would.
671
+ *
672
+ * # Errors
673
+ *
674
+ * Returns an error if a handle is invalid, the JSON is malformed, the blend
675
+ * computation fails, or a corner is not three straight rounds between flat
676
+ * faces with set-backs past the ball and short of each edge's far end.
677
+ */
678
+ filletV2Corners(solid: number, edge_handles: Uint32Array | number[], radius: number, corners_json: string): number;
638
679
  /**
639
680
  * Fillet edges using the v2 walking-based blend engine.
640
681
  *
@@ -645,7 +686,7 @@ export class BrepKernel {
645
686
  * Returns an error if the solid or edge handles are invalid, the blend
646
687
  * computation fails, or any edge could not be blended.
647
688
  */
648
- filletV2(solid: number, edge_handles: Uint32Array, radius: number): number;
689
+ filletV2(solid: number, edge_handles: Uint32Array | number[], radius: number): number;
649
690
  /**
650
691
  * Apply variable-radius fillets to edges.
651
692
  *
@@ -671,7 +712,7 @@ export class BrepKernel {
671
712
  * Returns an error if a handle is invalid, the radius is non-positive, or
672
713
  * the fillet fails.
673
714
  */
674
- filletWithEvolution(solid: number, edge_handles: Uint32Array, radius: number): any;
715
+ filletWithEvolution(solid: number, edge_handles: Uint32Array | number[], radius: number): any;
675
716
  /**
676
717
  * Fillet (round) edges of a solid.
677
718
  *
@@ -682,7 +723,7 @@ export class BrepKernel {
682
723
  * Returns an error if radius is non-positive, edges are invalid, or no
683
724
  * fillet engine can produce a valid changed solid.
684
725
  */
685
- fillet(solid: number, edge_handles: Uint32Array, radius: number): number;
726
+ fillet(solid: number, edge_handles: Uint32Array | number[], radius: number): number;
686
727
  /**
687
728
  * Fix face orientations to ensure consistent outward normals.
688
729
  *
@@ -718,7 +759,7 @@ export class BrepKernel {
718
759
  * Returns an error if any solid handle is invalid, the list is empty,
719
760
  * or a boolean operation produces an empty or non-manifold result.
720
761
  */
721
- fuseAll(solid_handles: Uint32Array): number;
762
+ fuseAll(solid_handles: Uint32Array | number[]): number;
722
763
  /**
723
764
  * Fuse (union) two solids and return evolution tracking data.
724
765
  *
@@ -1018,7 +1059,7 @@ export class BrepKernel {
1018
1059
  * Returns an error for a non-finite or malformed curve, a non-planar
1019
1060
  * profile, or a degenerate path.
1020
1061
  */
1021
- guidedSweep(face: number, spine_degree: number, spine_knots: Float64Array, spine_control_points: Float64Array, spine_weights: Float64Array, aux_degree: number, aux_knots: Float64Array, aux_control_points: Float64Array, aux_weights: Float64Array): number;
1062
+ guidedSweep(face: number, spine_degree: number, spine_knots: Float64Array | number[], spine_control_points: Float64Array | number[], spine_weights: Float64Array | number[], aux_degree: number, aux_knots: Float64Array | number[], aux_control_points: Float64Array | number[], aux_weights: Float64Array | number[]): number;
1022
1063
  /**
1023
1064
  * Heal a solid topology.
1024
1065
  *
@@ -1045,7 +1086,7 @@ export class BrepKernel {
1045
1086
  *
1046
1087
  * Returns an error if the 3MF data is malformed.
1047
1088
  */
1048
- import3mf(data: Uint8Array): Uint32Array;
1089
+ import3mf(data: Uint8Array | number[]): Uint32Array;
1049
1090
  /**
1050
1091
  * Import a GLB (glTF binary) file and return a solid handle.
1051
1092
  *
@@ -1053,7 +1094,7 @@ export class BrepKernel {
1053
1094
  *
1054
1095
  * Returns an error if the file is malformed or mesh import fails.
1055
1096
  */
1056
- importGlb(data: Uint8Array): number;
1097
+ importGlb(data: Uint8Array | number[]): number;
1057
1098
  /**
1058
1099
  * Import an IGES file and return solid handles.
1059
1100
  *
@@ -1061,7 +1102,7 @@ export class BrepKernel {
1061
1102
  *
1062
1103
  * Returns an error if the IGES data is malformed.
1063
1104
  */
1064
- importIges(data: Uint8Array): Uint32Array;
1105
+ importIges(data: Uint8Array | number[]): Uint32Array;
1065
1106
  /**
1066
1107
  * Import a triangle mesh from flat vertex/index arrays.
1067
1108
  *
@@ -1073,7 +1114,7 @@ export class BrepKernel {
1073
1114
  *
1074
1115
  * Returns an error if the arrays are malformed or mesh import fails.
1075
1116
  */
1076
- importIndexedMesh(positions: Float64Array, indices: Uint32Array): number;
1117
+ importIndexedMesh(positions: Float64Array | number[], indices: Uint32Array | number[]): number;
1077
1118
  /**
1078
1119
  * Import an OBJ file and return a solid handle.
1079
1120
  *
@@ -1081,7 +1122,7 @@ export class BrepKernel {
1081
1122
  *
1082
1123
  * Returns an error if the file is malformed or mesh import fails.
1083
1124
  */
1084
- importObj(data: Uint8Array): number;
1125
+ importObj(data: Uint8Array | number[]): number;
1085
1126
  /**
1086
1127
  * Import a STEP file and return solid handles.
1087
1128
  *
@@ -1091,7 +1132,7 @@ export class BrepKernel {
1091
1132
  *
1092
1133
  * Returns an error if the STEP data is malformed.
1093
1134
  */
1094
- importStep(data: Uint8Array): Uint32Array;
1135
+ importStep(data: Uint8Array | number[]): Uint32Array;
1095
1136
  /**
1096
1137
  * Import an STL file (binary or ASCII) and return a solid handle.
1097
1138
  *
@@ -1102,21 +1143,34 @@ export class BrepKernel {
1102
1143
  *
1103
1144
  * Returns an error if the STL data is malformed or empty.
1104
1145
  */
1105
- importStl(data: Uint8Array): number;
1146
+ importStl(data: Uint8Array | number[]): number;
1147
+ /**
1148
+ * A copy of a solid with its faces split where the given faces and edges
1149
+ * meet them.
1150
+ *
1151
+ * Returns a solid handle. The copy has the solid's volume.
1152
+ *
1153
+ * # Errors
1154
+ *
1155
+ * Returns an error if a handle does not resolve, a face cannot be split
1156
+ * along its marks, or the result would not be a valid solid of the same
1157
+ * volume.
1158
+ */
1159
+ imprintFaces(solid: number, face_handles: Uint32Array | number[], edge_handles: Uint32Array | number[]): number;
1106
1160
  /**
1107
1161
  * Interpolate a NURBS curve through points and create an edge.
1108
1162
  *
1109
1163
  * Uses chord-length parameterization with the given degree.
1110
1164
  * Returns an edge handle (`u32`).
1111
1165
  */
1112
- interpolatePoints(coords: Float64Array, degree: number): number;
1166
+ interpolatePoints(coords: Float64Array | number[], degree: number): number;
1113
1167
  /**
1114
1168
  * Interpolate a grid of points into a NURBS surface.
1115
1169
  *
1116
1170
  * `coords` is a flat array `[x,y,z, ...]` of `rows * cols` points.
1117
1171
  * Returns a face handle.
1118
1172
  */
1119
- interpolateSurface(coords: Float64Array, rows: number, cols: number, degree_u: number, degree_v: number): number;
1173
+ interpolateSurface(coords: Float64Array | number[], rows: number, cols: number, degree_u: number, degree_v: number): number;
1120
1174
  /**
1121
1175
  * Compute the boolean intersection of two 2D polygons.
1122
1176
  *
@@ -1126,7 +1180,7 @@ export class BrepKernel {
1126
1180
  *
1127
1181
  * Uses the Sutherland-Hodgman algorithm (convex clipper).
1128
1182
  */
1129
- intersectPolygons2d(coords_a: Float64Array, coords_b: Float64Array): Float64Array;
1183
+ intersectPolygons2d(coords_a: Float64Array | number[], coords_b: Float64Array | number[]): Float64Array;
1130
1184
  /**
1131
1185
  * Intersect two solids and return evolution tracking data.
1132
1186
  *
@@ -1178,7 +1232,7 @@ export class BrepKernel {
1178
1232
  *
1179
1233
  * Returns an edge handle (`u32`).
1180
1234
  */
1181
- liftCurve2dToPlane(curve_type: number, curve_params: Float64Array, origin_x: number, origin_y: number, origin_z: number, x_axis_x: number, x_axis_y: number, x_axis_z: number, normal_x: number, normal_y: number, normal_z: number, t_start: number, t_end: number): number;
1235
+ liftCurve2dToPlane(curve_type: number, curve_params: Float64Array | number[], origin_x: number, origin_y: number, origin_z: number, x_axis_x: number, x_axis_y: number, x_axis_z: number, normal_x: number, normal_y: number, normal_z: number, t_start: number, t_end: number): number;
1182
1236
  /**
1183
1237
  * Create a linear pattern of a solid.
1184
1238
  *
@@ -1203,7 +1257,7 @@ export class BrepKernel {
1203
1257
  * Returns an error if fewer than 2 profiles are given, profiles have
1204
1258
  * different vertex counts, or surface fitting fails.
1205
1259
  */
1206
- loftSmooth(faces: Uint32Array): number;
1260
+ loftSmooth(faces: Uint32Array | number[]): number;
1207
1261
  /**
1208
1262
  * Loft two or more open wires of equal edge counts into an open shell.
1209
1263
  *
@@ -1215,7 +1269,7 @@ export class BrepKernel {
1215
1269
  * their edge counts differ, a wire is closed, meets itself or breaks, two
1216
1270
  * wires touch where they would be joined, or two lines cross or fold over.
1217
1271
  */
1218
- loftWires(wires: Uint32Array): number;
1272
+ loftWires(wires: Uint32Array | number[]): number;
1219
1273
  /**
1220
1274
  * Loft profiles with options for start/end points and ruled mode.
1221
1275
  *
@@ -1227,7 +1281,7 @@ export class BrepKernel {
1227
1281
  * a shell handle holding the loft's faces without the caps on its end
1228
1282
  * profiles
1229
1283
  */
1230
- loftWithOptions(faces: Uint32Array, options: string): number;
1284
+ loftWithOptions(faces: Uint32Array | number[], options: string): number;
1231
1285
  /**
1232
1286
  * Loft two or more profile faces into a solid.
1233
1287
  *
@@ -1238,7 +1292,7 @@ export class BrepKernel {
1238
1292
  * Returns an error if fewer than 2 faces or profiles have
1239
1293
  * different vertex counts.
1240
1294
  */
1241
- loft(faces: Uint32Array): number;
1295
+ loft(faces: Uint32Array | number[]): number;
1242
1296
  /**
1243
1297
  * Create a box solid with the given dimensions, centered at the origin.
1244
1298
  *
@@ -1320,7 +1374,7 @@ export class BrepKernel {
1320
1374
  *
1321
1375
  * Returns a compound handle (stored as `u32`).
1322
1376
  */
1323
- makeCompound(solid_handles: Uint32Array): number;
1377
+ makeCompound(solid_handles: Uint32Array | number[]): number;
1324
1378
  /**
1325
1379
  * Create a cone or frustum solid centered at the origin, axis along +Z.
1326
1380
  *
@@ -1432,7 +1486,7 @@ export class BrepKernel {
1432
1486
  *
1433
1487
  * Returns an edge handle (`u32`).
1434
1488
  */
1435
- makeNurbsEdge(start_x: number, start_y: number, start_z: number, end_x: number, end_y: number, end_z: number, degree: number, knots: Float64Array, control_points: Float64Array, weights: Float64Array): number;
1489
+ makeNurbsEdge(start_x: number, start_y: number, start_z: number, end_x: number, end_y: number, end_z: number, degree: number, knots: Float64Array | number[], control_points: Float64Array | number[], weights: Float64Array | number[]): number;
1436
1490
  /**
1437
1491
  * Create a strictly planar face from a wire.
1438
1492
  *
@@ -1448,7 +1502,7 @@ export class BrepKernel {
1448
1502
  *
1449
1503
  * Returns a wire handle.
1450
1504
  */
1451
- makePolygonWire(coords: Float64Array): number;
1505
+ makePolygonWire(coords: Float64Array | number[]): number;
1452
1506
  /**
1453
1507
  * Create a polygonal face from flat coordinate triples `[x,y,z, ...]`.
1454
1508
  *
@@ -1460,7 +1514,7 @@ export class BrepKernel {
1460
1514
  * Returns an error if `coords` length is not a multiple of 3,
1461
1515
  * fewer than 3 points are provided, or the face normal is degenerate.
1462
1516
  */
1463
- makePolygon(coords: Float64Array): number;
1517
+ makePolygon(coords: Float64Array | number[]): number;
1464
1518
  /**
1465
1519
  * Create a rectangular face on the XY plane centered at the origin.
1466
1520
  *
@@ -1484,7 +1538,7 @@ export class BrepKernel {
1484
1538
  * Alias for `sewFaces` with a default tolerance. This is the equivalent
1485
1539
  * of sewing faces into a closed shell and building a solid.
1486
1540
  */
1487
- makeSolid(face_handles: Uint32Array): number;
1541
+ makeSolid(face_handles: Uint32Array | number[]): number;
1488
1542
  /**
1489
1543
  * Create a sphere solid centered at the origin.
1490
1544
  *
@@ -1526,7 +1580,22 @@ export class BrepKernel {
1526
1580
  *
1527
1581
  * Returns a wire handle (`u32`).
1528
1582
  */
1529
- makeWire(edge_handles: Uint32Array, closed: boolean): number;
1583
+ makeWire(edge_handles: Uint32Array | number[], closed: boolean): number;
1584
+ /**
1585
+ * Move one surface's edge on to another's at G0, G1 or G2, keeping the
1586
+ * rest of the surface as close as the move allows.
1587
+ *
1588
+ * `options` is JSON: `{ "continuity": "g0" | "g1" | "g2", "targetFace"?: face }`.
1589
+ * `targetFace` names the face a solid's edge is matched to, since it
1590
+ * bounds two. Returns a new face handle.
1591
+ *
1592
+ * # Errors
1593
+ *
1594
+ * Returns an error if a handle or the options are invalid, `edge` is not on
1595
+ * the face's outer boundary, or the target bounds no face or several when
1596
+ * a surface is needed and none is named.
1597
+ */
1598
+ matchSurface(face: number, edge: number, target_edge: number, options: string): number;
1530
1599
  /**
1531
1600
  * Measure curvature of an edge curve at parameter `t`.
1532
1601
  *
@@ -1552,7 +1621,7 @@ export class BrepKernel {
1552
1621
  *
1553
1622
  * Returns a `JsMesh` with the result.
1554
1623
  */
1555
- meshBoolean(positions_a: Float64Array, indices_a: Uint32Array, positions_b: Float64Array, indices_b: Uint32Array, op: string, tolerance: number): JsMesh;
1624
+ meshBoolean(positions_a: Float64Array | number[], indices_a: Uint32Array | number[], positions_b: Float64Array | number[], indices_b: Uint32Array | number[], op: string, tolerance: number): JsMesh;
1556
1625
  /**
1557
1626
  * Sample ALL edges of a solid (no smooth-edge filtering).
1558
1627
  *
@@ -1622,7 +1691,7 @@ export class BrepKernel {
1622
1691
  * Returns an error for fewer than two sections, mismatched array lengths, a
1623
1692
  * non-finite or out-of-range value, a non-planar profile, or loft failure.
1624
1693
  */
1625
- multiSectionSweep(face_handles: Uint32Array, params: Float64Array, spine_degree: number, spine_knots: Float64Array, spine_control_points: Float64Array, spine_weights: Float64Array, ruled: boolean): number;
1694
+ multiSectionSweep(face_handles: Uint32Array | number[], params: Float64Array | number[], spine_degree: number, spine_knots: Float64Array | number[], spine_control_points: Float64Array | number[], spine_weights: Float64Array | number[], ruled: boolean): number;
1626
1695
  /**
1627
1696
  * Create a new, empty kernel.
1628
1697
  */
@@ -1643,7 +1712,7 @@ export class BrepKernel {
1643
1712
  * `coords` is a flat array `[x,y, x,y, ...]` of 2D points.
1644
1713
  * Returns a flat array of offset polygon coordinates.
1645
1714
  */
1646
- offsetPolygon2d(coords: Float64Array, distance: number, tolerance: number): Float64Array;
1715
+ offsetPolygon2d(coords: Float64Array | number[], distance: number, tolerance: number): Float64Array;
1647
1716
  /**
1648
1717
  * Offset all faces of a solid outward or inward (V2 pipeline).
1649
1718
  *
@@ -1711,14 +1780,14 @@ export class BrepKernel {
1711
1780
  *
1712
1781
  * Returns an error if the face or path is invalid.
1713
1782
  */
1714
- pipe(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
1783
+ pipe(face: number, path_degree: number, path_knots: Float64Array | number[], path_control_points: Float64Array | number[], path_weights: Float64Array | number[]): number;
1715
1784
  /**
1716
1785
  * Test if a 2D point is inside a closed polygon.
1717
1786
  *
1718
1787
  * `polygon_coords` is a flat array `[x,y, x,y, ...]`.
1719
1788
  * Returns `true` if the point is inside the polygon (winding number test).
1720
1789
  */
1721
- pointInPolygon2d(polygon_coords: Float64Array, px: number, py: number): boolean;
1790
+ pointInPolygon2d(polygon_coords: Float64Array | number[], px: number, py: number): boolean;
1722
1791
  /**
1723
1792
  * Compute minimum distance from a point to an edge.
1724
1793
  *
@@ -1756,7 +1825,7 @@ export class BrepKernel {
1756
1825
  * Returns `true` if any vertex of one polygon is inside the other
1757
1826
  * or if any edges cross.
1758
1827
  */
1759
- polygonsIntersect2d(coords_a: Float64Array, coords_b: Float64Array): boolean;
1828
+ polygonsIntersect2d(coords_a: Float64Array | number[], coords_b: Float64Array | number[]): boolean;
1760
1829
  /**
1761
1830
  * Project a solid's edges onto a view plane with hidden-line removal.
1762
1831
  *
@@ -1787,7 +1856,7 @@ export class BrepKernel {
1787
1856
  * Returns an error for an empty list, an invalid handle, a non-positive
1788
1857
  * `deflection`, or a degenerate `dir`/`x_axis`.
1789
1858
  */
1790
- projectSolidsEdges(solids: Uint32Array, origin_x: number, origin_y: number, origin_z: number, dir_x: number, dir_y: number, dir_z: number, x_axis_x: number, x_axis_y: number, x_axis_z: number, hidden_lines: boolean, deflection: number): any;
1859
+ projectSolidsEdges(solids: Uint32Array | number[], origin_x: number, origin_y: number, origin_z: number, dir_x: number, dir_y: number, dir_z: number, x_axis_x: number, x_axis_y: number, x_axis_z: number, hidden_lines: boolean, deflection: number): any;
1791
1860
  /**
1792
1861
  * Recognize geometric features in a solid.
1793
1862
  *
@@ -1905,7 +1974,7 @@ export class BrepKernel {
1905
1974
  *
1906
1975
  * Returns an error if fewer than 2 faces or sewing fails.
1907
1976
  */
1908
- sewFaces(face_handles: Uint32Array, tolerance: number): number;
1977
+ sewFaces(face_handles: Uint32Array | number[], tolerance: number): number;
1909
1978
  /**
1910
1979
  * Get edges shared between two faces.
1911
1980
  *
@@ -1922,7 +1991,7 @@ export class BrepKernel {
1922
1991
  *
1923
1992
  * Returns an error if thickness is non-positive or the solid is invalid.
1924
1993
  */
1925
- shell(solid: number, thickness: number, open_faces: Uint32Array): number;
1994
+ shell(solid: number, thickness: number, open_faces: Uint32Array | number[]): number;
1926
1995
  /**
1927
1996
  * Add an arc to a sketch (defined by center, start, end point indices).
1928
1997
  * Returns the arc index.
@@ -1985,6 +2054,20 @@ export class BrepKernel {
1985
2054
  * Returns an error if either solid handle is invalid.
1986
2055
  */
1987
2056
  solidToSolidDistance(a: number, b: number): Float64Array;
2057
+ /**
2058
+ * A solid in the pieces the given faces separate it into. A face that
2059
+ * walls nothing off imprints instead, so a face that only dips in returns
2060
+ * one solid.
2061
+ *
2062
+ * Returns solid handles.
2063
+ *
2064
+ * # Errors
2065
+ *
2066
+ * Returns an error if a handle does not resolve, a face cannot be split
2067
+ * along its marks, or the pieces would not be valid solids summing to the
2068
+ * solid's volume.
2069
+ */
2070
+ splitByFaces(solid: number, face_handles: Uint32Array | number[]): Uint32Array;
1988
2071
  /**
1989
2072
  * Split a solid into two halves along a plane.
1990
2073
  *
@@ -2017,7 +2100,7 @@ export class BrepKernel {
2017
2100
  *
2018
2101
  * Returns an error if fewer than 2 edges or the fit fails.
2019
2102
  */
2020
- sweepAlongEdges(face: number, edge_handles: Uint32Array): number;
2103
+ sweepAlongEdges(face: number, edge_handles: Uint32Array | number[]): number;
2021
2104
  /**
2022
2105
  * Sweep a face along a path with smooth NURBS side surfaces.
2023
2106
  *
@@ -2031,7 +2114,7 @@ export class BrepKernel {
2031
2114
  *
2032
2115
  * Returns an error if the face or path is invalid, or surface fitting fails.
2033
2116
  */
2034
- sweepSmooth(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
2117
+ sweepSmooth(face: number, path_degree: number, path_knots: Float64Array | number[], path_control_points: Float64Array | number[], path_weights: Float64Array | number[]): number;
2035
2118
  /**
2036
2119
  * Sweep an open wire along a chain of path edges into an open shell.
2037
2120
  *
@@ -2045,7 +2128,7 @@ export class BrepKernel {
2045
2128
  * Returns an error if a handle is invalid, the chain has no edges, breaks,
2046
2129
  * closes or has a kink, or the wire is closed.
2047
2130
  */
2048
- sweepWire(wire: number, path_edges: Uint32Array): number;
2131
+ sweepWire(wire: number, path_edges: Uint32Array | number[]): number;
2049
2132
  /**
2050
2133
  * Sweep a face along a NURBS path with advanced options.
2051
2134
  *
@@ -2054,7 +2137,7 @@ export class BrepKernel {
2054
2137
  * `corner_mode`: "smooth" (default), "miter", or "round"
2055
2138
  * Returns a solid handle.
2056
2139
  */
2057
- sweepWithOptions(profile: number, path_edge: number, contact_mode: string, scale_values: Float64Array, segments: number, corner_mode: string): number;
2140
+ sweepWithOptions(profile: number, path_edge: number, contact_mode: string, scale_values: Float64Array | number[], segments: number, corner_mode: string): number;
2058
2141
  /**
2059
2142
  * Sweep a planar face along a NURBS curve path to create a solid.
2060
2143
  *
@@ -2071,7 +2154,7 @@ export class BrepKernel {
2071
2154
  * Returns an error if the face handle is invalid, the NURBS arrays have
2072
2155
  * inconsistent lengths, or the sweep operation fails.
2073
2156
  */
2074
- sweep(face: number, path_degree: number, path_knots: Float64Array, path_control_points: Float64Array, path_weights: Float64Array): number;
2157
+ sweep(face: number, path_degree: number, path_knots: Float64Array | number[], path_control_points: Float64Array | number[], path_weights: Float64Array | number[]): number;
2075
2158
  /**
2076
2159
  * Tessellate an edge curve into polyline segments.
2077
2160
  *
@@ -2181,7 +2264,7 @@ export class BrepKernel {
2181
2264
  * Returns an error if the face handle is invalid, the matrix doesn't
2182
2265
  * have 16 elements, or the matrix is singular.
2183
2266
  */
2184
- transformFace(face: number, matrix: Float64Array): void;
2267
+ transformFace(face: number, matrix: Float64Array | number[]): void;
2185
2268
  /**
2186
2269
  * Apply a 4×4 affine transform to a solid (in place).
2187
2270
  *
@@ -2192,7 +2275,7 @@ export class BrepKernel {
2192
2275
  * Returns an error if the solid handle is invalid, the matrix doesn't
2193
2276
  * have 16 elements, or the matrix is singular.
2194
2277
  */
2195
- transformSolid(solid: number, matrix: Float64Array): void;
2278
+ transformSolid(solid: number, matrix: Float64Array | number[]): void;
2196
2279
  /**
2197
2280
  * Apply a 4×4 affine transform to a wire (in place).
2198
2281
  *
@@ -2203,7 +2286,7 @@ export class BrepKernel {
2203
2286
  * Returns an error if the wire handle is invalid, the matrix doesn't
2204
2287
  * have 16 elements, or the matrix is singular.
2205
2288
  */
2206
- transformWire(wire: number, matrix: Float64Array): void;
2289
+ transformWire(wire: number, matrix: Float64Array | number[]): void;
2207
2290
  /**
2208
2291
  * Unify adjacent faces that lie on the same geometric surface.
2209
2292
  *
@@ -2272,7 +2355,7 @@ export class BrepKernel {
2272
2355
  * Accepts an array of face handles from potentially different shells.
2273
2356
  * Sews all faces together into a single solid.
2274
2357
  */
2275
- weldShellsAndFaces(face_handles: Uint32Array, tolerance: number): number;
2358
+ weldShellsAndFaces(face_handles: Uint32Array | number[], tolerance: number): number;
2276
2359
  /**
2277
2360
  * Compute the total arc-length of a wire.
2278
2361
  */