@bitbybit-dev/base 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.
Files changed (55) hide show
  1. package/lib/api/GlobalCDNProvider.js +1 -1
  2. package/lib/api/inputs/base-inputs.d.ts +13 -12
  3. package/lib/api/inputs/color-inputs.d.ts +97 -48
  4. package/lib/api/inputs/color-inputs.js +95 -46
  5. package/lib/api/inputs/dates-inputs.d.ts +67 -26
  6. package/lib/api/inputs/dates-inputs.js +57 -16
  7. package/lib/api/inputs/io-inputs.d.ts +13 -15
  8. package/lib/api/inputs/io-inputs.js +7 -8
  9. package/lib/api/inputs/line-inputs.d.ts +88 -33
  10. package/lib/api/inputs/line-inputs.js +61 -11
  11. package/lib/api/inputs/lists-inputs.d.ts +207 -96
  12. package/lib/api/inputs/lists-inputs.js +153 -45
  13. package/lib/api/inputs/logic-inputs.d.ts +52 -22
  14. package/lib/api/inputs/logic-inputs.js +41 -12
  15. package/lib/api/inputs/math-inputs.d.ts +113 -52
  16. package/lib/api/inputs/math-inputs.js +112 -51
  17. package/lib/api/inputs/mesh-inputs.d.ts +30 -11
  18. package/lib/api/inputs/mesh-inputs.js +21 -3
  19. package/lib/api/inputs/point-inputs.d.ts +240 -107
  20. package/lib/api/inputs/point-inputs.js +199 -73
  21. package/lib/api/inputs/polyline-inputs.d.ts +68 -28
  22. package/lib/api/inputs/polyline-inputs.js +48 -13
  23. package/lib/api/inputs/text-inputs.d.ts +117 -46
  24. package/lib/api/inputs/text-inputs.js +111 -41
  25. package/lib/api/inputs/transforms-inputs.d.ts +65 -23
  26. package/lib/api/inputs/transforms-inputs.js +64 -22
  27. package/lib/api/inputs/vector-inputs.d.ts +154 -76
  28. package/lib/api/inputs/vector-inputs.js +132 -57
  29. package/lib/api/models/point/hex-grid-data.d.ts +1 -1
  30. package/lib/api/models/point/hex-grid-data.js +1 -1
  31. package/lib/api/services/color.d.ts +149 -70
  32. package/lib/api/services/color.js +149 -70
  33. package/lib/api/services/dates.d.ts +313 -150
  34. package/lib/api/services/dates.js +313 -150
  35. package/lib/api/services/line.d.ts +138 -68
  36. package/lib/api/services/line.js +138 -68
  37. package/lib/api/services/lists.d.ts +357 -177
  38. package/lib/api/services/lists.js +357 -177
  39. package/lib/api/services/logic.d.ts +98 -45
  40. package/lib/api/services/logic.js +98 -45
  41. package/lib/api/services/math.d.ts +363 -211
  42. package/lib/api/services/math.js +363 -211
  43. package/lib/api/services/mesh.d.ts +73 -31
  44. package/lib/api/services/mesh.js +73 -31
  45. package/lib/api/services/point.d.ts +367 -147
  46. package/lib/api/services/point.js +367 -147
  47. package/lib/api/services/polyline.d.ts +146 -71
  48. package/lib/api/services/polyline.js +146 -71
  49. package/lib/api/services/text.d.ts +320 -165
  50. package/lib/api/services/text.js +320 -165
  51. package/lib/api/services/transforms.d.ts +145 -58
  52. package/lib/api/services/transforms.js +145 -58
  53. package/lib/api/services/vector.d.ts +381 -156
  54. package/lib/api/services/vector.js +381 -156
  55. package/package.json +1 -1
@@ -91,10 +91,13 @@ export var Math;
91
91
  easeEnum["easeOutBounce"] = "easeOutBounce";
92
92
  easeEnum["easeInOutBounce"] = "easeInOutBounce";
93
93
  })(easeEnum = Math.easeEnum || (Math.easeEnum = {}));
94
+ /**
95
+ * A number and a divisor for `math.modulus`, which gives the remainder of the division.
96
+ */
94
97
  class ModulusDto {
95
98
  constructor(number, modulus) {
96
99
  /**
97
- * Number
100
+ * The number to divide.
98
101
  * @default 1
99
102
  * @minimum -Infinity
100
103
  * @maximum Infinity
@@ -102,8 +105,8 @@ export var Math;
102
105
  */
103
106
  this.number = 1;
104
107
  /**
105
- * Modulus
106
- * @default 1
108
+ * The number to divide by; the remainder is smaller than it.
109
+ * @default 2
107
110
  * @minimum -Infinity
108
111
  * @maximum Infinity
109
112
  * @step 0.1
@@ -118,10 +121,14 @@ export var Math;
118
121
  }
119
122
  }
120
123
  Math.ModulusDto = ModulusDto;
124
+ /**
125
+ * One number for the single-number methods of `math`: `sqrt`, `abs`, `sin`, `degToRad` and the
126
+ * rest.
127
+ */
121
128
  class NumberDto {
122
129
  constructor(number) {
123
130
  /**
124
- * Number
131
+ * The number the method works on; for the trigonometric methods an angle in radians.
125
132
  * @default 1
126
133
  * @minimum -Infinity
127
134
  * @maximum Infinity
@@ -134,10 +141,13 @@ export var Math;
134
141
  }
135
142
  }
136
143
  Math.NumberDto = NumberDto;
144
+ /**
145
+ * A value between 0 and 1, a target range and an easing curve for `math.ease`.
146
+ */
137
147
  class EaseDto {
138
148
  constructor(x) {
139
149
  /**
140
- * X value param between 0-1
150
+ * The position along the curve, from 0 at `min` to 1 at `max`.
141
151
  * @default 0.5
142
152
  * @minimum 0
143
153
  * @maximum 1
@@ -145,7 +155,7 @@ export var Math;
145
155
  */
146
156
  this.x = 0.5;
147
157
  /**
148
- * Minimum value
158
+ * The value at the start of the curve.
149
159
  * @default 0
150
160
  * @minimum -Infinity
151
161
  * @maximum Infinity
@@ -153,7 +163,7 @@ export var Math;
153
163
  */
154
164
  this.min = 0;
155
165
  /**
156
- * Maximum value
166
+ * The value at the end of the curve.
157
167
  * @default 1
158
168
  * @minimum -Infinity
159
169
  * @maximum Infinity
@@ -161,7 +171,8 @@ export var Math;
161
171
  */
162
172
  this.max = 1;
163
173
  /**
164
- * Ease function
174
+ * The easing curve: `easeIn` starts slowly, `easeOut` ends slowly, `easeInOut` does both,
175
+ * in sine, quadratic, cubic and other strengths.
165
176
  * @default easeInSine
166
177
  */
167
178
  this.ease = easeEnum.easeInSine;
@@ -171,10 +182,13 @@ export var Math;
171
182
  }
172
183
  }
173
184
  Math.EaseDto = EaseDto;
185
+ /**
186
+ * A number and a precision for `math.roundToDecimals` and `math.roundAndRemoveTrailingZeros`.
187
+ */
174
188
  class RoundToDecimalsDto {
175
189
  constructor(number, decimalPlaces) {
176
190
  /**
177
- * Number to round
191
+ * The number to round; it is not changed, a rounded copy is returned.
178
192
  * @default 1.123456
179
193
  * @minimum -Infinity
180
194
  * @maximum Infinity
@@ -182,7 +196,7 @@ export var Math;
182
196
  */
183
197
  this.number = 1.123456;
184
198
  /**
185
- * Number of decimal places
199
+ * How many digits to keep after the decimal point; 0 rounds to a whole number.
186
200
  * @default 2
187
201
  * @minimum -Infinity
188
202
  * @maximum Infinity
@@ -198,10 +212,13 @@ export var Math;
198
212
  }
199
213
  }
200
214
  Math.RoundToDecimalsDto = RoundToDecimalsDto;
215
+ /**
216
+ * Two numbers and the arithmetic operation `math.twoNrOperation` applies to them.
217
+ */
201
218
  class ActionOnTwoNumbersDto {
202
219
  constructor(first, second, operation) {
203
220
  /**
204
- * First number
221
+ * The first operand: the number subtracted from, divided, or raised to a power.
205
222
  * @default 1
206
223
  * @minimum -Infinity
207
224
  * @maximum Infinity
@@ -209,7 +226,7 @@ export var Math;
209
226
  */
210
227
  this.first = 1;
211
228
  /**
212
- * Second number
229
+ * The second operand: the number subtracted, divided by, or used as the exponent.
213
230
  * @default 1
214
231
  * @minimum -Infinity
215
232
  * @maximum Infinity
@@ -217,7 +234,7 @@ export var Math;
217
234
  */
218
235
  this.second = 1;
219
236
  /**
220
- * Point
237
+ * The operation to apply to `first` and `second`, in that order
221
238
  * @default add
222
239
  */
223
240
  this.operation = mathTwoNrOperatorEnum.add;
@@ -233,10 +250,13 @@ export var Math;
233
250
  }
234
251
  }
235
252
  Math.ActionOnTwoNumbersDto = ActionOnTwoNumbersDto;
253
+ /**
254
+ * Two numbers for `math.add`, `math.subtract`, `math.multiply`, `math.divide` and `math.power`.
255
+ */
236
256
  class TwoNumbersDto {
237
257
  constructor(first, second) {
238
258
  /**
239
- * First number
259
+ * The first operand: the number subtracted from, divided, or raised to a power.
240
260
  * @default 1
241
261
  * @minimum -Infinity
242
262
  * @maximum Infinity
@@ -244,7 +264,7 @@ export var Math;
244
264
  */
245
265
  this.first = 1;
246
266
  /**
247
- * Second number
267
+ * The second operand: the number subtracted, divided by, or used as the exponent.
248
268
  * @default 2
249
269
  * @minimum -Infinity
250
270
  * @maximum Infinity
@@ -260,10 +280,13 @@ export var Math;
260
280
  }
261
281
  }
262
282
  Math.TwoNumbersDto = TwoNumbersDto;
283
+ /**
284
+ * One number and the operation `math.oneNrOperation` applies to it.
285
+ */
263
286
  class ActionOnOneNumberDto {
264
287
  constructor(number, operation) {
265
288
  /**
266
- * First number
289
+ * The number the operation works on; for the trigonometric operations an angle in radians.
267
290
  * @default 1
268
291
  * @minimum -Infinity
269
292
  * @maximum Infinity
@@ -271,7 +294,7 @@ export var Math;
271
294
  */
272
295
  this.number = 1;
273
296
  /**
274
- * Point
297
+ * The operation to apply to `number`
275
298
  * @default absolute
276
299
  */
277
300
  this.operation = mathOneNrOperatorEnum.absolute;
@@ -284,10 +307,13 @@ export var Math;
284
307
  }
285
308
  }
286
309
  Math.ActionOnOneNumberDto = ActionOnOneNumberDto;
310
+ /**
311
+ * A number, the range it is in and the range `math.remap` maps it to.
312
+ */
287
313
  class RemapNumberDto {
288
314
  constructor(number, fromLow, fromHigh, toLow, toHigh) {
289
315
  /**
290
- * Number to remap
316
+ * The number to map.
291
317
  * @default 0.5
292
318
  * @minimum -Infinity
293
319
  * @maximum Infinity
@@ -295,7 +321,7 @@ export var Math;
295
321
  */
296
322
  this.number = 0.5;
297
323
  /**
298
- * First number range min
324
+ * The low end of the range the number is in.
299
325
  * @default 0
300
326
  * @minimum -Infinity
301
327
  * @maximum Infinity
@@ -303,15 +329,15 @@ export var Math;
303
329
  */
304
330
  this.fromLow = 0;
305
331
  /**
306
- * Map to range min
307
- * @default 1
308
- * @minimum -Infinity
309
- * @maximum Infinity
310
- * @step 0.1
311
- */
332
+ * The high end of the range the number is in.
333
+ * @default 1
334
+ * @minimum -Infinity
335
+ * @maximum Infinity
336
+ * @step 0.1
337
+ */
312
338
  this.fromHigh = 1;
313
339
  /**
314
- * First number range max
340
+ * The low end of the range to map to; `fromLow` lands here.
315
341
  * @default 1
316
342
  * @minimum -Infinity
317
343
  * @maximum Infinity
@@ -319,7 +345,7 @@ export var Math;
319
345
  */
320
346
  this.toLow = 1;
321
347
  /**
322
- * Map to range max
348
+ * The high end of the range to map to; `fromHigh` lands here.
323
349
  * @default 2
324
350
  * @minimum -Infinity
325
351
  * @maximum Infinity
@@ -344,10 +370,14 @@ export var Math;
344
370
  }
345
371
  }
346
372
  Math.RemapNumberDto = RemapNumberDto;
373
+ /**
374
+ * The range `math.randomNumber` picks a value from; `low` can be picked, `high` is never quite
375
+ * reached.
376
+ */
347
377
  class RandomNumberDto {
348
378
  constructor(low, high) {
349
379
  /**
350
- * Low range of random value
380
+ * The smallest value that can be picked.
351
381
  * @default 0
352
382
  * @minimum -Infinity
353
383
  * @maximum Infinity
@@ -355,7 +385,7 @@ export var Math;
355
385
  */
356
386
  this.low = 0;
357
387
  /**
358
- * High range of random value
388
+ * The top of the range; values get close to it but never reach it.
359
389
  * @default 1
360
390
  * @minimum -Infinity
361
391
  * @maximum Infinity
@@ -371,10 +401,14 @@ export var Math;
371
401
  }
372
402
  }
373
403
  Math.RandomNumberDto = RandomNumberDto;
404
+ /**
405
+ * The range and the count for `math.randomNumbers`; `low` can be picked, `high` is never quite
406
+ * reached.
407
+ */
374
408
  class RandomNumbersDto {
375
409
  constructor(low, high, count) {
376
410
  /**
377
- * Low range of random value
411
+ * The smallest value that can be picked.
378
412
  * @default 0
379
413
  * @minimum -Infinity
380
414
  * @maximum Infinity
@@ -382,7 +416,7 @@ export var Math;
382
416
  */
383
417
  this.low = 0;
384
418
  /**
385
- * High range of random value
419
+ * The top of the range; values get close to it but never reach it.
386
420
  * @default 1
387
421
  * @minimum -Infinity
388
422
  * @maximum Infinity
@@ -390,7 +424,7 @@ export var Math;
390
424
  */
391
425
  this.high = 1;
392
426
  /**
393
- * Number of produced random values
427
+ * How many random numbers to produce.
394
428
  * @default 10
395
429
  * @minimum -Infinity
396
430
  * @maximum Infinity
@@ -409,10 +443,13 @@ export var Math;
409
443
  }
410
444
  }
411
445
  Math.RandomNumbersDto = RandomNumbersDto;
446
+ /**
447
+ * A number and a precision for `math.toFixed`, which formats it as text.
448
+ */
412
449
  class ToFixedDto {
413
450
  constructor(number, decimalPlaces) {
414
451
  /**
415
- * Number of decimal places
452
+ * How many digits to show after the decimal point, padding with zeros.
416
453
  * @default 2
417
454
  * @minimum -Infinity
418
455
  * @maximum Infinity
@@ -428,10 +465,13 @@ export var Math;
428
465
  }
429
466
  }
430
467
  Math.ToFixedDto = ToFixedDto;
468
+ /**
469
+ * A number and the range `math.clamp` keeps it within.
470
+ */
431
471
  class ClampDto {
432
472
  constructor(number, min, max) {
433
473
  /**
434
- * Number to clamp
474
+ * The number to limit.
435
475
  * @default 0.5
436
476
  * @minimum -Infinity
437
477
  * @maximum Infinity
@@ -439,7 +479,7 @@ export var Math;
439
479
  */
440
480
  this.number = 0.5;
441
481
  /**
442
- * Minimum value
482
+ * The lowest value allowed; anything below becomes this.
443
483
  * @default 0
444
484
  * @minimum -Infinity
445
485
  * @maximum Infinity
@@ -447,7 +487,7 @@ export var Math;
447
487
  */
448
488
  this.min = 0;
449
489
  /**
450
- * Maximum value
490
+ * The highest value allowed; anything above becomes this.
451
491
  * @default 1
452
492
  * @minimum -Infinity
453
493
  * @maximum Infinity
@@ -466,10 +506,13 @@ export var Math;
466
506
  }
467
507
  }
468
508
  Math.ClampDto = ClampDto;
509
+ /**
510
+ * A start, an end and a fraction for `math.lerp`, which blends between them.
511
+ */
469
512
  class LerpDto {
470
513
  constructor(start, end, t) {
471
514
  /**
472
- * Start value
515
+ * The value at fraction 0.
473
516
  * @default 0
474
517
  * @minimum -Infinity
475
518
  * @maximum Infinity
@@ -477,7 +520,7 @@ export var Math;
477
520
  */
478
521
  this.start = 0;
479
522
  /**
480
- * End value
523
+ * The value at fraction 1.
481
524
  * @default 1
482
525
  * @minimum -Infinity
483
526
  * @maximum Infinity
@@ -485,7 +528,7 @@ export var Math;
485
528
  */
486
529
  this.end = 1;
487
530
  /**
488
- * Interpolation value (0-1)
531
+ * How far from start to end, from 0 to 1; values outside that range extrapolate.
489
532
  * @default 0.5
490
533
  * @minimum -Infinity
491
534
  * @maximum Infinity
@@ -504,10 +547,14 @@ export var Math;
504
547
  }
505
548
  }
506
549
  Math.LerpDto = LerpDto;
550
+ /**
551
+ * A start, an end and a value for `math.inverseLerp`, which finds the value's fraction between
552
+ * them.
553
+ */
507
554
  class InverseLerpDto {
508
555
  constructor(start, end, value) {
509
556
  /**
510
- * Start value
557
+ * The value that counts as fraction 0.
511
558
  * @default 0
512
559
  * @minimum -Infinity
513
560
  * @maximum Infinity
@@ -515,7 +562,7 @@ export var Math;
515
562
  */
516
563
  this.start = 0;
517
564
  /**
518
- * End value
565
+ * The value that counts as fraction 1.
519
566
  * @default 1
520
567
  * @minimum -Infinity
521
568
  * @maximum Infinity
@@ -523,7 +570,7 @@ export var Math;
523
570
  */
524
571
  this.end = 1;
525
572
  /**
526
- * Value to find t for
573
+ * The value to locate between start and end.
527
574
  * @default 0.5
528
575
  * @minimum -Infinity
529
576
  * @maximum Infinity
@@ -542,10 +589,13 @@ export var Math;
542
589
  }
543
590
  }
544
591
  Math.InverseLerpDto = InverseLerpDto;
592
+ /**
593
+ * A number and the range `math.wrap` cycles it into.
594
+ */
545
595
  class WrapDto {
546
596
  constructor(number, min, max) {
547
597
  /**
548
- * Number to wrap
598
+ * The number to wrap; it may be far outside the range.
549
599
  * @default 1.5
550
600
  * @minimum -Infinity
551
601
  * @maximum Infinity
@@ -553,7 +603,7 @@ export var Math;
553
603
  */
554
604
  this.number = 1.5;
555
605
  /**
556
- * Minimum value
606
+ * The start of the range, included in the result.
557
607
  * @default 0
558
608
  * @minimum -Infinity
559
609
  * @maximum Infinity
@@ -561,7 +611,7 @@ export var Math;
561
611
  */
562
612
  this.min = 0;
563
613
  /**
564
- * Maximum value
614
+ * The end of the range, not included: a number reaching it comes back in at `min`.
565
615
  * @default 1
566
616
  * @minimum -Infinity
567
617
  * @maximum Infinity
@@ -580,10 +630,14 @@ export var Math;
580
630
  }
581
631
  }
582
632
  Math.WrapDto = WrapDto;
633
+ /**
634
+ * A running value and a length for `math.pingPong`, which bounces the value between 0 and the
635
+ * length.
636
+ */
583
637
  class PingPongDto {
584
638
  constructor(t, length) {
585
639
  /**
586
- * Time value
640
+ * The running value, such as elapsed time; it may grow without limit.
587
641
  * @default 0.5
588
642
  * @minimum -Infinity
589
643
  * @maximum Infinity
@@ -591,7 +645,7 @@ export var Math;
591
645
  */
592
646
  this.t = 0.5;
593
647
  /**
594
- * Length of ping pong
648
+ * The turning point: the result rises to it, then falls back to 0.
595
649
  * @default 1
596
650
  * @minimum -Infinity
597
651
  * @maximum Infinity
@@ -607,10 +661,13 @@ export var Math;
607
661
  }
608
662
  }
609
663
  Math.PingPongDto = PingPongDto;
664
+ /**
665
+ * A current value, a target and a step limit for `math.moveTowards`.
666
+ */
610
667
  class MoveTowardsDto {
611
668
  constructor(current, target, maxDelta) {
612
669
  /**
613
- * Current value
670
+ * The value to move.
614
671
  * @default 0
615
672
  * @minimum -Infinity
616
673
  * @maximum Infinity
@@ -618,7 +675,7 @@ export var Math;
618
675
  */
619
676
  this.current = 0;
620
677
  /**
621
- * Target value
678
+ * The value to move toward; it is never overshot.
622
679
  * @default 1
623
680
  * @minimum -Infinity
624
681
  * @maximum Infinity
@@ -626,7 +683,7 @@ export var Math;
626
683
  */
627
684
  this.target = 1;
628
685
  /**
629
- * Maximum change amount
686
+ * The largest change allowed in one step.
630
687
  * @default 0.1
631
688
  * @minimum -Infinity
632
689
  * @maximum Infinity
@@ -645,10 +702,14 @@ export var Math;
645
702
  }
646
703
  }
647
704
  Math.MoveTowardsDto = MoveTowardsDto;
705
+ /**
706
+ * An expression written as text for `math.evalArithmetic`.
707
+ */
648
708
  class EvalArithmeticDto {
649
709
  constructor(expression) {
650
710
  /**
651
- * Arithmetic expression containing numbers, +, -, *, /, and parentheses
711
+ * The expression: numbers, `+`, `-`, the multiplication sign, `/`, parentheses and spaces,
712
+ * such as `(3 + 2) / 4`.
652
713
  * @default 1+1
653
714
  */
654
715
  this.expression = "1+1";
@@ -5,36 +5,46 @@ import { Base } from "./base-inputs";
5
5
  * different kernels and the renderer expect.
6
6
  */
7
7
  export declare namespace Mesh {
8
+ /**
9
+ * A point and a plane for `mesh.signedDistanceToPlane`.
10
+ */
8
11
  class SignedDistanceFromPlaneToPointDto {
9
12
  constructor(point?: Base.Point3, plane?: Base.TrianglePlane3);
10
13
  /**
11
- * Point from which to find the distance
14
+ * The point to measure from.
12
15
  * @default undefined
13
16
  */
14
17
  point: Base.Point3;
15
18
  /**
16
- * Triangle plane to which the distance is calculated
19
+ * The plane as a unit normal and its distance from the origin along that normal, such as
20
+ * `calculateTrianglePlane` gives.
17
21
  * @default undefined
18
22
  */
19
23
  plane: Base.TrianglePlane3;
20
24
  }
25
+ /**
26
+ * One triangle as three points, for methods that read it.
27
+ */
21
28
  class TriangleDto {
22
29
  constructor(triangle?: Base.Triangle3);
23
30
  /**
24
- * Triangle to be used
31
+ * The triangle as three points.
25
32
  * @default undefined
26
33
  */
27
34
  triangle: Base.Triangle3;
28
35
  }
36
+ /**
37
+ * A triangle and a tolerance for `mesh.calculateTrianglePlane`.
38
+ */
29
39
  class TriangleToleranceDto {
30
40
  constructor(triangle?: Base.Triangle3);
31
41
  /**
32
- * Triangle to be used
42
+ * The triangle as three points.
33
43
  * @default undefined
34
44
  */
35
45
  triangle: Base.Triangle3;
36
46
  /**
37
- * Tolerance for the calculation
47
+ * A triangle whose normal is shorter than this counts as having no area.
38
48
  * @default 1e-7
39
49
  * @minimum -Infinity
40
50
  * @maximum Infinity
@@ -42,20 +52,24 @@ export declare namespace Mesh {
42
52
  */
43
53
  tolerance?: number | undefined;
44
54
  }
55
+ /**
56
+ * Two triangles and a tolerance for `mesh.triangleTriangleIntersection`.
57
+ */
45
58
  class TriangleTriangleToleranceDto {
46
59
  constructor(triangle1?: Base.Triangle3, triangle2?: Base.Triangle3, tolerance?: number);
47
60
  /**
48
- * First triangle
61
+ * The first triangle as three points.
49
62
  * @default undefined
50
63
  */
51
64
  triangle1: Base.Triangle3;
52
65
  /**
53
- * Second triangle
66
+ * The second triangle as three points.
54
67
  * @default undefined
55
68
  */
56
69
  triangle2: Base.Triangle3;
57
70
  /**
58
- * Tolerance for the calculation
71
+ * Distances below this, in model units, count as zero when deciding whether the triangles
72
+ * touch.
59
73
  * @default 1e-7
60
74
  * @minimum -Infinity
61
75
  * @maximum Infinity
@@ -63,20 +77,25 @@ export declare namespace Mesh {
63
77
  */
64
78
  tolerance?: number | undefined;
65
79
  }
80
+ /**
81
+ * Two meshes and a tolerance for `mesh.meshMeshIntersectionSegments`,
82
+ * `mesh.meshMeshIntersectionPolylines` and `mesh.meshMeshIntersectionPoints`.
83
+ */
66
84
  class MeshMeshToleranceDto {
67
85
  constructor(mesh1?: Base.Mesh3, mesh2?: Base.Mesh3, tolerance?: number);
68
86
  /**
69
- * First mesh
87
+ * The first mesh, as a list of triangles.
70
88
  * @default undefined
71
89
  */
72
90
  mesh1: Base.Mesh3;
73
91
  /**
74
- * Second mesh
92
+ * The second mesh, as a list of triangles.
75
93
  * @default undefined
76
94
  */
77
95
  mesh2: Base.Mesh3;
78
96
  /**
79
- * Tolerance for the calculation
97
+ * Distances below this, in model units, count as zero: when deciding whether triangles
98
+ * touch and when joining segment ends into polylines.
80
99
  * @default 1e-7
81
100
  * @minimum -Infinity
82
101
  * @maximum Infinity
@@ -6,6 +6,9 @@
6
6
  */
7
7
  export var Mesh;
8
8
  (function (Mesh) {
9
+ /**
10
+ * A point and a plane for `mesh.signedDistanceToPlane`.
11
+ */
9
12
  class SignedDistanceFromPlaneToPointDto {
10
13
  constructor(point, plane) {
11
14
  if (point !== undefined) {
@@ -17,6 +20,9 @@ export var Mesh;
17
20
  }
18
21
  }
19
22
  Mesh.SignedDistanceFromPlaneToPointDto = SignedDistanceFromPlaneToPointDto;
23
+ /**
24
+ * One triangle as three points, for methods that read it.
25
+ */
20
26
  class TriangleDto {
21
27
  constructor(triangle) {
22
28
  if (triangle !== undefined) {
@@ -25,10 +31,13 @@ export var Mesh;
25
31
  }
26
32
  }
27
33
  Mesh.TriangleDto = TriangleDto;
34
+ /**
35
+ * A triangle and a tolerance for `mesh.calculateTrianglePlane`.
36
+ */
28
37
  class TriangleToleranceDto {
29
38
  constructor(triangle) {
30
39
  /**
31
- * Tolerance for the calculation
40
+ * A triangle whose normal is shorter than this counts as having no area.
32
41
  * @default 1e-7
33
42
  * @minimum -Infinity
34
43
  * @maximum Infinity
@@ -41,10 +50,14 @@ export var Mesh;
41
50
  }
42
51
  }
43
52
  Mesh.TriangleToleranceDto = TriangleToleranceDto;
53
+ /**
54
+ * Two triangles and a tolerance for `mesh.triangleTriangleIntersection`.
55
+ */
44
56
  class TriangleTriangleToleranceDto {
45
57
  constructor(triangle1, triangle2, tolerance) {
46
58
  /**
47
- * Tolerance for the calculation
59
+ * Distances below this, in model units, count as zero when deciding whether the triangles
60
+ * touch.
48
61
  * @default 1e-7
49
62
  * @minimum -Infinity
50
63
  * @maximum Infinity
@@ -63,10 +76,15 @@ export var Mesh;
63
76
  }
64
77
  }
65
78
  Mesh.TriangleTriangleToleranceDto = TriangleTriangleToleranceDto;
79
+ /**
80
+ * Two meshes and a tolerance for `mesh.meshMeshIntersectionSegments`,
81
+ * `mesh.meshMeshIntersectionPolylines` and `mesh.meshMeshIntersectionPoints`.
82
+ */
66
83
  class MeshMeshToleranceDto {
67
84
  constructor(mesh1, mesh2, tolerance) {
68
85
  /**
69
- * Tolerance for the calculation
86
+ * Distances below this, in model units, count as zero: when deciding whether triangles
87
+ * touch and when joining segment ends into polylines.
70
88
  * @default 1e-7
71
89
  * @minimum -Infinity
72
90
  * @maximum Infinity