okgeometry-api 1.26.1 → 1.27.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/dist/Arc.js +1 -1
- package/dist/Arc.js.map +1 -1
- package/dist/Brep.js +1 -1
- package/dist/Brep.js.map +1 -1
- package/dist/Circle.js +1 -1
- package/dist/Circle.js.map +1 -1
- package/dist/Line.js +1 -1
- package/dist/Line.js.map +1 -1
- package/dist/Mesh.d.ts +41 -0
- package/dist/Mesh.d.ts.map +1 -1
- package/dist/Mesh.js +235 -21
- package/dist/Mesh.js.map +1 -1
- package/dist/MeshSurface.js +1 -1
- package/dist/MeshSurface.js.map +1 -1
- package/dist/NurbsCurve.js +1 -1
- package/dist/NurbsCurve.js.map +1 -1
- package/dist/NurbsSurface.js +1 -1
- package/dist/NurbsSurface.js.map +1 -1
- package/dist/PolyCurve.js +1 -1
- package/dist/PolyCurve.js.map +1 -1
- package/dist/Polyline.js +1 -1
- package/dist/Polyline.js.map +1 -1
- package/dist/Ray.js +1 -1
- package/dist/Ray.js.map +1 -1
- package/dist/SculptSession.js +1 -1
- package/dist/SculptSession.js.map +1 -1
- package/dist/engine-threaded.d.ts +2 -0
- package/dist/engine-threaded.d.ts.map +1 -0
- package/dist/engine-threaded.js +33 -0
- package/dist/engine-threaded.js.map +1 -0
- package/dist/engine.d.ts +21 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +42 -0
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mesh-boolean.pool.d.ts +23 -1
- package/dist/mesh-boolean.pool.d.ts.map +1 -1
- package/dist/mesh-boolean.pool.js +97 -12
- package/dist/mesh-boolean.pool.js.map +1 -1
- package/dist/mesh-boolean.protocol.d.ts +21 -1
- package/dist/mesh-boolean.protocol.d.ts.map +1 -1
- package/dist/mesh-boolean.protocol.js.map +1 -1
- package/dist/mesh-boolean.worker.d.ts.map +1 -1
- package/dist/mesh-boolean.worker.js +94 -1
- package/dist/mesh-boolean.worker.js.map +1 -1
- package/dist/wasm-active.d.ts +20 -0
- package/dist/wasm-active.d.ts.map +1 -0
- package/dist/wasm-active.js +26 -0
- package/dist/wasm-active.js.map +1 -0
- package/dist/wasm-base64-threaded.d.ts +2 -0
- package/dist/wasm-base64-threaded.d.ts.map +1 -0
- package/dist/wasm-base64-threaded.js +3 -0
- package/dist/wasm-base64-threaded.js.map +1 -0
- package/dist/wasm-base64.d.ts +1 -1
- package/dist/wasm-base64.d.ts.map +1 -1
- package/dist/wasm-base64.js +1 -1
- package/dist/wasm-base64.js.map +1 -1
- package/dist/wasm-bindings-threaded.d.ts +2664 -0
- package/dist/wasm-bindings-threaded.d.ts.map +1 -0
- package/dist/wasm-bindings-threaded.js +5008 -0
- package/dist/wasm-bindings-threaded.js.map +1 -0
- package/dist/wasm-bindings.d.ts +130 -0
- package/dist/wasm-bindings.d.ts.map +1 -1
- package/dist/wasm-bindings.js +208 -0
- package/dist/wasm-bindings.js.map +1 -1
- package/dist/workerHelpers-threaded.d.ts +2 -0
- package/dist/workerHelpers-threaded.d.ts.map +1 -0
- package/dist/workerHelpers-threaded.js +100 -0
- package/dist/workerHelpers-threaded.js.map +1 -0
- package/package.json +8 -3
- package/src/Arc.ts +117 -117
- package/src/Brep.ts +1 -1
- package/src/Circle.ts +166 -166
- package/src/Line.ts +171 -171
- package/src/Mesh.ts +300 -45
- package/src/MeshSurface.ts +1 -1
- package/src/NurbsCurve.ts +655 -655
- package/src/NurbsSurface.ts +721 -721
- package/src/PolyCurve.ts +203 -203
- package/src/Polyline.ts +316 -316
- package/src/Ray.ts +90 -90
- package/src/SculptSession.ts +377 -377
- package/src/engine-threaded.ts +39 -0
- package/src/engine.ts +46 -0
- package/src/index.ts +1 -1
- package/src/mesh-boolean.pool.ts +208 -86
- package/src/mesh-boolean.protocol.ts +44 -1
- package/src/mesh-boolean.worker.ts +170 -56
- package/src/wasm-active.ts +31 -0
- package/src/wasm-base64-threaded.ts +2 -0
- package/src/wasm-base64.ts +1 -1
- package/src/wasm-bindings-threaded.d.ts +1989 -0
- package/src/wasm-bindings-threaded.js +5235 -0
- package/src/wasm-bindings.d.ts +104 -0
- package/src/wasm-bindings.js +225 -0
- package/src/workerHelpers-threaded.js +107 -0
|
@@ -0,0 +1,1989 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Get the length of an arc.
|
|
6
|
+
*/
|
|
7
|
+
export function arc_length(radius: number, start_angle: number, end_angle: number): number;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Evaluate a point on an arc at parameter t ∈ [0,1].
|
|
11
|
+
* Returns [x, y, z].
|
|
12
|
+
*/
|
|
13
|
+
export function arc_point_at(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, start_angle: number, end_angle: number, t: number): Float64Array;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Parametric BREP boolean: exact surface–surface intersection curves with
|
|
17
|
+
* trimmed-surface output. Operands may be closed solids OR open sheets —
|
|
18
|
+
* the kernel dispatches on closedness (oriented-sheet convention: a sheet's
|
|
19
|
+
* "inside" is the FRONT of its normal):
|
|
20
|
+
* - closed × closed: full volumetric boolean.
|
|
21
|
+
* - sheet × solid: subtract keeps the sheet outside the solid, intersect
|
|
22
|
+
* keeps the inside.
|
|
23
|
+
* - solid × sheet: subtract keeps the capped half BEHIND the sheet normal,
|
|
24
|
+
* intersect the front half.
|
|
25
|
+
* - sheet × sheet: a sheet's material is its FRONT half-space, so union
|
|
26
|
+
* stitches A-BACK + B-BACK at the intersection edges (front pieces are
|
|
27
|
+
* interior to the union material; uncut pieces are kept, coincident
|
|
28
|
+
* overlaps keep A's copy); subtract keeps A's back pieces; intersect
|
|
29
|
+
* A's front pieces.
|
|
30
|
+
* - union of a solid and a sheet is not defined and returns an error.
|
|
31
|
+
* op: "union" | "intersect" | "subtract".
|
|
32
|
+
* Returns the result BREP as JSON, or {"error": "..."} on failure.
|
|
33
|
+
*/
|
|
34
|
+
export function brep_boolean_op(a_json: string, b_json: string, op: string, tolerance: number): string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Boolean-intersection clip of an exact NURBS curve against a CLOSED solid
|
|
38
|
+
* BREP: the curve is split exactly (knot insertion) at every boundary
|
|
39
|
+
* crossing and each piece is classified by containment. Every returned
|
|
40
|
+
* piece lies exactly on the input curve; closed curves merge the run
|
|
41
|
+
* spanning the parameter seam (same convention as `mesh_clip_polyline`).
|
|
42
|
+
*
|
|
43
|
+
* Packing: `[insideCount, (bufLen, curveData…)·insideCount,
|
|
44
|
+
* outsideCount, (bufLen, curveData…)·outsideCount]` — two concatenated
|
|
45
|
+
* multi-curve packings, inside pieces first. Returns an empty buffer on
|
|
46
|
+
* failure (malformed input, or a BREP that is not a closed solid).
|
|
47
|
+
*/
|
|
48
|
+
export function brep_clip_curve_op(curve_data: Float64Array, brep_json: string): Float64Array;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Closest BREP face to a 3D point. Returns [faceIndex, u, v, distance,
|
|
52
|
+
* isNurbs] ((u, v) in the surface's KNOT domain) or empty on failure.
|
|
53
|
+
*/
|
|
54
|
+
export function brep_closest_face(json: string, x: number, y: number, z: number): Float64Array;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Find all points where a NURBS curve pierces a BREP's faces: per face, the
|
|
58
|
+
* curve is intersected with the EXACT surface and kept only when the hit
|
|
59
|
+
* lies INSIDE the face's trimmed region; crossings on shared edges are
|
|
60
|
+
* deduplicated (smallest face index kept).
|
|
61
|
+
*
|
|
62
|
+
* `curve_data` is the standard NURBS curve encoding. Hits are sorted by
|
|
63
|
+
* curve parameter (normalized [0, 1]); (u, v) are in the face's OWN
|
|
64
|
+
* parameter space (knot domain for NURBS faces, plane-frame coordinates for
|
|
65
|
+
* planar faces).
|
|
66
|
+
*
|
|
67
|
+
* Packing: `[count, (x, y, z, curveParam, faceIndex, u, v)·count]`.
|
|
68
|
+
* Returns an empty buffer on malformed input.
|
|
69
|
+
*/
|
|
70
|
+
export function brep_curve_intersection_op(brep_json: string, curve_data: Float64Array): Float64Array;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* All BREP edges as polylines: [num_polylines, n1, x,y,z..., n2, ...].
|
|
74
|
+
*/
|
|
75
|
+
export function brep_edges(json: string, tolerance: number): Float64Array;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Extract one face as a standalone single-face TRIMMED sheet BREP (trim
|
|
79
|
+
* loops, pcurves, edges and vertices preserved). Returns JSON, empty on
|
|
80
|
+
* failure.
|
|
81
|
+
*/
|
|
82
|
+
export function brep_extract_face(json: string, face_index: number): string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* ALL faces as standalone single-face trimmed sheet BREPs, in one crossing
|
|
86
|
+
* (the source JSON is parsed once). Returns a JSON ARRAY aligned with face
|
|
87
|
+
* indices; faces that fail to extract are `null`.
|
|
88
|
+
*/
|
|
89
|
+
export function brep_extract_faces(json: string): string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Extrude a profile curve into a BREP (closed profile → capped solid,
|
|
93
|
+
* open profile → sheet). Returns JSON.
|
|
94
|
+
*/
|
|
95
|
+
export function brep_extrude_curve(curve_data: Float64Array, dx: number, dy: number, dz: number, height: number): string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Exact (u, v) of a point on a specific BREP face (closest-point Newton for
|
|
99
|
+
* NURBS, frame projection for planes). Returns [u, v, distance, isNurbs].
|
|
100
|
+
*/
|
|
101
|
+
export function brep_face_closest_uv(json: string, face_index: number, x: number, y: number, z: number): Float64Array;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Iso-parametric curve of a NURBS face's backing surface (untrimmed).
|
|
105
|
+
* Returns curve data, or empty for planar faces.
|
|
106
|
+
*/
|
|
107
|
+
export function brep_face_iso_curve(json: string, face_index: number, t: number, u_dir: boolean): Float64Array;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Exact isocurve(s) of a BREP face at KNOT-domain parameter `t`, CLIPPED to
|
|
111
|
+
* the face's trimmed region. `u_dir = true` runs along u at fixed v = t.
|
|
112
|
+
* Line pieces (planar faces) are encoded as degree-1 NURBS.
|
|
113
|
+
* Packing: [curveCount, (bufLen, curveData…)·curveCount] where curveData is
|
|
114
|
+
* the standard NURBS curve encoding.
|
|
115
|
+
*/
|
|
116
|
+
export function brep_face_iso_curves_trimmed(json: string, face_index: number, t: number, u_dir: boolean): Float64Array;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Like `brep_face_iso_curves_trimmed`, but `t` is NORMALIZED [0, 1] across
|
|
120
|
+
* the face's trim extent in the fixed direction — callers don't need the
|
|
121
|
+
* surface knot domain. Same packing.
|
|
122
|
+
*/
|
|
123
|
+
export function brep_face_iso_curves_trimmed_normalized(json: string, face_index: number, t: number, u_dir: boolean): Float64Array;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Geometric backing of a face.
|
|
127
|
+
* Returns [0, ox,oy,oz, ux,uy,uz, vx,vy,vz] for planes,
|
|
128
|
+
* or [1, surface_data...] for NURBS faces.
|
|
129
|
+
*/
|
|
130
|
+
export function brep_face_surface(json: string, face_index: number): Float64Array;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Underlying surface of a face CROPPED to its trim extent, ALWAYS as a NURBS
|
|
134
|
+
* surface (planar faces become exact degree-1 patches). Returns surface
|
|
135
|
+
* data, empty on failure.
|
|
136
|
+
*/
|
|
137
|
+
export function brep_face_surface_cropped(json: string, face_index: number): Float64Array;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Batch variant of `brep_face_surface_cropped` for all faces in one
|
|
141
|
+
* crossing. Packing: [faceCount, (bufLen, surfaceData…)·faceCount], aligned
|
|
142
|
+
* with face indices — a face that fails to crop gets bufLen 0.
|
|
143
|
+
*/
|
|
144
|
+
export function brep_face_surfaces_cropped(json: string): Float64Array;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Tessellate a single BREP face. Returns the standard mesh buffer.
|
|
148
|
+
*/
|
|
149
|
+
export function brep_face_tessellate(json: string, face_index: number, tolerance: number): Float64Array;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* UV bounding box of a face's trim loops in surface parameter space:
|
|
153
|
+
* [u_min, u_max, v_min, v_max]. Empty on failure.
|
|
154
|
+
*/
|
|
155
|
+
export function brep_face_trim_bounds(json: string, face_index: number): Float64Array;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Convert a closed manifold triangle mesh into a planar-face BREP.
|
|
159
|
+
* `normal_angle_tol_deg` ≤ 0 selects the default (≈0.057°); `max_faces` 0 =
|
|
160
|
+
* default guard (4096). Returns BREP JSON or {"error": ...}.
|
|
161
|
+
*/
|
|
162
|
+
export function brep_from_mesh_buffer(vertex_count: number, buffer: Float64Array, normal_angle_tol_deg: number, max_faces: number): string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* BREP structure summary: [face_count, edge_count, vertex_count, is_closed].
|
|
166
|
+
*/
|
|
167
|
+
export function brep_info(json: string): Float64Array;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* [`brep_intersection_curves_op`] with the per-face-pair pieces JOINED into
|
|
171
|
+
* maximal curves: greedy reversal-aware endpoint chaining, exact degree
|
|
172
|
+
* elevation to the chain maximum, exact `join_arcs` knot concatenation
|
|
173
|
+
* (junction multiplicity = degree, no re-parameterization), and a per-curve
|
|
174
|
+
* verification gate (dense samples within 5·tolerance of BOTH operands'
|
|
175
|
+
* surfaces — a chain failing the gate comes back unjoined, never corrupted).
|
|
176
|
+
* A closed intersection loop (e.g. plane through a cylinder) comes back as
|
|
177
|
+
* ONE closed curve.
|
|
178
|
+
*
|
|
179
|
+
* Packing: `[curveCount, (bufLen, curveData…)·curveCount]` (standard NURBS
|
|
180
|
+
* curve encoding). Returns an EMPTY buffer on failure (invalid BREP JSON or
|
|
181
|
+
* a pipeline error) — distinguishable from `[0]`, which means the operands
|
|
182
|
+
* genuinely do not intersect.
|
|
183
|
+
*/
|
|
184
|
+
export function brep_intersection_curves_joined_op(a_json: string, b_json: string, tolerance: number): Float64Array;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* TRIM-EXACT intersection curves between two BREPs (solids OR sheets): the
|
|
188
|
+
* parametric boolean's SSI → clip → convergence stages run and the fitted 3D
|
|
189
|
+
* intersection edges come back WITHOUT classification/assembly.
|
|
190
|
+
*
|
|
191
|
+
* A closed intersection loop may come back as several contiguous pieces
|
|
192
|
+
* (split at surface seams and face-boundary crossings); the pieces chain
|
|
193
|
+
* end-to-end exactly. Coincident (overlapping) face pairs contribute no
|
|
194
|
+
* curves.
|
|
195
|
+
*
|
|
196
|
+
* Packing: `[curveCount, (bufLen, curveData…)·curveCount]` (standard NURBS
|
|
197
|
+
* curve encoding). Returns an EMPTY buffer on failure (invalid BREP JSON or
|
|
198
|
+
* a pipeline error) — distinguishable from `[0]`, which means the operands
|
|
199
|
+
* genuinely do not intersect.
|
|
200
|
+
*/
|
|
201
|
+
export function brep_intersection_curves_op(a_json: string, b_json: string, tolerance: number): Float64Array;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Loft through profile curves into a BREP.
|
|
205
|
+
* Input: [num_curves, curve1_data..., curve2_data...]. Returns JSON.
|
|
206
|
+
*/
|
|
207
|
+
export function brep_loft_curves(data: Float64Array): string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Intersection curves between a BREP and a triangle mesh.
|
|
211
|
+
*
|
|
212
|
+
* TESSELLATION-BASED (documented approximation): the BREP is tessellated at
|
|
213
|
+
* `tolerance` (pass `<= 0` for the deterministic auto display tolerance)
|
|
214
|
+
* and intersected with the mesh via BVH-pruned tri-tri crossing + chaining.
|
|
215
|
+
*
|
|
216
|
+
* Mesh input is the standard `[vertexCount, positions..., indices...]`
|
|
217
|
+
* buffer. Returns the standard polyline group packing
|
|
218
|
+
* `[num_polylines, n1, x,y,z,..., n2, x,y,z,...]`; empty on failure.
|
|
219
|
+
*/
|
|
220
|
+
export function brep_mesh_intersection_curves_op(brep_json: string, vertex_count: number, mesh_buffer: Float64Array, tolerance: number): Float64Array;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* BREP primitives.
|
|
224
|
+
* kind: "box" [minx,miny,minz, maxx,maxy,maxz]
|
|
225
|
+
* "cylinder" [bx,by,bz, ax,ay,az, radius, height]
|
|
226
|
+
* "sphere" [cx,cy,cz, radius]
|
|
227
|
+
* "cone" [bx,by,bz, ax,ay,az, radius0, radius1, height]
|
|
228
|
+
* "torus" [cx,cy,cz, major, minor]
|
|
229
|
+
* Returns the BREP as JSON ("" on failure).
|
|
230
|
+
*/
|
|
231
|
+
export function brep_primitive(kind: string, params: Float64Array): string;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Rebuild every NURBS face surface of a BREP with the given degrees and
|
|
235
|
+
* control counts, preserving each face's parameter domain so trims and
|
|
236
|
+
* edges stay coherent. Each face replacement is gated by `tolerance`
|
|
237
|
+
* (non-positive = accept all fits); planar faces pass through untouched.
|
|
238
|
+
* Returns JSON `{"maxDeviation": .., "rebuiltFaces": .., "skippedFaces": ..,
|
|
239
|
+
* "planarFaces": .., "brep": {...}}` or `{"error": "..."}`.
|
|
240
|
+
*/
|
|
241
|
+
export function brep_rebuild_surfaces(json: string, degree_u: number, degree_v: number, count_u: number, count_v: number, tolerance: number): string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Revolve a profile curve into a BREP. Returns JSON.
|
|
245
|
+
*/
|
|
246
|
+
export function brep_revolve_curve(curve_data: Float64Array, ox: number, oy: number, oz: number, ax: number, ay: number, az: number, angle: number): string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Untrimmed sheet BREP from a NURBS surface. Returns JSON.
|
|
250
|
+
*/
|
|
251
|
+
export function brep_sheet_from_surface(surface_data: Float64Array): string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Split an OPEN sheet BREP `a` by another OPEN sheet BREP `b`.
|
|
255
|
+
* Returns {"inside": <brep|null>, "outside": <brep|null>} or {"error":...}:
|
|
256
|
+
* `inside` = a's pieces in FRONT of b's oriented normal, `outside` = the
|
|
257
|
+
* pieces behind it (matching the oriented-sheet convention of
|
|
258
|
+
* `mesh_clip_polyline` and the sheet boolean dispatch).
|
|
259
|
+
*/
|
|
260
|
+
export function brep_split_sheet_by_sheet_op(a_json: string, b_json: string, tolerance: number): string;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Split an OPEN sheet BREP by a CLOSED solid BREP into containment sides.
|
|
264
|
+
* Returns {"inside": <brep|null>, "outside": <brep|null>} or {"error":...}:
|
|
265
|
+
* `inside` = the sheet pieces contained in the solid (ON-boundary pieces
|
|
266
|
+
* count as inside), `outside` = the rest. Both preserve the sheet's exact
|
|
267
|
+
* trimmed faces, pcurves and edges.
|
|
268
|
+
*/
|
|
269
|
+
export function brep_split_sheet_by_solid_op(sheet_json: string, solid_json: string, tolerance: number): string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Split a closed solid BREP by a sheet BREP into BOTH capped halves.
|
|
273
|
+
* Returns {"negative": <brep|null>, "positive": <brep|null>} or {"error":...}.
|
|
274
|
+
* Sides follow the sheet normal (negative = behind it), matching
|
|
275
|
+
* `mesh_solid_split_by_surface`.
|
|
276
|
+
*/
|
|
277
|
+
export function brep_split_solid_by_sheet_op(solid_json: string, sheet_json: string, tolerance: number): string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Tessellate a BREP into the standard mesh buffer
|
|
281
|
+
* [vertexCount, positions..., indices...]. Crack-free across shared edges.
|
|
282
|
+
*/
|
|
283
|
+
export function brep_tessellate(json: string, tolerance: number): Float64Array;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Tessellate a BREP with per-face triangle ranges for face-level picking.
|
|
287
|
+
* `tolerance <= 0` selects the deterministic auto display tolerance (from the
|
|
288
|
+
* BREP's own extent), so triangle indices from a previously produced
|
|
289
|
+
* auto-tolerance display mesh stay valid across calls.
|
|
290
|
+
* Packing: [vertexCount, indexCount, rangeCount,
|
|
291
|
+
* positions(3·vc), indices(ic), (face, firstTri, triCount)·rc].
|
|
292
|
+
*/
|
|
293
|
+
export function brep_tessellate_with_face_ranges(json: string, tolerance: number): Float64Array;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Apply a row-major 4x4 matrix to a BREP. Returns transformed JSON.
|
|
297
|
+
*/
|
|
298
|
+
export function brep_transform(json: string, matrix: Float64Array): string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Validate a BREP. Returns a JSON report:
|
|
302
|
+
* {"isClosed":bool,"boundaryEdgeCount":n,"maxCoherenceError":e,"issues":[...]}
|
|
303
|
+
*/
|
|
304
|
+
export function brep_validate(json: string, tolerance: number): string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Volume and surface area from tessellation: [volume, area].
|
|
308
|
+
*/
|
|
309
|
+
export function brep_volume_area(json: string, tolerance: number): Float64Array;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Wireframe of the whole BREP in ONE crossing: per face, `u_count` +
|
|
313
|
+
* `v_count` iso-parametric curves at evenly spaced INTERIOR normalized
|
|
314
|
+
* parameters, clipped to each face's trimmed region. The body JSON is
|
|
315
|
+
* parsed ONCE for the entire sweep. Same packing as
|
|
316
|
+
* `brep_face_iso_curves_trimmed_normalized`; faces that fail to evaluate
|
|
317
|
+
* are skipped atomically.
|
|
318
|
+
*/
|
|
319
|
+
export function brep_wireframe_curves(json: string, u_count: number, v_count: number): Float64Array;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Build a NURBS curve from raw control points with kernel-managed knots and weights.
|
|
323
|
+
*
|
|
324
|
+
* * `degree` - Requested degree (clamped to the valid range for the point count)
|
|
325
|
+
* * `coords` - Flat control points [x,y,z, x,y,z, ...]. For closed curves the
|
|
326
|
+
* first point must NOT be repeated at the end.
|
|
327
|
+
* * `closed` - When true, builds a periodic (C^{degree-1}) closed loop;
|
|
328
|
+
* otherwise a clamped curve interpolating the first/last control points.
|
|
329
|
+
*
|
|
330
|
+
* Returns the encoded curve [degree, num_cp, cp_xyz..., weights..., knots...]
|
|
331
|
+
* (the same format consumed by `sample_nurbs_curve` / `evaluate_nurbs_curve_at`),
|
|
332
|
+
* or an empty buffer on failure.
|
|
333
|
+
*/
|
|
334
|
+
export function build_nurbs_curve(degree: number, coords: Float64Array, closed: boolean): Float64Array;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Chamfer corners of a polyline by cutting each corner with a straight segment.
|
|
338
|
+
* Input: flat coords [x1,y1,z1, ...], distance from corner to cut.
|
|
339
|
+
* Output: encoded polycurve segments [segment_count, type, ...data, ...]
|
|
340
|
+
* type 0 = Line: [sx,sy,sz, ex,ey,ez]
|
|
341
|
+
*/
|
|
342
|
+
export function chamfer_polycurve(coords: Float64Array, distance: number): Float64Array;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Chamfer polyline corners with closed support and optional corner
|
|
346
|
+
* selection. `coords` is a flat point list (closed inputs without the
|
|
347
|
+
* duplicate seam point); `corner_indices` empty = all eligible corners.
|
|
348
|
+
* Returns the flat chamfered point list (closed outputs again without the
|
|
349
|
+
* seam duplicate), or empty on failure (see `geometry_last_error`).
|
|
350
|
+
*/
|
|
351
|
+
export function chamfer_polyline_corners(coords: Float64Array, closed: boolean, distance: number, corner_indices: Float64Array): Float64Array;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Get the circumference of a circle.
|
|
355
|
+
*/
|
|
356
|
+
export function circle_length(radius: number): number;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Evaluate a point on a circle at parameter t ∈ [0,1].
|
|
360
|
+
* Returns [x, y, z].
|
|
361
|
+
*/
|
|
362
|
+
export function circle_point_at(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, t: number): Float64Array;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Create an arc and return sampled points
|
|
366
|
+
*/
|
|
367
|
+
export function create_arc(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, start_angle: number, end_angle: number, samples: number): Float64Array;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Create a circle and return sampled points
|
|
371
|
+
*/
|
|
372
|
+
export function create_circle(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, samples: number): Float64Array;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Create a line segment and return sampled points
|
|
376
|
+
*/
|
|
377
|
+
export function create_line(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, samples: number): Float64Array;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Create a polyline and return the points
|
|
381
|
+
*/
|
|
382
|
+
export function create_polyline(coords: Float64Array, samples_per_segment: number): Float64Array;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* 2D REGION boolean between two CLOSED, COPLANAR curves (Rhino CurveBoolean).
|
|
386
|
+
*
|
|
387
|
+
* Both inputs are standard NURBS curve encodings (the TS layer coerces
|
|
388
|
+
* circles/arcs/polylines/polycurves to exact NURBS first). The curves are
|
|
389
|
+
* projected onto a common plane (fitted from A, coplanarity verified),
|
|
390
|
+
* tessellated to polygons, arranged in 2D, classified by inside-A/inside-B
|
|
391
|
+
* (nonzero winding), and the result loops emitted per op. CLOSURE is
|
|
392
|
+
* verified kernel-side: each curve's endpoints must coincide within a
|
|
393
|
+
* scale-relative tolerance, open curves error out (never silently
|
|
394
|
+
* chord-closed).
|
|
395
|
+
*
|
|
396
|
+
* `op`: 0 = union, 1 = subtract (A − B), 2 = intersect.
|
|
397
|
+
*
|
|
398
|
+
* Result loops are POLYLINE (degree-1 NURBS) closed curves — Rhino-parity
|
|
399
|
+
* fidelity. Tessellation samples include every distinct interior knot value,
|
|
400
|
+
* so degree-1 polygon corners and C0 kinks are preserved EXACTLY, and
|
|
401
|
+
* consecutive collinear points are collapsed so straight runs come back as
|
|
402
|
+
* single segments. Outer boundaries are CCW (positive plane-signed area),
|
|
403
|
+
* holes CW. CCW is measured about a DETERMINISTIC plane normal: the normal
|
|
404
|
+
* fitted from curve A, flipped so its dominant world-axis component is
|
|
405
|
+
* positive (for XY-plane curves the reference is +Z). The orientation is
|
|
406
|
+
* therefore independent of the inputs' drawing direction. Callers
|
|
407
|
+
* reconstruct nesting from the winding sign.
|
|
408
|
+
*
|
|
409
|
+
* Packing: `[curveCount, (bufLen, curveData…)·curveCount]` (same multi-curve
|
|
410
|
+
* packing as `nurbs_curve_split_at_params`). An EMPTY buffer signals an error
|
|
411
|
+
* (non-coplanar / open input / malformed input); a valid but EMPTY result
|
|
412
|
+
* (e.g. disjoint intersect) is the non-empty `[0]` packing.
|
|
413
|
+
*/
|
|
414
|
+
export function curve_region_boolean(a_data: Float64Array, b_data: Float64Array, op: number): Float64Array;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* SPLIT two CLOSED, COPLANAR curves into ALL region boundaries (Rhino
|
|
418
|
+
* "region split"): the arrangement of A and B partitions the plane into the
|
|
419
|
+
* pieces inside-A-only, inside-B-only and inside-both; each bounded region's
|
|
420
|
+
* outer and hole loops are returned as their own closed curves.
|
|
421
|
+
*
|
|
422
|
+
* Inputs, plane/coplanarity handling, fidelity and orientation follow
|
|
423
|
+
* `curve_region_boolean`. Same multi-curve packing; empty buffer on error.
|
|
424
|
+
*/
|
|
425
|
+
export function curve_region_split(a_data: Float64Array, b_data: Float64Array): Float64Array;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Serialize a curve to a list of points for Three.js rendering
|
|
429
|
+
* Returns a flat array of coordinates: [x1, y1, z1, x2, y2, z2, ...]
|
|
430
|
+
*/
|
|
431
|
+
export function curve_to_points(curve_type: string, params: Float64Array, samples: number): Float64Array;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Evaluate a NURBS curve at normalized parameter t in [0,1].
|
|
435
|
+
* Returns [x, y, z].
|
|
436
|
+
*/
|
|
437
|
+
export function evaluate_nurbs_curve_at(data: Float64Array, t: number): Float64Array;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Extrude a circle and return mesh buffers
|
|
441
|
+
*/
|
|
442
|
+
export function extrude_circle(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, dx: number, dy: number, dz: number, segments: number, with_caps: boolean): Float64Array;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Extrude a line segment and return mesh buffers
|
|
446
|
+
*/
|
|
447
|
+
export function extrude_line(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, dx: number, dy: number, dz: number, segments: number): Float64Array;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Extrude a polyline and return mesh buffers.
|
|
451
|
+
* Uses the polyline's actual vertices (no resampling) to preserve sharp corners.
|
|
452
|
+
*/
|
|
453
|
+
export function extrude_polyline(coords: Float64Array, dx: number, dy: number, dz: number, _segments: number, with_caps: boolean): Float64Array;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Fillet corners of a polyline with arcs of a given radius.
|
|
457
|
+
* Input: flat coords [x1,y1,z1, ...], radius, plane normal (nx,ny,nz; 0,0,0 for auto).
|
|
458
|
+
* Output: encoded polycurve segments [segment_count, type, ...data, type, ...data, ...]
|
|
459
|
+
* type 0 = Line: [sx,sy,sz, ex,ey,ez]
|
|
460
|
+
* type 1 = Arc: [cx,cy,cz, nx,ny,nz, radius, start_angle, end_angle]
|
|
461
|
+
*/
|
|
462
|
+
export function fillet_polycurve(coords: Float64Array, radius: number, nx: number, ny: number, nz: number): Float64Array;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Human-readable reason for the most recent empty result returned by the
|
|
466
|
+
* offset/chamfer exports below. Cleared at the start of each such call.
|
|
467
|
+
*/
|
|
468
|
+
export function geometry_last_error(): string;
|
|
469
|
+
|
|
470
|
+
export function initThreadPool(num_threads: number): Promise<any>;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Get the length of a line segment.
|
|
474
|
+
*/
|
|
475
|
+
export function line_length(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Offset a line segment perpendicular to line direction relative to reference normal.
|
|
479
|
+
* Returns [startX,startY,startZ,endX,endY,endZ]
|
|
480
|
+
*/
|
|
481
|
+
export function line_offset(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, distance: number, nx: number, ny: number, nz: number): Float64Array;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Evaluate a point on a line segment at parameter t ∈ [0,1].
|
|
485
|
+
* Returns [x, y, z].
|
|
486
|
+
*/
|
|
487
|
+
export function line_point_at(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, t: number): Float64Array;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Get the tangent direction of a line segment. Returns [x, y, z].
|
|
491
|
+
*/
|
|
492
|
+
export function line_tangent(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): Float64Array;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Loft between multiple circles
|
|
496
|
+
*
|
|
497
|
+
* # Parameters
|
|
498
|
+
* * `circle_data` - Flat array of circle definitions [cx, cy, cz, nx, ny, nz, radius, ...]
|
|
499
|
+
* * `segments` - Number of segments to sample along each curve
|
|
500
|
+
* * `with_caps` - Whether to create end caps
|
|
501
|
+
*
|
|
502
|
+
* # Returns
|
|
503
|
+
* Mesh buffers for the lofted surface
|
|
504
|
+
*/
|
|
505
|
+
export function loft_circles(circle_data: Float64Array, segments: number, with_caps: boolean): Float64Array;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Loft a NURBS surface through multiple NURBS curves.
|
|
509
|
+
* Input: [num_curves, degree_v, curve1_data..., curve2_data..., ...]
|
|
510
|
+
* Each curve_data: [degree, num_pts, x,y,z,..., w0,w1,..., k0,k1,...]
|
|
511
|
+
* Returns the NurbsSurface data (same format as tessellate input, without u_segs/v_segs).
|
|
512
|
+
*/
|
|
513
|
+
export function loft_nurbs_surface(data: Float64Array): Float64Array;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Loft between multiple polylines
|
|
517
|
+
*
|
|
518
|
+
* # Parameters
|
|
519
|
+
* * `polyline_data` - Flat array where each polyline is prefixed by its point count:
|
|
520
|
+
* [count1, x1, y1, z1, x2, y2, z2, ..., count2, x1, y1, z1, ...]
|
|
521
|
+
* * `_segments` - Ignored for polylines (kept for API compat). Points are used directly.
|
|
522
|
+
* * `with_caps` - Whether to create end caps (fan triangulation from center)
|
|
523
|
+
*
|
|
524
|
+
* # Returns
|
|
525
|
+
* Mesh buffers for the lofted surface
|
|
526
|
+
*/
|
|
527
|
+
export function loft_polylines(polyline_data: Float64Array, _segments: number, with_caps: boolean): Float64Array;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Loft between raw profile polylines with kernel-managed compatibility
|
|
531
|
+
* (resampling to a common count, seam alignment, direction matching).
|
|
532
|
+
*
|
|
533
|
+
* # Parameters
|
|
534
|
+
* * `profile_data` - Flat array where each profile is prefixed by its point count:
|
|
535
|
+
* [count1, x1, y1, z1, ..., count2, x1, y1, z1, ...]
|
|
536
|
+
* * `closed` - Whether profiles are closed loops (input must NOT repeat the
|
|
537
|
+
* first point). Closed profiles loft into a tube, open profiles into a sheet.
|
|
538
|
+
* * `with_caps` - Cap the first/last profiles (closed profiles only) to produce
|
|
539
|
+
* a watertight solid ready for booleans.
|
|
540
|
+
*
|
|
541
|
+
* # Returns
|
|
542
|
+
* Mesh buffers for the lofted surface (empty on failure)
|
|
543
|
+
*/
|
|
544
|
+
export function loft_profiles(profile_data: Float64Array, closed: boolean, with_caps: boolean): Float64Array;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Make multiple NURBS curves compatible (same knot vectors, same CP count).
|
|
548
|
+
* Input: [curve_count, curve1_data..., curve2_data..., ...]
|
|
549
|
+
* Each curve: [degree, num_cp, cp_xyz..., weights..., knots...]
|
|
550
|
+
* Output: same format with unified curves.
|
|
551
|
+
*/
|
|
552
|
+
export function make_nurbs_curves_compatible(curves_data: Float64Array): Float64Array;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Apply a 4x4 transformation matrix to a mesh.
|
|
556
|
+
* matrix: flat [m00,m01,m02,m03, m10,m11,..., m30,m31,m32,m33] (16 elements, row-major)
|
|
557
|
+
*/
|
|
558
|
+
export function mesh_apply_matrix(vertex_count: number, buffer: Float64Array, matrix: Float64Array): Float64Array;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Subtract all cutter meshes from the host in one WASM call.
|
|
562
|
+
*
|
|
563
|
+
* `packed` layout matches `mesh_boolean_union_all`; the FIRST mesh is the
|
|
564
|
+
* host and every following mesh is a cutter.
|
|
565
|
+
* `flags`: `""` or `"trustedInput"`.
|
|
566
|
+
* Returns a standard result mesh buffer, or an empty vector on failure.
|
|
567
|
+
*/
|
|
568
|
+
export function mesh_boolean_difference_all(packed: Float64Array, flags: string): Float64Array;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Perform boolean intersection on two meshes
|
|
572
|
+
*/
|
|
573
|
+
export function mesh_boolean_intersection(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array): Float64Array;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Debug helper: run the live kernel-mesh boolean entrypoint and surface the
|
|
577
|
+
* exact error instead of collapsing it into an empty output buffer.
|
|
578
|
+
*/
|
|
579
|
+
export function mesh_boolean_kernel_mesh_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
580
|
+
|
|
581
|
+
export function mesh_boolean_last_debug_marker(): number;
|
|
582
|
+
|
|
583
|
+
export function mesh_boolean_manifold_port_cleanup_triangle_dump(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, cleanup_stage: string): string;
|
|
584
|
+
|
|
585
|
+
export function mesh_boolean_manifold_port_face2tri_face_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, face_index: number): string;
|
|
586
|
+
|
|
587
|
+
export function mesh_boolean_manifold_port_face2tri_face_transform_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, face_index: number, rotate_offset: number, reverse: boolean): string;
|
|
588
|
+
|
|
589
|
+
export function mesh_boolean_manifold_port_final_triangle_dump(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
590
|
+
|
|
591
|
+
export function mesh_boolean_manifold_port_flag_edge_attempts_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
592
|
+
|
|
593
|
+
export function mesh_boolean_manifold_port_intersections_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
594
|
+
|
|
595
|
+
export function mesh_boolean_manifold_port_new_edge_bucket_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, face_p: number, face_q: number): string;
|
|
596
|
+
|
|
597
|
+
export function mesh_boolean_manifold_port_overlap_boxes_cleanup_triangle_dump(cleanup_stage: string): string;
|
|
598
|
+
|
|
599
|
+
export function mesh_boolean_manifold_port_overlap_boxes_face2tri_face_debug(face_index: number): string;
|
|
600
|
+
|
|
601
|
+
export function mesh_boolean_manifold_port_raw_face_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, face_index: number): string;
|
|
602
|
+
|
|
603
|
+
export function mesh_boolean_manifold_port_short_edge_attempts_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
604
|
+
|
|
605
|
+
export function mesh_boolean_manifold_port_single_swap_triangle_dump(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string, edge: number): string;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Debug helper: run the isolated direct-port pipeline and surface stage counts
|
|
609
|
+
* so we can see where geometry diverges without involving legacy routing.
|
|
610
|
+
*/
|
|
611
|
+
export function mesh_boolean_manifold_port_stage_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
612
|
+
|
|
613
|
+
export function mesh_boolean_manifold_port_swappable_edges_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
614
|
+
|
|
615
|
+
export function mesh_boolean_manifold_port_triangulated_triangle_dump(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
616
|
+
|
|
617
|
+
export function mesh_boolean_operation(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Debug helper: perform boolean operation and return a textual status,
|
|
621
|
+
* including kernel error reason on failure.
|
|
622
|
+
*/
|
|
623
|
+
export function mesh_boolean_operation_debug(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
624
|
+
|
|
625
|
+
export function mesh_boolean_port_triangle_dump(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): string;
|
|
626
|
+
|
|
627
|
+
export function mesh_boolean_split(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Perform boolean subtraction on two meshes (A - B)
|
|
631
|
+
*/
|
|
632
|
+
export function mesh_boolean_subtraction(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array): Float64Array;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Perform boolean operation and return stage-level profiling data followed by
|
|
636
|
+
* the result mesh buffer.
|
|
637
|
+
*
|
|
638
|
+
* Output format:
|
|
639
|
+
* [profile_len(=95), broadphase_ms, segments_ms, split_ms,
|
|
640
|
+
* split_touched_faces_a, split_source_faces_a, split_touched_faces_b, split_source_faces_b,
|
|
641
|
+
* classify_ms, classify_seed_ms, classify_strict_ms, classify_open_component_ms,
|
|
642
|
+
* extract_ms, extract_primary_ms, extract_fallback_ms,
|
|
643
|
+
* Perform boolean union on two meshes
|
|
644
|
+
*/
|
|
645
|
+
export function mesh_boolean_union(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array): Float64Array;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Union all meshes in the packed buffer into a single mesh in one WASM call.
|
|
649
|
+
*
|
|
650
|
+
* `packed` layout: `[meshCount, (bufferLen, [vertexCount, positions..., indices...])...]`.
|
|
651
|
+
* `flags`: `""` or `"trustedInput"`.
|
|
652
|
+
* Returns a standard result mesh buffer, or an empty vector on failure.
|
|
653
|
+
*/
|
|
654
|
+
export function mesh_boolean_union_all(packed: Float64Array, flags: string): Float64Array;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Flat 3D endpoints of every open boundary edge: `[x0,y0,z0, x1,y1,z1, ...]`,
|
|
658
|
+
* six values per segment. Empty when the mesh is closed. Drives the red
|
|
659
|
+
* "open edge" viewport highlight.
|
|
660
|
+
*/
|
|
661
|
+
export function mesh_boundary_edge_segments(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Handle variant of `mesh_boundary_edge_segments`.
|
|
665
|
+
*/
|
|
666
|
+
export function mesh_boundary_edge_segments_h(id: number): Float64Array;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Extract boundary (perimeter) edges from a mesh as polylines.
|
|
670
|
+
* Returns polyline buffer: [num_polylines, n1, x,y,z,..., n2, x,y,z,...]
|
|
671
|
+
*/
|
|
672
|
+
export function mesh_boundary_polylines(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Coplanar connected face groups.
|
|
676
|
+
* Output format:
|
|
677
|
+
* [groupCount, triCount, tri..., centroidX,centroidY,centroidZ, normalX,normalY,normalZ, ...]
|
|
678
|
+
*/
|
|
679
|
+
export function mesh_build_coplanar_connected_face_groups(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Display-ready render buffers: creased (split) vertex normals plus feature
|
|
683
|
+
* edges, computed in one pass. Replaces THREE's toCreasedNormals +
|
|
684
|
+
* EdgesGeometry in app layers (orders of magnitude faster on large meshes).
|
|
685
|
+
*
|
|
686
|
+
* Output (f32-packed):
|
|
687
|
+
* [vertexCount, positions (vertexCount*3), normals (vertexCount*3),
|
|
688
|
+
* edgeSegmentCount, edgePositions (edgeSegmentCount*6)]
|
|
689
|
+
* Vertices are non-indexed in input triangle order, so raycast face indices
|
|
690
|
+
* against the source mesh stay valid.
|
|
691
|
+
*/
|
|
692
|
+
export function mesh_build_render_buffers(vertex_count: number, buffer: Float64Array, crease_angle_deg: number): Float32Array;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Handle variant of `mesh_build_render_buffers`.
|
|
696
|
+
*/
|
|
697
|
+
export function mesh_build_render_buffers_h(id: number, crease_angle_deg: number): Float32Array;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Chamfer all edges of a primitive mesh (flat bevel)
|
|
701
|
+
*
|
|
702
|
+
* # Arguments
|
|
703
|
+
* * `mesh_type` - "box", "cylinder", or "prism"
|
|
704
|
+
* * `params` - Parameters: [width,height,depth] for box, [radius,height,segments] for cylinder/prism
|
|
705
|
+
* * `offset` - Chamfer offset distance
|
|
706
|
+
*
|
|
707
|
+
* # Returns
|
|
708
|
+
* Result mesh buffer [vertexCount, vertices..., indices...]
|
|
709
|
+
*/
|
|
710
|
+
export function mesh_chamfer_all_edges(mesh_type: string, params: Float64Array, offset: number): Float64Array;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Chamfer feature edges of a closed solid. `edges` is a flat buffer of
|
|
714
|
+
* segment endpoint pairs [ax,ay,az,bx,by,bz, ...]; each picked segment
|
|
715
|
+
* expands to its full feature-edge chain (straight box edges, tessellated
|
|
716
|
+
* rims). `distance` is the setback along each adjacent face.
|
|
717
|
+
* Returns a standard mesh buffer, or empty on failure (see
|
|
718
|
+
* `geometry_last_error`).
|
|
719
|
+
*/
|
|
720
|
+
export function mesh_chamfer_edges(vertex_count: number, buffer: Float64Array, edges: Float64Array, distance: number): Float64Array;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Clip a polyline against a closed mesh volume (boolean intersection for curves).
|
|
724
|
+
*
|
|
725
|
+
* `points` is a flat [x,y,z, ...] vertex list; `closed` marks a closed loop
|
|
726
|
+
* (no duplicated seam point required, one is tolerated).
|
|
727
|
+
* Returns two concatenated polyline buffers — inside pieces first, then
|
|
728
|
+
* outside pieces — each encoded as [num_polylines, n1, x,y,z,..., ...].
|
|
729
|
+
* Returns an empty buffer on failure (open cutter, degenerate polyline).
|
|
730
|
+
*/
|
|
731
|
+
export function mesh_clip_polyline(vertex_count: number, buffer: Float64Array, points: Float64Array, closed: boolean): Float64Array;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Clip a polyline by an OPEN oriented sheet: split it at every sheet
|
|
735
|
+
* crossing and classify each piece by the SIGNED SIDE of the sheet. This is
|
|
736
|
+
* side classification, NOT containment (unlike `mesh_clip_polyline`, which
|
|
737
|
+
* requires a closed volume): pieces far from the sheet still classify by
|
|
738
|
+
* the nearest facet's normal. `inside` = the positive side, in FRONT of the
|
|
739
|
+
* sheet normal; `outside` = behind it. The sheet may be any non-empty
|
|
740
|
+
* triangle mesh, open or closed; its stored winding defines the normals.
|
|
741
|
+
*
|
|
742
|
+
* Returns two concatenated polyline buffers — inside pieces first, then
|
|
743
|
+
* outside pieces — each encoded as `[num_polylines, n1, x,y,z,..., ...]`
|
|
744
|
+
* (identical packing to `mesh_clip_polyline`). Returns an empty buffer on
|
|
745
|
+
* failure (degenerate polyline/sheet).
|
|
746
|
+
*/
|
|
747
|
+
export function mesh_clip_polyline_by_sheet(vertex_count: number, buffer: Float64Array, points: Float64Array, closed: boolean): Float64Array;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Compute planar curve normal from ordered points.
|
|
751
|
+
*/
|
|
752
|
+
export function mesh_compute_planar_curve_normal(coords: Float64Array, closed: boolean): Float64Array;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Odd/even mesh containment test.
|
|
756
|
+
*/
|
|
757
|
+
export function mesh_contains_point(vertex_count: number, buffer: Float64Array, px: number, py: number, pz: number): boolean;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Create a box mesh and return buffers
|
|
761
|
+
* Returns [vertices..., indices...]
|
|
762
|
+
*/
|
|
763
|
+
export function mesh_create_box(width: number, height: number, depth: number): Float64Array;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Create a Manifold-aligned centered Z-axis cone mesh and return buffers
|
|
767
|
+
*/
|
|
768
|
+
export function mesh_create_cone(radius: number, height: number, segments: number): Float64Array;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Create a Manifold-aligned centered Z-axis cylinder mesh and return buffers
|
|
772
|
+
*/
|
|
773
|
+
export function mesh_create_cylinder(radius: number, height: number, segments: number): Float64Array;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Create a prism mesh and return buffers
|
|
777
|
+
*/
|
|
778
|
+
export function mesh_create_prism(radius: number, height: number, sides: number): Float64Array;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Create a geodesic sphere mesh matching Manifold's sphere topology and return buffers
|
|
782
|
+
*/
|
|
783
|
+
export function mesh_create_sphere(radius: number, segments: number, rings: number): Float64Array;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Evaluate a point on a mesh surface at parametric coordinates (u, v).
|
|
787
|
+
* Maps u ∈ [0,1] and v ∈ [0,1] to the mesh's AABB bounding box,
|
|
788
|
+
* then casts a ray perpendicular to the best-fit projection plane.
|
|
789
|
+
* Returns [x, y, z] of the intersection point, or [NaN, NaN, NaN] if no hit.
|
|
790
|
+
*/
|
|
791
|
+
export function mesh_evaluate(vertex_count: number, buffer: Float64Array, u: number, v: number): Float64Array;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Export a mesh to OBJ format
|
|
795
|
+
* Takes the standard mesh buffer (`[vertexCount, ...positions, ...indices]`,
|
|
796
|
+
* same format as `mesh_to_buffers` / `Mesh.rawBuffer`) and returns OBJ text.
|
|
797
|
+
*/
|
|
798
|
+
export function mesh_export_obj(vertex_count: number, buffer: Float64Array): string;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Export a mesh (standard buffer format) to ASCII STL text.
|
|
802
|
+
*/
|
|
803
|
+
export function mesh_export_stl_ascii(vertex_count: number, buffer: Float64Array, name: string): string;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Export a mesh (standard buffer format) to binary STL bytes.
|
|
807
|
+
*/
|
|
808
|
+
export function mesh_export_stl_binary(vertex_count: number, buffer: Float64Array): Uint8Array;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Push/pull a planar face set by moving its coplanar connected region.
|
|
812
|
+
*/
|
|
813
|
+
export function mesh_extrude_face(vertex_count: number, buffer: Float64Array, face_index: number, distance: number): Float64Array;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Extrude planar curve profile by normal * height.
|
|
817
|
+
*/
|
|
818
|
+
export function mesh_extrude_planar_curve(coords: Float64Array, nx: number, ny: number, nz: number, height: number, closed: boolean): Float64Array;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Feature-edge chains of a mesh for chamfer highlighting: every connected
|
|
822
|
+
* chain of edges separating the same two smooth face groups — the exact
|
|
823
|
+
* grouping `mesh_chamfer_edges` expands picks to, so highlighting a chain
|
|
824
|
+
* shows precisely what one pick will chamfer. Packed as
|
|
825
|
+
* `[chainCount, (closed, pointCount, x,y,z ...)...]`; closed chains omit the
|
|
826
|
+
* duplicate seam point. A mesh with no feature edges returns `[0]`; an
|
|
827
|
+
* invalid mesh returns an empty buffer (see `geometry_last_error`).
|
|
828
|
+
*/
|
|
829
|
+
export function mesh_feature_edge_chains(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Handle variant of `mesh_feature_edge_chains`.
|
|
833
|
+
*/
|
|
834
|
+
export function mesh_feature_edge_chains_h(id: number): Float64Array;
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Find the best matching coplanar connected face group by normal and optional near-point.
|
|
838
|
+
* Output format: [centroidX, centroidY, centroidZ, normalX, normalY, normalZ] or [].
|
|
839
|
+
*/
|
|
840
|
+
export function mesh_find_face_group_by_normal(vertex_count: number, buffer: Float64Array, nx: number, ny: number, nz: number, near_x: number, near_y: number, near_z: number, use_near_point: boolean): Float64Array;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Handle variant of `mesh_find_face_group_by_normal`.
|
|
844
|
+
*/
|
|
845
|
+
export function mesh_find_face_group_by_normal_h(id: number, nx: number, ny: number, nz: number, near_x: number, near_y: number, near_z: number, use_near_point: boolean): Float64Array;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Find the coplanar connected face group containing triangle_index.
|
|
849
|
+
* Output format: [centroidX, centroidY, centroidZ, normalX, normalY, normalZ] or [].
|
|
850
|
+
*/
|
|
851
|
+
export function mesh_find_face_group_by_triangle_index(vertex_count: number, buffer: Float64Array, triangle_index: number): Float64Array;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Handle variant of `mesh_find_face_group_by_triangle_index`.
|
|
855
|
+
*/
|
|
856
|
+
export function mesh_find_face_group_by_triangle_index_h(id: number, triangle_index: number): Float64Array;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Axis-aligned bounding box as [minX, minY, minZ, maxX, maxY, maxZ].
|
|
860
|
+
*/
|
|
861
|
+
export function mesh_get_bounds(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Coplanar connected face-group centroid containing a given triangle face index.
|
|
865
|
+
* Output format: [x, y, z] or [] when unavailable.
|
|
866
|
+
*/
|
|
867
|
+
export function mesh_get_coplanar_face_group_centroid(vertex_count: number, buffer: Float64Array, face_index: number): Float64Array;
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Handle variant of `mesh_get_coplanar_face_group_centroid`.
|
|
871
|
+
*/
|
|
872
|
+
export function mesh_get_coplanar_face_group_centroid_h(id: number, face_index: number): Float64Array;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Edge-connected coplanar triangle indices as [count, i0, i1, ...].
|
|
876
|
+
*/
|
|
877
|
+
export function mesh_get_coplanar_face_indices(vertex_count: number, buffer: Float64Array, face_index: number): Float64Array;
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Handle variant of `mesh_get_coplanar_face_indices`.
|
|
881
|
+
*/
|
|
882
|
+
export function mesh_get_coplanar_face_indices_h(id: number, face_index: number): Float64Array;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Coplanar connected face region projected to a plane basis.
|
|
886
|
+
* Output format:
|
|
887
|
+
* [faceCount, faceIndex0, faceIndex1, ..., uMin, uMax, vMin, vMax]
|
|
888
|
+
*/
|
|
889
|
+
export function mesh_get_coplanar_face_region(vertex_count: number, buffer: Float64Array, face_index: number, ox: number, oy: number, oz: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, margin_scale: number, min_margin: number): Float64Array;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Unique undirected triangle edges as [edgeCount, v0a, v0b, v1a, v1b, ...].
|
|
893
|
+
*/
|
|
894
|
+
export function mesh_get_edge_vertex_pairs(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Handle variant of `mesh_get_edge_vertex_pairs`.
|
|
898
|
+
*/
|
|
899
|
+
export function mesh_get_edge_vertex_pairs_h(id: number): Float64Array;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Face area.
|
|
903
|
+
*/
|
|
904
|
+
export function mesh_get_face_area(vertex_count: number, buffer: Float64Array, face_index: number): number;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Boundary loops of the coplanar connected face group containing `face_index`.
|
|
908
|
+
*
|
|
909
|
+
* Boundary edges are the directed triangle edges whose reversed twin is not
|
|
910
|
+
* present within the group; chaining them preserves the group's winding.
|
|
911
|
+
* Consecutive collinear points (T-junction subdivisions) are collapsed so
|
|
912
|
+
* consumers receive clean polygon corners.
|
|
913
|
+
*
|
|
914
|
+
* Output format: [loopCount, (pointCount, x, y, z, ...) per loop].
|
|
915
|
+
* Loops are implicitly closed (last point connects back to the first).
|
|
916
|
+
*/
|
|
917
|
+
export function mesh_get_face_boundary_loops(vertex_count: number, buffer: Float64Array, face_index: number): Float64Array;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Handle variant of `mesh_get_face_boundary_loops`.
|
|
921
|
+
*/
|
|
922
|
+
export function mesh_get_face_boundary_loops_h(id: number, face_index: number): Float64Array;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Face centroid as [x, y, z].
|
|
926
|
+
*/
|
|
927
|
+
export function mesh_get_face_centroid(vertex_count: number, buffer: Float64Array, face_index: number): Float64Array;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* Face normal as [x, y, z].
|
|
931
|
+
*/
|
|
932
|
+
export function mesh_get_face_normal(vertex_count: number, buffer: Float64Array, face_index: number): Float64Array;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Edge-connected smooth face group (dihedral angle below `max_angle_deg`).
|
|
936
|
+
* Output format: [count, isPlanar (0|1), tri0, tri1, ...]
|
|
937
|
+
* `isPlanar` is 1 when every triangle normal in the group aligns with the
|
|
938
|
+
* seed triangle's normal (i.e. the group is a flat face), 0 for curved
|
|
939
|
+
* regions such as cylinder walls or lofted patches.
|
|
940
|
+
*/
|
|
941
|
+
export function mesh_get_smooth_face_group(vertex_count: number, buffer: Float64Array, face_index: number, max_angle_deg: number): Float64Array;
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Handle variant of `mesh_get_smooth_face_group`.
|
|
945
|
+
*/
|
|
946
|
+
export function mesh_get_smooth_face_group_h(id: number, face_index: number, max_angle_deg: number): Float64Array;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Get mesh statistics
|
|
950
|
+
* Returns [vertex_count, face_count, edge_count]
|
|
951
|
+
*/
|
|
952
|
+
export function mesh_get_stats(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Import OBJ data and return mesh buffers
|
|
956
|
+
*/
|
|
957
|
+
export function mesh_import_obj(obj_data: string): Float64Array;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Import STL data (binary or ASCII, auto-detected) and return the standard
|
|
961
|
+
* mesh buffer (`[vertexCount, ...positions, ...indices]`). STL stores an
|
|
962
|
+
* unindexed triangle soup, so coincident vertices are welded.
|
|
963
|
+
*
|
|
964
|
+
* `weld_tolerance`: absolute distance under which vertices merge; `<= 0`
|
|
965
|
+
* selects an automatic tolerance from the bounding box. Returns an empty
|
|
966
|
+
* buffer on parse failure.
|
|
967
|
+
*/
|
|
968
|
+
export function mesh_import_stl(data: Uint8Array, weld_tolerance: number): Float64Array;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Check if triangulated mesh is a closed volume (no welded boundary edges).
|
|
972
|
+
*/
|
|
973
|
+
export function mesh_is_closed_volume(vertex_count: number, buffer: Float64Array): boolean;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Layered "make watertight": first geometry-preserving repair; if that already
|
|
977
|
+
* closes the mesh, return it. Otherwise fall back to voxel remeshing.
|
|
978
|
+
*
|
|
979
|
+
* Output: `[ before(13), after(13), method, effectiveResolution, vertexCount,
|
|
980
|
+
* ...positions, ...indices ]` where `method` is 0 (repair) or 1 (remesh) and
|
|
981
|
+
* `after` describes the returned mesh.
|
|
982
|
+
*/
|
|
983
|
+
export function mesh_make_watertight(vertex_count: number, buffer: Float64Array, resolution: number, iso: number): Float64Array;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Debug helper: run only the isolated direct-port `MeshGL -> Impl -> MeshGL`
|
|
987
|
+
* normalization owner and return a JSON dump for local port validation.
|
|
988
|
+
*/
|
|
989
|
+
export function mesh_manifold_port_import_roundtrip_debug(vertex_count: number, buffer: Float64Array, trusted_input: boolean): string;
|
|
990
|
+
|
|
991
|
+
export function mesh_manifold_port_import_stage_hashes_debug(vertex_count: number, buffer: Float64Array, trusted_input: boolean): string;
|
|
992
|
+
|
|
993
|
+
export function mesh_manifold_port_triangulate_projected_polygon_debug(data: Float64Array, epsilon: number, allow_convex: boolean): string;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Merge multiple mesh buffers while preserving per-mesh vertex order and index remapping.
|
|
997
|
+
* Input format: [mesh_count, len1, mesh1..., len2, mesh2..., ...]
|
|
998
|
+
*/
|
|
999
|
+
export function mesh_merge(mesh_data: Float64Array): Float64Array;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Intersect two meshes, returning intersection polyline points.
|
|
1003
|
+
* Returns: [num_polylines, n1, x,y,z,..., n2, x,y,z,...]
|
|
1004
|
+
*/
|
|
1005
|
+
export function mesh_mesh_intersect(va_count: number, buffer_a: Float64Array, vb_count: number, buffer_b: Float64Array): Float64Array;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Create a planar patch mesh from boundary points using CDT.
|
|
1009
|
+
* Correctly handles concave polygons (unlike fan triangulation).
|
|
1010
|
+
* Input: flat coordinate array [x1,y1,z1, x2,y2,z2, ...]
|
|
1011
|
+
* Output: mesh buffer [vertexCount, x1,y1,z1,..., i0,i1,i2, ...]
|
|
1012
|
+
*/
|
|
1013
|
+
export function mesh_patch_from_points(coords: Float64Array): Float64Array;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Evaluate a point on a planar mesh-face surface at normalized parameters.
|
|
1017
|
+
* Parameters map across the face group's local 2D bounds.
|
|
1018
|
+
* Returns [x, y, z] or [NaN, NaN, NaN] when the query falls outside the face region.
|
|
1019
|
+
*/
|
|
1020
|
+
export function mesh_planar_face_evaluate(vertex_count: number, buffer: Float64Array, face_index: number, u: number, v: number): Float64Array;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Intersect a mesh with a plane, returning polyline points.
|
|
1024
|
+
* Input: vertex_count, mesh_buffer..., nx, ny, nz, d
|
|
1025
|
+
* Returns: [num_polylines, n1, x,y,z,..., n2, x,y,z,...]
|
|
1026
|
+
*/
|
|
1027
|
+
export function mesh_plane_intersect(vertex_count: number, buffer: Float64Array, nx: number, ny: number, nz: number, d: number): Float64Array;
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Compute all transversal crossing points of a polyline with a triangle
|
|
1031
|
+
* mesh. Works on OPEN meshes (sheets) — the mesh is NOT required to be a
|
|
1032
|
+
* closed volume, unlike `mesh_clip_polyline`.
|
|
1033
|
+
*
|
|
1034
|
+
* `points` is a flat [x,y,z, ...] vertex list; `closed` marks a closed loop
|
|
1035
|
+
* (segment `i` runs `points[i] → points[(i+1) % n]`; open polylines have
|
|
1036
|
+
* n−1 segments, closed ones n).
|
|
1037
|
+
*
|
|
1038
|
+
* Packing: `[count, (x, y, z, segmentIndex, segmentT, triangleIndex)·count]`,
|
|
1039
|
+
* sorted by (segmentIndex, segmentT). Shared-edge/vertex crossings dedupe to
|
|
1040
|
+
* one hit (smallest triangle index kept); coplanar sliding overlaps yield no
|
|
1041
|
+
* hits. Returns an empty buffer on failure (degenerate polyline/mesh).
|
|
1042
|
+
*/
|
|
1043
|
+
export function mesh_polyline_intersection_points(vertex_count: number, buffer: Float64Array, points: Float64Array, closed: boolean): Float64Array;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Shift closed boolean cutter curve and adjust height.
|
|
1047
|
+
* Returns [height, epsilon, pointCount, x,y,z,...]
|
|
1048
|
+
*/
|
|
1049
|
+
export function mesh_prepare_boolean_cutter_curve(coords: Float64Array, closed: boolean, nx: number, ny: number, nz: number, height: number): Float64Array;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Host-aware boolean cutter preparation: like
|
|
1053
|
+
* `mesh_prepare_boolean_cutter_curve`, but the bias is raised past the
|
|
1054
|
+
* measured host-surface deviation under the cutter footprint (sculpted /
|
|
1055
|
+
* non-planar faces). The host arrives as a standard triangulated buffer.
|
|
1056
|
+
* Returns [height, epsilon, pointCount, x,y,z,...]
|
|
1057
|
+
*/
|
|
1058
|
+
export function mesh_prepare_hosted_boolean_cutter(host_vertex_count: number, host_buffer: Float64Array, coords: Float64Array, closed: boolean, nx: number, ny: number, nz: number, height: number): Float64Array;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Raycast against mesh and return closest hit.
|
|
1062
|
+
* Output: [] when no hit, otherwise [pointX,pointY,pointZ, normalX,normalY,normalZ, faceIndex, distance]
|
|
1063
|
+
*/
|
|
1064
|
+
export function mesh_raycast(vertex_count: number, buffer: Float64Array, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, max_distance: number): Float64Array;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Raycast against mesh and return all hits sorted by distance.
|
|
1068
|
+
* Output: [hitCount, (point, normal, faceIndex, distance)*]
|
|
1069
|
+
*/
|
|
1070
|
+
export function mesh_raycast_all(vertex_count: number, buffer: Float64Array, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, max_distance: number): Float64Array;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Handle variant of `mesh_raycast_all` — reuses the stored mesh's cached BVH.
|
|
1074
|
+
*/
|
|
1075
|
+
export function mesh_raycast_all_h(id: number, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, max_distance: number): Float64Array;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Handle variant of `mesh_raycast` — reuses the stored mesh's cached BVH.
|
|
1079
|
+
*/
|
|
1080
|
+
export function mesh_raycast_h(id: number, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, max_distance: number): Float64Array;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Raycast against many meshes packed as:
|
|
1084
|
+
* [meshCount, meshLen0, meshRaw0..., meshLen1, meshRaw1..., ...]
|
|
1085
|
+
* Output: [hitCount, meshIndex, pointX,pointY,pointZ, normalX,normalY,normalZ, faceIndex, distance, ...]
|
|
1086
|
+
*/
|
|
1087
|
+
export function mesh_raycast_many(mesh_data: Float64Array, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, max_distance: number): Float64Array;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Geometry-preserving repair: weld, drop degenerate/duplicate triangles,
|
|
1091
|
+
* remove orphan vertices, fix winding, and fill holes.
|
|
1092
|
+
*
|
|
1093
|
+
* `flags` bitmask: 1=weld, 2=removeDegenerate, 4=removeDuplicate,
|
|
1094
|
+
* 8=fillHoles, 16=fixWinding, 32=removeUnreferenced. `weld_tolerance <= 0`
|
|
1095
|
+
* = auto; `max_hole_edges <= 0` = fill every hole.
|
|
1096
|
+
*
|
|
1097
|
+
* Output: `[ before(13), after(13), weldedVertices, removedTriangles,
|
|
1098
|
+
* filledHoles, vertexCount, ...positions, ...indices ]` — the trailing mesh
|
|
1099
|
+
* buffer is a standard `[vertexCount, positions, indices]` block.
|
|
1100
|
+
*/
|
|
1101
|
+
export function mesh_repair(vertex_count: number, buffer: Float64Array, flags: number, weld_tolerance: number, max_hole_edges: number): Float64Array;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Full mesh health report (see [`push_repair_diag`] for the 13-value layout).
|
|
1105
|
+
*/
|
|
1106
|
+
export function mesh_repair_diagnostics(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Handle variant of `mesh_repair_diagnostics`.
|
|
1110
|
+
*/
|
|
1111
|
+
export function mesh_repair_diagnostics_h(id: number): Float64Array;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Rotate a mesh around an arbitrary axis and return new buffers
|
|
1115
|
+
* Axis is defined by (ax, ay, az), angle in radians
|
|
1116
|
+
*/
|
|
1117
|
+
export function mesh_rotate(vertex_count: number, buffer: Float64Array, ax: number, ay: number, az: number, angle: number): Float64Array;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Scale a mesh non-uniformly and return new buffers
|
|
1121
|
+
*/
|
|
1122
|
+
export function mesh_scale(vertex_count: number, buffer: Float64Array, sx: number, sy: number, sz: number): Float64Array;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Union of two OPEN oriented sheets (mesh A ∪ mesh B): mutual trim + join.
|
|
1126
|
+
* A sheet's material is its FRONT half-space, so the union boundary keeps
|
|
1127
|
+
* A's pieces BEHIND B and B's pieces BEHIND A (pieces in front of the other
|
|
1128
|
+
* sheet are interior to the union material and are dropped), stitched at
|
|
1129
|
+
* the shared intersection seam; regions the other operand never cuts are
|
|
1130
|
+
* kept wholesale (coincident-overlap regions keep A's copy only). Rejects
|
|
1131
|
+
* closed operands — those belong to the solid boolean. Returns one mesh
|
|
1132
|
+
* buffer in the standard `[vertexCount, positions…, indices…]` layout.
|
|
1133
|
+
*/
|
|
1134
|
+
export function mesh_sheet_union(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, flags: string): Float64Array;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* Split a closed solid (mesh A) by a surface (mesh B) into BOTH capped solids.
|
|
1138
|
+
* `outside` = the solid on the negative side of the surface, `inside` = the
|
|
1139
|
+
* positive side; each is capped by the portion of the surface inside the
|
|
1140
|
+
* solid, welded into a watertight result. Same packed layout as the other
|
|
1141
|
+
* split exports.
|
|
1142
|
+
*/
|
|
1143
|
+
export function mesh_solid_split_by_surface(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
|
|
1144
|
+
|
|
1145
|
+
export function mesh_solid_split_plane(vertex_count: number, buffer: Float64Array, nx: number, ny: number, nz: number, d: number, operation: string): Float64Array;
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* One-shot production path: closed manifold triangle mesh ÷ NURBS surface →
|
|
1149
|
+
* both halves as exact capped BREPs, in a single WASM crossing (mesh→BREP
|
|
1150
|
+
* conversion, sheet construction and the parametric split all run kernel-side).
|
|
1151
|
+
* Returns {"negative": <brep|null>, "positive": <brep|null>} or {"error":...}.
|
|
1152
|
+
*/
|
|
1153
|
+
export function mesh_split_by_surface_to_brep(vertex_count: number, buffer: Float64Array, surface_data: Float64Array, tolerance: number, normal_angle_tol_deg: number, max_faces: number): string;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Intersect a polyline with a triangle mesh (open sheets allowed) and split
|
|
1157
|
+
* it into pieces at every crossing. Hit points become the shared endpoints
|
|
1158
|
+
* of adjacent pieces; a closed loop is opened at the first hit (N hits → N
|
|
1159
|
+
* pieces), an open polyline yields N + 1 pieces. With no crossings the
|
|
1160
|
+
* original polyline comes back as one piece.
|
|
1161
|
+
*
|
|
1162
|
+
* Packing: a single flat polyline-group buffer
|
|
1163
|
+
* `[num_polylines, n1, x,y,z,..., n2, x,y,z,...]` (same group encoding as
|
|
1164
|
+
* `mesh_clip_polyline`, but ONE list — pieces are not classified). Returns
|
|
1165
|
+
* an empty buffer on failure.
|
|
1166
|
+
*/
|
|
1167
|
+
export function mesh_split_polyline(vertex_count: number, buffer: Float64Array, points: Float64Array, closed: boolean): Float64Array;
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Store a mesh buffer `[vertexCount, x,y,z..., i0,i1,i2...]` WASM-side.
|
|
1171
|
+
* Returns a non-zero id, or 0 on invalid input.
|
|
1172
|
+
*/
|
|
1173
|
+
export function mesh_store(vertex_count: number, buffer: Float64Array): number;
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Approximate bytes held by stored mesh raw buffers (diagnostics/tests).
|
|
1177
|
+
* Excludes lazy raycast caches.
|
|
1178
|
+
*/
|
|
1179
|
+
export function mesh_store_bytes(): number;
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* Number of stored meshes (diagnostics/tests).
|
|
1183
|
+
*/
|
|
1184
|
+
export function mesh_store_count(): number;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Release a stored mesh and free its memory (idempotent).
|
|
1188
|
+
*/
|
|
1189
|
+
export function mesh_store_free(id: number): void;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Trim an OPEN host surface by all closed cutter meshes in one WASM call.
|
|
1193
|
+
*
|
|
1194
|
+
* `packed` layout matches `mesh_boolean_difference_all`: the FIRST mesh is
|
|
1195
|
+
* the open host and every following mesh is a closed cutter volume.
|
|
1196
|
+
* `flags`: `""` or `"trustedInput"`.
|
|
1197
|
+
*
|
|
1198
|
+
* Unlike folding pairwise surface-split subtracts over the cutter list,
|
|
1199
|
+
* every host triangle is cut by ALL relevant cutters at once (one CDT per
|
|
1200
|
+
* triangle) and classified inside-any-cutter — one pass over the host
|
|
1201
|
+
* instead of N passes over an ever-growing, ever-degrading host.
|
|
1202
|
+
* Returns the outside (kept) mesh buffer, or an empty vector on failure.
|
|
1203
|
+
*/
|
|
1204
|
+
export function mesh_surface_difference_all(packed: Float64Array, flags: string): Float64Array;
|
|
1205
|
+
|
|
1206
|
+
export function mesh_surface_split(vertex_count_a: number, buffer_a: Float64Array, vertex_count_b: number, buffer_b: Float64Array, operation: string): Float64Array;
|
|
1207
|
+
|
|
1208
|
+
export function mesh_surface_split_plane(vertex_count: number, buffer: Float64Array, nx: number, ny: number, nz: number, d: number, operation: string): Float64Array;
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Return welded-edge topology metrics for a triangulated mesh buffer:
|
|
1212
|
+
* `[boundary_edges, non_manifold_edges]`.
|
|
1213
|
+
*/
|
|
1214
|
+
export function mesh_topology_metrics(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Return raw index-topology metrics for a triangulated mesh buffer:
|
|
1218
|
+
* `[boundary_edges, non_manifold_edges]`.
|
|
1219
|
+
*
|
|
1220
|
+
* Unlike `mesh_topology_metrics`, this preserves duplicate same-position seam
|
|
1221
|
+
* vertices. That makes it a closer fit for trusted MeshGL-style boolean meshes,
|
|
1222
|
+
* where manifoldness comes from explicit topology rather than position welding.
|
|
1223
|
+
*/
|
|
1224
|
+
export function mesh_topology_metrics_raw(vertex_count: number, buffer: Float64Array): Float64Array;
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Translate a mesh by an offset vector and return new buffers
|
|
1228
|
+
*/
|
|
1229
|
+
export function mesh_translate(vertex_count: number, buffer: Float64Array, dx: number, dy: number, dz: number): Float64Array;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Rebuild a mesh as a guaranteed-watertight solid via generalized-winding-
|
|
1233
|
+
* number voxel remeshing. `resolution` = cells along the longest axis
|
|
1234
|
+
* (`0` = 64 default, auto-capped by a work budget). `iso` = winding threshold
|
|
1235
|
+
* (`<=0` or `>=1` → 0.5).
|
|
1236
|
+
*
|
|
1237
|
+
* Output: a standard `[vertexCount, ...positions, ...indices]` mesh buffer.
|
|
1238
|
+
*/
|
|
1239
|
+
export function mesh_voxel_remesh(vertex_count: number, buffer: Float64Array, resolution: number, iso: number): Float64Array;
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Intersect two NURBS curves.
|
|
1243
|
+
* Returns: [num_points, x,y,z, ...]
|
|
1244
|
+
*/
|
|
1245
|
+
export function nurbs_curve_curve_intersect(data_a: Float64Array, data_b: Float64Array): Float64Array;
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Find all intersections between two NURBS curves, with exact parameters.
|
|
1249
|
+
*
|
|
1250
|
+
* Inputs are standard NURBS curve encodings
|
|
1251
|
+
* `[degree, num_cp, cp_xyz..., weights..., knots...]` (the same format
|
|
1252
|
+
* consumed by `sample_nurbs_curve` / produced by `build_nurbs_curve`).
|
|
1253
|
+
*
|
|
1254
|
+
* Packing: `[count, (x, y, z, paramA, paramB)·count]`. Parameters are
|
|
1255
|
+
* normalized to [0, 1]; results are sorted by `paramA`. Coincident
|
|
1256
|
+
* (overlapping) curve runs yield NO points (identical curves return
|
|
1257
|
+
* `[0]`). Returns an empty buffer on malformed input.
|
|
1258
|
+
*/
|
|
1259
|
+
export function nurbs_curve_curve_intersect_params(curve_a_data: Float64Array, curve_b_data: Float64Array): Float64Array;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Offset a planar NURBS curve by `distance` within the plane with normal
|
|
1263
|
+
* (nx, ny, nz), refit to `tolerance`. Input/output use the standard curve
|
|
1264
|
+
* buffer format [degree, n, cps(xyz)..., weights..., knots...].
|
|
1265
|
+
* Returns an empty buffer on failure (see `geometry_last_error`).
|
|
1266
|
+
*/
|
|
1267
|
+
export function nurbs_curve_offset(data: Float64Array, distance: number, nx: number, ny: number, nz: number, tolerance: number): Float64Array;
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* Intersect a NURBS curve with a plane.
|
|
1271
|
+
* Input: same curve format as sample_nurbs_curve + plane normal (nx,ny,nz) and d.
|
|
1272
|
+
* Returns: [num_points, x,y,z, x,y,z, ...]
|
|
1273
|
+
*/
|
|
1274
|
+
export function nurbs_curve_plane_intersect(data: Float64Array, nx: number, ny: number, nz: number, d: number): Float64Array;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Rebuild a NURBS curve with the given degree and control point count via
|
|
1278
|
+
* global least-squares fitting (Rhino-style Rebuild). Geometrically closed
|
|
1279
|
+
* inputs produce a periodic (seamlessly closed) result; output is always
|
|
1280
|
+
* non-rational. Input uses the standard curve buffer format
|
|
1281
|
+
* [degree, n, cps(xyz)..., weights..., knots...]; output prepends the fit
|
|
1282
|
+
* report: [maxDeviation, avgDeviation, degree, n, cps..., weights...,
|
|
1283
|
+
* knots...]. Returns an empty buffer on failure (see `geometry_last_error`).
|
|
1284
|
+
*/
|
|
1285
|
+
export function nurbs_curve_rebuild(data: Float64Array, degree: number, count: number): Float64Array;
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Split a NURBS curve at multiple normalized parameters t ∈ [0, 1].
|
|
1289
|
+
*
|
|
1290
|
+
* Splitting is exact (knot insertion), so every returned piece lies exactly
|
|
1291
|
+
* on the input curve. Parameters are sorted/deduplicated/clamped internally;
|
|
1292
|
+
* closed curves are opened at the FIRST parameter (N interior parameters →
|
|
1293
|
+
* N pieces), open curves yield N + 1 pieces. With no valid parameters the
|
|
1294
|
+
* (clamped) curve comes back as the single piece.
|
|
1295
|
+
*
|
|
1296
|
+
* `closed_hint` is an explicit topology override: `> 0` forces closed
|
|
1297
|
+
* (seam-rejoin) semantics, `0` forces open semantics (an open curve whose
|
|
1298
|
+
* endpoints merely coincide keeps N + 1 pieces), `< 0` infers closedness
|
|
1299
|
+
* geometrically from the endpoint distance (the historical behavior).
|
|
1300
|
+
*
|
|
1301
|
+
* Packing: `[curveCount, (bufLen, curveData…)·curveCount]` where curveData
|
|
1302
|
+
* is the standard NURBS curve encoding (same multi-curve packing as
|
|
1303
|
+
* `brep_face_iso_curves_trimmed`). Returns an empty buffer on malformed
|
|
1304
|
+
* input.
|
|
1305
|
+
*/
|
|
1306
|
+
export function nurbs_curve_split_at_params(curve_data: Float64Array, params: Float64Array, closed_hint: number): Float64Array;
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Find all isolated intersections of a NURBS curve with a NURBS surface,
|
|
1310
|
+
* with exact parameters.
|
|
1311
|
+
*
|
|
1312
|
+
* `curve_data` is the standard NURBS curve encoding; `surface_data` is the
|
|
1313
|
+
* standard NURBS surface encoding `[degree_u, degree_v, num_u, num_v,
|
|
1314
|
+
* cp(flat)..., weights..., knots_u..., knots_v...]` (same as
|
|
1315
|
+
* `nurbs_surface_evaluate`).
|
|
1316
|
+
*
|
|
1317
|
+
* Packing: `[count, (x, y, z, t, u, v)·count]`. All parameters are
|
|
1318
|
+
* normalized to [0, 1]; results are sorted by `t`. Curve segments lying ON
|
|
1319
|
+
* the surface (coincident runs) yield no points. Returns an empty buffer on
|
|
1320
|
+
* malformed input.
|
|
1321
|
+
*/
|
|
1322
|
+
export function nurbs_curve_surface_intersect_exact(curve_data: Float64Array, surface_data: Float64Array): Float64Array;
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* Closest point on the surface to (x, y, z).
|
|
1326
|
+
* Returns [u, v, px, py, pz] with u, v normalized to [0,1].
|
|
1327
|
+
*/
|
|
1328
|
+
export function nurbs_surface_closest_point(data: Float64Array, x: number, y: number, z: number): Float64Array;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Surface curvature at normalized (u, v): [k1, k2, gaussian, mean, nx, ny, nz].
|
|
1332
|
+
*/
|
|
1333
|
+
export function nurbs_surface_curvature(data: Float64Array, u: number, v: number): Float64Array;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Analytic surface derivatives at normalized (u, v) in [0,1]².
|
|
1337
|
+
* Returns 18 floats: [S, Su, Sv, Suu, Suv, Svv] (xyz each), derivatives taken
|
|
1338
|
+
* with respect to the NORMALIZED parameters (chain rule applied).
|
|
1339
|
+
*/
|
|
1340
|
+
export function nurbs_surface_derivatives(data: Float64Array, u: number, v: number): Float64Array;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Exact degree elevation by `t` in one direction.
|
|
1344
|
+
*/
|
|
1345
|
+
export function nurbs_surface_elevate_degree(data: Float64Array, u_dir: boolean, t: number): Float64Array;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Evaluate a NURBS surface at normalized parameters (u, v) in [0,1].
|
|
1349
|
+
* Returns [x, y, z]
|
|
1350
|
+
*/
|
|
1351
|
+
export function nurbs_surface_evaluate(data: Float64Array, u: number, v: number): Float64Array;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* Exact sub-patch extraction over normalized ranges.
|
|
1355
|
+
*/
|
|
1356
|
+
export function nurbs_surface_extract_region(data: Float64Array, u0: number, u1: number, v0: number, v1: number): Float64Array;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Exact extruded (translational) surface from a profile curve.
|
|
1360
|
+
*/
|
|
1361
|
+
export function nurbs_surface_extrude(curve_data: Float64Array, dx: number, dy: number, dz: number): Float64Array;
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Exact knot insertion at normalized parameter t (repeated `times`).
|
|
1365
|
+
* Returns the refined surface in standard surface format.
|
|
1366
|
+
*/
|
|
1367
|
+
export function nurbs_surface_insert_knot(data: Float64Array, u_dir: boolean, t: number, times: number): Float64Array;
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Exact rational iso-parametric curve. `u_dir = true` extracts the curve
|
|
1371
|
+
* running along u at constant v = t; false extracts along v at constant u = t.
|
|
1372
|
+
* t is normalized [0,1]. Returns curve data [degree, n, pts..., w..., knots...].
|
|
1373
|
+
*/
|
|
1374
|
+
export function nurbs_surface_iso_curve(data: Float64Array, t: number, u_dir: boolean): Float64Array;
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Evaluate a NURBS surface unit normal at normalized parameters (u, v) in [0,1].
|
|
1378
|
+
* Returns [x, y, z]
|
|
1379
|
+
*/
|
|
1380
|
+
export function nurbs_surface_normal(data: Float64Array, u: number, v: number): Float64Array;
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Offset a NURBS surface by `distance` along its normal field, refit to
|
|
1384
|
+
* `tolerance`. Input/output use the standard surface buffer format.
|
|
1385
|
+
* Returns an empty buffer on failure (see `geometry_last_error`).
|
|
1386
|
+
*/
|
|
1387
|
+
export function nurbs_surface_offset(data: Float64Array, distance: number, tolerance: number): Float64Array;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* Intersect a NURBS surface with a plane.
|
|
1391
|
+
* Input: same surface format as tessellate_nurbs_surface, then plane (nx,ny,nz,d) appended.
|
|
1392
|
+
* Returns polyline buffer: [num_polylines, n1, x,y,z,..., n2, x,y,z,...]
|
|
1393
|
+
*/
|
|
1394
|
+
export function nurbs_surface_plane_intersect(surface_data: Float64Array, nx: number, ny: number, nz: number, d: number, tess: number): Float64Array;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Exact rational primitive surfaces.
|
|
1398
|
+
* kind: "cylinder" [bx,by,bz, ax,ay,az, radius, height]
|
|
1399
|
+
* "sphere" [cx,cy,cz, radius]
|
|
1400
|
+
* "cone" [bx,by,bz, ax,ay,az, radius0, radius1, height]
|
|
1401
|
+
* "torus" [cx,cy,cz, major, minor]
|
|
1402
|
+
*/
|
|
1403
|
+
export function nurbs_surface_primitive(kind: string, params: Float64Array): Float64Array;
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Rebuild a NURBS surface with the given degrees and control counts via the
|
|
1407
|
+
* two-stage least-squares scheme. Closed directions stay closed (periodic
|
|
1408
|
+
* basis); poles stay exactly degenerate; output is non-rational. Input uses
|
|
1409
|
+
* the standard surface buffer format; output prepends the fit report:
|
|
1410
|
+
* [maxDeviation, avgDeviation, ...surface buffer]. Returns an empty buffer
|
|
1411
|
+
* on failure (see `geometry_last_error`).
|
|
1412
|
+
*/
|
|
1413
|
+
export function nurbs_surface_rebuild(data: Float64Array, degree_u: number, degree_v: number, count_u: number, count_v: number): Float64Array;
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* Exact surface of revolution from a profile curve (A8.1).
|
|
1417
|
+
*/
|
|
1418
|
+
export function nurbs_surface_revolve(curve_data: Float64Array, ox: number, oy: number, oz: number, ax: number, ay: number, az: number, angle: number): Float64Array;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Exact ruled surface between two curves (auto degree/knot compatibility).
|
|
1422
|
+
*/
|
|
1423
|
+
export function nurbs_surface_ruled(curve_a: Float64Array, curve_b: Float64Array): Float64Array;
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Exact split at normalized parameter t. Returns [lenA, surfaceA..., lenB, surfaceB...].
|
|
1427
|
+
*/
|
|
1428
|
+
export function nurbs_surface_split(data: Float64Array, u_dir: boolean, t: number): Float64Array;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* Intersect two NURBS surfaces.
|
|
1432
|
+
* Returns polyline buffer.
|
|
1433
|
+
*/
|
|
1434
|
+
export function nurbs_surface_surface_intersect(data_a: Float64Array, data_b: Float64Array, tess: number): Float64Array;
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* EXACT intersection curves of two FULL (untrimmed) NURBS surfaces: the
|
|
1438
|
+
* parametric boolean's SSI pipeline (seeded tri-tri, chaining, tangent-plane
|
|
1439
|
+
* relaxation) fitted to tolerance-verified interpolating NURBS curves —
|
|
1440
|
+
* unlike `nurbs_surface_surface_intersect`, which returns tessellated
|
|
1441
|
+
* polylines.
|
|
1442
|
+
*
|
|
1443
|
+
* Inputs are standard NURBS surface encodings; `tolerance` is absolute
|
|
1444
|
+
* (floored relative to the combined model scale kernel-side). Closed loops
|
|
1445
|
+
* come back as ONE closed curve; coincident (overlapping) surfaces yield no
|
|
1446
|
+
* curves (their overlap is a 2D region).
|
|
1447
|
+
*
|
|
1448
|
+
* Packing: `[curveCount, (bufLen, curveData…)·curveCount]` where curveData
|
|
1449
|
+
* is the standard NURBS curve encoding. Returns an empty buffer on
|
|
1450
|
+
* malformed input.
|
|
1451
|
+
*/
|
|
1452
|
+
export function nurbs_surface_surface_intersect_curves(surf_a_data: Float64Array, surf_b_data: Float64Array, tolerance: number): Float64Array;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* Curvature-adaptive tessellation against a chordal tolerance.
|
|
1456
|
+
* Returns the standard mesh buffer [vertexCount, positions..., indices...].
|
|
1457
|
+
*/
|
|
1458
|
+
export function nurbs_surface_tessellate_adaptive(data: Float64Array, tolerance: number, max_segments_per_span: number): Float64Array;
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* Display-ready render tessellation: twist-aware adaptive grid with ANALYTIC
|
|
1462
|
+
* surface normals, plus feature edges only where the surface really has them
|
|
1463
|
+
* (boundaries, kinked C0 knot lines, kinked closed seams).
|
|
1464
|
+
* Output (f32, same packing as `mesh_build_render_buffers`):
|
|
1465
|
+
* [vertexCount, positions..., normals..., edgeSegmentCount, edgeSegments...]
|
|
1466
|
+
*/
|
|
1467
|
+
export function nurbs_surface_tessellate_render(data: Float64Array, tolerance: number, max_segments_per_span: number, crease_angle_deg: number): Float32Array;
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Offset a polycurve made of line and arc segments.
|
|
1471
|
+
* Input format: [segment_count, type, ...data, ...]
|
|
1472
|
+
* type 0 = Line: [sx,sy,sz, ex,ey,ez]
|
|
1473
|
+
* type 1 = Arc: [cx,cy,cz, nx,ny,nz, radius, start_angle, end_angle]
|
|
1474
|
+
* Output uses the same encoded segment format.
|
|
1475
|
+
*/
|
|
1476
|
+
export function offset_polycurve(segment_data: Float64Array, distance: number, nx: number, ny: number, nz: number, join_style_code: number): Float64Array;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Offset a polycurve and return every exact result curve.
|
|
1480
|
+
* Output format: [curve_count, curve_len, curve_data..., curve_len, curve_data..., ...]
|
|
1481
|
+
*/
|
|
1482
|
+
export function offset_polycurve_all(segment_data: Float64Array, distance: number, nx: number, ny: number, nz: number, join_style_code: number): Float64Array;
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* Offset a polyline by a distance in a given plane.
|
|
1486
|
+
* If nx=ny=nz=0, the plane normal is auto-detected.
|
|
1487
|
+
* Returns flat [x1,y1,z1, x2,y2,z2, ...] of the offset polyline.
|
|
1488
|
+
*/
|
|
1489
|
+
export function offset_polyline_curve(coords: Float64Array, distance: number, nx: number, ny: number, nz: number): Float64Array;
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* Convert a polycurve (Line/Arc segments) to an exact NURBS curve.
|
|
1493
|
+
* Input format: [segment_count, type1, ...data1..., type2, ...data2..., ...]
|
|
1494
|
+
* type 0 = Line (6 floats: start_xyz, end_xyz)
|
|
1495
|
+
* type 1 = Arc (9 floats: center_xyz, normal_xyz, radius, start_angle, end_angle)
|
|
1496
|
+
* Output format: [degree, num_cp, cp_x1,y1,z1,..., w1,w2,..., k1,k2,...]
|
|
1497
|
+
*/
|
|
1498
|
+
export function polycurve_to_nurbs(segment_data: Float64Array): Float64Array;
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Get the total length of a polyline.
|
|
1502
|
+
* Input: flat coords [x1,y1,z1, x2,y2,z2, ...]
|
|
1503
|
+
*/
|
|
1504
|
+
export function polyline_length(coords: Float64Array): number;
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* Evaluate a point on a polyline at parameter t ∈ [0,1].
|
|
1508
|
+
* Input: flat coords [x1,y1,z1, x2,y2,z2, ...]
|
|
1509
|
+
* Returns [x, y, z].
|
|
1510
|
+
*/
|
|
1511
|
+
export function polyline_point_at(coords: Float64Array, t: number): Float64Array;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Find the closest point on a ray to a given point.
|
|
1515
|
+
* Returns [x, y, z] of the closest point on the ray.
|
|
1516
|
+
*/
|
|
1517
|
+
export function ray_closest_point(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, px: number, py: number, pz: number): Float64Array;
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Find the parameter t for the closest point on a ray to a given point.
|
|
1521
|
+
* The closest point is at: origin + t * direction
|
|
1522
|
+
* Note: t can be negative if the closest point is "behind" the ray origin.
|
|
1523
|
+
*/
|
|
1524
|
+
export function ray_closest_point_parameter(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, px: number, py: number, pz: number): number;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Compute the distance from a ray to a point.
|
|
1528
|
+
* Ray is defined by origin (ox, oy, oz) and direction (dx, dy, dz).
|
|
1529
|
+
* Direction should be normalized for accurate distance.
|
|
1530
|
+
* Returns the perpendicular distance from the ray to the point.
|
|
1531
|
+
*/
|
|
1532
|
+
export function ray_distance_to_point(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, px: number, py: number, pz: number): number;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Get a point along the ray at parameter t.
|
|
1536
|
+
* Returns [x, y, z] = origin + t * direction
|
|
1537
|
+
*/
|
|
1538
|
+
export function ray_point_at(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, t: number): Float64Array;
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Sample a NURBS curve.
|
|
1542
|
+
* Input: degree, then flat control points [x,y,z,...], then flat weights, then flat knots
|
|
1543
|
+
* Format: [degree, num_pts, x0,y0,z0, ..., w0,w1,..., k0,k1,...]
|
|
1544
|
+
*/
|
|
1545
|
+
export function sample_nurbs_curve(data: Float64Array, samples: number): Float64Array;
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Begin a stroke. `brush` and `falloff` are stable enum codes
|
|
1549
|
+
* (see okgeometry-api SculptBrush / SculptFalloff). Flags: bit 0 = invert,
|
|
1550
|
+
* bit 1 = front faces only. `symmetry`: bit 0 = X, bit 1 = Y, bit 2 = Z.
|
|
1551
|
+
*/
|
|
1552
|
+
export function sculpt_session_begin_stroke(id: number, brush: number, radius: number, strength: number, falloff: number, flags: number, plane_offset: number, symmetry: number): number;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Create a sculpt session from a standard mesh buffer
|
|
1556
|
+
* `[vertexCount, x,y,z..., i0,i1,i2...]`. Returns the session id, or 0 on
|
|
1557
|
+
* invalid input.
|
|
1558
|
+
*/
|
|
1559
|
+
export function sculpt_session_create(vertex_count: number, buffer: Float64Array): number;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Apply one dab. Returns the render patch `[index, x,y,z, nx,ny,nz]` per
|
|
1563
|
+
* changed vertex (f32), empty when nothing changed.
|
|
1564
|
+
*/
|
|
1565
|
+
export function sculpt_session_dab(id: number, cx: number, cy: number, cz: number, vx: number, vy: number, vz: number, dragx: number, dragy: number, dragz: number, pressure: number): Float32Array;
|
|
1566
|
+
|
|
1567
|
+
/**
|
|
1568
|
+
* Locally REDUCE point density in the given triangle group (constrained
|
|
1569
|
+
* edge collapse of interior vertices; the group boundary is preserved)
|
|
1570
|
+
* until the group has at most `target_points` unique vertices or no safe
|
|
1571
|
+
* collapse remains. Returns 1 when at least one collapse happened, 0
|
|
1572
|
+
* otherwise. Clears session undo history; callers must refetch
|
|
1573
|
+
* `sculpt_session_render_data` afterwards.
|
|
1574
|
+
*/
|
|
1575
|
+
export function sculpt_session_decimate_faces(id: number, triangles: Uint32Array, target_points: number): number;
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* Finish the active stroke (pushes one undo entry).
|
|
1579
|
+
*/
|
|
1580
|
+
export function sculpt_session_end_stroke(id: number): void;
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* Smooth face group around a seed triangle (dihedral flood fill, same
|
|
1584
|
+
* semantics as the mesh-level query push-pull uses). Returns the group's
|
|
1585
|
+
* triangle indices; empty when the session/seed is invalid.
|
|
1586
|
+
*/
|
|
1587
|
+
export function sculpt_session_face_group(id: number, seed_triangle: number, max_angle_deg: number): Uint32Array;
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Session stats: `[vertexCount, triangleCount, averageEdgeLength, undoDepth,
|
|
1591
|
+
* redoDepth]`; empty if the session does not exist.
|
|
1592
|
+
*/
|
|
1593
|
+
export function sculpt_session_info(id: number): Float64Array;
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Fill the sculpt mask with one value (0 clears). Undoable; returns the
|
|
1597
|
+
* render patch (stride 8) of changed vertices.
|
|
1598
|
+
*/
|
|
1599
|
+
export function sculpt_session_mask_fill(id: number, value: number): Float32Array;
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* Invert the sculpt mask. Undoable; returns the render patch (stride 8).
|
|
1603
|
+
*/
|
|
1604
|
+
export function sculpt_session_mask_invert(id: number): Float32Array;
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* Current mesh as a standard f64 buffer (for committing back to a document).
|
|
1608
|
+
*/
|
|
1609
|
+
export function sculpt_session_mesh_buffer(id: number): Float64Array;
|
|
1610
|
+
|
|
1611
|
+
/**
|
|
1612
|
+
* Raycast the CURRENT (deforming) surface. Returns
|
|
1613
|
+
* `[px,py,pz, nx,ny,nz, distance, triangleIndex]` or empty on miss.
|
|
1614
|
+
*/
|
|
1615
|
+
export function sculpt_session_raycast(id: number, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number): Float64Array;
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* Redo the last undone stroke. Same contract as `sculpt_session_undo`.
|
|
1619
|
+
*/
|
|
1620
|
+
export function sculpt_session_redo(id: number): Float32Array;
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Release a sculpt session and free its memory.
|
|
1624
|
+
*/
|
|
1625
|
+
export function sculpt_session_release(id: number): void;
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Full render snapshot as f32:
|
|
1629
|
+
* `[vertexCount, triangleCount, positions..., normals..., mask..., indices...]`.
|
|
1630
|
+
*/
|
|
1631
|
+
export function sculpt_session_render_data(id: number): Float32Array;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* Uniform 1:4 shape-preserving subdivision (adds sculptable detail).
|
|
1635
|
+
* Clears session undo history. Returns 1 on success, 0 when refused
|
|
1636
|
+
* (session missing or the result would exceed the safety cap). Callers must
|
|
1637
|
+
* refetch `sculpt_session_render_data` afterwards.
|
|
1638
|
+
*/
|
|
1639
|
+
export function sculpt_session_subdivide(id: number): number;
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* Locally refine the given triangles 1:4 with crack-free conforming
|
|
1643
|
+
* neighbor splits (red-green refinement). Returns 1 on success, 0 when
|
|
1644
|
+
* refused (bad input or safety cap). Clears session undo history; callers
|
|
1645
|
+
* must refetch `sculpt_session_render_data` afterwards.
|
|
1646
|
+
*/
|
|
1647
|
+
export function sculpt_session_subdivide_faces(id: number, triangles: Uint32Array): number;
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* Undo the last stroke. Returns the render patch restoring the previous
|
|
1651
|
+
* positions; empty when there is nothing to undo.
|
|
1652
|
+
*/
|
|
1653
|
+
export function sculpt_session_undo(id: number): Float32Array;
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* Sweep a profile curve along a path curve using exact curve evaluation.
|
|
1657
|
+
* profile_data/path_data: encoded curve (see decode_curve)
|
|
1658
|
+
* Returns mesh buffers.
|
|
1659
|
+
*/
|
|
1660
|
+
export function sweep_curves(profile_data: Float64Array, path_data: Float64Array, profile_segments: number, path_segments: number, with_caps: boolean): Float64Array;
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* Sweep a profile polyline along a path polyline.
|
|
1664
|
+
* profile_coords: flat [x,y,z,...] for profile curve
|
|
1665
|
+
* path_coords: flat [x,y,z,...] for path curve
|
|
1666
|
+
* with_caps: whether to close the ends
|
|
1667
|
+
* Returns mesh buffers.
|
|
1668
|
+
*/
|
|
1669
|
+
export function sweep_polylines(profile_coords: Float64Array, path_coords: Float64Array, with_caps: boolean): Float64Array;
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Tessellate a NURBS surface to a mesh buffer.
|
|
1673
|
+
* Input format: [degree_u, degree_v, num_u, num_v, ...control_points(flat)..., ...weights(flat)..., ...knots_u..., ...knots_v..., u_segs, v_segs]
|
|
1674
|
+
*/
|
|
1675
|
+
export function tessellate_nurbs_surface(data: Float64Array): Float64Array;
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* Simple test function to verify WASM is working
|
|
1679
|
+
*/
|
|
1680
|
+
export function test_wasm(): string;
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Thicken an open polycurve into a single closed loop.
|
|
1684
|
+
* Input format: [segment_count, type, ...data, ...]
|
|
1685
|
+
* type 0 = Line: [sx,sy,sz, ex,ey,ez]
|
|
1686
|
+
* type 1 = Arc: [cx,cy,cz, nx,ny,nz, radius, start_angle, end_angle]
|
|
1687
|
+
* Output uses the same encoded segment format.
|
|
1688
|
+
*/
|
|
1689
|
+
export function thicken_polycurve(segment_data: Float64Array, distance: number, both_sides: boolean, nx: number, ny: number, nz: number, join_style_code: number): Float64Array;
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* Get version info
|
|
1693
|
+
*/
|
|
1694
|
+
export function version(): string;
|
|
1695
|
+
|
|
1696
|
+
export class wbg_rayon_PoolBuilder {
|
|
1697
|
+
private constructor();
|
|
1698
|
+
free(): void;
|
|
1699
|
+
[Symbol.dispose](): void;
|
|
1700
|
+
build(): void;
|
|
1701
|
+
numThreads(): number;
|
|
1702
|
+
receiver(): number;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
export function wbg_rayon_start_worker(receiver: number): void;
|
|
1706
|
+
|
|
1707
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1708
|
+
|
|
1709
|
+
export interface InitOutput {
|
|
1710
|
+
readonly arc_length: (a: number, b: number, c: number) => number;
|
|
1711
|
+
readonly arc_point_at: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1712
|
+
readonly brep_boolean_op: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1713
|
+
readonly brep_clip_curve_op: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1714
|
+
readonly brep_closest_face: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1715
|
+
readonly brep_curve_intersection_op: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1716
|
+
readonly brep_edges: (a: number, b: number, c: number) => [number, number];
|
|
1717
|
+
readonly brep_extract_face: (a: number, b: number, c: number) => [number, number];
|
|
1718
|
+
readonly brep_extract_faces: (a: number, b: number) => [number, number];
|
|
1719
|
+
readonly brep_extrude_curve: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1720
|
+
readonly brep_face_closest_uv: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1721
|
+
readonly brep_face_iso_curve: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1722
|
+
readonly brep_face_iso_curves_trimmed: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1723
|
+
readonly brep_face_iso_curves_trimmed_normalized: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1724
|
+
readonly brep_face_surface: (a: number, b: number, c: number) => [number, number];
|
|
1725
|
+
readonly brep_face_surface_cropped: (a: number, b: number, c: number) => [number, number];
|
|
1726
|
+
readonly brep_face_surfaces_cropped: (a: number, b: number) => [number, number];
|
|
1727
|
+
readonly brep_face_tessellate: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1728
|
+
readonly brep_face_trim_bounds: (a: number, b: number, c: number) => [number, number];
|
|
1729
|
+
readonly brep_from_mesh_buffer: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1730
|
+
readonly brep_info: (a: number, b: number) => [number, number];
|
|
1731
|
+
readonly brep_intersection_curves_joined_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1732
|
+
readonly brep_intersection_curves_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1733
|
+
readonly brep_loft_curves: (a: number, b: number) => [number, number];
|
|
1734
|
+
readonly brep_mesh_intersection_curves_op: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1735
|
+
readonly brep_primitive: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1736
|
+
readonly brep_rebuild_surfaces: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1737
|
+
readonly brep_revolve_curve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1738
|
+
readonly brep_sheet_from_surface: (a: number, b: number) => [number, number];
|
|
1739
|
+
readonly brep_split_sheet_by_sheet_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1740
|
+
readonly brep_split_sheet_by_solid_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1741
|
+
readonly brep_split_solid_by_sheet_op: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1742
|
+
readonly brep_tessellate: (a: number, b: number, c: number) => [number, number];
|
|
1743
|
+
readonly brep_tessellate_with_face_ranges: (a: number, b: number, c: number) => [number, number];
|
|
1744
|
+
readonly brep_transform: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1745
|
+
readonly brep_validate: (a: number, b: number, c: number) => [number, number];
|
|
1746
|
+
readonly brep_volume_area: (a: number, b: number, c: number) => [number, number];
|
|
1747
|
+
readonly brep_wireframe_curves: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1748
|
+
readonly build_nurbs_curve: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1749
|
+
readonly chamfer_polycurve: (a: number, b: number, c: number) => [number, number];
|
|
1750
|
+
readonly chamfer_polyline_corners: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1751
|
+
readonly circle_length: (a: number) => number;
|
|
1752
|
+
readonly circle_point_at: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1753
|
+
readonly create_arc: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1754
|
+
readonly create_circle: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1755
|
+
readonly create_line: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1756
|
+
readonly create_polyline: (a: number, b: number, c: number) => [number, number];
|
|
1757
|
+
readonly curve_region_boolean: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1758
|
+
readonly curve_region_split: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1759
|
+
readonly curve_to_points: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1760
|
+
readonly evaluate_nurbs_curve_at: (a: number, b: number, c: number) => [number, number];
|
|
1761
|
+
readonly extrude_circle: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number];
|
|
1762
|
+
readonly extrude_line: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1763
|
+
readonly extrude_polyline: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1764
|
+
readonly fillet_polycurve: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1765
|
+
readonly geometry_last_error: () => [number, number];
|
|
1766
|
+
readonly line_length: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
1767
|
+
readonly line_offset: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1768
|
+
readonly line_point_at: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1769
|
+
readonly line_tangent: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1770
|
+
readonly loft_circles: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1771
|
+
readonly loft_nurbs_surface: (a: number, b: number) => [number, number];
|
|
1772
|
+
readonly loft_polylines: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1773
|
+
readonly loft_profiles: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1774
|
+
readonly make_nurbs_curves_compatible: (a: number, b: number) => [number, number];
|
|
1775
|
+
readonly mesh_apply_matrix: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1776
|
+
readonly mesh_boolean_difference_all: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1777
|
+
readonly mesh_boolean_intersection: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1778
|
+
readonly mesh_boolean_kernel_mesh_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1779
|
+
readonly mesh_boolean_last_debug_marker: () => number;
|
|
1780
|
+
readonly mesh_boolean_manifold_port_cleanup_triangle_dump: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1781
|
+
readonly mesh_boolean_manifold_port_face2tri_face_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1782
|
+
readonly mesh_boolean_manifold_port_face2tri_face_transform_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number];
|
|
1783
|
+
readonly mesh_boolean_manifold_port_final_triangle_dump: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1784
|
+
readonly mesh_boolean_manifold_port_flag_edge_attempts_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1785
|
+
readonly mesh_boolean_manifold_port_intersections_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1786
|
+
readonly mesh_boolean_manifold_port_new_edge_bucket_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1787
|
+
readonly mesh_boolean_manifold_port_overlap_boxes_cleanup_triangle_dump: (a: number, b: number) => [number, number];
|
|
1788
|
+
readonly mesh_boolean_manifold_port_overlap_boxes_face2tri_face_debug: (a: number) => [number, number];
|
|
1789
|
+
readonly mesh_boolean_manifold_port_raw_face_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1790
|
+
readonly mesh_boolean_manifold_port_short_edge_attempts_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1791
|
+
readonly mesh_boolean_manifold_port_single_swap_triangle_dump: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1792
|
+
readonly mesh_boolean_manifold_port_stage_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1793
|
+
readonly mesh_boolean_manifold_port_swappable_edges_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1794
|
+
readonly mesh_boolean_manifold_port_triangulated_triangle_dump: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1795
|
+
readonly mesh_boolean_operation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1796
|
+
readonly mesh_boolean_operation_debug: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1797
|
+
readonly mesh_boolean_port_triangle_dump: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1798
|
+
readonly mesh_boolean_split: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1799
|
+
readonly mesh_boolean_subtraction: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1800
|
+
readonly mesh_boolean_union: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1801
|
+
readonly mesh_boolean_union_all: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1802
|
+
readonly mesh_boundary_edge_segments: (a: number, b: number, c: number) => [number, number];
|
|
1803
|
+
readonly mesh_boundary_edge_segments_h: (a: number) => [number, number];
|
|
1804
|
+
readonly mesh_boundary_polylines: (a: number, b: number, c: number) => [number, number];
|
|
1805
|
+
readonly mesh_build_coplanar_connected_face_groups: (a: number, b: number, c: number) => [number, number];
|
|
1806
|
+
readonly mesh_build_render_buffers: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1807
|
+
readonly mesh_build_render_buffers_h: (a: number, b: number) => [number, number];
|
|
1808
|
+
readonly mesh_chamfer_all_edges: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1809
|
+
readonly mesh_chamfer_edges: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1810
|
+
readonly mesh_clip_polyline: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1811
|
+
readonly mesh_clip_polyline_by_sheet: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1812
|
+
readonly mesh_compute_planar_curve_normal: (a: number, b: number, c: number) => [number, number];
|
|
1813
|
+
readonly mesh_contains_point: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
1814
|
+
readonly mesh_create_box: (a: number, b: number, c: number) => [number, number];
|
|
1815
|
+
readonly mesh_create_cone: (a: number, b: number, c: number) => [number, number];
|
|
1816
|
+
readonly mesh_create_cylinder: (a: number, b: number, c: number) => [number, number];
|
|
1817
|
+
readonly mesh_create_prism: (a: number, b: number, c: number) => [number, number];
|
|
1818
|
+
readonly mesh_create_sphere: (a: number, b: number, c: number) => [number, number];
|
|
1819
|
+
readonly mesh_evaluate: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1820
|
+
readonly mesh_export_obj: (a: number, b: number, c: number) => [number, number];
|
|
1821
|
+
readonly mesh_export_stl_ascii: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1822
|
+
readonly mesh_export_stl_binary: (a: number, b: number, c: number) => [number, number];
|
|
1823
|
+
readonly mesh_extrude_face: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1824
|
+
readonly mesh_extrude_planar_curve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1825
|
+
readonly mesh_feature_edge_chains: (a: number, b: number, c: number) => [number, number];
|
|
1826
|
+
readonly mesh_feature_edge_chains_h: (a: number) => [number, number];
|
|
1827
|
+
readonly mesh_find_face_group_by_normal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1828
|
+
readonly mesh_find_face_group_by_normal_h: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1829
|
+
readonly mesh_find_face_group_by_triangle_index: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1830
|
+
readonly mesh_find_face_group_by_triangle_index_h: (a: number, b: number) => [number, number];
|
|
1831
|
+
readonly mesh_get_bounds: (a: number, b: number, c: number) => [number, number];
|
|
1832
|
+
readonly mesh_get_coplanar_face_group_centroid: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1833
|
+
readonly mesh_get_coplanar_face_group_centroid_h: (a: number, b: number) => [number, number];
|
|
1834
|
+
readonly mesh_get_coplanar_face_indices: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1835
|
+
readonly mesh_get_coplanar_face_indices_h: (a: number, b: number) => [number, number];
|
|
1836
|
+
readonly mesh_get_coplanar_face_region: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => [number, number];
|
|
1837
|
+
readonly mesh_get_edge_vertex_pairs: (a: number, b: number, c: number) => [number, number];
|
|
1838
|
+
readonly mesh_get_edge_vertex_pairs_h: (a: number) => [number, number];
|
|
1839
|
+
readonly mesh_get_face_area: (a: number, b: number, c: number, d: number) => number;
|
|
1840
|
+
readonly mesh_get_face_boundary_loops: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1841
|
+
readonly mesh_get_face_boundary_loops_h: (a: number, b: number) => [number, number];
|
|
1842
|
+
readonly mesh_get_face_centroid: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1843
|
+
readonly mesh_get_face_normal: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1844
|
+
readonly mesh_get_smooth_face_group: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1845
|
+
readonly mesh_get_smooth_face_group_h: (a: number, b: number, c: number) => [number, number];
|
|
1846
|
+
readonly mesh_get_stats: (a: number, b: number, c: number) => [number, number];
|
|
1847
|
+
readonly mesh_import_obj: (a: number, b: number) => [number, number];
|
|
1848
|
+
readonly mesh_import_stl: (a: number, b: number, c: number) => [number, number];
|
|
1849
|
+
readonly mesh_is_closed_volume: (a: number, b: number, c: number) => number;
|
|
1850
|
+
readonly mesh_make_watertight: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1851
|
+
readonly mesh_manifold_port_import_roundtrip_debug: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1852
|
+
readonly mesh_manifold_port_import_stage_hashes_debug: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1853
|
+
readonly mesh_manifold_port_triangulate_projected_polygon_debug: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1854
|
+
readonly mesh_merge: (a: number, b: number) => [number, number];
|
|
1855
|
+
readonly mesh_mesh_intersect: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1856
|
+
readonly mesh_patch_from_points: (a: number, b: number) => [number, number];
|
|
1857
|
+
readonly mesh_planar_face_evaluate: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1858
|
+
readonly mesh_plane_intersect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1859
|
+
readonly mesh_polyline_intersection_points: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1860
|
+
readonly mesh_prepare_boolean_cutter_curve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1861
|
+
readonly mesh_prepare_hosted_boolean_cutter: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1862
|
+
readonly mesh_raycast: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1863
|
+
readonly mesh_raycast_all: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
1864
|
+
readonly mesh_raycast_all_h: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1865
|
+
readonly mesh_raycast_h: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1866
|
+
readonly mesh_raycast_many: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1867
|
+
readonly mesh_repair: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1868
|
+
readonly mesh_repair_diagnostics: (a: number, b: number, c: number) => [number, number];
|
|
1869
|
+
readonly mesh_repair_diagnostics_h: (a: number) => [number, number];
|
|
1870
|
+
readonly mesh_rotate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1871
|
+
readonly mesh_scale: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1872
|
+
readonly mesh_sheet_union: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1873
|
+
readonly mesh_solid_split_by_surface: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1874
|
+
readonly mesh_solid_split_plane: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1875
|
+
readonly mesh_split_by_surface_to_brep: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1876
|
+
readonly mesh_split_polyline: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1877
|
+
readonly mesh_store: (a: number, b: number, c: number) => number;
|
|
1878
|
+
readonly mesh_store_bytes: () => number;
|
|
1879
|
+
readonly mesh_store_free: (a: number) => void;
|
|
1880
|
+
readonly mesh_surface_difference_all: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1881
|
+
readonly mesh_surface_split: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1882
|
+
readonly mesh_surface_split_plane: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1883
|
+
readonly mesh_topology_metrics: (a: number, b: number, c: number) => [number, number];
|
|
1884
|
+
readonly mesh_topology_metrics_raw: (a: number, b: number, c: number) => [number, number];
|
|
1885
|
+
readonly mesh_translate: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1886
|
+
readonly mesh_voxel_remesh: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1887
|
+
readonly nurbs_curve_curve_intersect: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1888
|
+
readonly nurbs_curve_curve_intersect_params: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1889
|
+
readonly nurbs_curve_offset: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1890
|
+
readonly nurbs_curve_plane_intersect: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1891
|
+
readonly nurbs_curve_rebuild: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1892
|
+
readonly nurbs_curve_split_at_params: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1893
|
+
readonly nurbs_curve_surface_intersect_exact: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1894
|
+
readonly nurbs_surface_closest_point: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1895
|
+
readonly nurbs_surface_curvature: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1896
|
+
readonly nurbs_surface_derivatives: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1897
|
+
readonly nurbs_surface_elevate_degree: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1898
|
+
readonly nurbs_surface_evaluate: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1899
|
+
readonly nurbs_surface_extract_region: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1900
|
+
readonly nurbs_surface_extrude: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1901
|
+
readonly nurbs_surface_insert_knot: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1902
|
+
readonly nurbs_surface_iso_curve: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1903
|
+
readonly nurbs_surface_normal: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1904
|
+
readonly nurbs_surface_offset: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1905
|
+
readonly nurbs_surface_plane_intersect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1906
|
+
readonly nurbs_surface_primitive: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1907
|
+
readonly nurbs_surface_rebuild: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1908
|
+
readonly nurbs_surface_revolve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1909
|
+
readonly nurbs_surface_ruled: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1910
|
+
readonly nurbs_surface_split: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1911
|
+
readonly nurbs_surface_surface_intersect: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1912
|
+
readonly nurbs_surface_surface_intersect_curves: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1913
|
+
readonly nurbs_surface_tessellate_adaptive: (a: number, b: number, c: number, d: number) => [number, number];
|
|
1914
|
+
readonly nurbs_surface_tessellate_render: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1915
|
+
readonly offset_polycurve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1916
|
+
readonly offset_polycurve_all: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1917
|
+
readonly offset_polyline_curve: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
1918
|
+
readonly polycurve_to_nurbs: (a: number, b: number) => [number, number];
|
|
1919
|
+
readonly polyline_length: (a: number, b: number) => number;
|
|
1920
|
+
readonly polyline_point_at: (a: number, b: number, c: number) => [number, number];
|
|
1921
|
+
readonly ray_closest_point: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
1922
|
+
readonly ray_closest_point_parameter: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
1923
|
+
readonly ray_point_at: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1924
|
+
readonly sample_nurbs_curve: (a: number, b: number, c: number) => [number, number];
|
|
1925
|
+
readonly sculpt_session_begin_stroke: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
1926
|
+
readonly sculpt_session_create: (a: number, b: number, c: number) => number;
|
|
1927
|
+
readonly sculpt_session_dab: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number];
|
|
1928
|
+
readonly sculpt_session_decimate_faces: (a: number, b: number, c: number, d: number) => number;
|
|
1929
|
+
readonly sculpt_session_end_stroke: (a: number) => void;
|
|
1930
|
+
readonly sculpt_session_face_group: (a: number, b: number, c: number) => [number, number];
|
|
1931
|
+
readonly sculpt_session_info: (a: number) => [number, number];
|
|
1932
|
+
readonly sculpt_session_mask_fill: (a: number, b: number) => [number, number];
|
|
1933
|
+
readonly sculpt_session_mask_invert: (a: number) => [number, number];
|
|
1934
|
+
readonly sculpt_session_mesh_buffer: (a: number) => [number, number];
|
|
1935
|
+
readonly sculpt_session_raycast: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1936
|
+
readonly sculpt_session_redo: (a: number) => [number, number];
|
|
1937
|
+
readonly sculpt_session_release: (a: number) => void;
|
|
1938
|
+
readonly sculpt_session_render_data: (a: number) => [number, number];
|
|
1939
|
+
readonly sculpt_session_subdivide: (a: number) => number;
|
|
1940
|
+
readonly sculpt_session_subdivide_faces: (a: number, b: number, c: number) => number;
|
|
1941
|
+
readonly sculpt_session_undo: (a: number) => [number, number];
|
|
1942
|
+
readonly sweep_curves: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
1943
|
+
readonly sweep_polylines: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
1944
|
+
readonly tessellate_nurbs_surface: (a: number, b: number) => [number, number];
|
|
1945
|
+
readonly test_wasm: () => [number, number];
|
|
1946
|
+
readonly thicken_polycurve: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
1947
|
+
readonly version: () => [number, number];
|
|
1948
|
+
readonly ray_distance_to_point: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
1949
|
+
readonly mesh_store_count: () => number;
|
|
1950
|
+
readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
|
|
1951
|
+
readonly initThreadPool: (a: number) => any;
|
|
1952
|
+
readonly wbg_rayon_poolbuilder_build: (a: number) => void;
|
|
1953
|
+
readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number;
|
|
1954
|
+
readonly wbg_rayon_poolbuilder_receiver: (a: number) => number;
|
|
1955
|
+
readonly wbg_rayon_start_worker: (a: number) => void;
|
|
1956
|
+
readonly memory: WebAssembly.Memory;
|
|
1957
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1958
|
+
readonly __externref_table_alloc: () => number;
|
|
1959
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
1960
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1961
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1962
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1963
|
+
readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void;
|
|
1964
|
+
readonly __wbindgen_start: (a: number) => void;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1968
|
+
|
|
1969
|
+
/**
|
|
1970
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1971
|
+
* a precompiled `WebAssembly.Module`.
|
|
1972
|
+
*
|
|
1973
|
+
* @param {{ module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1974
|
+
* @param {WebAssembly.Memory} memory - Deprecated.
|
|
1975
|
+
*
|
|
1976
|
+
* @returns {InitOutput}
|
|
1977
|
+
*/
|
|
1978
|
+
export function initSync(module: { module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number } | SyncInitInput, memory?: WebAssembly.Memory): InitOutput;
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1982
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1983
|
+
*
|
|
1984
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1985
|
+
* @param {WebAssembly.Memory} memory - Deprecated.
|
|
1986
|
+
*
|
|
1987
|
+
* @returns {Promise<InitOutput>}
|
|
1988
|
+
*/
|
|
1989
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number } | InitInput | Promise<InitInput>, memory?: WebAssembly.Memory): Promise<InitOutput>;
|