brepkit-wasm 4.9.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,7 +1143,7 @@ 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;
1106
1147
  /**
1107
1148
  * A copy of a solid with its faces split where the given faces and edges
1108
1149
  * meet them.
@@ -1115,21 +1156,21 @@ export class BrepKernel {
1115
1156
  * along its marks, or the result would not be a valid solid of the same
1116
1157
  * volume.
1117
1158
  */
1118
- imprintFaces(solid: number, face_handles: Uint32Array, edge_handles: Uint32Array): number;
1159
+ imprintFaces(solid: number, face_handles: Uint32Array | number[], edge_handles: Uint32Array | number[]): number;
1119
1160
  /**
1120
1161
  * Interpolate a NURBS curve through points and create an edge.
1121
1162
  *
1122
1163
  * Uses chord-length parameterization with the given degree.
1123
1164
  * Returns an edge handle (`u32`).
1124
1165
  */
1125
- interpolatePoints(coords: Float64Array, degree: number): number;
1166
+ interpolatePoints(coords: Float64Array | number[], degree: number): number;
1126
1167
  /**
1127
1168
  * Interpolate a grid of points into a NURBS surface.
1128
1169
  *
1129
1170
  * `coords` is a flat array `[x,y,z, ...]` of `rows * cols` points.
1130
1171
  * Returns a face handle.
1131
1172
  */
1132
- 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;
1133
1174
  /**
1134
1175
  * Compute the boolean intersection of two 2D polygons.
1135
1176
  *
@@ -1139,7 +1180,7 @@ export class BrepKernel {
1139
1180
  *
1140
1181
  * Uses the Sutherland-Hodgman algorithm (convex clipper).
1141
1182
  */
1142
- intersectPolygons2d(coords_a: Float64Array, coords_b: Float64Array): Float64Array;
1183
+ intersectPolygons2d(coords_a: Float64Array | number[], coords_b: Float64Array | number[]): Float64Array;
1143
1184
  /**
1144
1185
  * Intersect two solids and return evolution tracking data.
1145
1186
  *
@@ -1191,7 +1232,7 @@ export class BrepKernel {
1191
1232
  *
1192
1233
  * Returns an edge handle (`u32`).
1193
1234
  */
1194
- 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;
1195
1236
  /**
1196
1237
  * Create a linear pattern of a solid.
1197
1238
  *
@@ -1216,7 +1257,7 @@ export class BrepKernel {
1216
1257
  * Returns an error if fewer than 2 profiles are given, profiles have
1217
1258
  * different vertex counts, or surface fitting fails.
1218
1259
  */
1219
- loftSmooth(faces: Uint32Array): number;
1260
+ loftSmooth(faces: Uint32Array | number[]): number;
1220
1261
  /**
1221
1262
  * Loft two or more open wires of equal edge counts into an open shell.
1222
1263
  *
@@ -1228,7 +1269,7 @@ export class BrepKernel {
1228
1269
  * their edge counts differ, a wire is closed, meets itself or breaks, two
1229
1270
  * wires touch where they would be joined, or two lines cross or fold over.
1230
1271
  */
1231
- loftWires(wires: Uint32Array): number;
1272
+ loftWires(wires: Uint32Array | number[]): number;
1232
1273
  /**
1233
1274
  * Loft profiles with options for start/end points and ruled mode.
1234
1275
  *
@@ -1240,7 +1281,7 @@ export class BrepKernel {
1240
1281
  * a shell handle holding the loft's faces without the caps on its end
1241
1282
  * profiles
1242
1283
  */
1243
- loftWithOptions(faces: Uint32Array, options: string): number;
1284
+ loftWithOptions(faces: Uint32Array | number[], options: string): number;
1244
1285
  /**
1245
1286
  * Loft two or more profile faces into a solid.
1246
1287
  *
@@ -1251,7 +1292,7 @@ export class BrepKernel {
1251
1292
  * Returns an error if fewer than 2 faces or profiles have
1252
1293
  * different vertex counts.
1253
1294
  */
1254
- loft(faces: Uint32Array): number;
1295
+ loft(faces: Uint32Array | number[]): number;
1255
1296
  /**
1256
1297
  * Create a box solid with the given dimensions, centered at the origin.
1257
1298
  *
@@ -1333,7 +1374,7 @@ export class BrepKernel {
1333
1374
  *
1334
1375
  * Returns a compound handle (stored as `u32`).
1335
1376
  */
1336
- makeCompound(solid_handles: Uint32Array): number;
1377
+ makeCompound(solid_handles: Uint32Array | number[]): number;
1337
1378
  /**
1338
1379
  * Create a cone or frustum solid centered at the origin, axis along +Z.
1339
1380
  *
@@ -1445,7 +1486,7 @@ export class BrepKernel {
1445
1486
  *
1446
1487
  * Returns an edge handle (`u32`).
1447
1488
  */
1448
- 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;
1449
1490
  /**
1450
1491
  * Create a strictly planar face from a wire.
1451
1492
  *
@@ -1461,7 +1502,7 @@ export class BrepKernel {
1461
1502
  *
1462
1503
  * Returns a wire handle.
1463
1504
  */
1464
- makePolygonWire(coords: Float64Array): number;
1505
+ makePolygonWire(coords: Float64Array | number[]): number;
1465
1506
  /**
1466
1507
  * Create a polygonal face from flat coordinate triples `[x,y,z, ...]`.
1467
1508
  *
@@ -1473,7 +1514,7 @@ export class BrepKernel {
1473
1514
  * Returns an error if `coords` length is not a multiple of 3,
1474
1515
  * fewer than 3 points are provided, or the face normal is degenerate.
1475
1516
  */
1476
- makePolygon(coords: Float64Array): number;
1517
+ makePolygon(coords: Float64Array | number[]): number;
1477
1518
  /**
1478
1519
  * Create a rectangular face on the XY plane centered at the origin.
1479
1520
  *
@@ -1497,7 +1538,7 @@ export class BrepKernel {
1497
1538
  * Alias for `sewFaces` with a default tolerance. This is the equivalent
1498
1539
  * of sewing faces into a closed shell and building a solid.
1499
1540
  */
1500
- makeSolid(face_handles: Uint32Array): number;
1541
+ makeSolid(face_handles: Uint32Array | number[]): number;
1501
1542
  /**
1502
1543
  * Create a sphere solid centered at the origin.
1503
1544
  *
@@ -1539,7 +1580,22 @@ export class BrepKernel {
1539
1580
  *
1540
1581
  * Returns a wire handle (`u32`).
1541
1582
  */
1542
- 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;
1543
1599
  /**
1544
1600
  * Measure curvature of an edge curve at parameter `t`.
1545
1601
  *
@@ -1565,7 +1621,7 @@ export class BrepKernel {
1565
1621
  *
1566
1622
  * Returns a `JsMesh` with the result.
1567
1623
  */
1568
- 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;
1569
1625
  /**
1570
1626
  * Sample ALL edges of a solid (no smooth-edge filtering).
1571
1627
  *
@@ -1635,7 +1691,7 @@ export class BrepKernel {
1635
1691
  * Returns an error for fewer than two sections, mismatched array lengths, a
1636
1692
  * non-finite or out-of-range value, a non-planar profile, or loft failure.
1637
1693
  */
1638
- 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;
1639
1695
  /**
1640
1696
  * Create a new, empty kernel.
1641
1697
  */
@@ -1656,7 +1712,7 @@ export class BrepKernel {
1656
1712
  * `coords` is a flat array `[x,y, x,y, ...]` of 2D points.
1657
1713
  * Returns a flat array of offset polygon coordinates.
1658
1714
  */
1659
- offsetPolygon2d(coords: Float64Array, distance: number, tolerance: number): Float64Array;
1715
+ offsetPolygon2d(coords: Float64Array | number[], distance: number, tolerance: number): Float64Array;
1660
1716
  /**
1661
1717
  * Offset all faces of a solid outward or inward (V2 pipeline).
1662
1718
  *
@@ -1724,14 +1780,14 @@ export class BrepKernel {
1724
1780
  *
1725
1781
  * Returns an error if the face or path is invalid.
1726
1782
  */
1727
- 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;
1728
1784
  /**
1729
1785
  * Test if a 2D point is inside a closed polygon.
1730
1786
  *
1731
1787
  * `polygon_coords` is a flat array `[x,y, x,y, ...]`.
1732
1788
  * Returns `true` if the point is inside the polygon (winding number test).
1733
1789
  */
1734
- pointInPolygon2d(polygon_coords: Float64Array, px: number, py: number): boolean;
1790
+ pointInPolygon2d(polygon_coords: Float64Array | number[], px: number, py: number): boolean;
1735
1791
  /**
1736
1792
  * Compute minimum distance from a point to an edge.
1737
1793
  *
@@ -1769,7 +1825,7 @@ export class BrepKernel {
1769
1825
  * Returns `true` if any vertex of one polygon is inside the other
1770
1826
  * or if any edges cross.
1771
1827
  */
1772
- polygonsIntersect2d(coords_a: Float64Array, coords_b: Float64Array): boolean;
1828
+ polygonsIntersect2d(coords_a: Float64Array | number[], coords_b: Float64Array | number[]): boolean;
1773
1829
  /**
1774
1830
  * Project a solid's edges onto a view plane with hidden-line removal.
1775
1831
  *
@@ -1800,7 +1856,7 @@ export class BrepKernel {
1800
1856
  * Returns an error for an empty list, an invalid handle, a non-positive
1801
1857
  * `deflection`, or a degenerate `dir`/`x_axis`.
1802
1858
  */
1803
- 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;
1804
1860
  /**
1805
1861
  * Recognize geometric features in a solid.
1806
1862
  *
@@ -1918,7 +1974,7 @@ export class BrepKernel {
1918
1974
  *
1919
1975
  * Returns an error if fewer than 2 faces or sewing fails.
1920
1976
  */
1921
- sewFaces(face_handles: Uint32Array, tolerance: number): number;
1977
+ sewFaces(face_handles: Uint32Array | number[], tolerance: number): number;
1922
1978
  /**
1923
1979
  * Get edges shared between two faces.
1924
1980
  *
@@ -1935,7 +1991,7 @@ export class BrepKernel {
1935
1991
  *
1936
1992
  * Returns an error if thickness is non-positive or the solid is invalid.
1937
1993
  */
1938
- shell(solid: number, thickness: number, open_faces: Uint32Array): number;
1994
+ shell(solid: number, thickness: number, open_faces: Uint32Array | number[]): number;
1939
1995
  /**
1940
1996
  * Add an arc to a sketch (defined by center, start, end point indices).
1941
1997
  * Returns the arc index.
@@ -2011,7 +2067,7 @@ export class BrepKernel {
2011
2067
  * along its marks, or the pieces would not be valid solids summing to the
2012
2068
  * solid's volume.
2013
2069
  */
2014
- splitByFaces(solid: number, face_handles: Uint32Array): Uint32Array;
2070
+ splitByFaces(solid: number, face_handles: Uint32Array | number[]): Uint32Array;
2015
2071
  /**
2016
2072
  * Split a solid into two halves along a plane.
2017
2073
  *
@@ -2044,7 +2100,7 @@ export class BrepKernel {
2044
2100
  *
2045
2101
  * Returns an error if fewer than 2 edges or the fit fails.
2046
2102
  */
2047
- sweepAlongEdges(face: number, edge_handles: Uint32Array): number;
2103
+ sweepAlongEdges(face: number, edge_handles: Uint32Array | number[]): number;
2048
2104
  /**
2049
2105
  * Sweep a face along a path with smooth NURBS side surfaces.
2050
2106
  *
@@ -2058,7 +2114,7 @@ export class BrepKernel {
2058
2114
  *
2059
2115
  * Returns an error if the face or path is invalid, or surface fitting fails.
2060
2116
  */
2061
- 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;
2062
2118
  /**
2063
2119
  * Sweep an open wire along a chain of path edges into an open shell.
2064
2120
  *
@@ -2072,7 +2128,7 @@ export class BrepKernel {
2072
2128
  * Returns an error if a handle is invalid, the chain has no edges, breaks,
2073
2129
  * closes or has a kink, or the wire is closed.
2074
2130
  */
2075
- sweepWire(wire: number, path_edges: Uint32Array): number;
2131
+ sweepWire(wire: number, path_edges: Uint32Array | number[]): number;
2076
2132
  /**
2077
2133
  * Sweep a face along a NURBS path with advanced options.
2078
2134
  *
@@ -2081,7 +2137,7 @@ export class BrepKernel {
2081
2137
  * `corner_mode`: "smooth" (default), "miter", or "round"
2082
2138
  * Returns a solid handle.
2083
2139
  */
2084
- 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;
2085
2141
  /**
2086
2142
  * Sweep a planar face along a NURBS curve path to create a solid.
2087
2143
  *
@@ -2098,7 +2154,7 @@ export class BrepKernel {
2098
2154
  * Returns an error if the face handle is invalid, the NURBS arrays have
2099
2155
  * inconsistent lengths, or the sweep operation fails.
2100
2156
  */
2101
- 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;
2102
2158
  /**
2103
2159
  * Tessellate an edge curve into polyline segments.
2104
2160
  *
@@ -2208,7 +2264,7 @@ export class BrepKernel {
2208
2264
  * Returns an error if the face handle is invalid, the matrix doesn't
2209
2265
  * have 16 elements, or the matrix is singular.
2210
2266
  */
2211
- transformFace(face: number, matrix: Float64Array): void;
2267
+ transformFace(face: number, matrix: Float64Array | number[]): void;
2212
2268
  /**
2213
2269
  * Apply a 4×4 affine transform to a solid (in place).
2214
2270
  *
@@ -2219,7 +2275,7 @@ export class BrepKernel {
2219
2275
  * Returns an error if the solid handle is invalid, the matrix doesn't
2220
2276
  * have 16 elements, or the matrix is singular.
2221
2277
  */
2222
- transformSolid(solid: number, matrix: Float64Array): void;
2278
+ transformSolid(solid: number, matrix: Float64Array | number[]): void;
2223
2279
  /**
2224
2280
  * Apply a 4×4 affine transform to a wire (in place).
2225
2281
  *
@@ -2230,7 +2286,7 @@ export class BrepKernel {
2230
2286
  * Returns an error if the wire handle is invalid, the matrix doesn't
2231
2287
  * have 16 elements, or the matrix is singular.
2232
2288
  */
2233
- transformWire(wire: number, matrix: Float64Array): void;
2289
+ transformWire(wire: number, matrix: Float64Array | number[]): void;
2234
2290
  /**
2235
2291
  * Unify adjacent faces that lie on the same geometric surface.
2236
2292
  *
@@ -2299,7 +2355,7 @@ export class BrepKernel {
2299
2355
  * Accepts an array of face handles from potentially different shells.
2300
2356
  * Sews all faces together into a single solid.
2301
2357
  */
2302
- weldShellsAndFaces(face_handles: Uint32Array, tolerance: number): number;
2358
+ weldShellsAndFaces(face_handles: Uint32Array | number[], tolerance: number): number;
2303
2359
  /**
2304
2360
  * Compute the total arc-length of a wire.
2305
2361
  */