@itwin/core-geometry 5.0.0-dev.32 → 5.0.0-dev.34

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 (173) hide show
  1. package/lib/cjs/Constant.js +17 -17
  2. package/lib/cjs/Constant.js.map +1 -1
  3. package/lib/cjs/Geometry.js +35 -35
  4. package/lib/cjs/Geometry.js.map +1 -1
  5. package/lib/cjs/bspline/KnotVector.js +2 -2
  6. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  7. package/lib/cjs/clipping/AlternatingConvexClipTree.js +2 -2
  8. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  9. package/lib/cjs/clipping/ClipPlane.js +1 -1
  10. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  11. package/lib/cjs/clipping/ClipUtils.js +1 -1
  12. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  13. package/lib/cjs/clipping/ClipVector.js +1 -1
  14. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  15. package/lib/cjs/clipping/ConvexClipPlaneSet.js +3 -3
  16. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  17. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -1
  18. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  19. package/lib/cjs/curve/Arc3d.js +14 -14
  20. package/lib/cjs/curve/Arc3d.js.map +1 -1
  21. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +4 -4
  22. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  23. package/lib/cjs/curve/LineString3d.js +5 -5
  24. package/lib/cjs/curve/LineString3d.js.map +1 -1
  25. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +1 -1
  26. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  27. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -5
  28. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  29. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +13 -13
  30. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  31. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +5 -5
  32. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  33. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +5 -5
  34. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  35. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +4 -4
  36. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  37. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +2 -2
  38. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  39. package/lib/cjs/geometry3d/Angle.js +16 -16
  40. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  41. package/lib/cjs/geometry3d/Matrix3d.js +8 -8
  42. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  43. package/lib/cjs/geometry3d/OrderedRotationAngles.js +2 -2
  44. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  45. package/lib/cjs/geometry3d/PointHelpers.js +5 -5
  46. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  47. package/lib/cjs/geometry3d/PolygonOps.js +23 -23
  48. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  49. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
  50. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  51. package/lib/cjs/geometry3d/Range.js +4 -4
  52. package/lib/cjs/geometry3d/Range.js.map +1 -1
  53. package/lib/cjs/numerics/ClusterableArray.js +13 -13
  54. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  55. package/lib/cjs/numerics/PascalCoefficients.js +1 -1
  56. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  57. package/lib/cjs/numerics/PolarData.js +1 -1
  58. package/lib/cjs/numerics/PolarData.js.map +1 -1
  59. package/lib/cjs/numerics/Polynomials.js +26 -26
  60. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  61. package/lib/cjs/numerics/Quadrature.js +20 -20
  62. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  63. package/lib/cjs/polyface/BoxTopology.js +67 -67
  64. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  65. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js +2 -2
  66. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  67. package/lib/cjs/polyface/PolyfaceBuilder.js +4 -4
  68. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  69. package/lib/cjs/polyface/PolyfaceData.js +5 -5
  70. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  71. package/lib/cjs/polyface/PolyfaceQuery.js +7 -7
  72. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  73. package/lib/cjs/polyface/multiclip/RangeSearch.js +5 -5
  74. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  75. package/lib/cjs/serialization/BGFBReader.js +22 -22
  76. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  77. package/lib/cjs/serialization/GeometrySamples.js +107 -107
  78. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  79. package/lib/cjs/topology/ChainMerge.js +4 -4
  80. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  81. package/lib/cjs/topology/Graph.js +5 -5
  82. package/lib/cjs/topology/Graph.js.map +1 -1
  83. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +2 -2
  84. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  85. package/lib/cjs/topology/Triangulation.js +11 -11
  86. package/lib/cjs/topology/Triangulation.js.map +1 -1
  87. package/lib/esm/Constant.js +17 -17
  88. package/lib/esm/Constant.js.map +1 -1
  89. package/lib/esm/Geometry.js +35 -35
  90. package/lib/esm/Geometry.js.map +1 -1
  91. package/lib/esm/bspline/KnotVector.js +2 -2
  92. package/lib/esm/bspline/KnotVector.js.map +1 -1
  93. package/lib/esm/clipping/AlternatingConvexClipTree.js +2 -2
  94. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  95. package/lib/esm/clipping/ClipPlane.js +1 -1
  96. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  97. package/lib/esm/clipping/ClipUtils.js +1 -1
  98. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  99. package/lib/esm/clipping/ClipVector.js +1 -1
  100. package/lib/esm/clipping/ClipVector.js.map +1 -1
  101. package/lib/esm/clipping/ConvexClipPlaneSet.js +3 -3
  102. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  103. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -1
  104. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  105. package/lib/esm/curve/Arc3d.js +14 -14
  106. package/lib/esm/curve/Arc3d.js.map +1 -1
  107. package/lib/esm/curve/CurveChainWithDistanceIndex.js +4 -4
  108. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  109. package/lib/esm/curve/LineString3d.js +5 -5
  110. package/lib/esm/curve/LineString3d.js.map +1 -1
  111. package/lib/esm/curve/RegionOpsClassificationSweeps.js +1 -1
  112. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  113. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -5
  114. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  115. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +13 -13
  116. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  117. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +5 -5
  118. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  119. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +5 -5
  120. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  121. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +4 -4
  122. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  123. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +2 -2
  124. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  125. package/lib/esm/geometry3d/Angle.js +16 -16
  126. package/lib/esm/geometry3d/Angle.js.map +1 -1
  127. package/lib/esm/geometry3d/Matrix3d.js +8 -8
  128. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  129. package/lib/esm/geometry3d/OrderedRotationAngles.js +2 -2
  130. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  131. package/lib/esm/geometry3d/PointHelpers.js +5 -5
  132. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  133. package/lib/esm/geometry3d/PolygonOps.js +23 -23
  134. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  135. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
  136. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  137. package/lib/esm/geometry3d/Range.js +4 -4
  138. package/lib/esm/geometry3d/Range.js.map +1 -1
  139. package/lib/esm/numerics/ClusterableArray.js +13 -13
  140. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  141. package/lib/esm/numerics/PascalCoefficients.js +1 -1
  142. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  143. package/lib/esm/numerics/PolarData.js +1 -1
  144. package/lib/esm/numerics/PolarData.js.map +1 -1
  145. package/lib/esm/numerics/Polynomials.js +26 -26
  146. package/lib/esm/numerics/Polynomials.js.map +1 -1
  147. package/lib/esm/numerics/Quadrature.js +20 -20
  148. package/lib/esm/numerics/Quadrature.js.map +1 -1
  149. package/lib/esm/polyface/BoxTopology.js +67 -67
  150. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  151. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js +2 -2
  152. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  153. package/lib/esm/polyface/PolyfaceBuilder.js +4 -4
  154. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  155. package/lib/esm/polyface/PolyfaceData.js +5 -5
  156. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  157. package/lib/esm/polyface/PolyfaceQuery.js +7 -7
  158. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  159. package/lib/esm/polyface/multiclip/RangeSearch.js +5 -5
  160. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  161. package/lib/esm/serialization/BGFBReader.js +22 -22
  162. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  163. package/lib/esm/serialization/GeometrySamples.js +107 -107
  164. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  165. package/lib/esm/topology/ChainMerge.js +4 -4
  166. package/lib/esm/topology/ChainMerge.js.map +1 -1
  167. package/lib/esm/topology/Graph.js +5 -5
  168. package/lib/esm/topology/Graph.js.map +1 -1
  169. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +2 -2
  170. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  171. package/lib/esm/topology/Triangulation.js +11 -11
  172. package/lib/esm/topology/Triangulation.js.map +1 -1
  173. package/package.json +4 -4
@@ -387,6 +387,25 @@ export class PolygonOps {
387
387
  s *= 0.5;
388
388
  return s;
389
389
  }
390
+ /** These values are the integrated area moment products [xx,xy,xz, x]
391
+ * for a right triangle in the first quadrant at the origin -- (0,0),(1,0),(0,1)
392
+ */
393
+ static { this._triangleMomentWeights = Matrix4d.createRowValues(2.0 / 24.0, 1.0 / 24.0, 0, 4.0 / 24.0, 1.0 / 24.0, 2.0 / 24.0, 0, 4.0 / 24.0, 0, 0, 0, 0, 4.0 / 24.0, 4.0 / 24.0, 0, 12.0 / 24.0); }
394
+ /** These values are the integrated volume moment products [xx,xy,xz, x, yx,yy,yz,y, zx,zy,zz,z,x,y,z,1]
395
+ * for a tetrahedron in the first quadrant at the origin -- (0,00),(1,0,0),(0,1,0),(0,0,1)
396
+ */
397
+ static { this._tetrahedralMomentWeights = Matrix4d.createRowValues(1.0 / 60.0, 1.0 / 120, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 60.0, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 120, 1.0 / 60.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 6.0); }
398
+ // statics for shared reuse.
399
+ // many methods use these.
400
+ // only use them in "leaf" methods that are certain not to call other users . . .
401
+ static { this._vector0 = Vector3d.create(); }
402
+ static { this._vector1 = Vector3d.create(); }
403
+ static { this._vector2 = Vector3d.create(); }
404
+ static { this._vectorOrigin = Vector3d.create(); }
405
+ static { this._normal = Vector3d.create(); }
406
+ static { this._matrixA = Matrix4d.createIdentity(); }
407
+ static { this._matrixB = Matrix4d.createIdentity(); }
408
+ static { this._matrixC = Matrix4d.createIdentity(); }
390
409
  /** return a vector which is perpendicular to the polygon and has magnitude equal to the polygon area. */
391
410
  static areaNormalGo(points, result) {
392
411
  if (!result)
@@ -1296,30 +1315,14 @@ export class PolygonOps {
1296
1315
  return result;
1297
1316
  }
1298
1317
  }
1299
- /** These values are the integrated area moment products [xx,xy,xz, x]
1300
- * for a right triangle in the first quadrant at the origin -- (0,0),(1,0),(0,1)
1301
- */
1302
- PolygonOps._triangleMomentWeights = Matrix4d.createRowValues(2.0 / 24.0, 1.0 / 24.0, 0, 4.0 / 24.0, 1.0 / 24.0, 2.0 / 24.0, 0, 4.0 / 24.0, 0, 0, 0, 0, 4.0 / 24.0, 4.0 / 24.0, 0, 12.0 / 24.0);
1303
- /** These values are the integrated volume moment products [xx,xy,xz, x, yx,yy,yz,y, zx,zy,zz,z,x,y,z,1]
1304
- * for a tetrahedron in the first quadrant at the origin -- (0,00),(1,0,0),(0,1,0),(0,0,1)
1305
- */
1306
- PolygonOps._tetrahedralMomentWeights = Matrix4d.createRowValues(1.0 / 60.0, 1.0 / 120, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 60.0, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 120, 1.0 / 60.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 6.0);
1307
- // statics for shared reuse.
1308
- // many methods use these.
1309
- // only use them in "leaf" methods that are certain not to call other users . . .
1310
- PolygonOps._vector0 = Vector3d.create();
1311
- PolygonOps._vector1 = Vector3d.create();
1312
- PolygonOps._vector2 = Vector3d.create();
1313
- PolygonOps._vectorOrigin = Vector3d.create();
1314
- PolygonOps._normal = Vector3d.create();
1315
- PolygonOps._matrixA = Matrix4d.createIdentity();
1316
- PolygonOps._matrixB = Matrix4d.createIdentity();
1317
- PolygonOps._matrixC = Matrix4d.createIdentity();
1318
1318
  /**
1319
1319
  * `IndexedXYZCollectionPolygonOps` class contains _static_ methods for typical operations on polygons carried as `IndexedXYZCollection`
1320
1320
  * @public
1321
1321
  */
1322
1322
  export class IndexedXYZCollectionPolygonOps {
1323
+ static { this._xyz0Work = Point3d.create(); }
1324
+ static { this._xyz1Work = Point3d.create(); }
1325
+ static { this._xyz2Work = Point3d.create(); }
1323
1326
  /**
1324
1327
  * Split a (convex) polygon into 2 parts based on altitude evaluations.
1325
1328
  * * POSITIVE ALTITUDE IS IN
@@ -1576,14 +1579,12 @@ export class IndexedXYZCollectionPolygonOps {
1576
1579
  return xyz;
1577
1580
  }
1578
1581
  }
1579
- IndexedXYZCollectionPolygonOps._xyz0Work = Point3d.create();
1580
- IndexedXYZCollectionPolygonOps._xyz1Work = Point3d.create();
1581
- IndexedXYZCollectionPolygonOps._xyz2Work = Point3d.create();
1582
1582
  /**
1583
1583
  * `Point3dArrayPolygonOps` class contains _static_ methods for typical operations on polygons carried as `Point3d[]`
1584
1584
  * @public
1585
1585
  */
1586
1586
  export class Point3dArrayPolygonOps {
1587
+ static { this._xyz0Work = Point3d.create(); }
1587
1588
  // private static _xyz1Work: Point3d = Point3d.create();
1588
1589
  // private static _xyz2Work: Point3d = Point3d.create();
1589
1590
  /**
@@ -1657,5 +1658,4 @@ export class Point3dArrayPolygonOps {
1657
1658
  }
1658
1659
  }
1659
1660
  }
1660
- Point3dArrayPolygonOps._xyz0Work = Point3d.create();
1661
1661
  //# sourceMappingURL=PolygonOps.js.map