@bitbybit-dev/manifold 1.2.0 → 1.3.0-rc.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/lib/api/inputs/manifold-inputs.d.ts +521 -224
- package/lib/api/inputs/manifold-inputs.js +380 -135
- package/lib/api/manifold-service.d.ts +37 -11
- package/lib/api/manifold-service.js +37 -11
- package/lib/api/services/cross-section/cross-section-booleans.d.ts +66 -29
- package/lib/api/services/cross-section/cross-section-booleans.js +66 -29
- package/lib/api/services/cross-section/cross-section-evaluate.d.ts +38 -17
- package/lib/api/services/cross-section/cross-section-evaluate.js +38 -17
- package/lib/api/services/cross-section/cross-section-operations.d.ts +73 -33
- package/lib/api/services/cross-section/cross-section-operations.js +73 -33
- package/lib/api/services/cross-section/cross-section-shapes.d.ts +38 -17
- package/lib/api/services/cross-section/cross-section-shapes.js +38 -17
- package/lib/api/services/cross-section/cross-section-transforms.d.ts +64 -29
- package/lib/api/services/cross-section/cross-section-transforms.js +64 -29
- package/lib/api/services/cross-section/cross-section.d.ts +81 -20
- package/lib/api/services/cross-section/cross-section.js +81 -20
- package/lib/api/services/manifold/manifold-booleans.d.ts +139 -43
- package/lib/api/services/manifold/manifold-booleans.js +143 -43
- package/lib/api/services/manifold/manifold-evaluate.d.ts +134 -59
- package/lib/api/services/manifold/manifold-evaluate.js +141 -59
- package/lib/api/services/manifold/manifold-operations.d.ts +195 -108
- package/lib/api/services/manifold/manifold-operations.js +197 -110
- package/lib/api/services/manifold/manifold-shapes.d.ts +64 -26
- package/lib/api/services/manifold/manifold-shapes.js +66 -28
- package/lib/api/services/manifold/manifold-transforms.d.ts +100 -38
- package/lib/api/services/manifold/manifold-transforms.js +100 -38
- package/lib/api/services/manifold/manifold.d.ts +25 -8
- package/lib/api/services/manifold/manifold.js +25 -8
- package/lib/api/services/mesh/mesh-evaluate.d.ts +103 -32
- package/lib/api/services/mesh/mesh-evaluate.js +108 -33
- package/lib/api/services/mesh/mesh-operations.d.ts +12 -15
- package/lib/api/services/mesh/mesh-operations.js +12 -15
- package/lib/api/services/mesh/mesh.d.ts +4 -2
- package/lib/api/services/mesh/mesh.js +4 -2
- package/package.json +3 -3
|
@@ -43,13 +43,17 @@ export var Manifold;
|
|
|
43
43
|
class DecomposedManifoldMeshDto {
|
|
44
44
|
}
|
|
45
45
|
Manifold.DecomposedManifoldMeshDto = DecomposedManifoldMeshDto;
|
|
46
|
+
/**
|
|
47
|
+
* A solid or cross-section and how to draw it, for the renderer packages: face color, opacity and
|
|
48
|
+
* material for a solid, line color and width for a cross-section.
|
|
49
|
+
*/
|
|
46
50
|
class DrawManifoldOrCrossSectionDto {
|
|
47
51
|
/**
|
|
48
52
|
* Provide options without default values
|
|
49
53
|
*/
|
|
50
54
|
constructor(manifoldOrCrossSection, faceOpacity, faceMaterial, faceColour, crossSectionColour, crossSectionWidth, crossSectionOpacity, computeNormals, drawTwoSided, backFaceColour, backFaceOpacity) {
|
|
51
55
|
/**
|
|
52
|
-
*
|
|
56
|
+
* How opaque the faces are, from 0 for invisible to 1 for solid.
|
|
53
57
|
* @default 1
|
|
54
58
|
* @minimum 0
|
|
55
59
|
* @maximum 1
|
|
@@ -57,22 +61,22 @@ export var Manifold;
|
|
|
57
61
|
*/
|
|
58
62
|
this.faceOpacity = 1;
|
|
59
63
|
/**
|
|
60
|
-
*
|
|
64
|
+
* The color of the faces as a hex string such as `#ff0000`.
|
|
61
65
|
* @default #ff0000
|
|
62
66
|
*/
|
|
63
67
|
this.faceColour = "#ff0000";
|
|
64
68
|
/**
|
|
65
|
-
*
|
|
69
|
+
* The color of a cross-section's lines as a hex string.
|
|
66
70
|
* @default #ff00ff
|
|
67
71
|
*/
|
|
68
72
|
this.crossSectionColour = "#ff00ff";
|
|
69
73
|
/**
|
|
70
|
-
*
|
|
74
|
+
* How thick a cross-section's lines are drawn.
|
|
71
75
|
* @default 2
|
|
72
76
|
*/
|
|
73
77
|
this.crossSectionWidth = 2;
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
79
|
+
* How opaque a cross-section's lines are, from 0 to 1.
|
|
76
80
|
* @default 1
|
|
77
81
|
* @minimum 0
|
|
78
82
|
* @maximum 1
|
|
@@ -80,22 +84,23 @@ export var Manifold;
|
|
|
80
84
|
*/
|
|
81
85
|
this.crossSectionOpacity = 1;
|
|
82
86
|
/**
|
|
83
|
-
*
|
|
87
|
+
* When true, normals are computed for the mesh so it shades smoothly.
|
|
84
88
|
* @default false
|
|
85
89
|
*/
|
|
86
90
|
this.computeNormals = false;
|
|
87
91
|
/**
|
|
88
|
-
*
|
|
92
|
+
* When true, the back of each face is drawn in its own color, which shows which way faces
|
|
93
|
+
* point.
|
|
89
94
|
* @default true
|
|
90
95
|
*/
|
|
91
96
|
this.drawTwoSided = true;
|
|
92
97
|
/**
|
|
93
|
-
*
|
|
98
|
+
* The color of the back of the faces as a hex string; used only with `drawTwoSided`.
|
|
94
99
|
* @default #0000ff
|
|
95
100
|
*/
|
|
96
101
|
this.backFaceColour = "#0000ff";
|
|
97
102
|
/**
|
|
98
|
-
*
|
|
103
|
+
* How opaque the back of the faces is, from 0 to 1; used only with `drawTwoSided`.
|
|
99
104
|
* @default 1
|
|
100
105
|
* @minimum 0
|
|
101
106
|
* @maximum 1
|
|
@@ -138,18 +143,22 @@ export var Manifold;
|
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
145
|
Manifold.DrawManifoldOrCrossSectionDto = DrawManifoldOrCrossSectionDto;
|
|
146
|
+
/**
|
|
147
|
+
* Solids or cross-sections and how to draw them, for the renderer packages: the same options as
|
|
148
|
+
* `DrawManifoldOrCrossSectionDto`, applied to every shape in the list.
|
|
149
|
+
*/
|
|
141
150
|
class DrawManifoldsOrCrossSectionsDto {
|
|
142
151
|
/**
|
|
143
152
|
* Provide options without default values
|
|
144
153
|
*/
|
|
145
154
|
constructor(manifoldsOrCrossSections, faceOpacity, faceMaterial, faceColour, crossSectionColour, crossSectionWidth, crossSectionOpacity, computeNormals, drawTwoSided, backFaceColour, backFaceOpacity) {
|
|
146
155
|
/**
|
|
147
|
-
*
|
|
156
|
+
* The color of the faces as a hex string such as `#ff0000`.
|
|
148
157
|
* @default #ff0000
|
|
149
158
|
*/
|
|
150
159
|
this.faceColour = "#ff0000";
|
|
151
160
|
/**
|
|
152
|
-
*
|
|
161
|
+
* How opaque the faces are, from 0 for invisible to 1 for solid.
|
|
153
162
|
* @default 1
|
|
154
163
|
* @minimum 0
|
|
155
164
|
* @maximum 1
|
|
@@ -157,17 +166,17 @@ export var Manifold;
|
|
|
157
166
|
*/
|
|
158
167
|
this.faceOpacity = 1;
|
|
159
168
|
/**
|
|
160
|
-
*
|
|
169
|
+
* The color of a cross-section's lines as a hex string.
|
|
161
170
|
* @default #ff00ff
|
|
162
171
|
*/
|
|
163
172
|
this.crossSectionColour = "#ff00ff";
|
|
164
173
|
/**
|
|
165
|
-
*
|
|
174
|
+
* How thick a cross-section's lines are drawn.
|
|
166
175
|
* @default 2
|
|
167
176
|
*/
|
|
168
177
|
this.crossSectionWidth = 2;
|
|
169
178
|
/**
|
|
170
|
-
*
|
|
179
|
+
* How opaque a cross-section's lines are, from 0 to 1.
|
|
171
180
|
* @default 1
|
|
172
181
|
* @minimum 0
|
|
173
182
|
* @maximum 1
|
|
@@ -175,22 +184,23 @@ export var Manifold;
|
|
|
175
184
|
*/
|
|
176
185
|
this.crossSectionOpacity = 1;
|
|
177
186
|
/**
|
|
178
|
-
*
|
|
187
|
+
* When true, normals are computed for the meshes so they shade smoothly.
|
|
179
188
|
* @default false
|
|
180
189
|
*/
|
|
181
190
|
this.computeNormals = false;
|
|
182
191
|
/**
|
|
183
|
-
*
|
|
192
|
+
* When true, the back of each face is drawn in its own color, which shows which way faces
|
|
193
|
+
* point.
|
|
184
194
|
* @default true
|
|
185
195
|
*/
|
|
186
196
|
this.drawTwoSided = true;
|
|
187
197
|
/**
|
|
188
|
-
*
|
|
198
|
+
* The color of the back of the faces as a hex string; used only with `drawTwoSided`.
|
|
189
199
|
* @default #0000ff
|
|
190
200
|
*/
|
|
191
201
|
this.backFaceColour = "#0000ff";
|
|
192
202
|
/**
|
|
193
|
-
*
|
|
203
|
+
* How opaque the back of the faces is, from 0 to 1; used only with `drawTwoSided`.
|
|
194
204
|
* @default 1
|
|
195
205
|
* @minimum 0
|
|
196
206
|
* @maximum 1
|
|
@@ -233,6 +243,9 @@ export var Manifold;
|
|
|
233
243
|
}
|
|
234
244
|
}
|
|
235
245
|
Manifold.DrawManifoldsOrCrossSectionsDto = DrawManifoldsOrCrossSectionsDto;
|
|
246
|
+
/**
|
|
247
|
+
* Mesh data for `manifold.shapes.manifoldFromMesh`, which builds a solid from it.
|
|
248
|
+
*/
|
|
236
249
|
class CreateFromMeshDto {
|
|
237
250
|
constructor(mesh) {
|
|
238
251
|
if (mesh !== undefined) {
|
|
@@ -241,6 +254,9 @@ export var Manifold;
|
|
|
241
254
|
}
|
|
242
255
|
}
|
|
243
256
|
Manifold.CreateFromMeshDto = CreateFromMeshDto;
|
|
257
|
+
/**
|
|
258
|
+
* Triangles as points for `manifold.shapes.fromPolygonPoints`, which builds a solid from them.
|
|
259
|
+
*/
|
|
244
260
|
class FromPolygonPointsDto {
|
|
245
261
|
constructor(polygonPoints) {
|
|
246
262
|
if (polygonPoints !== undefined) {
|
|
@@ -249,20 +265,25 @@ export var Manifold;
|
|
|
249
265
|
}
|
|
250
266
|
}
|
|
251
267
|
Manifold.FromPolygonPointsDto = FromPolygonPointsDto;
|
|
268
|
+
/**
|
|
269
|
+
* One polygon as points and the fill options for `crossSection.crossSectionFromPoints`.
|
|
270
|
+
*/
|
|
252
271
|
class CrossSectionFromPolygonPointsDto {
|
|
253
272
|
constructor(points, fillRule, removeDuplicates, tolerance) {
|
|
254
273
|
/**
|
|
255
|
-
*
|
|
274
|
+
* Which regions of a self-crossing polygon count as inside: even-odd, non-zero, positive or
|
|
275
|
+
* negative winding.
|
|
256
276
|
* @default positive
|
|
257
277
|
*/
|
|
258
278
|
this.fillRule = fillRuleEnum.positive;
|
|
259
279
|
/**
|
|
260
|
-
*
|
|
280
|
+
* When true, consecutive repeated points, the last and first included, are dropped before
|
|
281
|
+
* building.
|
|
261
282
|
* @default false
|
|
262
283
|
*/
|
|
263
284
|
this.removeDuplicates = false;
|
|
264
285
|
/**
|
|
265
|
-
*
|
|
286
|
+
* How close two points must be to count as repeated, in model units.
|
|
266
287
|
* @default 1e-7
|
|
267
288
|
*/
|
|
268
289
|
this.tolerance = 1e-7;
|
|
@@ -281,20 +302,26 @@ export var Manifold;
|
|
|
281
302
|
}
|
|
282
303
|
}
|
|
283
304
|
Manifold.CrossSectionFromPolygonPointsDto = CrossSectionFromPolygonPointsDto;
|
|
305
|
+
/**
|
|
306
|
+
* Several polygons as points and the fill options for `crossSection.crossSectionFromPolygons`, for
|
|
307
|
+
* outlines with holes.
|
|
308
|
+
*/
|
|
284
309
|
class CrossSectionFromPolygonsPointsDto {
|
|
285
310
|
constructor(polygonPoints, fillRule, removeDuplicates, tolerance) {
|
|
286
311
|
/**
|
|
287
|
-
*
|
|
312
|
+
* Which regions count as inside where polygons overlap: even-odd, non-zero, positive or
|
|
313
|
+
* negative winding.
|
|
288
314
|
* @default positive
|
|
289
315
|
*/
|
|
290
316
|
this.fillRule = fillRuleEnum.positive;
|
|
291
317
|
/**
|
|
292
|
-
*
|
|
318
|
+
* When true, consecutive repeated points in each polygon, the last and first included, are
|
|
319
|
+
* dropped before building.
|
|
293
320
|
* @default false
|
|
294
321
|
*/
|
|
295
322
|
this.removeDuplicates = false;
|
|
296
323
|
/**
|
|
297
|
-
*
|
|
324
|
+
* How close two points must be to count as repeated, in model units.
|
|
298
325
|
* @default 1e-7
|
|
299
326
|
*/
|
|
300
327
|
this.tolerance = 1e-7;
|
|
@@ -313,15 +340,19 @@ export var Manifold;
|
|
|
313
340
|
}
|
|
314
341
|
}
|
|
315
342
|
Manifold.CrossSectionFromPolygonsPointsDto = CrossSectionFromPolygonsPointsDto;
|
|
343
|
+
/**
|
|
344
|
+
* A size and a placement for `manifold.shapes.cube`.
|
|
345
|
+
*/
|
|
316
346
|
class CubeDto {
|
|
317
347
|
constructor(center, size) {
|
|
318
348
|
/**
|
|
319
|
-
*
|
|
349
|
+
* When true, the box is centered on the origin; when false its corner sits there and it extends
|
|
350
|
+
* along the positive axes.
|
|
320
351
|
* @default true
|
|
321
352
|
*/
|
|
322
353
|
this.center = true;
|
|
323
354
|
/**
|
|
324
|
-
*
|
|
355
|
+
* The side length of the cube, in model units.
|
|
325
356
|
* @default 1
|
|
326
357
|
* @minimum 0
|
|
327
358
|
* @maximum Infinity
|
|
@@ -337,10 +368,14 @@ export var Manifold;
|
|
|
337
368
|
}
|
|
338
369
|
}
|
|
339
370
|
Manifold.CubeDto = CubeDto;
|
|
371
|
+
/**
|
|
372
|
+
* Polygons as 2D points and a fill rule for `crossSection.shapes.create`.
|
|
373
|
+
*/
|
|
340
374
|
class CreateContourSectionDto {
|
|
341
375
|
constructor(polygons, fillRule) {
|
|
342
376
|
/**
|
|
343
|
-
*
|
|
377
|
+
* Which regions count as inside where polygons overlap: even-odd, non-zero, positive or
|
|
378
|
+
* negative winding.
|
|
344
379
|
* @default EvenOdd
|
|
345
380
|
*/
|
|
346
381
|
this.fillRule = fillRuleEnum.evenOdd;
|
|
@@ -353,15 +388,19 @@ export var Manifold;
|
|
|
353
388
|
}
|
|
354
389
|
}
|
|
355
390
|
Manifold.CreateContourSectionDto = CreateContourSectionDto;
|
|
391
|
+
/**
|
|
392
|
+
* A side length and a placement for `crossSection.shapes.square`.
|
|
393
|
+
*/
|
|
356
394
|
class SquareDto {
|
|
357
395
|
constructor(center, size) {
|
|
358
396
|
/**
|
|
359
|
-
*
|
|
397
|
+
* When true, the square is centered on the origin; when false its corner sits there.
|
|
360
398
|
* @default false
|
|
361
399
|
*/
|
|
362
400
|
this.center = false;
|
|
363
401
|
/**
|
|
364
|
-
*
|
|
402
|
+
* The side length, one number for a square or two for a rectangle along X and Y, in model
|
|
403
|
+
* units.
|
|
365
404
|
* @default 1
|
|
366
405
|
* @minimum 0
|
|
367
406
|
* @maximum Infinity
|
|
@@ -377,10 +416,13 @@ export var Manifold;
|
|
|
377
416
|
}
|
|
378
417
|
}
|
|
379
418
|
Manifold.SquareDto = SquareDto;
|
|
419
|
+
/**
|
|
420
|
+
* A radius and a segment count for `manifold.shapes.sphere`.
|
|
421
|
+
*/
|
|
380
422
|
class SphereDto {
|
|
381
423
|
constructor(radius, circularSegments) {
|
|
382
424
|
/**
|
|
383
|
-
*
|
|
425
|
+
* The distance from the center to the surface, in model units.
|
|
384
426
|
* @default 1
|
|
385
427
|
* @minimum 0
|
|
386
428
|
* @maximum Infinity
|
|
@@ -388,12 +430,12 @@ export var Manifold;
|
|
|
388
430
|
*/
|
|
389
431
|
this.radius = 1;
|
|
390
432
|
/**
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
433
|
+
* How many segments go around the sphere; rounded up to a multiple of four.
|
|
434
|
+
* @default 32
|
|
435
|
+
* @minimum 0
|
|
436
|
+
* @maximum Infinity
|
|
437
|
+
* @step 1
|
|
438
|
+
*/
|
|
397
439
|
this.circularSegments = 32;
|
|
398
440
|
if (radius !== undefined) {
|
|
399
441
|
this.radius = radius;
|
|
@@ -404,10 +446,14 @@ export var Manifold;
|
|
|
404
446
|
}
|
|
405
447
|
}
|
|
406
448
|
Manifold.SphereDto = SphereDto;
|
|
449
|
+
/**
|
|
450
|
+
* The size and placement of a cylinder or cone for `manifold.shapes.cylinder`, which stands it
|
|
451
|
+
* along Z.
|
|
452
|
+
*/
|
|
407
453
|
class CylinderDto {
|
|
408
454
|
constructor(height, radiusLow, radiusHigh, circularSegments, center) {
|
|
409
455
|
/**
|
|
410
|
-
*
|
|
456
|
+
* The height along Z, in model units.
|
|
411
457
|
* @default 1
|
|
412
458
|
* @minimum 0
|
|
413
459
|
* @maximum Infinity
|
|
@@ -415,7 +461,7 @@ export var Manifold;
|
|
|
415
461
|
*/
|
|
416
462
|
this.height = 1;
|
|
417
463
|
/**
|
|
418
|
-
*
|
|
464
|
+
* The radius of the bottom circle, in model units; must be above 0.
|
|
419
465
|
* @default 1
|
|
420
466
|
* @minimum 0
|
|
421
467
|
* @maximum Infinity
|
|
@@ -423,7 +469,8 @@ export var Manifold;
|
|
|
423
469
|
*/
|
|
424
470
|
this.radiusLow = 1;
|
|
425
471
|
/**
|
|
426
|
-
*
|
|
472
|
+
* The radius of the top circle, in model units: equal to `radiusLow` for a cylinder, smaller
|
|
473
|
+
* for a truncated cone, 0 for a pointed cone.
|
|
427
474
|
* @default 1
|
|
428
475
|
* @minimum 0
|
|
429
476
|
* @maximum Infinity
|
|
@@ -431,7 +478,7 @@ export var Manifold;
|
|
|
431
478
|
*/
|
|
432
479
|
this.radiusHigh = 1;
|
|
433
480
|
/**
|
|
434
|
-
*
|
|
481
|
+
* How many flat sides go around the cylinder; more is rounder.
|
|
435
482
|
* @default 32
|
|
436
483
|
* @minimum 0
|
|
437
484
|
* @maximum Infinity
|
|
@@ -439,7 +486,7 @@ export var Manifold;
|
|
|
439
486
|
*/
|
|
440
487
|
this.circularSegments = 32;
|
|
441
488
|
/**
|
|
442
|
-
*
|
|
489
|
+
* When true, the cylinder is centered on the origin; when false it stands on the XY plane.
|
|
443
490
|
* @default true
|
|
444
491
|
*/
|
|
445
492
|
this.center = true;
|
|
@@ -461,10 +508,13 @@ export var Manifold;
|
|
|
461
508
|
}
|
|
462
509
|
}
|
|
463
510
|
Manifold.CylinderDto = CylinderDto;
|
|
511
|
+
/**
|
|
512
|
+
* A radius and a segment count for `crossSection.shapes.circle`.
|
|
513
|
+
*/
|
|
464
514
|
class CircleDto {
|
|
465
515
|
constructor(radius, circularSegments) {
|
|
466
516
|
/**
|
|
467
|
-
*
|
|
517
|
+
* The distance from the center to the outline, in model units.
|
|
468
518
|
* @default 1
|
|
469
519
|
* @minimum 0
|
|
470
520
|
* @maximum Infinity
|
|
@@ -472,7 +522,7 @@ export var Manifold;
|
|
|
472
522
|
*/
|
|
473
523
|
this.radius = 1;
|
|
474
524
|
/**
|
|
475
|
-
*
|
|
525
|
+
* How many straight sides the circle is drawn with; more is rounder.
|
|
476
526
|
* @default 32
|
|
477
527
|
* @minimum 0
|
|
478
528
|
* @maximum Infinity
|
|
@@ -488,10 +538,13 @@ export var Manifold;
|
|
|
488
538
|
}
|
|
489
539
|
}
|
|
490
540
|
Manifold.CircleDto = CircleDto;
|
|
541
|
+
/**
|
|
542
|
+
* Two sides and a placement for `crossSection.shapes.rectangle`.
|
|
543
|
+
*/
|
|
491
544
|
class RectangleDto {
|
|
492
545
|
constructor(length, height, center) {
|
|
493
546
|
/**
|
|
494
|
-
*
|
|
547
|
+
* The side along X, in model units.
|
|
495
548
|
* @default 1
|
|
496
549
|
* @minimum 0
|
|
497
550
|
* @maximum Infinity
|
|
@@ -499,7 +552,7 @@ export var Manifold;
|
|
|
499
552
|
*/
|
|
500
553
|
this.length = 1;
|
|
501
554
|
/**
|
|
502
|
-
*
|
|
555
|
+
* The side along Y, in model units.
|
|
503
556
|
* @default 1
|
|
504
557
|
* @minimum 0
|
|
505
558
|
* @maximum Infinity
|
|
@@ -507,7 +560,7 @@ export var Manifold;
|
|
|
507
560
|
*/
|
|
508
561
|
this.height = 1;
|
|
509
562
|
/**
|
|
510
|
-
*
|
|
563
|
+
* When true, the rectangle is centered on the origin; when false its corner sits there.
|
|
511
564
|
* @default false
|
|
512
565
|
*/
|
|
513
566
|
this.center = false;
|
|
@@ -523,6 +576,10 @@ export var Manifold;
|
|
|
523
576
|
}
|
|
524
577
|
}
|
|
525
578
|
Manifold.RectangleDto = RectangleDto;
|
|
579
|
+
/**
|
|
580
|
+
* One solid for the methods that take nothing else, such as `manifold.evaluate.volume` or
|
|
581
|
+
* `manifold.operations.hull`.
|
|
582
|
+
*/
|
|
526
583
|
class ManifoldDto {
|
|
527
584
|
constructor(manifold) {
|
|
528
585
|
if (manifold !== undefined) {
|
|
@@ -531,13 +588,14 @@ export var Manifold;
|
|
|
531
588
|
}
|
|
532
589
|
}
|
|
533
590
|
Manifold.ManifoldDto = ManifoldDto;
|
|
591
|
+
/**
|
|
592
|
+
* A solid, a channel and a sharp angle for `manifold.operations.calculateNormals`.
|
|
593
|
+
*/
|
|
534
594
|
class CalculateNormalsDto {
|
|
535
595
|
constructor(manifold, normalIdx, minSharpAngle) {
|
|
536
596
|
/**
|
|
537
|
-
* The property channel
|
|
538
|
-
|
|
539
|
-
* property set will be automatically expanded to include up through normalIdx
|
|
540
|
-
* + 2.
|
|
597
|
+
* The property channel that receives the X of each normal; Y and Z follow in the next two, and
|
|
598
|
+
* channels are added as needed.
|
|
541
599
|
* @default 0
|
|
542
600
|
* @minimum 0
|
|
543
601
|
* @maximum Infinity
|
|
@@ -545,12 +603,8 @@ export var Manifold;
|
|
|
545
603
|
*/
|
|
546
604
|
this.normalIdx = 0;
|
|
547
605
|
/**
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
* the edge. By default, no edges are sharp and all normals are shared. With a
|
|
551
|
-
* value of zero, the model is faceted and all normals match their triangle
|
|
552
|
-
* normals, but in this case it would be better not to calculate normals at
|
|
553
|
-
* all. The value is in degrees.
|
|
606
|
+
* Edges bent more than this, in degrees, get separate normals on each side and stay crisp; at 0
|
|
607
|
+
* every triangle keeps its own normal.
|
|
554
608
|
* @default 0
|
|
555
609
|
* @minimum 0
|
|
556
610
|
* @maximum Infinity
|
|
@@ -569,13 +623,14 @@ export var Manifold;
|
|
|
569
623
|
}
|
|
570
624
|
}
|
|
571
625
|
Manifold.CalculateNormalsDto = CalculateNormalsDto;
|
|
626
|
+
/**
|
|
627
|
+
* A solid and two channels for `manifold.operations.calculateCurvature`.
|
|
628
|
+
*/
|
|
572
629
|
class CalculateCurvatureDto {
|
|
573
630
|
constructor(manifold) {
|
|
574
631
|
/**
|
|
575
|
-
* The property channel
|
|
576
|
-
*
|
|
577
|
-
* property set will be automatically expanded to include the channel
|
|
578
|
-
* index specified.
|
|
632
|
+
* The property channel that receives the Gaussian curvature, the product of the two principal
|
|
633
|
+
* curvatures; below 0 skips it.
|
|
579
634
|
* @default 0
|
|
580
635
|
* @minimum 0
|
|
581
636
|
* @maximum Infinity
|
|
@@ -583,10 +638,8 @@ export var Manifold;
|
|
|
583
638
|
*/
|
|
584
639
|
this.gaussianIdx = 0;
|
|
585
640
|
/**
|
|
586
|
-
* The property channel
|
|
587
|
-
*
|
|
588
|
-
* set will be automatically expanded to include the channel index
|
|
589
|
-
* specified. The mean curvature is a scalar value that describes the
|
|
641
|
+
* The property channel that receives the mean curvature, the sum of the two principal
|
|
642
|
+
* curvatures; below 0 skips it.
|
|
590
643
|
* @default 1
|
|
591
644
|
* @minimum 0
|
|
592
645
|
* @maximum Infinity
|
|
@@ -599,6 +652,9 @@ export var Manifold;
|
|
|
599
652
|
}
|
|
600
653
|
}
|
|
601
654
|
Manifold.CalculateCurvatureDto = CalculateCurvatureDto;
|
|
655
|
+
/**
|
|
656
|
+
* A count for `manifold.operations.reserveIds`, which reserves that many mesh ids.
|
|
657
|
+
*/
|
|
602
658
|
class CountDto {
|
|
603
659
|
constructor(count) {
|
|
604
660
|
if (count !== undefined) {
|
|
@@ -607,10 +663,13 @@ export var Manifold;
|
|
|
607
663
|
}
|
|
608
664
|
}
|
|
609
665
|
Manifold.CountDto = CountDto;
|
|
666
|
+
/**
|
|
667
|
+
* Two solids and a search distance for `manifold.evaluate.minGap`.
|
|
668
|
+
*/
|
|
610
669
|
class ManifoldsMinGapDto {
|
|
611
670
|
constructor(manifold1, manifold2, searchLength) {
|
|
612
671
|
/**
|
|
613
|
-
*
|
|
672
|
+
* How far apart the solids may be before the search gives up, in model units.
|
|
614
673
|
* @default 100
|
|
615
674
|
* @minimum 0
|
|
616
675
|
* @maximum Infinity
|
|
@@ -629,12 +688,42 @@ export var Manifold;
|
|
|
629
688
|
}
|
|
630
689
|
}
|
|
631
690
|
Manifold.ManifoldsMinGapDto = ManifoldsMinGapDto;
|
|
691
|
+
/**
|
|
692
|
+
* A solid and a ray segment for `manifold.evaluate.rayCast`.
|
|
693
|
+
*/
|
|
694
|
+
class RayCastDto {
|
|
695
|
+
constructor(manifold, origin, endpoint) {
|
|
696
|
+
/**
|
|
697
|
+
* Where the ray segment starts.
|
|
698
|
+
* @default [0,0,0]
|
|
699
|
+
*/
|
|
700
|
+
this.origin = [0, 0, 0];
|
|
701
|
+
/**
|
|
702
|
+
* Where the ray segment ends; nothing beyond it is hit.
|
|
703
|
+
* @default [0,0,10]
|
|
704
|
+
*/
|
|
705
|
+
this.endpoint = [0, 0, 10];
|
|
706
|
+
if (manifold !== undefined) {
|
|
707
|
+
this.manifold = manifold;
|
|
708
|
+
}
|
|
709
|
+
if (origin !== undefined) {
|
|
710
|
+
this.origin = origin;
|
|
711
|
+
}
|
|
712
|
+
if (endpoint !== undefined) {
|
|
713
|
+
this.endpoint = endpoint;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
Manifold.RayCastDto = RayCastDto;
|
|
718
|
+
/**
|
|
719
|
+
* A solid and a tolerance for `manifold.operations.refineToTolerance` and
|
|
720
|
+
* `manifold.operations.setTolerance`.
|
|
721
|
+
*/
|
|
632
722
|
class ManifoldRefineToleranceDto {
|
|
633
723
|
constructor(manifold, tolerance) {
|
|
634
724
|
/**
|
|
635
|
-
* The
|
|
636
|
-
*
|
|
637
|
-
* on the surface, within rounding error.
|
|
725
|
+
* The largest distance allowed between the triangles and the smooth surface they stand for, in
|
|
726
|
+
* model units.
|
|
638
727
|
* @default 1e-6
|
|
639
728
|
* @minimum 0
|
|
640
729
|
* @maximum Infinity
|
|
@@ -650,10 +739,13 @@ export var Manifold;
|
|
|
650
739
|
}
|
|
651
740
|
}
|
|
652
741
|
Manifold.ManifoldRefineToleranceDto = ManifoldRefineToleranceDto;
|
|
742
|
+
/**
|
|
743
|
+
* A solid and an edge length for `manifold.operations.refineToLength`.
|
|
744
|
+
*/
|
|
653
745
|
class ManifoldRefineLengthDto {
|
|
654
746
|
constructor(manifold, length) {
|
|
655
747
|
/**
|
|
656
|
-
*
|
|
748
|
+
* The rough length every edge is split down to, in model units.
|
|
657
749
|
* @default 0.1
|
|
658
750
|
* @minimum 0
|
|
659
751
|
* @maximum Infinity
|
|
@@ -669,10 +761,13 @@ export var Manifold;
|
|
|
669
761
|
}
|
|
670
762
|
}
|
|
671
763
|
Manifold.ManifoldRefineLengthDto = ManifoldRefineLengthDto;
|
|
764
|
+
/**
|
|
765
|
+
* A solid and a count for `manifold.operations.refine`.
|
|
766
|
+
*/
|
|
672
767
|
class ManifoldRefineDto {
|
|
673
768
|
constructor(manifold, number) {
|
|
674
769
|
/**
|
|
675
|
-
*
|
|
770
|
+
* How many pieces every edge is split into; must be more than 1 to change anything.
|
|
676
771
|
* @default 1
|
|
677
772
|
* @minimum 0
|
|
678
773
|
* @maximum Infinity
|
|
@@ -688,12 +783,14 @@ export var Manifold;
|
|
|
688
783
|
}
|
|
689
784
|
}
|
|
690
785
|
Manifold.ManifoldRefineDto = ManifoldRefineDto;
|
|
786
|
+
/**
|
|
787
|
+
* A solid and a normal channel for `manifold.operations.smoothByNormals`.
|
|
788
|
+
*/
|
|
691
789
|
class ManifoldSmoothByNormalsDto {
|
|
692
790
|
constructor(manifold, normalIdx) {
|
|
693
791
|
/**
|
|
694
|
-
* The first property
|
|
695
|
-
*
|
|
696
|
-
* agree will result in a sharp edge.
|
|
792
|
+
* The first of the three property channels holding the normals; the solid must have at least
|
|
793
|
+
* that many plus three.
|
|
697
794
|
* @default 0
|
|
698
795
|
* @minimum 0
|
|
699
796
|
* @maximum Infinity
|
|
@@ -709,6 +806,9 @@ export var Manifold;
|
|
|
709
806
|
}
|
|
710
807
|
}
|
|
711
808
|
Manifold.ManifoldSmoothByNormalsDto = ManifoldSmoothByNormalsDto;
|
|
809
|
+
/**
|
|
810
|
+
* A solid and a tolerance for `manifold.operations.simplify`.
|
|
811
|
+
*/
|
|
712
812
|
class ManifoldSimplifyDto {
|
|
713
813
|
constructor(manifold, tolerance) {
|
|
714
814
|
if (manifold !== undefined) {
|
|
@@ -720,10 +820,13 @@ export var Manifold;
|
|
|
720
820
|
}
|
|
721
821
|
}
|
|
722
822
|
Manifold.ManifoldSimplifyDto = ManifoldSimplifyDto;
|
|
823
|
+
/**
|
|
824
|
+
* A solid, a property count and a fill function for `manifold.operations.setProperties`.
|
|
825
|
+
*/
|
|
723
826
|
class ManifoldSetPropertiesDto {
|
|
724
827
|
constructor(manifold, numProp, propFunc) {
|
|
725
828
|
/**
|
|
726
|
-
*
|
|
829
|
+
* How many properties each vertex has afterwards.
|
|
727
830
|
* @default 3
|
|
728
831
|
* @minimum 3
|
|
729
832
|
* @maximum Infinity
|
|
@@ -742,14 +845,14 @@ export var Manifold;
|
|
|
742
845
|
}
|
|
743
846
|
}
|
|
744
847
|
Manifold.ManifoldSetPropertiesDto = ManifoldSetPropertiesDto;
|
|
848
|
+
/**
|
|
849
|
+
* A solid and the smoothing settings for `manifold.operations.smoothOut`.
|
|
850
|
+
*/
|
|
745
851
|
class ManifoldSmoothOutDto {
|
|
746
852
|
constructor(manifold, minSharpAngle, minSmoothness) {
|
|
747
853
|
/**
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
* continuity, with the caveat that flat faces of three or more triangles will
|
|
751
|
-
* always remain flat. With a value of zero, the model is faceted, but in this
|
|
752
|
-
* case there is no point in smoothing.
|
|
854
|
+
* Edges bent more than this, in degrees, stay sharp; the rest are smoothed. At 0 nothing is
|
|
855
|
+
* smoothed.
|
|
753
856
|
* @default 60
|
|
754
857
|
* @minimum -Infinity
|
|
755
858
|
* @maximum Infinity
|
|
@@ -757,10 +860,7 @@ export var Manifold;
|
|
|
757
860
|
*/
|
|
758
861
|
this.minSharpAngle = 60;
|
|
759
862
|
/**
|
|
760
|
-
*
|
|
761
|
-
* sharp angles. The default gives a hard edge, while values > 0 will give a
|
|
762
|
-
* small fillet on these sharp edges. A value of 1 is equivalent to a
|
|
763
|
-
* minSharpAngle of 180 - all edges will be smooth.
|
|
863
|
+
* How much the sharp edges are rounded, from 0 for a hard edge to 1 for fully smooth.
|
|
764
864
|
* @default 0
|
|
765
865
|
* @minimum 0
|
|
766
866
|
* @maximum 1
|
|
@@ -779,6 +879,9 @@ export var Manifold;
|
|
|
779
879
|
}
|
|
780
880
|
}
|
|
781
881
|
Manifold.ManifoldSmoothOutDto = ManifoldSmoothOutDto;
|
|
882
|
+
/**
|
|
883
|
+
* Points and solids for `manifold.operations.hullPoints`, which wraps them all in one convex hull.
|
|
884
|
+
*/
|
|
782
885
|
class HullPointsDto {
|
|
783
886
|
constructor(points) {
|
|
784
887
|
if (points !== undefined) {
|
|
@@ -787,10 +890,13 @@ export var Manifold;
|
|
|
787
890
|
}
|
|
788
891
|
}
|
|
789
892
|
Manifold.HullPointsDto = HullPointsDto;
|
|
893
|
+
/**
|
|
894
|
+
* A solid and a height for `manifold.operations.slice`.
|
|
895
|
+
*/
|
|
790
896
|
class SliceDto {
|
|
791
897
|
constructor(manifold) {
|
|
792
898
|
/**
|
|
793
|
-
*
|
|
899
|
+
* The Z height of the cutting plane, which is parallel to the XY plane.
|
|
794
900
|
* @default 0.5
|
|
795
901
|
* @minimum 0
|
|
796
902
|
* @maximum Infinity
|
|
@@ -803,6 +909,10 @@ export var Manifold;
|
|
|
803
909
|
}
|
|
804
910
|
}
|
|
805
911
|
Manifold.SliceDto = SliceDto;
|
|
912
|
+
/**
|
|
913
|
+
* Mesh data for the methods that read it whole, such as `mesh.evaluate.numTri` and
|
|
914
|
+
* `mesh.operations.merge`.
|
|
915
|
+
*/
|
|
806
916
|
class MeshDto {
|
|
807
917
|
constructor(mesh) {
|
|
808
918
|
if (mesh !== undefined) {
|
|
@@ -811,10 +921,13 @@ export var Manifold;
|
|
|
811
921
|
}
|
|
812
922
|
}
|
|
813
923
|
Manifold.MeshDto = MeshDto;
|
|
924
|
+
/**
|
|
925
|
+
* Mesh data and a vertex index for `mesh.evaluate.position` and `mesh.evaluate.extras`.
|
|
926
|
+
*/
|
|
814
927
|
class MeshVertexIndexDto {
|
|
815
928
|
constructor(mesh, vertexIndex) {
|
|
816
929
|
/**
|
|
817
|
-
*
|
|
930
|
+
* The position of the vertex, counting from 0.
|
|
818
931
|
* @default 0
|
|
819
932
|
* @minimum 0
|
|
820
933
|
* @maximum Infinity
|
|
@@ -830,10 +943,13 @@ export var Manifold;
|
|
|
830
943
|
}
|
|
831
944
|
}
|
|
832
945
|
Manifold.MeshVertexIndexDto = MeshVertexIndexDto;
|
|
946
|
+
/**
|
|
947
|
+
* Mesh data and a run index for `mesh.evaluate.transform`.
|
|
948
|
+
*/
|
|
833
949
|
class MeshTriangleRunIndexDto {
|
|
834
950
|
constructor(mesh, triangleRunIndex) {
|
|
835
951
|
/**
|
|
836
|
-
*
|
|
952
|
+
* The position of the triangle run, counting from 0.
|
|
837
953
|
* @default 0
|
|
838
954
|
* @minimum 0
|
|
839
955
|
* @maximum Infinity
|
|
@@ -849,10 +965,13 @@ export var Manifold;
|
|
|
849
965
|
}
|
|
850
966
|
}
|
|
851
967
|
Manifold.MeshTriangleRunIndexDto = MeshTriangleRunIndexDto;
|
|
968
|
+
/**
|
|
969
|
+
* Mesh data and a half-edge index for `mesh.evaluate.tangent`.
|
|
970
|
+
*/
|
|
852
971
|
class MeshHalfEdgeIndexDto {
|
|
853
972
|
constructor(mesh, halfEdgeIndex) {
|
|
854
973
|
/**
|
|
855
|
-
*
|
|
974
|
+
* The position of the half-edge, counting from 0: three per triangle, in triangle order.
|
|
856
975
|
* @default 0
|
|
857
976
|
* @minimum 0
|
|
858
977
|
* @maximum Infinity
|
|
@@ -868,10 +987,13 @@ export var Manifold;
|
|
|
868
987
|
}
|
|
869
988
|
}
|
|
870
989
|
Manifold.MeshHalfEdgeIndexDto = MeshHalfEdgeIndexDto;
|
|
990
|
+
/**
|
|
991
|
+
* Mesh data and a triangle index for `mesh.evaluate.verts`.
|
|
992
|
+
*/
|
|
871
993
|
class MeshTriangleIndexDto {
|
|
872
994
|
constructor(mesh, triangleIndex) {
|
|
873
995
|
/**
|
|
874
|
-
*
|
|
996
|
+
* The position of the triangle, counting from 0.
|
|
875
997
|
* @default 0
|
|
876
998
|
* @minimum 0
|
|
877
999
|
* @maximum Infinity
|
|
@@ -887,6 +1009,10 @@ export var Manifold;
|
|
|
887
1009
|
}
|
|
888
1010
|
}
|
|
889
1011
|
Manifold.MeshTriangleIndexDto = MeshTriangleIndexDto;
|
|
1012
|
+
/**
|
|
1013
|
+
* One cross-section for the methods that take nothing else, such as `crossSection.evaluate.area` or
|
|
1014
|
+
* `crossSection.operations.hull`.
|
|
1015
|
+
*/
|
|
890
1016
|
class CrossSectionDto {
|
|
891
1017
|
constructor(crossSection) {
|
|
892
1018
|
if (crossSection !== undefined) {
|
|
@@ -895,6 +1021,9 @@ export var Manifold;
|
|
|
895
1021
|
}
|
|
896
1022
|
}
|
|
897
1023
|
Manifold.CrossSectionDto = CrossSectionDto;
|
|
1024
|
+
/**
|
|
1025
|
+
* Several cross-sections for the methods that take a list, such as `crossSection.booleans.union`.
|
|
1026
|
+
*/
|
|
898
1027
|
class CrossSectionsDto {
|
|
899
1028
|
constructor(crossSections) {
|
|
900
1029
|
if (crossSections !== undefined) {
|
|
@@ -903,10 +1032,14 @@ export var Manifold;
|
|
|
903
1032
|
}
|
|
904
1033
|
}
|
|
905
1034
|
Manifold.CrossSectionsDto = CrossSectionsDto;
|
|
1035
|
+
/**
|
|
1036
|
+
* A cross-section and the sweep settings for `crossSection.operations.extrude`, which grows it
|
|
1037
|
+
* along Z into a solid.
|
|
1038
|
+
*/
|
|
906
1039
|
class ExtrudeDto {
|
|
907
1040
|
constructor(crossSection) {
|
|
908
1041
|
/**
|
|
909
|
-
*
|
|
1042
|
+
* How far the outline is swept along Z, in model units.
|
|
910
1043
|
* @default 1
|
|
911
1044
|
* @minimum 0
|
|
912
1045
|
* @maximum Infinity
|
|
@@ -914,7 +1047,8 @@ export var Manifold;
|
|
|
914
1047
|
*/
|
|
915
1048
|
this.height = 1;
|
|
916
1049
|
/**
|
|
917
|
-
*
|
|
1050
|
+
* How many extra copies of the outline are inserted along the way; more keeps a twist or taper
|
|
1051
|
+
* smooth.
|
|
918
1052
|
* @default 1
|
|
919
1053
|
* @minimum 0
|
|
920
1054
|
* @maximum Infinity
|
|
@@ -922,7 +1056,7 @@ export var Manifold;
|
|
|
922
1056
|
*/
|
|
923
1057
|
this.nDivisions = 1;
|
|
924
1058
|
/**
|
|
925
|
-
*
|
|
1059
|
+
* How far the top is turned against the bottom, in degrees.
|
|
926
1060
|
* @default 0
|
|
927
1061
|
* @minimum -Infinity
|
|
928
1062
|
* @maximum Infinity
|
|
@@ -930,7 +1064,7 @@ export var Manifold;
|
|
|
930
1064
|
*/
|
|
931
1065
|
this.twistDegrees = 0;
|
|
932
1066
|
/**
|
|
933
|
-
*
|
|
1067
|
+
* How much the top is scaled along X; 1 keeps it, 0 with `scaleTopY` at 0 makes a cone.
|
|
934
1068
|
* @default 1
|
|
935
1069
|
* @minimum 0
|
|
936
1070
|
* @maximum Infinity
|
|
@@ -938,7 +1072,7 @@ export var Manifold;
|
|
|
938
1072
|
*/
|
|
939
1073
|
this.scaleTopX = 1;
|
|
940
1074
|
/**
|
|
941
|
-
*
|
|
1075
|
+
* How much the top is scaled along Y; 1 keeps it, 0 with `scaleTopX` at 0 makes a cone.
|
|
942
1076
|
* @default 1
|
|
943
1077
|
* @minimum 0
|
|
944
1078
|
* @maximum Infinity
|
|
@@ -946,9 +1080,9 @@ export var Manifold;
|
|
|
946
1080
|
*/
|
|
947
1081
|
this.scaleTopY = 1;
|
|
948
1082
|
/**
|
|
949
|
-
*
|
|
1083
|
+
* When true, the solid is centered on the XY plane; when false it stands on it.
|
|
950
1084
|
* @default true
|
|
951
|
-
|
|
1085
|
+
*/
|
|
952
1086
|
this.center = true;
|
|
953
1087
|
if (crossSection !== undefined) {
|
|
954
1088
|
this.crossSection = crossSection;
|
|
@@ -956,10 +1090,14 @@ export var Manifold;
|
|
|
956
1090
|
}
|
|
957
1091
|
}
|
|
958
1092
|
Manifold.ExtrudeDto = ExtrudeDto;
|
|
1093
|
+
/**
|
|
1094
|
+
* A cross-section and the turn settings for `crossSection.operations.revolve`, which spins it into
|
|
1095
|
+
* a solid.
|
|
1096
|
+
*/
|
|
959
1097
|
class RevolveDto {
|
|
960
1098
|
constructor(crossSection, revolveDegrees, matchProfile, circularSegments) {
|
|
961
1099
|
/**
|
|
962
|
-
*
|
|
1100
|
+
* How far to spin, in degrees; 360 gives a full turn.
|
|
963
1101
|
* @default 360
|
|
964
1102
|
* @minimum 0
|
|
965
1103
|
* @maximum Infinity
|
|
@@ -967,12 +1105,13 @@ export var Manifold;
|
|
|
967
1105
|
*/
|
|
968
1106
|
this.revolveDegrees = 360;
|
|
969
1107
|
/**
|
|
970
|
-
*
|
|
1108
|
+
* When true, the result is turned back to keep the profile's orientation; when false it stands
|
|
1109
|
+
* along Z as the kernel makes it.
|
|
971
1110
|
* @default true
|
|
972
1111
|
*/
|
|
973
1112
|
this.matchProfile = true;
|
|
974
1113
|
/**
|
|
975
|
-
*
|
|
1114
|
+
* How many segments go around the turn; more is rounder.
|
|
976
1115
|
* @default 32
|
|
977
1116
|
* @minimum 0
|
|
978
1117
|
* @maximum Infinity
|
|
@@ -994,12 +1133,14 @@ export var Manifold;
|
|
|
994
1133
|
}
|
|
995
1134
|
}
|
|
996
1135
|
Manifold.RevolveDto = RevolveDto;
|
|
1136
|
+
/**
|
|
1137
|
+
* A cross-section and the offset settings for `crossSection.operations.offset`.
|
|
1138
|
+
*/
|
|
997
1139
|
class OffsetDto {
|
|
998
1140
|
constructor(crossSection, delta, joinType, miterLimit, circularSegments) {
|
|
999
1141
|
/**
|
|
1000
|
-
*
|
|
1001
|
-
*
|
|
1002
|
-
* have the opposite effect.
|
|
1142
|
+
* How far the outline moves, in model units: positive grows outer contours and shrinks holes,
|
|
1143
|
+
* negative does the opposite.
|
|
1003
1144
|
* @default 1
|
|
1004
1145
|
* @minimum -Infinity
|
|
1005
1146
|
* @maximum Infinity
|
|
@@ -1007,18 +1148,13 @@ export var Manifold;
|
|
|
1007
1148
|
*/
|
|
1008
1149
|
this.delta = 1;
|
|
1009
1150
|
/**
|
|
1010
|
-
*
|
|
1011
|
-
* (corners).
|
|
1151
|
+
* How corners are treated: `round`, `square`, `miter` or `bevel`.
|
|
1012
1152
|
* @default round
|
|
1013
1153
|
*/
|
|
1014
1154
|
this.joinType = manifoldJoinTypeEnum.round;
|
|
1015
1155
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
* applied, **when the join type is Miter** (default is 2, which is the
|
|
1019
|
-
* minimum allowed). See the [Clipper2
|
|
1020
|
-
* MiterLimit](http://www.angusj.com/clipper2/Docs/Units/Clipper.Offset/Classes/ClipperOffset/Properties/MiterLimit.htm)
|
|
1021
|
-
* page for a visual example.
|
|
1156
|
+
* For `miter` joins, how far a corner may reach as a multiple of `delta` before it is squared
|
|
1157
|
+
* off; 2 is the smallest allowed.
|
|
1022
1158
|
* @default 2
|
|
1023
1159
|
* @minimum 2
|
|
1024
1160
|
* @maximum Infinity
|
|
@@ -1026,10 +1162,7 @@ export var Manifold;
|
|
|
1026
1162
|
*/
|
|
1027
1163
|
this.miterLimit = 2;
|
|
1028
1164
|
/**
|
|
1029
|
-
*
|
|
1030
|
-
* <B>JoinType::Round</B> corners (roughly, the number of vertices that
|
|
1031
|
-
* will be added to each contour). Default is calculated by the static Quality
|
|
1032
|
-
* defaults according to the radius.
|
|
1165
|
+
* For `round` joins, how many segments a full circle of rounding gets.
|
|
1033
1166
|
* @default 32
|
|
1034
1167
|
* @minimum 0
|
|
1035
1168
|
* @maximum Infinity
|
|
@@ -1054,10 +1187,13 @@ export var Manifold;
|
|
|
1054
1187
|
}
|
|
1055
1188
|
}
|
|
1056
1189
|
Manifold.OffsetDto = OffsetDto;
|
|
1190
|
+
/**
|
|
1191
|
+
* A cross-section and a distance for `crossSection.operations.simplify`.
|
|
1192
|
+
*/
|
|
1057
1193
|
class SimplifyDto {
|
|
1058
1194
|
constructor(crossSection, epsilon) {
|
|
1059
1195
|
/**
|
|
1060
|
-
*
|
|
1196
|
+
* Points closer than this, in model units, to the line between their neighbors are dropped.
|
|
1061
1197
|
* @default 1e-6
|
|
1062
1198
|
* @minimum 0
|
|
1063
1199
|
* @maximum Infinity
|
|
@@ -1073,6 +1209,10 @@ export var Manifold;
|
|
|
1073
1209
|
}
|
|
1074
1210
|
}
|
|
1075
1211
|
Manifold.SimplifyDto = SimplifyDto;
|
|
1212
|
+
/**
|
|
1213
|
+
* Cross-sections or polygons for `crossSection.operations.compose`, which packs them into one
|
|
1214
|
+
* cross-section.
|
|
1215
|
+
*/
|
|
1076
1216
|
class ComposeDto {
|
|
1077
1217
|
constructor(polygons) {
|
|
1078
1218
|
if (polygons !== undefined) {
|
|
@@ -1081,10 +1221,13 @@ export var Manifold;
|
|
|
1081
1221
|
}
|
|
1082
1222
|
}
|
|
1083
1223
|
Manifold.ComposeDto = ComposeDto;
|
|
1224
|
+
/**
|
|
1225
|
+
* A cross-section and a direction for `crossSection.transforms.mirror`.
|
|
1226
|
+
*/
|
|
1084
1227
|
class MirrorCrossSectionDto {
|
|
1085
1228
|
constructor(crossSection, normal) {
|
|
1086
1229
|
/**
|
|
1087
|
-
* The normal
|
|
1230
|
+
* The normal of the mirror line through the origin; `[1, 0]` mirrors left to right.
|
|
1088
1231
|
* @default [1,0]
|
|
1089
1232
|
*/
|
|
1090
1233
|
this.normal = [1, 0];
|
|
@@ -1097,10 +1240,13 @@ export var Manifold;
|
|
|
1097
1240
|
}
|
|
1098
1241
|
}
|
|
1099
1242
|
Manifold.MirrorCrossSectionDto = MirrorCrossSectionDto;
|
|
1243
|
+
/**
|
|
1244
|
+
* A cross-section and two factors for `crossSection.transforms.scale2D`.
|
|
1245
|
+
*/
|
|
1100
1246
|
class Scale2DCrossSectionDto {
|
|
1101
1247
|
constructor(crossSection, vector) {
|
|
1102
1248
|
/**
|
|
1103
|
-
* The
|
|
1249
|
+
* The factors along X and Y, about the origin; 1 keeps an axis as it is.
|
|
1104
1250
|
* @default [2,2]
|
|
1105
1251
|
*/
|
|
1106
1252
|
this.vector = [2, 2];
|
|
@@ -1113,6 +1259,9 @@ export var Manifold;
|
|
|
1113
1259
|
}
|
|
1114
1260
|
}
|
|
1115
1261
|
Manifold.Scale2DCrossSectionDto = Scale2DCrossSectionDto;
|
|
1262
|
+
/**
|
|
1263
|
+
* A cross-section and a vector for `crossSection.transforms.translate`.
|
|
1264
|
+
*/
|
|
1116
1265
|
class TranslateCrossSectionDto {
|
|
1117
1266
|
constructor(crossSection, vector) {
|
|
1118
1267
|
if (crossSection !== undefined) {
|
|
@@ -1124,10 +1273,13 @@ export var Manifold;
|
|
|
1124
1273
|
}
|
|
1125
1274
|
}
|
|
1126
1275
|
Manifold.TranslateCrossSectionDto = TranslateCrossSectionDto;
|
|
1276
|
+
/**
|
|
1277
|
+
* A cross-section and an angle for `crossSection.transforms.rotate`.
|
|
1278
|
+
*/
|
|
1127
1279
|
class RotateCrossSectionDto {
|
|
1128
1280
|
constructor(crossSection, degrees) {
|
|
1129
1281
|
/**
|
|
1130
|
-
* The rotation
|
|
1282
|
+
* The rotation about the origin, in degrees, counterclockwise.
|
|
1131
1283
|
* @default 45
|
|
1132
1284
|
* @minimum -Infinity
|
|
1133
1285
|
* @maximum Infinity
|
|
@@ -1143,10 +1295,13 @@ export var Manifold;
|
|
|
1143
1295
|
}
|
|
1144
1296
|
}
|
|
1145
1297
|
Manifold.RotateCrossSectionDto = RotateCrossSectionDto;
|
|
1298
|
+
/**
|
|
1299
|
+
* A cross-section and a factor for `crossSection.transforms.scale`.
|
|
1300
|
+
*/
|
|
1146
1301
|
class ScaleCrossSectionDto {
|
|
1147
1302
|
constructor(crossSection, factor) {
|
|
1148
1303
|
/**
|
|
1149
|
-
* The
|
|
1304
|
+
* The uniform scale about the origin; 2 doubles every size.
|
|
1150
1305
|
* @default 2
|
|
1151
1306
|
*/
|
|
1152
1307
|
this.factor = 2;
|
|
@@ -1159,10 +1314,13 @@ export var Manifold;
|
|
|
1159
1314
|
}
|
|
1160
1315
|
}
|
|
1161
1316
|
Manifold.ScaleCrossSectionDto = ScaleCrossSectionDto;
|
|
1317
|
+
/**
|
|
1318
|
+
* A cross-section and two distances for `crossSection.transforms.translateXY`.
|
|
1319
|
+
*/
|
|
1162
1320
|
class TranslateXYCrossSectionDto {
|
|
1163
1321
|
constructor(crossSection, x, y) {
|
|
1164
1322
|
/**
|
|
1165
|
-
*
|
|
1323
|
+
* How far to move along X, in model units.
|
|
1166
1324
|
* @default 0
|
|
1167
1325
|
* @minimum -Infinity
|
|
1168
1326
|
* @maximum Infinity
|
|
@@ -1170,7 +1328,7 @@ export var Manifold;
|
|
|
1170
1328
|
*/
|
|
1171
1329
|
this.x = 0;
|
|
1172
1330
|
/**
|
|
1173
|
-
*
|
|
1331
|
+
* How far to move along Y, in model units.
|
|
1174
1332
|
* @default 0
|
|
1175
1333
|
* @minimum -Infinity
|
|
1176
1334
|
* @maximum Infinity
|
|
@@ -1189,6 +1347,9 @@ export var Manifold;
|
|
|
1189
1347
|
}
|
|
1190
1348
|
}
|
|
1191
1349
|
Manifold.TranslateXYCrossSectionDto = TranslateXYCrossSectionDto;
|
|
1350
|
+
/**
|
|
1351
|
+
* A cross-section and a 3x3 matrix for `crossSection.transforms.transform`.
|
|
1352
|
+
*/
|
|
1192
1353
|
class TransformCrossSectionDto {
|
|
1193
1354
|
constructor(crossSection, transform) {
|
|
1194
1355
|
if (crossSection !== undefined) {
|
|
@@ -1200,6 +1361,9 @@ export var Manifold;
|
|
|
1200
1361
|
}
|
|
1201
1362
|
}
|
|
1202
1363
|
Manifold.TransformCrossSectionDto = TransformCrossSectionDto;
|
|
1364
|
+
/**
|
|
1365
|
+
* A cross-section and a function for `crossSection.transforms.warp`.
|
|
1366
|
+
*/
|
|
1203
1367
|
class CrossSectionWarpDto {
|
|
1204
1368
|
constructor(crossSection, warpFunc) {
|
|
1205
1369
|
if (crossSection !== undefined) {
|
|
@@ -1211,10 +1375,13 @@ export var Manifold;
|
|
|
1211
1375
|
}
|
|
1212
1376
|
}
|
|
1213
1377
|
Manifold.CrossSectionWarpDto = CrossSectionWarpDto;
|
|
1378
|
+
/**
|
|
1379
|
+
* A solid and a plane normal for `manifold.transforms.mirror`.
|
|
1380
|
+
*/
|
|
1214
1381
|
class MirrorDto {
|
|
1215
1382
|
constructor(manifold, normal) {
|
|
1216
1383
|
/**
|
|
1217
|
-
* The normal
|
|
1384
|
+
* The normal of the mirror plane through the origin; a zero vector gives an empty solid.
|
|
1218
1385
|
* @default [1,0,0]
|
|
1219
1386
|
*/
|
|
1220
1387
|
this.normal = [1, 0, 0];
|
|
@@ -1227,10 +1394,13 @@ export var Manifold;
|
|
|
1227
1394
|
}
|
|
1228
1395
|
}
|
|
1229
1396
|
Manifold.MirrorDto = MirrorDto;
|
|
1397
|
+
/**
|
|
1398
|
+
* A solid and three factors for `manifold.transforms.scale3D` and `manifold.transforms.scale`.
|
|
1399
|
+
*/
|
|
1230
1400
|
class Scale3DDto {
|
|
1231
1401
|
constructor(manifold, vector) {
|
|
1232
1402
|
/**
|
|
1233
|
-
* The
|
|
1403
|
+
* The factors along X, Y and Z, about the origin; 1 keeps an axis as it is, 2 doubles it.
|
|
1234
1404
|
* @default [2,2,2]
|
|
1235
1405
|
*/
|
|
1236
1406
|
this.vector = [2, 2, 2];
|
|
@@ -1243,6 +1413,9 @@ export var Manifold;
|
|
|
1243
1413
|
}
|
|
1244
1414
|
}
|
|
1245
1415
|
Manifold.Scale3DDto = Scale3DDto;
|
|
1416
|
+
/**
|
|
1417
|
+
* A solid and a vector for `manifold.transforms.translate`.
|
|
1418
|
+
*/
|
|
1246
1419
|
class TranslateDto {
|
|
1247
1420
|
constructor(manifold, vector) {
|
|
1248
1421
|
if (manifold !== undefined) {
|
|
@@ -1254,6 +1427,10 @@ export var Manifold;
|
|
|
1254
1427
|
}
|
|
1255
1428
|
}
|
|
1256
1429
|
Manifold.TranslateDto = TranslateDto;
|
|
1430
|
+
/**
|
|
1431
|
+
* A solid and several vectors for `manifold.transforms.translateByVectors`, one moved copy per
|
|
1432
|
+
* vector.
|
|
1433
|
+
*/
|
|
1257
1434
|
class TranslateByVectorsDto {
|
|
1258
1435
|
constructor(manifold, vectors) {
|
|
1259
1436
|
if (manifold !== undefined) {
|
|
@@ -1265,6 +1442,9 @@ export var Manifold;
|
|
|
1265
1442
|
}
|
|
1266
1443
|
}
|
|
1267
1444
|
Manifold.TranslateByVectorsDto = TranslateByVectorsDto;
|
|
1445
|
+
/**
|
|
1446
|
+
* A solid and three angles for `manifold.transforms.rotate`.
|
|
1447
|
+
*/
|
|
1268
1448
|
class RotateDto {
|
|
1269
1449
|
constructor(manifold, vector) {
|
|
1270
1450
|
if (manifold !== undefined) {
|
|
@@ -1276,10 +1456,13 @@ export var Manifold;
|
|
|
1276
1456
|
}
|
|
1277
1457
|
}
|
|
1278
1458
|
Manifold.RotateDto = RotateDto;
|
|
1459
|
+
/**
|
|
1460
|
+
* A solid and three separate angles for `manifold.transforms.rotateXYZ`.
|
|
1461
|
+
*/
|
|
1279
1462
|
class RotateXYZDto {
|
|
1280
1463
|
constructor(manifold, x, y, z) {
|
|
1281
1464
|
/**
|
|
1282
|
-
* The rotation
|
|
1465
|
+
* The rotation about the X axis in degrees, applied first.
|
|
1283
1466
|
* @default 0
|
|
1284
1467
|
* @minimum -Infinity
|
|
1285
1468
|
* @maximum Infinity
|
|
@@ -1287,7 +1470,7 @@ export var Manifold;
|
|
|
1287
1470
|
*/
|
|
1288
1471
|
this.x = 0;
|
|
1289
1472
|
/**
|
|
1290
|
-
* The rotation
|
|
1473
|
+
* The rotation about the Y axis in degrees, applied second.
|
|
1291
1474
|
* @default 0
|
|
1292
1475
|
* @minimum -Infinity
|
|
1293
1476
|
* @maximum Infinity
|
|
@@ -1295,7 +1478,7 @@ export var Manifold;
|
|
|
1295
1478
|
*/
|
|
1296
1479
|
this.y = 0;
|
|
1297
1480
|
/**
|
|
1298
|
-
* The rotation
|
|
1481
|
+
* The rotation about the Z axis in degrees, applied last.
|
|
1299
1482
|
* @default 0
|
|
1300
1483
|
* @minimum -Infinity
|
|
1301
1484
|
* @maximum Infinity
|
|
@@ -1317,10 +1500,14 @@ export var Manifold;
|
|
|
1317
1500
|
}
|
|
1318
1501
|
}
|
|
1319
1502
|
Manifold.RotateXYZDto = RotateXYZDto;
|
|
1503
|
+
/**
|
|
1504
|
+
* A solid and a factor for uniform scaling; currently unused by the library, which scales through
|
|
1505
|
+
* `Scale3DDto`.
|
|
1506
|
+
*/
|
|
1320
1507
|
class ScaleDto {
|
|
1321
1508
|
constructor(manifold, factor) {
|
|
1322
1509
|
/**
|
|
1323
|
-
* The
|
|
1510
|
+
* The uniform scale about the origin; 2 doubles every size.
|
|
1324
1511
|
* @default 2
|
|
1325
1512
|
*/
|
|
1326
1513
|
this.factor = 2;
|
|
@@ -1333,10 +1520,13 @@ export var Manifold;
|
|
|
1333
1520
|
}
|
|
1334
1521
|
}
|
|
1335
1522
|
Manifold.ScaleDto = ScaleDto;
|
|
1523
|
+
/**
|
|
1524
|
+
* A solid and three distances for `manifold.transforms.translateXYZ`.
|
|
1525
|
+
*/
|
|
1336
1526
|
class TranslateXYZDto {
|
|
1337
1527
|
constructor(manifold, x, y, z) {
|
|
1338
1528
|
/**
|
|
1339
|
-
*
|
|
1529
|
+
* How far to move along X, in model units.
|
|
1340
1530
|
* @default 0
|
|
1341
1531
|
* @minimum -Infinity
|
|
1342
1532
|
* @maximum Infinity
|
|
@@ -1344,7 +1534,7 @@ export var Manifold;
|
|
|
1344
1534
|
*/
|
|
1345
1535
|
this.x = 0;
|
|
1346
1536
|
/**
|
|
1347
|
-
*
|
|
1537
|
+
* How far to move along Y, in model units.
|
|
1348
1538
|
* @default 0
|
|
1349
1539
|
* @minimum -Infinity
|
|
1350
1540
|
* @maximum Infinity
|
|
@@ -1352,7 +1542,7 @@ export var Manifold;
|
|
|
1352
1542
|
*/
|
|
1353
1543
|
this.y = 0;
|
|
1354
1544
|
/**
|
|
1355
|
-
*
|
|
1545
|
+
* How far to move along Z, in model units.
|
|
1356
1546
|
* @default 0
|
|
1357
1547
|
* @minimum -Infinity
|
|
1358
1548
|
* @maximum Infinity
|
|
@@ -1374,6 +1564,9 @@ export var Manifold;
|
|
|
1374
1564
|
}
|
|
1375
1565
|
}
|
|
1376
1566
|
Manifold.TranslateXYZDto = TranslateXYZDto;
|
|
1567
|
+
/**
|
|
1568
|
+
* A solid and a 4x4 matrix for `manifold.transforms.transform`.
|
|
1569
|
+
*/
|
|
1377
1570
|
class TransformDto {
|
|
1378
1571
|
constructor(manifold, transform) {
|
|
1379
1572
|
if (manifold !== undefined) {
|
|
@@ -1385,6 +1578,9 @@ export var Manifold;
|
|
|
1385
1578
|
}
|
|
1386
1579
|
}
|
|
1387
1580
|
Manifold.TransformDto = TransformDto;
|
|
1581
|
+
/**
|
|
1582
|
+
* A solid and several 4x4 matrices for `manifold.transforms.transforms`, applied first to last.
|
|
1583
|
+
*/
|
|
1388
1584
|
class TransformsDto {
|
|
1389
1585
|
constructor(manifold, transforms) {
|
|
1390
1586
|
if (manifold !== undefined) {
|
|
@@ -1396,6 +1592,9 @@ export var Manifold;
|
|
|
1396
1592
|
}
|
|
1397
1593
|
}
|
|
1398
1594
|
Manifold.TransformsDto = TransformsDto;
|
|
1595
|
+
/**
|
|
1596
|
+
* A solid and a function for `manifold.transforms.warp`.
|
|
1597
|
+
*/
|
|
1399
1598
|
class ManifoldWarpDto {
|
|
1400
1599
|
constructor(manifold, warpFunc) {
|
|
1401
1600
|
if (manifold !== undefined) {
|
|
@@ -1407,6 +1606,9 @@ export var Manifold;
|
|
|
1407
1606
|
}
|
|
1408
1607
|
}
|
|
1409
1608
|
Manifold.ManifoldWarpDto = ManifoldWarpDto;
|
|
1609
|
+
/**
|
|
1610
|
+
* Two cross-sections for the pairwise methods of `crossSection.booleans`.
|
|
1611
|
+
*/
|
|
1410
1612
|
class TwoCrossSectionsDto {
|
|
1411
1613
|
constructor(crossSection1, crossSection2) {
|
|
1412
1614
|
if (crossSection1 !== undefined) {
|
|
@@ -1418,6 +1620,9 @@ export var Manifold;
|
|
|
1418
1620
|
}
|
|
1419
1621
|
}
|
|
1420
1622
|
Manifold.TwoCrossSectionsDto = TwoCrossSectionsDto;
|
|
1623
|
+
/**
|
|
1624
|
+
* Two solids for the pairwise methods of `manifold.booleans`.
|
|
1625
|
+
*/
|
|
1421
1626
|
class TwoManifoldsDto {
|
|
1422
1627
|
constructor(manifold1, manifold2) {
|
|
1423
1628
|
if (manifold1 !== undefined) {
|
|
@@ -1429,6 +1634,9 @@ export var Manifold;
|
|
|
1429
1634
|
}
|
|
1430
1635
|
}
|
|
1431
1636
|
Manifold.TwoManifoldsDto = TwoManifoldsDto;
|
|
1637
|
+
/**
|
|
1638
|
+
* A solid and a cutter for `manifold.booleans.split`.
|
|
1639
|
+
*/
|
|
1432
1640
|
class SplitManifoldsDto {
|
|
1433
1641
|
constructor(manifoldToSplit, manifoldCutter) {
|
|
1434
1642
|
if (manifoldToSplit !== undefined) {
|
|
@@ -1440,15 +1648,20 @@ export var Manifold;
|
|
|
1440
1648
|
}
|
|
1441
1649
|
}
|
|
1442
1650
|
Manifold.SplitManifoldsDto = SplitManifoldsDto;
|
|
1651
|
+
/**
|
|
1652
|
+
* A solid and a plane for `manifold.booleans.trimByPlane`, which keeps the part on the normal's
|
|
1653
|
+
* side.
|
|
1654
|
+
*/
|
|
1443
1655
|
class TrimByPlaneDto {
|
|
1444
1656
|
constructor(manifold, normal, originOffset) {
|
|
1445
1657
|
/**
|
|
1446
|
-
* The normal
|
|
1658
|
+
* The normal of the cutting plane; the kept part lies on the side it points to, and its length
|
|
1659
|
+
* does not matter.
|
|
1447
1660
|
* @default [1,0,0]
|
|
1448
1661
|
*/
|
|
1449
1662
|
this.normal = [1, 0, 0];
|
|
1450
1663
|
/**
|
|
1451
|
-
*
|
|
1664
|
+
* How far the plane sits from the origin along the normal, in model units.
|
|
1452
1665
|
* @default 0
|
|
1453
1666
|
* @minimum -Infinity
|
|
1454
1667
|
* @maximum Infinity
|
|
@@ -1467,15 +1680,19 @@ export var Manifold;
|
|
|
1467
1680
|
}
|
|
1468
1681
|
}
|
|
1469
1682
|
Manifold.TrimByPlaneDto = TrimByPlaneDto;
|
|
1683
|
+
/**
|
|
1684
|
+
* A solid and a plane for `manifold.booleans.splitByPlane`, which keeps both pieces.
|
|
1685
|
+
*/
|
|
1470
1686
|
class SplitByPlaneDto {
|
|
1471
1687
|
constructor(manifold, normal, originOffset) {
|
|
1472
1688
|
/**
|
|
1473
|
-
* The normal
|
|
1689
|
+
* The normal of the cutting plane; the first piece lies on the side it points to, and its
|
|
1690
|
+
* length does not matter.
|
|
1474
1691
|
* @default [1,0,0]
|
|
1475
1692
|
*/
|
|
1476
1693
|
this.normal = [1, 0, 0];
|
|
1477
1694
|
/**
|
|
1478
|
-
*
|
|
1695
|
+
* How far the plane sits from the origin along the normal, in model units.
|
|
1479
1696
|
* @default 0
|
|
1480
1697
|
* @minimum -Infinity
|
|
1481
1698
|
* @maximum Infinity
|
|
@@ -1494,15 +1711,20 @@ export var Manifold;
|
|
|
1494
1711
|
}
|
|
1495
1712
|
}
|
|
1496
1713
|
Manifold.SplitByPlaneDto = SplitByPlaneDto;
|
|
1714
|
+
/**
|
|
1715
|
+
* A solid, a plane normal and several distances for `manifold.booleans.splitByPlaneOnOffsets`,
|
|
1716
|
+
* which cuts the solid into slabs.
|
|
1717
|
+
*/
|
|
1497
1718
|
class SplitByPlaneOnOffsetsDto {
|
|
1498
1719
|
constructor(manifold, normal, originOffsets) {
|
|
1499
1720
|
/**
|
|
1500
|
-
* The normal
|
|
1721
|
+
* The normal shared by every cutting plane; its length does not matter.
|
|
1501
1722
|
* @default [1,0,0]
|
|
1502
1723
|
*/
|
|
1503
1724
|
this.normal = [1, 0, 0];
|
|
1504
1725
|
/**
|
|
1505
|
-
*
|
|
1726
|
+
* How far each plane sits from the origin along the normal, in model units, in increasing
|
|
1727
|
+
* order.
|
|
1506
1728
|
* @default [0]
|
|
1507
1729
|
*/
|
|
1508
1730
|
this.originOffsets = [0];
|
|
@@ -1518,6 +1740,10 @@ export var Manifold;
|
|
|
1518
1740
|
}
|
|
1519
1741
|
}
|
|
1520
1742
|
Manifold.SplitByPlaneOnOffsetsDto = SplitByPlaneOnOffsetsDto;
|
|
1743
|
+
/**
|
|
1744
|
+
* Several solids for the methods that take a list, such as `manifold.booleans.union` or
|
|
1745
|
+
* `manifold.operations.compose`.
|
|
1746
|
+
*/
|
|
1521
1747
|
class ManifoldsDto {
|
|
1522
1748
|
constructor(manifolds) {
|
|
1523
1749
|
if (manifolds !== undefined) {
|
|
@@ -1526,6 +1752,9 @@ export var Manifold;
|
|
|
1526
1752
|
}
|
|
1527
1753
|
}
|
|
1528
1754
|
Manifold.ManifoldsDto = ManifoldsDto;
|
|
1755
|
+
/**
|
|
1756
|
+
* A solid and an optional normal channel for `manifold.manifoldToMesh`.
|
|
1757
|
+
*/
|
|
1529
1758
|
class ManifoldToMeshDto {
|
|
1530
1759
|
constructor(manifold, normalIdx) {
|
|
1531
1760
|
if (manifold !== undefined) {
|
|
@@ -1537,6 +1766,9 @@ export var Manifold;
|
|
|
1537
1766
|
}
|
|
1538
1767
|
}
|
|
1539
1768
|
Manifold.ManifoldToMeshDto = ManifoldToMeshDto;
|
|
1769
|
+
/**
|
|
1770
|
+
* Several solids and optional normal channels for `manifold.manifoldsToMeshes`.
|
|
1771
|
+
*/
|
|
1540
1772
|
class ManifoldsToMeshesDto {
|
|
1541
1773
|
constructor(manifolds, normalIdx) {
|
|
1542
1774
|
if (manifolds !== undefined) {
|
|
@@ -1548,6 +1780,9 @@ export var Manifold;
|
|
|
1548
1780
|
}
|
|
1549
1781
|
}
|
|
1550
1782
|
Manifold.ManifoldsToMeshesDto = ManifoldsToMeshesDto;
|
|
1783
|
+
/**
|
|
1784
|
+
* A solid or cross-section and an optional normal channel for `decomposeManifoldOrCrossSection`.
|
|
1785
|
+
*/
|
|
1551
1786
|
class DecomposeManifoldOrCrossSectionDto {
|
|
1552
1787
|
constructor(manifoldOrCrossSection, normalIdx) {
|
|
1553
1788
|
if (manifoldOrCrossSection !== undefined) {
|
|
@@ -1559,6 +1794,9 @@ export var Manifold;
|
|
|
1559
1794
|
}
|
|
1560
1795
|
}
|
|
1561
1796
|
Manifold.DecomposeManifoldOrCrossSectionDto = DecomposeManifoldOrCrossSectionDto;
|
|
1797
|
+
/**
|
|
1798
|
+
* One solid or cross-section for the methods that accept either.
|
|
1799
|
+
*/
|
|
1562
1800
|
class ManifoldOrCrossSectionDto {
|
|
1563
1801
|
constructor(manifoldOrCrossSection) {
|
|
1564
1802
|
if (manifoldOrCrossSection !== undefined) {
|
|
@@ -1567,6 +1805,9 @@ export var Manifold;
|
|
|
1567
1805
|
}
|
|
1568
1806
|
}
|
|
1569
1807
|
Manifold.ManifoldOrCrossSectionDto = ManifoldOrCrossSectionDto;
|
|
1808
|
+
/**
|
|
1809
|
+
* Several solids or cross-sections for the methods that accept either kind in a list.
|
|
1810
|
+
*/
|
|
1570
1811
|
class ManifoldsOrCrossSectionsDto {
|
|
1571
1812
|
constructor(manifoldsOrCrossSections) {
|
|
1572
1813
|
if (manifoldsOrCrossSections !== undefined) {
|
|
@@ -1575,6 +1816,10 @@ export var Manifold;
|
|
|
1575
1816
|
}
|
|
1576
1817
|
}
|
|
1577
1818
|
Manifold.ManifoldsOrCrossSectionsDto = ManifoldsOrCrossSectionsDto;
|
|
1819
|
+
/**
|
|
1820
|
+
* Several solids or cross-sections and optional normal channels for
|
|
1821
|
+
* `decomposeManifoldsOrCrossSections`.
|
|
1822
|
+
*/
|
|
1578
1823
|
class DecomposeManifoldsOrCrossSectionsDto {
|
|
1579
1824
|
constructor(manifoldsOrCrossSections, normalIdx) {
|
|
1580
1825
|
if (manifoldsOrCrossSections !== undefined) {
|