@itwin/core-geometry 4.0.0-dev.55 → 4.0.0-dev.58

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 (97) hide show
  1. package/lib/cjs/Geometry.d.ts +5 -1
  2. package/lib/cjs/Geometry.d.ts.map +1 -1
  3. package/lib/cjs/Geometry.js +5 -1
  4. package/lib/cjs/Geometry.js.map +1 -1
  5. package/lib/cjs/geometry3d/Angle.d.ts +29 -34
  6. package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
  7. package/lib/cjs/geometry3d/Angle.js +31 -36
  8. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  9. package/lib/cjs/geometry3d/AngleSweep.d.ts +48 -43
  10. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  11. package/lib/cjs/geometry3d/AngleSweep.js +48 -43
  12. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  13. package/lib/cjs/geometry3d/Matrix3d.d.ts +5 -8
  14. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  15. package/lib/cjs/geometry3d/Matrix3d.js +5 -8
  16. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  17. package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts +3 -3
  18. package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
  19. package/lib/cjs/geometry3d/OrderedRotationAngles.js +3 -3
  20. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  21. package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +8 -10
  22. package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
  23. package/lib/cjs/geometry3d/Point2dArrayCarrier.js +8 -10
  24. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  25. package/lib/cjs/geometry3d/Point2dVector2d.d.ts +37 -34
  26. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  27. package/lib/cjs/geometry3d/Point2dVector2d.js +38 -35
  28. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  29. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +17 -21
  30. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  31. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +16 -20
  32. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  33. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +84 -67
  34. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  35. package/lib/cjs/geometry3d/Point3dVector3d.js +84 -67
  36. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  37. package/lib/cjs/geometry3d/Transform.d.ts +76 -66
  38. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  39. package/lib/cjs/geometry3d/Transform.js +88 -77
  40. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  41. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +15 -16
  42. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  43. package/lib/cjs/geometry3d/YawPitchRollAngles.js +14 -15
  44. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  45. package/lib/cjs/serialization/GeometrySamples.d.ts +72 -58
  46. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  47. package/lib/cjs/serialization/GeometrySamples.js +132 -108
  48. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  49. package/lib/esm/Geometry.d.ts +5 -1
  50. package/lib/esm/Geometry.d.ts.map +1 -1
  51. package/lib/esm/Geometry.js +5 -1
  52. package/lib/esm/Geometry.js.map +1 -1
  53. package/lib/esm/geometry3d/Angle.d.ts +29 -34
  54. package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
  55. package/lib/esm/geometry3d/Angle.js +31 -36
  56. package/lib/esm/geometry3d/Angle.js.map +1 -1
  57. package/lib/esm/geometry3d/AngleSweep.d.ts +48 -43
  58. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  59. package/lib/esm/geometry3d/AngleSweep.js +48 -43
  60. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  61. package/lib/esm/geometry3d/Matrix3d.d.ts +5 -8
  62. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  63. package/lib/esm/geometry3d/Matrix3d.js +5 -8
  64. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  65. package/lib/esm/geometry3d/OrderedRotationAngles.d.ts +3 -3
  66. package/lib/esm/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
  67. package/lib/esm/geometry3d/OrderedRotationAngles.js +3 -3
  68. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  69. package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +8 -10
  70. package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
  71. package/lib/esm/geometry3d/Point2dArrayCarrier.js +8 -10
  72. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  73. package/lib/esm/geometry3d/Point2dVector2d.d.ts +37 -34
  74. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  75. package/lib/esm/geometry3d/Point2dVector2d.js +38 -35
  76. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  77. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +17 -21
  78. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  79. package/lib/esm/geometry3d/Point3dArrayCarrier.js +16 -20
  80. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  81. package/lib/esm/geometry3d/Point3dVector3d.d.ts +84 -67
  82. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  83. package/lib/esm/geometry3d/Point3dVector3d.js +84 -67
  84. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  85. package/lib/esm/geometry3d/Transform.d.ts +76 -66
  86. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  87. package/lib/esm/geometry3d/Transform.js +88 -77
  88. package/lib/esm/geometry3d/Transform.js.map +1 -1
  89. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +15 -16
  90. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  91. package/lib/esm/geometry3d/YawPitchRollAngles.js +14 -15
  92. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  93. package/lib/esm/serialization/GeometrySamples.d.ts +72 -58
  94. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  95. package/lib/esm/serialization/GeometrySamples.js +132 -108
  96. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  97. package/package.json +3 -3
@@ -67,19 +67,22 @@ class SteppedIndexFunctionFactory {
67
67
  static createConstant(value = 0) {
68
68
  return (_i, _n) => value;
69
69
  }
70
- /** Return a function that steps linearly
70
+ /**
71
+ * Return a function that steps linearly
71
72
  * * f(i,n) = y0 + (i/n) * a
72
73
  */
73
74
  static createLinear(a, f0 = 0) {
74
75
  return (i, n) => (f0 + a * (i / n));
75
76
  }
76
- /** Return a function that steps with cosine of angles in sweep
77
+ /**
78
+ * Return a function that steps with cosine of angles in sweep
77
79
  * * f(i,n) = y0 + amplitude * cos(i/n)
78
80
  */
79
81
  static createCosine(amplitude, sweep = AngleSweep_1.AngleSweep.create360(), f0 = 0) {
80
82
  return (i, n) => (f0 + amplitude * Math.cos(sweep.fractionToRadians(i / n)));
81
83
  }
82
- /** Return a function that steps with cosine of angles in sweep.
84
+ /**
85
+ * Return a function that steps with cosine of angles in sweep.
83
86
  * * f(i,n) = y0 + amplitude * sin(i/n)
84
87
  */
85
88
  static createSine(amplitude, sweep = AngleSweep_1.AngleSweep.create360(), f0 = 0) {
@@ -92,7 +95,8 @@ exports.SteppedIndexFunctionFactory = SteppedIndexFunctionFactory;
92
95
  * @alpha
93
96
  */
94
97
  class Sample {
95
- /** Return an array of Point3d, with x,y,z all stepping through a range of values.
98
+ /**
99
+ * Return an array of Point3d, with x,y,z all stepping through a range of values.
96
100
  * x varies fastest, then y then z
97
101
  */
98
102
  static createPoint3dLattice(low, step, high) {
@@ -103,7 +107,8 @@ class Sample {
103
107
  points.push(Point3dVector3d_1.Point3d.create(x, y, z));
104
108
  return points;
105
109
  }
106
- /** Return an array of Point2d, with x,y all stepping through a range of values.
110
+ /**
111
+ * Return an array of Point2d, with x,y all stepping through a range of values.
107
112
  * x varies fastest, then y
108
113
  */
109
114
  static createPoint2dLattice(low, step, high) {
@@ -151,7 +156,8 @@ class Sample {
151
156
  static createCenteredRectangleXY(cx, cy, ax, ay, z = 0) {
152
157
  return this.createRectangleXY(cx - ax, cy - ay, 2 * ax, 2 * ay, z);
153
158
  }
154
- /** Access the last point in the array. push another shifted by dx,dy,dz.
159
+ /**
160
+ * Access the last point in the array. push another shifted by dx,dy,dz.
155
161
  * * No push if all are 0.
156
162
  * * If array is empty, push a leading 000
157
163
  */
@@ -173,7 +179,8 @@ class Sample {
173
179
  points.push(points[0].clone());
174
180
  return points;
175
181
  }
176
- /** Create points for an L shaped polygon
182
+ /**
183
+ * Create points for an L shaped polygon
177
184
  * * lower left at x0,y0.
178
185
  * * ax,ay are larger side lengths (lower left to corners along x and y directions)
179
186
  * * bx,by are smaller side lengths (inner corner to points along x and y directions)
@@ -198,7 +205,7 @@ class Sample {
198
205
  return [
199
206
  plane0, plane1, plane2,
200
207
  ClipPlane_1.ClipPlane.createNormalAndDistance(Point3dVector3d_1.Vector3d.create(3, 4, 0), 2.0),
201
- ClipPlane_1.ClipPlane.createEdgeXY(Point3dVector3d_1.Point3d.create(1, 0, 0), Point3dVector3d_1.Point3d.create(24, 32, 0))
208
+ ClipPlane_1.ClipPlane.createEdgeXY(Point3dVector3d_1.Point3d.create(1, 0, 0), Point3dVector3d_1.Point3d.create(24, 32, 0)),
202
209
  ];
203
210
  }
204
211
  /**
@@ -214,16 +221,17 @@ class Sample {
214
221
  const quadrant4 = ConvexClipPlaneSet_1.ConvexClipPlaneSet.createXYBox(0, -1, 1, 0);
215
222
  result.push(UnionOfConvexClipPlaneSets_1.UnionOfConvexClipPlaneSets.createConvexSets([
216
223
  quadrant1.clone(),
217
- quadrant4.clone()
224
+ quadrant4.clone(),
218
225
  ]));
219
226
  result.push(UnionOfConvexClipPlaneSets_1.UnionOfConvexClipPlaneSets.createConvexSets([
220
227
  quadrant1.clone(),
221
228
  quadrant2.clone(),
222
- quadrant4.clone()
229
+ quadrant4.clone(),
223
230
  ]));
224
231
  return result;
225
232
  }
226
- /** Create (unweighted) bspline curves.
233
+ /**
234
+ * Create (unweighted) bspline curves.
227
235
  * order varies from 2 to 5
228
236
  */
229
237
  static createBsplineCurves(includeMultipleKnots = false) {
@@ -260,7 +268,8 @@ class Sample {
260
268
  }
261
269
  return result;
262
270
  }
263
- /** Create weighted bspline curves.
271
+ /**
272
+ * Create weighted bspline curves.
264
273
  * order varies from 2 to 5
265
274
  */
266
275
  static createBspline3dHCurves() {
@@ -298,8 +307,7 @@ class Sample {
298
307
  }
299
308
  return result;
300
309
  }
301
- /** Create weighted bsplines for circular arcs.
302
- */
310
+ /** Create weighted bsplines for circular arcs. */
303
311
  static createBspline3dHArcs() {
304
312
  const result = [];
305
313
  const halfRadians = Angle_1.Angle.degreesToRadians(60.0);
@@ -314,14 +322,15 @@ class Sample {
314
322
  Point4d_1.Point4d.create(-1, 0, 0, c),
315
323
  Point4d_1.Point4d.create(-c, -s, 0, 1),
316
324
  Point4d_1.Point4d.create(c, -s, 0, c),
317
- Point4d_1.Point4d.create(1, 0, 0, 1)
325
+ Point4d_1.Point4d.create(1, 0, 0, 1),
318
326
  ];
319
327
  const knots = [0, 0, 1, 1, 2, 2, 3, 3];
320
328
  const curve = BSplineCurve3dH_1.BSplineCurve3dH.create(points, knots, 3);
321
329
  result.push(curve);
322
330
  return result;
323
331
  }
324
- /** Return array [x,y,z,w] bspline control points for an arc in 90 degree bspline spans.
332
+ /**
333
+ * Return array [x,y,z,w] bspline control points for an arc in 90 degree bspline spans.
325
334
  * @param points array of [x,y,z,w]
326
335
  * @param center center of arc
327
336
  * @param axes matrix with 0 and 90 degree axes
@@ -367,7 +376,7 @@ class Sample {
367
376
  result.push(b);
368
377
  return result;
369
378
  }
370
- /** create a plane from origin and normal coordinates -- default to 001 normal if needed. */
379
+ /** Create a plane from origin and normal coordinates -- default to 001 normal if needed. */
371
380
  static createPlane(x, y, z, u, v, w) {
372
381
  const point = Point3dVector3d_1.Point3d.create(x, y, z);
373
382
  const vector = Point3dVector3d_1.Vector3d.create(u, v, w).normalize();
@@ -387,22 +396,23 @@ class Sample {
387
396
  return [
388
397
  LineString3d_1.LineString3d.createPoints([
389
398
  Point3dVector3d_1.Point3d.create(0, 0, 0),
390
- Point3dVector3d_1.Point3d.create(1, 0, 0)
399
+ Point3dVector3d_1.Point3d.create(1, 0, 0),
391
400
  ]),
392
401
  LineString3d_1.LineString3d.createPoints([
393
402
  Point3dVector3d_1.Point3d.create(0, 0, 0),
394
403
  Point3dVector3d_1.Point3d.create(1, 0, 0),
395
- Point3dVector3d_1.Point3d.create(1, 1, 0)
404
+ Point3dVector3d_1.Point3d.create(1, 1, 0),
396
405
  ]),
397
406
  LineString3d_1.LineString3d.createPoints([
398
407
  Point3dVector3d_1.Point3d.create(0, 0, 0),
399
408
  Point3dVector3d_1.Point3d.create(1, 0, 0),
400
409
  Point3dVector3d_1.Point3d.create(1, 1, 0),
401
- Point3dVector3d_1.Point3d.create(2, 2, 0)
402
- ])
410
+ Point3dVector3d_1.Point3d.create(2, 2, 0),
411
+ ]),
403
412
  ];
404
413
  }
405
- /** Assorted Matrix3d:
414
+ /**
415
+ * Assorted Matrix3d:
406
416
  * * identity
407
417
  * * rotation around x
408
418
  * * rotation around general vector
@@ -427,10 +437,11 @@ class Sample {
427
437
  Transform_1.Transform.createTranslationXYZ(1, 2, 0),
428
438
  Transform_1.Transform.createTranslationXYZ(1, 2, 3),
429
439
  Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(4, 1, -2), Matrix3d_1.Matrix3d.createUniformScale(2.0)),
430
- Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(4, 1, -2), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.create(1, 2, 3), Angle_1.Angle.createRadians(10)))
440
+ Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(4, 1, -2), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.create(1, 2, 3), Angle_1.Angle.createRadians(10))),
431
441
  ];
432
442
  }
433
- /** Return an array of Matrix3d with various skew and scale. This includes at least:
443
+ /**
444
+ * Return an array of Matrix3d with various skew and scale. This includes at least:
434
445
  * * identity
435
446
  * * 3 distinct diagonals.
436
447
  * * The distinct diagonal base with smaller value added to other 6 spots in succession.
@@ -449,9 +460,10 @@ class Sample {
449
460
  Matrix3d_1.Matrix3d.createRowValues(5, 2, 3, 2, 6, 1, -1, 2, 7),
450
461
  ];
451
462
  }
452
- /** Return an array of singular Matrix3d. This includes at least:
463
+ /**
464
+ * Return an array of singular Matrix3d. This includes at least:
453
465
  * * all zeros
454
- * * one nonzero column
466
+ * * one non-zero column
455
467
  * * two independent columns, third is zero
456
468
  * * two independent columns, third is sum of those
457
469
  * * two independent columns, third is copy of one
@@ -463,26 +475,26 @@ class Sample {
463
475
  const vector0 = Point3dVector3d_1.Vector3d.createZero();
464
476
  return [
465
477
  Matrix3d_1.Matrix3d.createZero(),
466
- // one nonzero column
478
+ // one non-zero column
467
479
  Matrix3d_1.Matrix3d.createColumns(vectorU, vector0, vector0),
468
480
  Matrix3d_1.Matrix3d.createColumns(vector0, vectorU, vector0),
469
- Matrix3d_1.Matrix3d.createColumns(vector0, vector0, vector0),
470
- // two independent nonzero columns with zero
481
+ Matrix3d_1.Matrix3d.createColumns(vector0, vector0, vectorU),
482
+ // two independent non-zero columns with one zero column
471
483
  Matrix3d_1.Matrix3d.createColumns(vectorU, vectorV, vector0),
472
484
  Matrix3d_1.Matrix3d.createColumns(vector0, vectorU, vectorV),
473
- Matrix3d_1.Matrix3d.createColumns(vectorV, vector0, vector0),
474
- // third column dependent
485
+ Matrix3d_1.Matrix3d.createColumns(vectorU, vector0, vectorV),
486
+ // two independent columns with one dependent column
475
487
  Matrix3d_1.Matrix3d.createColumns(vectorU, vectorV, vectorUPlusV),
476
488
  Matrix3d_1.Matrix3d.createColumns(vectorU, vectorUPlusV, vectorV),
477
- Matrix3d_1.Matrix3d.createColumns(vectorUPlusV, vectorV, vectorU),
478
- // two independent with duplicate
479
- Matrix3d_1.Matrix3d.createColumns(vectorU, vectorV, vectorU),
489
+ Matrix3d_1.Matrix3d.createColumns(vectorUPlusV, vectorU, vectorV),
490
+ // two independent with columns with one duplicate column
480
491
  Matrix3d_1.Matrix3d.createColumns(vectorU, vectorU, vectorV),
481
- Matrix3d_1.Matrix3d.createColumns(vectorV, vectorV, vectorU)
492
+ Matrix3d_1.Matrix3d.createColumns(vectorU, vectorV, vectorU),
493
+ Matrix3d_1.Matrix3d.createColumns(vectorV, vectorU, vectorU),
482
494
  ];
483
495
  }
484
496
  /**
485
- * * Return an array of rigid transforms. This includes (at least)
497
+ * Return an array of rigid transforms. This includes (at least)
486
498
  * * Identity
487
499
  * * translation with identity matrix
488
500
  * * rotation around origin and arbitrary vector
@@ -497,16 +509,15 @@ class Sample {
497
509
  Transform_1.Transform.createTranslationXYZ(distanceScale3 * 1, distanceScale3 * 2, distanceScale3 * 3),
498
510
  Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(0, 0, 0), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.unitY(), Angle_1.Angle.createDegrees(10))),
499
511
  Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(distanceScale4 * 4, distanceScale4 * 1, -distanceScale4 * 2), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.create(1, 2, 3), Angle_1.Angle.createDegrees(10))),
500
- Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(distanceScale4 * 4, distanceScale4 * 1, -distanceScale4 * 2), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.create(-2, 1, 4), Angle_1.Angle.createDegrees(35)))
512
+ Transform_1.Transform.createFixedPointAndMatrix(Point3dVector3d_1.Point3d.create(distanceScale4 * 4, distanceScale4 * 1, -distanceScale4 * 2), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.create(-2, 1, 4), Angle_1.Angle.createDegrees(35))),
501
513
  ];
502
514
  }
503
- /**
504
- * Return a single rigid transform with all terms nonzero.
505
- */
515
+ /** Return a single rigid transform with all terms nonzero. */
506
516
  static createMessyRigidTransform(fixedPoint) {
507
517
  return Transform_1.Transform.createFixedPointAndMatrix(fixedPoint ? fixedPoint : Point3dVector3d_1.Point3d.create(1, 2, 3), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.create(0.3, -0.2, 1.2), Angle_1.Angle.createDegrees(15.7)));
508
518
  }
509
- /** Return various rigid matrices:
519
+ /**
520
+ * Return various rigid matrices:
510
521
  * * identity
511
522
  * * small rotations around x, y, z
512
523
  * * small rotation around (1,2,3)
@@ -536,9 +547,7 @@ class Sample {
536
547
  }
537
548
  return result;
538
549
  }
539
- /**
540
- * Create full Map4d for each `Sample.createInvertibleTransforms ()`
541
- */
550
+ /** Create full Map4d for each `Sample.createInvertibleTransforms()` */
542
551
  static createMap4ds() {
543
552
  const result = [];
544
553
  let transform;
@@ -556,7 +565,12 @@ class Sample {
556
565
  static createSimplePaths(withGaps = false) {
557
566
  const point0 = Point3dVector3d_1.Point3d.create(0, 0, 0);
558
567
  const point1 = Point3dVector3d_1.Point3d.create(10, 0, 0);
559
- const p1 = [point1, Point3dVector3d_1.Point3d.create(0, 10, 0), Point3dVector3d_1.Point3d.create(6, 10, 0), Point3dVector3d_1.Point3d.create(6, 10, 0), Point3dVector3d_1.Point3d.create(0, 10, 0)];
568
+ const p1 = [
569
+ point1, Point3dVector3d_1.Point3d.create(0, 10, 0),
570
+ Point3dVector3d_1.Point3d.create(6, 10, 0),
571
+ Point3dVector3d_1.Point3d.create(6, 10, 0),
572
+ Point3dVector3d_1.Point3d.create(0, 10, 0),
573
+ ];
560
574
  const segment1 = LineSegment3d_1.LineSegment3d.create(point0, point1);
561
575
  const vectorU = Point3dVector3d_1.Vector3d.unitX(3);
562
576
  const vectorV = Point3dVector3d_1.Vector3d.unitY(3);
@@ -571,7 +585,8 @@ class Sample {
571
585
  simplePaths.push(Path_1.Path.create(LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(0, 0, 0), Point3dVector3d_1.Point3d.create(10, 0, 0)), LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(10, 10, 0), Point3dVector3d_1.Point3d.create(5, 0, 0))));
572
586
  return simplePaths;
573
587
  }
574
- /** Assorted `Path` with lines and arcs.
588
+ /**
589
+ * Assorted `Path` with lines and arcs.
575
590
  * Specifically useful for offset tests.
576
591
  */
577
592
  static createLineArcPaths() {
@@ -600,12 +615,16 @@ class Sample {
600
615
  }
601
616
  /** Assorted `PointString3d` objects. */
602
617
  static createSimplePointStrings() {
603
- const p1 = [[Point3dVector3d_1.Point3d.create(0, 10, 0)], [Point3dVector3d_1.Point3d.create(6, 10, 0)], [Point3dVector3d_1.Point3d.create(6, 10, 0), [Point3dVector3d_1.Point3d.create(6, 10, 0)]]];
618
+ const p1 = [
619
+ [Point3dVector3d_1.Point3d.create(0, 10, 0)],
620
+ [Point3dVector3d_1.Point3d.create(6, 10, 0)],
621
+ [Point3dVector3d_1.Point3d.create(6, 10, 0), [Point3dVector3d_1.Point3d.create(6, 10, 0)]],
622
+ ];
604
623
  const simplePaths = [
605
624
  PointString3d_1.PointString3d.create(Point3dVector3d_1.Point3d.create(1, 2, 0)),
606
625
  PointString3d_1.PointString3d.create(Point3dVector3d_1.Point3d.create(0, 0, 0), Point3dVector3d_1.Point3d.create(10, 0, 0)),
607
626
  PointString3d_1.PointString3d.create(Point3dVector3d_1.Point3d.create(10, 0, 0), Point3dVector3d_1.Point3d.create(10, 5, 0)),
608
- PointString3d_1.PointString3d.create(p1)
627
+ PointString3d_1.PointString3d.create(p1),
609
628
  ];
610
629
  return simplePaths;
611
630
  }
@@ -634,8 +653,7 @@ class Sample {
634
653
  * @param dx1 distance along x axis at y=dy
635
654
  * @param numPhase number of phases of the jump.
636
655
  * @param dyReturn y value for return to origin. If 0, the wave ends at y=0 after then final "down" with one extra horizontal dx0
637
- * If nonzero, rise to that y value, return to x=0, and return down to origin.
638
- *
656
+ * If nonzero, rise to that y value, return to x=0, and return down to origin.
639
657
  */
640
658
  static createSquareWave(origin, dx0, dy, dx1, numPhase, dyReturn) {
641
659
  const result = [origin.clone()];
@@ -696,7 +714,7 @@ class Sample {
696
714
  }
697
715
  return points;
698
716
  }
699
- /** append sawtooth with x distances successively scaled by xFactor */
717
+ /** Append sawtooth with x distances successively scaled by xFactor */
700
718
  static appendVariableSawTooth(points, dxLow, riseX, riseY, dxHigh, numPhase, xFactor) {
701
719
  let factor = 1.0;
702
720
  for (let i = 0; i < numPhase; i++) {
@@ -737,7 +755,8 @@ class Sample {
737
755
  data.push(data[0].clone());
738
756
  return data;
739
757
  }
740
- /** append to a linestring, taking steps along given vector directions
758
+ /**
759
+ * Append to a linestring, taking steps along given vector directions
741
760
  * If the linestring is empty, a 000 point is added.
742
761
  * @param linestring LineString3d to receive points.
743
762
  * @param numPhase number of phases of the sawtooth
@@ -754,7 +773,8 @@ class Sample {
754
773
  }
755
774
  }
756
775
  }
757
- /** Assorted regions with arc boundaries
776
+ /**
777
+ * Assorted regions with arc boundaries
758
778
  * * full circle
759
779
  * * with varying sweep:
760
780
  * * partial arc with single chord closure
@@ -781,7 +801,8 @@ class Sample {
781
801
  }
782
802
  return result;
783
803
  }
784
- /** Assorted loops in xy plane:
804
+ /**
805
+ * Assorted loops in xy plane:
785
806
  * * unit square
786
807
  * * rectangle
787
808
  * * L shape
@@ -821,10 +842,14 @@ class Sample {
821
842
  ];
822
843
  if (includeBCurves) {
823
844
  const ey = 1.0;
824
- result.push(ParityRegion_1.ParityRegion.create(Loop_1.Loop.create(LineSegment3d_1.LineSegment3d.create(point0, pointA), BSplineCurve_1.BSplineCurve3d.createUniformKnots([pointA, Point3dVector3d_1.Point3d.create(ax + 1, ey),
845
+ result.push(ParityRegion_1.ParityRegion.create(Loop_1.Loop.create(LineSegment3d_1.LineSegment3d.create(point0, pointA), BSplineCurve_1.BSplineCurve3d.createUniformKnots([
846
+ pointA,
847
+ Point3dVector3d_1.Point3d.create(ax + 1, ey),
825
848
  Point3dVector3d_1.Point3d.create(ax + 1, 2 * ey),
826
849
  Point3dVector3d_1.Point3d.create(ax + 2, 3 * ey),
827
- Point3dVector3d_1.Point3d.create(ax + 1, 4 * ey), pointB], 3), Arc3d_1.Arc3d.createCircularStartMiddleEnd(pointB, pointC1, point0))));
850
+ Point3dVector3d_1.Point3d.create(ax + 1, 4 * ey),
851
+ pointB,
852
+ ], 3), Arc3d_1.Arc3d.createCircularStartMiddleEnd(pointB, pointC1, point0))));
828
853
  }
829
854
  return result;
830
855
  }
@@ -838,7 +863,7 @@ class Sample {
838
863
  const by = 2.0;
839
864
  const result = [
840
865
  UnionRegion_1.UnionRegion.create(Loop_1.Loop.create(LineString3d_1.LineString3d.createRectangleXY(Point3dVector3d_1.Point3d.create(0, 0, 0), ax, ay)), Loop_1.Loop.create(LineString3d_1.LineString3d.createRectangleXY(Point3dVector3d_1.Point3d.create(0, 2 * ay, 0), bx, by))),
841
- UnionRegion_1.UnionRegion.create(Loop_1.Loop.create(LineString3d_1.LineString3d.create(Sample.createRectangleXY(parityRange.low.x, parityRange.high.y + 0.5, parityRange.xLength(), parityRange.yLength()))), parityRegions[0])
866
+ UnionRegion_1.UnionRegion.create(Loop_1.Loop.create(LineString3d_1.LineString3d.create(Sample.createRectangleXY(parityRange.low.x, parityRange.high.y + 0.5, parityRange.xLength(), parityRange.yLength()))), parityRegions[0]),
842
867
  ];
843
868
  return result;
844
869
  }
@@ -857,7 +882,8 @@ class Sample {
857
882
  ];
858
883
  return result;
859
884
  }
860
- /** Assorted smooth curve primitives:
885
+ /**
886
+ * Assorted smooth curve primitives:
861
887
  * * line segments
862
888
  * * arcs
863
889
  */
@@ -872,7 +898,7 @@ class Sample {
872
898
  Arc3d_1.Arc3d.create(Point3dVector3d_1.Point3d.create(0, 0, 0), Point3dVector3d_1.Vector3d.create(size, alpha * size, 0), Point3dVector3d_1.Vector3d.create(-alpha * beta * size, beta * size, 0), AngleSweep_1.AngleSweep.createStartEndDegrees(-40, 270)),
873
899
  ];
874
900
  }
875
- /** assorted small polyface grids, possibly expanded by gridMultiplier */
901
+ /** Assorted small polyface grids, possibly expanded by gridMultiplier */
876
902
  static createSimpleIndexedPolyfaces(gridMultiplier) {
877
903
  const meshes = [
878
904
  Sample.createTriangularUnitGridPolyface(Point3dVector3d_1.Point3d.create(), Point3dVector3d_1.Vector3d.unitX(), Point3dVector3d_1.Vector3d.unitY(), gridMultiplier * 3, 2 * gridMultiplier, false, false, false),
@@ -1103,7 +1129,7 @@ class Sample {
1103
1129
  }
1104
1130
  return BSplineSurface_1.BSplineSurface3dH.create(xyzPoles, weights, numU, orderU, undefined, numV, orderV, undefined);
1105
1131
  }
1106
- /** assorted linear sweeps */
1132
+ /** Assorted linear sweeps */
1107
1133
  static createSimpleLinearSweeps() {
1108
1134
  const result = [];
1109
1135
  const base = Loop_1.Loop.create(LineString3d_1.LineString3d.createRectangleXY(Point3dVector3d_1.Point3d.create(), 2, 3));
@@ -1122,7 +1148,7 @@ class Sample {
1122
1148
  const xyPoints = [
1123
1149
  Point2dVector2d_1.Point2d.create(0, 0),
1124
1150
  Point2dVector2d_1.Point2d.create(1, 0),
1125
- Point2dVector2d_1.Point2d.create(1, 1)
1151
+ Point2dVector2d_1.Point2d.create(1, 1),
1126
1152
  ];
1127
1153
  result.push(LinearSweep_1.LinearSweep.createZSweep(xyPoints, 1, 3, false));
1128
1154
  // this forces artificial closure point . . .
@@ -1166,7 +1192,7 @@ class Sample {
1166
1192
  for (const axis of [
1167
1193
  Ray3d_1.Ray3d.createXYZUVW(0, 0, 0, 0, 1, 0),
1168
1194
  Ray3d_1.Ray3d.createXYZUVW(5, 0, 0, 0, 1, 0),
1169
- Ray3d_1.Ray3d.createXYZUVW(-1, 0, 0, -1, 1, 0)
1195
+ Ray3d_1.Ray3d.createXYZUVW(-1, 0, 0, -1, 1, 0),
1170
1196
  ]) {
1171
1197
  result.push(RotationalSweep_1.RotationalSweep.create(base, axis, Angle_1.Angle.createDegrees(45.0), false));
1172
1198
  result.push(RotationalSweep_1.RotationalSweep.create(base, axis, Angle_1.Angle.createDegrees(150.0), true));
@@ -1191,7 +1217,7 @@ class Sample {
1191
1217
  /** Create true (non-spherical) ellipsoids. */
1192
1218
  static createEllipsoids() {
1193
1219
  return [
1194
- Sphere_1.Sphere.createEllipsoid(Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.create(0, 0, 0), Matrix3d_1.Matrix3d.createRowValues(4, 1, 1, 1, 4, 1, 0.5, 0.2, 5)), AngleSweep_1.AngleSweep.createFullLatitude(), true)
1220
+ Sphere_1.Sphere.createEllipsoid(Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.create(0, 0, 0), Matrix3d_1.Matrix3d.createRowValues(4, 1, 1, 1, 4, 1, 0.5, 0.2, 5)), AngleSweep_1.AngleSweep.createFullLatitude(), true),
1195
1221
  ];
1196
1222
  }
1197
1223
  /** Create assorted cones. */
@@ -1249,8 +1275,7 @@ class Sample {
1249
1275
  result.push(Box_1.Box.createDgnBox(cornerA, frameY.columnX(), frameY.columnY(), cornerA.plusScaled(frameY.columnZ(), h), aX, aY, bX, bY, capped));
1250
1276
  return result;
1251
1277
  }
1252
- /** create an array of points for a rectangle with corners (x0,y0,z) and (x1,y1,z)
1253
- */
1278
+ /** Create an array of points for a rectangle with corners (x0,y0,z) and (x1,y1,z) */
1254
1279
  static createRectangle(x0, y0, x1, y1, z = 0.0, closed = false) {
1255
1280
  const points = [
1256
1281
  Point3dVector3d_1.Point3d.create(x0, y0, z),
@@ -1262,8 +1287,7 @@ class Sample {
1262
1287
  points.push(Point3dVector3d_1.Point3d.create(x0, y0, z));
1263
1288
  return points;
1264
1289
  }
1265
- /** create an array of points for a rectangle with corners of a Range2d.
1266
- */
1290
+ /** Create an array of points for a rectangle with corners of a Range2d. */
1267
1291
  static createRectangleInRange2d(range, z = 0.0, closed = false) {
1268
1292
  const x0 = range.low.x;
1269
1293
  const x1 = range.high.x;
@@ -1372,8 +1396,9 @@ class Sample {
1372
1396
  }
1373
1397
  return points;
1374
1398
  }
1375
- /** Primary shape is a "triangle" with lower edge pushed in so it becomes a mild nonconvex quad.
1376
- * Fractal effects are gentle.
1399
+ /**
1400
+ * Primary shape is a "triangle" with lower edge pushed in so it becomes a mild nonconvex quad.
1401
+ * Fractal effects are gentle.
1377
1402
  */
1378
1403
  static nonConvexQuadSimpleFractal(numRecursion, perpendicularFactor) {
1379
1404
  const pattern = [
@@ -1390,7 +1415,7 @@ class Sample {
1390
1415
  ];
1391
1416
  return Sample.createRecursiveFractalPolygon(poles, pattern, numRecursion, perpendicularFactor);
1392
1417
  }
1393
- /** create a diamond with convex fractal */
1418
+ /** Create a diamond with convex fractal */
1394
1419
  static createFractalDiamondConvexPattern(numRecursion, perpendicularFactor) {
1395
1420
  const pattern = [
1396
1421
  Point2dVector2d_1.Point2d.create(),
@@ -1487,7 +1512,7 @@ class Sample {
1487
1512
  ];
1488
1513
  return Sample.createRecursiveFractalPolygon(poles, pattern, numRecursion, perpendicularFactor);
1489
1514
  }
1490
- /** append interpolated points from the array tail to the target. */
1515
+ /** Append interpolated points from the array tail to the target. */
1491
1516
  static appendSplits(points, target, numSplit, includeTarget) {
1492
1517
  const pointA = points[points.length - 1];
1493
1518
  for (let i = 0; i < numSplit; i++)
@@ -1531,7 +1556,8 @@ class Sample {
1531
1556
  geometry.push(LineSegment3d_1.LineSegment3d.createXYZXYZ(x0, y1, z0, x0, y1, z1));
1532
1557
  return geometry;
1533
1558
  }
1534
- /** Assorted transition spirals
1559
+ /**
1560
+ * Assorted transition spirals
1535
1561
  * * (All combinations of bearing radius bearing radius length subsets.)
1536
1562
  */
1537
1563
  static createSimpleTransitionSpirals() {
@@ -1552,10 +1578,11 @@ class Sample {
1552
1578
  DirectSpiral3d_1.DirectSpiral3d.createFromLengthAndRadius("ChineseCubic", r0, r1, Angle_1.Angle.createDegrees(0), undefined, arcLength, undefined, Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.create(1, 2, 0), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createDegrees(15)))),
1553
1579
  DirectSpiral3d_1.DirectSpiral3d.createFromLengthAndRadius("JapaneseCubic", r0, r1, Angle_1.Angle.createDegrees(0), undefined, arcLength, undefined, Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.create(1, 2, 0), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createDegrees(15)))),
1554
1580
  DirectSpiral3d_1.DirectSpiral3d.createFromLengthAndRadius("DirectHalfCosine", r0, r1, Angle_1.Angle.createDegrees(0), undefined, arcLength, undefined, Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.create(1, 2, 0), Matrix3d_1.Matrix3d.createRotationAroundVector(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createDegrees(15)))),
1555
- DirectSpiral3d_1.DirectSpiral3d.createCzechCubic(Transform_1.Transform.createIdentity(), arcLength, r1)
1581
+ DirectSpiral3d_1.DirectSpiral3d.createCzechCubic(Transform_1.Transform.createIdentity(), arcLength, r1),
1556
1582
  ];
1557
1583
  }
1558
- /** Create a Bezier curve with significant twist effects
1584
+ /**
1585
+ * Create a Bezier curve with significant twist effects
1559
1586
  * * r and theta are circle in xy plane at steps in thetaStepper
1560
1587
  * * z varies with sin(phi) at steps in phiStepper.
1561
1588
  */
@@ -1611,18 +1638,10 @@ class Sample {
1611
1638
  result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(// arc spline with smooth joins
1612
1639
  Arc3d_1.Arc3d.createXY(Point3dVector3d_1.Point3d.create(5, 0), 5, AngleSweep_1.AngleSweep.createStartEndDegrees(180, 0)), Arc3d_1.Arc3d.createXY(Point3dVector3d_1.Point3d.create(15, 0), 5, AngleSweep_1.AngleSweep.createStartEndDegrees(180, 360)), Arc3d_1.Arc3d.createXY(Point3dVector3d_1.Point3d.create(25, 0), 5, AngleSweep_1.AngleSweep.createStartEndDegrees(180, 0)))));
1613
1640
  result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(// 2-pt Interpolation Curve
1614
- InterpolationCurve3d_1.InterpolationCurve3d.createCapture(InterpolationCurve3d_1.InterpolationCurve3dOptions.create({
1615
- fitPoints: [pointsA[0], pointsA[1]],
1616
- })))));
1641
+ InterpolationCurve3d_1.InterpolationCurve3d.createCapture(InterpolationCurve3d_1.InterpolationCurve3dOptions.create({ fitPoints: [pointsA[0], pointsA[1]] })))));
1617
1642
  result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(// 3-pt Interpolation Curve
1618
- InterpolationCurve3d_1.InterpolationCurve3d.createCapture(InterpolationCurve3d_1.InterpolationCurve3dOptions.create({
1619
- fitPoints: [pointsA[0], pointsA[1], pointsA[2]],
1620
- })))));
1621
- result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(InterpolationCurve3d_1.InterpolationCurve3d.createCapture(InterpolationCurve3d_1.InterpolationCurve3dOptions.create({
1622
- fitPoints: pointsA,
1623
- startTangent: Point3dVector3d_1.Point3d.create(1, -1),
1624
- endTangent: Point3dVector3d_1.Point3d.create(-1, -1),
1625
- })))));
1643
+ InterpolationCurve3d_1.InterpolationCurve3d.createCapture(InterpolationCurve3d_1.InterpolationCurve3dOptions.create({ fitPoints: [pointsA[0], pointsA[1], pointsA[2]] })))));
1644
+ result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(InterpolationCurve3d_1.InterpolationCurve3d.createCapture(InterpolationCurve3d_1.InterpolationCurve3dOptions.create({ fitPoints: pointsA, startTangent: Point3dVector3d_1.Point3d.create(1, -1), endTangent: Point3dVector3d_1.Point3d.create(-1, -1) })))));
1626
1645
  result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(IntegratedSpiral3d_1.IntegratedSpiral3d.createRadiusRadiusBearingBearing(Segment1d_1.Segment1d.create(0, 100), AngleSweep_1.AngleSweep.createStartEndDegrees(10, 75), Segment1d_1.Segment1d.create(0, 1), Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.createZero(), Matrix3d_1.Matrix3d.createRotationAroundAxisIndex(2, Angle_1.Angle.createDegrees(30))), "bloss"))));
1627
1646
  result.push(CurveChainWithDistanceIndex_1.CurveChainWithDistanceIndex.createCapture(Path_1.Path.create(DirectSpiral3d_1.DirectSpiral3d.createDirectHalfCosine(Transform_1.Transform.createOriginAndMatrix(Point3dVector3d_1.Point3d.createZero(), Matrix3d_1.Matrix3d.createRotationAroundAxisIndex(2, Angle_1.Angle.createDegrees(110))), 50, 350, Segment1d_1.Segment1d.create(0, 1)))));
1628
1647
  return result;
@@ -1706,7 +1725,7 @@ class Sample {
1706
1725
  const sweep2 = AngleSweep_1.AngleSweep.createStartEndDegrees(160.0, 380.0);
1707
1726
  for (const arcs of [
1708
1727
  Sample.createArcs(1.0), Sample.createArcs(0.5),
1709
- Sample.createArcs(1.0, sweep1), Sample.createArcs(0.3, sweep2)
1728
+ Sample.createArcs(1.0, sweep1), Sample.createArcs(0.3, sweep2),
1710
1729
  ]) {
1711
1730
  for (const arc of arcs)
1712
1731
  result.push(arc);
@@ -1809,10 +1828,10 @@ class Sample {
1809
1828
  return points;
1810
1829
  }
1811
1830
  /**
1812
- * * let ay = 4
1813
- * * base polygon has vertices (0,0), (ax,0), (2*ax,0), (2* ax,ay), (ax,ay), (0,ay), (0,0).
1814
- * * shift the x coordinates of vertices 1,4 by indicated amounts (0-based numbering)
1815
- * * shift the y coordinates for points 1,2,3,4 by indicated amounts (in 0-based numbering)
1831
+ * * Let ay = 4
1832
+ * * Base polygon has vertices (0,0), (ax,0), (2*ax,0), (2* ax,ay), (ax,ay), (0,ay), (0,0).
1833
+ * * Shift the x coordinates of vertices 1,4 by indicated amounts (0-based numbering)
1834
+ * * Shift the y coordinates for points 1,2,3,4 by indicated amounts (in 0-based numbering)
1816
1835
  * * This is useful for testing non-y-monotonic face situations.
1817
1836
  * * Return as points.
1818
1837
  * @param dy1
@@ -1832,7 +1851,7 @@ class Sample {
1832
1851
  return points;
1833
1852
  }
1834
1853
  /**
1835
- * make line segments for each pair of adjacent points.
1854
+ * Make line segments for each pair of adjacent points.
1836
1855
  * @param points array of points
1837
1856
  * @param forceClosure if true, inspect coordinates to determine if a closure edge is needed.
1838
1857
  */
@@ -1948,7 +1967,8 @@ class Sample {
1948
1967
  this.appendGeometry(this.createBagOfCurves(), result);
1949
1968
  return result;
1950
1969
  }
1951
- /** Create points on a sine wave
1970
+ /**
1971
+ * Create points on a sine wave
1952
1972
  * Point i is origin + (i * xStep, a *sin(theta0 + i * dTheta), b * sin(beta0 + i * dBeta))
1953
1973
  * * Default b is zero, so it is a simple sine wave
1954
1974
  * * If the dTheta and dBeta are equal, it is a sine wave in a tilted plane.
@@ -1957,8 +1977,9 @@ class Sample {
1957
1977
  static createPointSineWave(origin, numInterval = 24, xStep = Math.PI / 12, a = 1, thetaSweep = AngleSweep_1.AngleSweep.createStartEndDegrees(0, 360), b = 0, betaSweep = AngleSweep_1.AngleSweep.createStartEndDegrees(0, 180)) {
1958
1978
  return this.createPointsByIndexFunctions(numInterval, SteppedIndexFunctionFactory.createLinear(xStep, origin ? origin.x : 0), SteppedIndexFunctionFactory.createCosine(a, thetaSweep, origin ? origin.y : 0), SteppedIndexFunctionFactory.createCosine(b, betaSweep, origin ? origin.z : 0));
1959
1979
  }
1960
- /** Create points with x,y,z independent functions of i and numInterval,
1961
- * Point3d.create (fx(i,numInterval), fy(i,numInterval), fz(i, numInterval));
1980
+ /**
1981
+ * Create points with x,y,z independent functions of i and numInterval,
1982
+ * Point3d.create (fx(i,numInterval), fy(i,numInterval), fz(i, numInterval));
1962
1983
  */
1963
1984
  static createPointsByIndexFunctions(numInterval, fx, fy, fz) {
1964
1985
  const points = [];
@@ -2029,9 +2050,7 @@ class Sample {
2029
2050
  builder.addGreedyTriangulationBetweenLineStrings(point0, point1);
2030
2051
  return builder.claimPolyface();
2031
2052
  }
2032
- /**
2033
- * create strokes on an arc at radius r0, then returning at radius r1.
2034
- */
2053
+ /** Create strokes on an arc at radius r0, then returning at radius r1. */
2035
2054
  static createAnnulusPolyline(edgesPerQuadrant, center, r0, r1, theta0, theta1, addClosure) {
2036
2055
  const point0 = [];
2037
2056
  const point1 = [];
@@ -2101,7 +2120,12 @@ class Sample {
2101
2120
  for (let yC = 0; yC + 1 <= ySweep; yC++) {
2102
2121
  const yD = yC + 1;
2103
2122
  if (acceptFunction(xA, yC))
2104
- builder.addPolygon([Point3dVector3d_1.Point3d.create(xA, yC, zA), Point3dVector3d_1.Point3d.create(xB, yC, zB), Point3dVector3d_1.Point3d.create(xB, yD, zB), Point3dVector3d_1.Point3d.create(xA, yD, zA)]);
2123
+ builder.addPolygon([
2124
+ Point3dVector3d_1.Point3d.create(xA, yC, zA),
2125
+ Point3dVector3d_1.Point3d.create(xB, yC, zB),
2126
+ Point3dVector3d_1.Point3d.create(xB, yD, zB),
2127
+ Point3dVector3d_1.Point3d.create(xA, yD, zA),
2128
+ ]);
2105
2129
  }
2106
2130
  }
2107
2131
  }
@@ -2159,7 +2183,7 @@ Sample.plane3dByOriginAndUnitNormal = [
2159
2183
  Plane3dByOriginAndUnitNormal_1.Plane3dByOriginAndUnitNormal.createYZPlane(),
2160
2184
  Plane3dByOriginAndUnitNormal_1.Plane3dByOriginAndUnitNormal.createZXPlane(),
2161
2185
  Sample.createPlane(0, 0, 0, 3, 0, 1),
2162
- Sample.createPlane(1, 2, 3, 2, 4, -1)
2186
+ Sample.createPlane(1, 2, 3, 2, 4, -1),
2163
2187
  ];
2164
2188
  /** Assorted Ray3d, not all unit direction vectors. */
2165
2189
  Sample.ray3d = [
@@ -2167,7 +2191,7 @@ Sample.ray3d = [
2167
2191
  Sample.createRay(0, 0, 0, 0, 1, 0),
2168
2192
  Sample.createRay(0, 0, 0, 0, 0, 1),
2169
2193
  Sample.createRay(0, 0, 0, 1, 2, 0),
2170
- Sample.createRay(1, 2, 3, 4, 2, -1)
2194
+ Sample.createRay(1, 2, 3, 4, 2, -1),
2171
2195
  ];
2172
2196
  /** Assorted angles. All principal directions, some others included. */
2173
2197
  Sample.angle = [
@@ -2176,7 +2200,7 @@ Sample.angle = [
2176
2200
  Angle_1.Angle.createDegrees(180),
2177
2201
  Angle_1.Angle.createDegrees(-90),
2178
2202
  Angle_1.Angle.createDegrees(30),
2179
- Angle_1.Angle.createDegrees(-105)
2203
+ Angle_1.Angle.createDegrees(-105),
2180
2204
  ];
2181
2205
  /** Assorted angle sweeps */
2182
2206
  Sample.angleSweep = [
@@ -2185,35 +2209,35 @@ Sample.angleSweep = [
2185
2209
  AngleSweep_1.AngleSweep.createStartEndDegrees(-90, 0),
2186
2210
  AngleSweep_1.AngleSweep.createStartEndDegrees(0, -90),
2187
2211
  AngleSweep_1.AngleSweep.createStartEndDegrees(0, 30),
2188
- AngleSweep_1.AngleSweep.createStartEndDegrees(45, 110)
2212
+ AngleSweep_1.AngleSweep.createStartEndDegrees(45, 110),
2189
2213
  ];
2190
- /** assorted line segments */
2214
+ /** Assorted line segments */
2191
2215
  Sample.lineSegment3d = [
2192
2216
  LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(0, 0, 0), Point3dVector3d_1.Point3d.create(1, 0, 0)),
2193
2217
  LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(0, 0, 0), Point3dVector3d_1.Point3d.create(0, 1, 0)),
2194
2218
  LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(0, 0, 0), Point3dVector3d_1.Point3d.create(0, 0, 1)),
2195
- LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(1, 2, 3), Point3dVector3d_1.Point3d.create(-2, -3, 0.5))
2219
+ LineSegment3d_1.LineSegment3d.create(Point3dVector3d_1.Point3d.create(1, 2, 3), Point3dVector3d_1.Point3d.create(-2, -3, 0.5)),
2196
2220
  ];
2197
- /** Assorted Range1d: single point, null, simple forward, simple reverse */
2221
+ /** Assorted Range1d: single point, null, simple forward, simple reverse */
2198
2222
  Sample.range1d = [
2199
2223
  Range_1.Range1d.createX(1),
2200
2224
  Range_1.Range1d.createNull(),
2201
2225
  Range_1.Range1d.createXX(1, 2),
2202
- Range_1.Range1d.createXX(2, 1)
2226
+ Range_1.Range1d.createXX(2, 1),
2203
2227
  ];
2204
2228
  /** Assorted range2d: single point, null, 2 point with various creation orders. */
2205
2229
  Sample.range2d = [
2206
2230
  Range_1.Range2d.createXY(1, 2),
2207
2231
  Range_1.Range2d.createNull(),
2208
2232
  Range_1.Range2d.createXYXY(1, 2, 0, 3),
2209
- Range_1.Range2d.createXYXY(1, 2, 3, 4)
2233
+ Range_1.Range2d.createXYXY(1, 2, 3, 4),
2210
2234
  ];
2211
2235
  /** Assorted range2d: single point, null, 2 point with various creation orders. */
2212
2236
  Sample.range3d = [
2213
2237
  Range_1.Range3d.createXYZ(1, 2, 3),
2214
2238
  Range_1.Range3d.createNull(),
2215
2239
  Range_1.Range3d.createXYZXYZ(1, 2, 0, 3, 4, 7),
2216
- Range_1.Range3d.createXYZXYZ(1, 2, 3, -2, -4, -1)
2240
+ Range_1.Range3d.createXYZXYZ(1, 2, 3, -2, -4, -1),
2217
2241
  ];
2218
2242
  exports.Sample = Sample;
2219
2243
  //# sourceMappingURL=GeometrySamples.js.map