@itwin/core-geometry 4.9.0-dev.9 → 4.10.0-dev.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 (680) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/lib/cjs/Constant.js.map +1 -1
  3. package/lib/cjs/Geometry.d.ts +57 -46
  4. package/lib/cjs/Geometry.d.ts.map +1 -1
  5. package/lib/cjs/Geometry.js +73 -53
  6. package/lib/cjs/Geometry.js.map +1 -1
  7. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  11. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  13. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  14. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  15. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  16. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  17. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  18. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  19. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  20. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  21. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  22. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  23. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  24. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  25. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  26. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  27. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  28. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  29. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  30. package/lib/cjs/core-geometry.js.map +1 -1
  31. package/lib/cjs/curve/Arc3d.d.ts +141 -38
  32. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  33. package/lib/cjs/curve/Arc3d.js +219 -31
  34. package/lib/cjs/curve/Arc3d.js.map +1 -1
  35. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  36. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  37. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +11 -6
  38. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  39. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +12 -10
  40. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  41. package/lib/cjs/curve/CurveCollection.d.ts +2 -1
  42. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  43. package/lib/cjs/curve/CurveCollection.js +2 -1
  44. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  45. package/lib/cjs/curve/CurveCurve.d.ts +11 -9
  46. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  47. package/lib/cjs/curve/CurveCurve.js +11 -9
  48. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  49. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  50. package/lib/cjs/curve/CurveFactory.d.ts +4 -3
  51. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  52. package/lib/cjs/curve/CurveFactory.js +4 -3
  53. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  54. package/lib/cjs/curve/CurveLocationDetail.d.ts +19 -1
  55. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  56. package/lib/cjs/curve/CurveLocationDetail.js +39 -0
  57. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  58. package/lib/cjs/curve/CurveOps.d.ts +4 -4
  59. package/lib/cjs/curve/CurveOps.d.ts.map +1 -1
  60. package/lib/cjs/curve/CurveOps.js +6 -6
  61. package/lib/cjs/curve/CurveOps.js.map +1 -1
  62. package/lib/cjs/curve/CurvePrimitive.d.ts +1 -1
  63. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  64. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  65. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  66. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  67. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  68. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  69. package/lib/cjs/curve/LineString3d.d.ts +7 -5
  70. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  71. package/lib/cjs/curve/LineString3d.js +8 -6
  72. package/lib/cjs/curve/LineString3d.js.map +1 -1
  73. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  74. package/lib/cjs/curve/Loop.js +6 -6
  75. package/lib/cjs/curve/Loop.js.map +1 -1
  76. package/lib/cjs/curve/OffsetOptions.d.ts +1 -1
  77. package/lib/cjs/curve/OffsetOptions.js +1 -1
  78. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  79. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  80. package/lib/cjs/curve/Path.d.ts.map +1 -1
  81. package/lib/cjs/curve/Path.js +5 -6
  82. package/lib/cjs/curve/Path.js.map +1 -1
  83. package/lib/cjs/curve/PointString3d.js.map +1 -1
  84. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  85. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  86. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -4
  87. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  88. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  89. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  90. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  91. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  92. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  93. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  94. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  95. package/lib/cjs/curve/RegionOps.d.ts +4 -3
  96. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  97. package/lib/cjs/curve/RegionOps.js +4 -3
  98. package/lib/cjs/curve/RegionOps.js.map +1 -1
  99. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  100. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  101. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  102. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  103. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  104. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  105. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  106. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  107. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  108. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +23 -7
  109. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  110. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +43 -35
  111. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  112. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +22 -8
  113. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  114. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +127 -52
  115. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  116. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  117. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  118. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  119. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts +211 -0
  120. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -0
  121. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +1000 -0
  122. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -0
  123. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  124. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +11 -8
  125. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  126. package/lib/cjs/curve/internalContexts/MultiChainCollector.js +7 -4
  127. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  128. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  129. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  130. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  131. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  132. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  133. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  134. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  135. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  136. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  137. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  138. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  139. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  140. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  141. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  142. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  143. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  144. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  145. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  146. package/lib/cjs/geometry3d/Angle.d.ts +18 -5
  147. package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
  148. package/lib/cjs/geometry3d/Angle.js +23 -7
  149. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  150. package/lib/cjs/geometry3d/AngleSweep.d.ts +14 -1
  151. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  152. package/lib/cjs/geometry3d/AngleSweep.js +47 -12
  153. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  154. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  155. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  156. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  157. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  158. package/lib/cjs/geometry3d/FrameBuilder.d.ts +2 -1
  159. package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
  160. package/lib/cjs/geometry3d/FrameBuilder.js +12 -10
  161. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  162. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  163. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  164. package/lib/cjs/geometry3d/GeometryHandler.js +1 -7
  165. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  166. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  167. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  168. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  169. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  170. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  171. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  172. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  173. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  174. package/lib/cjs/geometry3d/Matrix3d.d.ts +6 -4
  175. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  176. package/lib/cjs/geometry3d/Matrix3d.js +6 -4
  177. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  178. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  179. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  180. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  181. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  182. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  183. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  184. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  185. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +5 -5
  186. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  187. package/lib/cjs/geometry3d/Point3dVector3d.js +5 -5
  188. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  189. package/lib/cjs/geometry3d/PointHelpers.d.ts +6 -5
  190. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  191. package/lib/cjs/geometry3d/PointHelpers.js +11 -10
  192. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  193. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  194. package/lib/cjs/geometry3d/PolygonOps.d.ts +4 -4
  195. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  196. package/lib/cjs/geometry3d/PolygonOps.js +7 -11
  197. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  198. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +1 -1
  199. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  200. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
  201. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  202. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  203. package/lib/cjs/geometry3d/Range.d.ts +6 -1
  204. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  205. package/lib/cjs/geometry3d/Range.js +9 -3
  206. package/lib/cjs/geometry3d/Range.js.map +1 -1
  207. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  208. package/lib/cjs/geometry3d/Ray3d.d.ts +1 -1
  209. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  210. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  211. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  212. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  213. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  214. package/lib/cjs/geometry3d/Transform.d.ts +1 -1
  215. package/lib/cjs/geometry3d/Transform.js +1 -1
  216. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  217. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  218. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  219. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  220. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  221. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  222. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  223. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  224. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  225. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  226. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  227. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  228. package/lib/cjs/numerics/Complex.js.map +1 -1
  229. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  230. package/lib/cjs/numerics/Newton.d.ts +3 -3
  231. package/lib/cjs/numerics/Newton.d.ts.map +1 -1
  232. package/lib/cjs/numerics/Newton.js +14 -16
  233. package/lib/cjs/numerics/Newton.js.map +1 -1
  234. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  235. package/lib/cjs/numerics/PolarData.js.map +1 -1
  236. package/lib/cjs/numerics/Polynomials.d.ts +2 -2
  237. package/lib/cjs/numerics/Polynomials.js +2 -2
  238. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  239. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  240. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  241. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  242. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  243. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  244. package/lib/cjs/polyface/AuxData.js.map +1 -1
  245. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  246. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  247. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  248. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  249. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  250. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  251. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  252. package/lib/cjs/polyface/Polyface.js.map +1 -1
  253. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +7 -4
  254. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  255. package/lib/cjs/polyface/PolyfaceBuilder.js +11 -6
  256. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  257. package/lib/cjs/polyface/PolyfaceClip.d.ts +13 -10
  258. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  259. package/lib/cjs/polyface/PolyfaceClip.js +17 -14
  260. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  261. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  262. package/lib/cjs/polyface/PolyfaceQuery.d.ts +11 -14
  263. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  264. package/lib/cjs/polyface/PolyfaceQuery.js +59 -52
  265. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  266. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  267. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  268. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  269. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  270. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  271. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  272. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  273. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  274. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  275. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  276. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  277. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  278. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  279. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  280. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  281. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  282. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  283. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  284. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  285. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  286. package/lib/cjs/serialization/BGFBWriter.js +2 -2
  287. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  288. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  289. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  290. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  291. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  292. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  293. package/lib/cjs/solid/Box.js.map +1 -1
  294. package/lib/cjs/solid/Cone.js.map +1 -1
  295. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  296. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  297. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  298. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  299. package/lib/cjs/solid/Sphere.js.map +1 -1
  300. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  301. package/lib/cjs/solid/SweepContour.js +0 -4
  302. package/lib/cjs/solid/SweepContour.js.map +1 -1
  303. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  304. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  305. package/lib/cjs/topology/Graph.d.ts +1 -1
  306. package/lib/cjs/topology/Graph.js +2 -2
  307. package/lib/cjs/topology/Graph.js.map +1 -1
  308. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  309. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  310. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  311. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  312. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  313. package/lib/cjs/topology/HalfEdgeNodeXYZUV.d.ts +1 -1
  314. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js +1 -1
  315. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  316. package/lib/cjs/topology/HalfEdgePointInGraphSearch.d.ts +57 -15
  317. package/lib/cjs/topology/HalfEdgePointInGraphSearch.d.ts.map +1 -1
  318. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js +168 -127
  319. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  320. package/lib/cjs/topology/HalfEdgePositionDetail.d.ts +35 -35
  321. package/lib/cjs/topology/HalfEdgePositionDetail.d.ts.map +1 -1
  322. package/lib/cjs/topology/HalfEdgePositionDetail.js +63 -41
  323. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  324. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  325. package/lib/cjs/topology/InsertAndRetriangulateContext.d.ts +64 -12
  326. package/lib/cjs/topology/InsertAndRetriangulateContext.d.ts.map +1 -1
  327. package/lib/cjs/topology/InsertAndRetriangulateContext.js +174 -75
  328. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  329. package/lib/cjs/topology/MaskManager.js.map +1 -1
  330. package/lib/cjs/topology/Merging.d.ts +2 -2
  331. package/lib/cjs/topology/Merging.js +2 -2
  332. package/lib/cjs/topology/Merging.js.map +1 -1
  333. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  334. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  335. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  336. package/lib/cjs/topology/Triangulation.d.ts +16 -10
  337. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  338. package/lib/cjs/topology/Triangulation.js +23 -30
  339. package/lib/cjs/topology/Triangulation.js.map +1 -1
  340. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  341. package/lib/esm/Constant.js.map +1 -1
  342. package/lib/esm/Geometry.d.ts +57 -46
  343. package/lib/esm/Geometry.d.ts.map +1 -1
  344. package/lib/esm/Geometry.js +73 -53
  345. package/lib/esm/Geometry.js.map +1 -1
  346. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  347. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  348. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  349. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  350. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  351. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  352. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  353. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  354. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  355. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  356. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  357. package/lib/esm/bspline/KnotVector.js.map +1 -1
  358. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  359. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  360. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  361. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  362. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  363. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  364. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  365. package/lib/esm/clipping/ClipVector.js.map +1 -1
  366. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  367. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  368. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  369. package/lib/esm/core-geometry.js.map +1 -1
  370. package/lib/esm/curve/Arc3d.d.ts +141 -38
  371. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  372. package/lib/esm/curve/Arc3d.js +217 -30
  373. package/lib/esm/curve/Arc3d.js.map +1 -1
  374. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  375. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  376. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +11 -6
  377. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  378. package/lib/esm/curve/CurveChainWithDistanceIndex.js +12 -10
  379. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  380. package/lib/esm/curve/CurveCollection.d.ts +2 -1
  381. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  382. package/lib/esm/curve/CurveCollection.js +2 -1
  383. package/lib/esm/curve/CurveCollection.js.map +1 -1
  384. package/lib/esm/curve/CurveCurve.d.ts +11 -9
  385. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  386. package/lib/esm/curve/CurveCurve.js +11 -9
  387. package/lib/esm/curve/CurveCurve.js.map +1 -1
  388. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  389. package/lib/esm/curve/CurveFactory.d.ts +4 -3
  390. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  391. package/lib/esm/curve/CurveFactory.js +4 -3
  392. package/lib/esm/curve/CurveFactory.js.map +1 -1
  393. package/lib/esm/curve/CurveLocationDetail.d.ts +19 -1
  394. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  395. package/lib/esm/curve/CurveLocationDetail.js +39 -0
  396. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  397. package/lib/esm/curve/CurveOps.d.ts +4 -4
  398. package/lib/esm/curve/CurveOps.d.ts.map +1 -1
  399. package/lib/esm/curve/CurveOps.js +6 -6
  400. package/lib/esm/curve/CurveOps.js.map +1 -1
  401. package/lib/esm/curve/CurvePrimitive.d.ts +1 -1
  402. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  403. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  404. package/lib/esm/curve/CurveTypes.js.map +1 -1
  405. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  406. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  407. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  408. package/lib/esm/curve/LineString3d.d.ts +7 -5
  409. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  410. package/lib/esm/curve/LineString3d.js +8 -6
  411. package/lib/esm/curve/LineString3d.js.map +1 -1
  412. package/lib/esm/curve/Loop.d.ts.map +1 -1
  413. package/lib/esm/curve/Loop.js +6 -6
  414. package/lib/esm/curve/Loop.js.map +1 -1
  415. package/lib/esm/curve/OffsetOptions.d.ts +1 -1
  416. package/lib/esm/curve/OffsetOptions.js +1 -1
  417. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  418. package/lib/esm/curve/ParityRegion.js.map +1 -1
  419. package/lib/esm/curve/Path.d.ts.map +1 -1
  420. package/lib/esm/curve/Path.js +5 -6
  421. package/lib/esm/curve/Path.js.map +1 -1
  422. package/lib/esm/curve/PointString3d.js.map +1 -1
  423. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  424. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  425. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -4
  426. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  427. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  428. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  429. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  430. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  431. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  432. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  433. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  434. package/lib/esm/curve/RegionOps.d.ts +4 -3
  435. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  436. package/lib/esm/curve/RegionOps.js +4 -3
  437. package/lib/esm/curve/RegionOps.js.map +1 -1
  438. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  439. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  440. package/lib/esm/curve/UnionRegion.js.map +1 -1
  441. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  442. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  443. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  444. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  445. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  446. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  447. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +23 -7
  448. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  449. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +43 -35
  450. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  451. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +22 -8
  452. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  453. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +127 -52
  454. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  455. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  456. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  457. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  458. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts +211 -0
  459. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -0
  460. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +995 -0
  461. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -0
  462. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  463. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +11 -8
  464. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  465. package/lib/esm/curve/internalContexts/MultiChainCollector.js +7 -4
  466. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  467. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  468. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  469. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  470. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  471. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  472. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  473. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  474. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  475. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  476. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  477. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  478. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  479. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  480. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  481. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  482. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  483. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  484. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  485. package/lib/esm/geometry3d/Angle.d.ts +18 -5
  486. package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
  487. package/lib/esm/geometry3d/Angle.js +23 -7
  488. package/lib/esm/geometry3d/Angle.js.map +1 -1
  489. package/lib/esm/geometry3d/AngleSweep.d.ts +14 -1
  490. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  491. package/lib/esm/geometry3d/AngleSweep.js +47 -12
  492. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  493. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  494. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  495. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  496. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  497. package/lib/esm/geometry3d/FrameBuilder.d.ts +2 -1
  498. package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
  499. package/lib/esm/geometry3d/FrameBuilder.js +12 -10
  500. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  501. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  502. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  503. package/lib/esm/geometry3d/GeometryHandler.js +1 -7
  504. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  505. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  506. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  507. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  508. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  509. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  510. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  511. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  512. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  513. package/lib/esm/geometry3d/Matrix3d.d.ts +6 -4
  514. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  515. package/lib/esm/geometry3d/Matrix3d.js +6 -4
  516. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  517. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  518. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  519. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  520. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  521. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  522. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  523. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  524. package/lib/esm/geometry3d/Point3dVector3d.d.ts +5 -5
  525. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  526. package/lib/esm/geometry3d/Point3dVector3d.js +5 -5
  527. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  528. package/lib/esm/geometry3d/PointHelpers.d.ts +6 -5
  529. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  530. package/lib/esm/geometry3d/PointHelpers.js +11 -10
  531. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  532. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  533. package/lib/esm/geometry3d/PolygonOps.d.ts +4 -4
  534. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  535. package/lib/esm/geometry3d/PolygonOps.js +7 -11
  536. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  537. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +1 -1
  538. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  539. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
  540. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  541. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  542. package/lib/esm/geometry3d/Range.d.ts +6 -1
  543. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  544. package/lib/esm/geometry3d/Range.js +9 -3
  545. package/lib/esm/geometry3d/Range.js.map +1 -1
  546. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  547. package/lib/esm/geometry3d/Ray3d.d.ts +1 -1
  548. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  549. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  550. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  551. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  552. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  553. package/lib/esm/geometry3d/Transform.d.ts +1 -1
  554. package/lib/esm/geometry3d/Transform.js +1 -1
  555. package/lib/esm/geometry3d/Transform.js.map +1 -1
  556. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  557. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  558. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  559. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  560. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  561. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  562. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  563. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  564. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  565. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  566. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  567. package/lib/esm/numerics/Complex.js.map +1 -1
  568. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  569. package/lib/esm/numerics/Newton.d.ts +3 -3
  570. package/lib/esm/numerics/Newton.d.ts.map +1 -1
  571. package/lib/esm/numerics/Newton.js +14 -16
  572. package/lib/esm/numerics/Newton.js.map +1 -1
  573. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  574. package/lib/esm/numerics/PolarData.js.map +1 -1
  575. package/lib/esm/numerics/Polynomials.d.ts +2 -2
  576. package/lib/esm/numerics/Polynomials.js +2 -2
  577. package/lib/esm/numerics/Polynomials.js.map +1 -1
  578. package/lib/esm/numerics/Quadrature.js.map +1 -1
  579. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  580. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  581. package/lib/esm/numerics/UnionFind.js.map +1 -1
  582. package/lib/esm/numerics/UsageSums.js.map +1 -1
  583. package/lib/esm/polyface/AuxData.js.map +1 -1
  584. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  585. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  586. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  587. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  588. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  589. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  590. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  591. package/lib/esm/polyface/Polyface.js.map +1 -1
  592. package/lib/esm/polyface/PolyfaceBuilder.d.ts +7 -4
  593. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  594. package/lib/esm/polyface/PolyfaceBuilder.js +11 -6
  595. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  596. package/lib/esm/polyface/PolyfaceClip.d.ts +13 -10
  597. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  598. package/lib/esm/polyface/PolyfaceClip.js +17 -14
  599. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  600. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  601. package/lib/esm/polyface/PolyfaceQuery.d.ts +11 -14
  602. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  603. package/lib/esm/polyface/PolyfaceQuery.js +59 -52
  604. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  605. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  606. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  607. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  608. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  609. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  610. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  611. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  612. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  613. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  614. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  615. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  616. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  617. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  618. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  619. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  620. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  621. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  622. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  623. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  624. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  625. package/lib/esm/serialization/BGFBWriter.js +2 -2
  626. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  627. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  628. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  629. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  630. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  631. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  632. package/lib/esm/solid/Box.js.map +1 -1
  633. package/lib/esm/solid/Cone.js.map +1 -1
  634. package/lib/esm/solid/LinearSweep.js.map +1 -1
  635. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  636. package/lib/esm/solid/RuledSweep.js.map +1 -1
  637. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  638. package/lib/esm/solid/Sphere.js.map +1 -1
  639. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  640. package/lib/esm/solid/SweepContour.js +0 -4
  641. package/lib/esm/solid/SweepContour.js.map +1 -1
  642. package/lib/esm/solid/TorusPipe.js.map +1 -1
  643. package/lib/esm/topology/ChainMerge.js.map +1 -1
  644. package/lib/esm/topology/Graph.d.ts +1 -1
  645. package/lib/esm/topology/Graph.js +2 -2
  646. package/lib/esm/topology/Graph.js.map +1 -1
  647. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  648. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  649. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  650. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  651. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  652. package/lib/esm/topology/HalfEdgeNodeXYZUV.d.ts +1 -1
  653. package/lib/esm/topology/HalfEdgeNodeXYZUV.js +1 -1
  654. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  655. package/lib/esm/topology/HalfEdgePointInGraphSearch.d.ts +57 -15
  656. package/lib/esm/topology/HalfEdgePointInGraphSearch.d.ts.map +1 -1
  657. package/lib/esm/topology/HalfEdgePointInGraphSearch.js +168 -127
  658. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  659. package/lib/esm/topology/HalfEdgePositionDetail.d.ts +35 -35
  660. package/lib/esm/topology/HalfEdgePositionDetail.d.ts.map +1 -1
  661. package/lib/esm/topology/HalfEdgePositionDetail.js +63 -41
  662. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  663. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  664. package/lib/esm/topology/InsertAndRetriangulateContext.d.ts +64 -12
  665. package/lib/esm/topology/InsertAndRetriangulateContext.d.ts.map +1 -1
  666. package/lib/esm/topology/InsertAndRetriangulateContext.js +173 -74
  667. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  668. package/lib/esm/topology/MaskManager.js.map +1 -1
  669. package/lib/esm/topology/Merging.d.ts +2 -2
  670. package/lib/esm/topology/Merging.js +2 -2
  671. package/lib/esm/topology/Merging.js.map +1 -1
  672. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  673. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  674. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  675. package/lib/esm/topology/Triangulation.d.ts +16 -10
  676. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  677. package/lib/esm/topology/Triangulation.js +24 -31
  678. package/lib/esm/topology/Triangulation.js.map +1 -1
  679. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  680. package/package.json +3 -3
@@ -4,7 +4,8 @@
4
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Arc3d = void 0;
7
+ exports.Arc3d = exports.EllipticalArcApproximationOptions = exports.EllipticalArcSampleMethod = void 0;
8
+ const Constant_1 = require("../Constant");
8
9
  const Geometry_1 = require("../Geometry");
9
10
  const Angle_1 = require("../geometry3d/Angle");
10
11
  const AngleSweep_1 = require("../geometry3d/AngleSweep");
@@ -18,24 +19,134 @@ const CurveExtendMode_1 = require("./CurveExtendMode");
18
19
  const CurveLocationDetail_1 = require("./CurveLocationDetail");
19
20
  const CurvePrimitive_1 = require("./CurvePrimitive");
20
21
  const CurveOffsetXYHandler_1 = require("./internalContexts/CurveOffsetXYHandler");
22
+ const EllipticalArcApproximationContext_1 = require("./internalContexts/EllipticalArcApproximationContext");
21
23
  const PlaneAltitudeRangeContext_1 = require("./internalContexts/PlaneAltitudeRangeContext");
24
+ const LineSegment3d_1 = require("./LineSegment3d");
22
25
  const LineString3d_1 = require("./LineString3d");
23
26
  const OffsetOptions_1 = require("./OffsetOptions");
27
+ const Path_1 = require("./Path");
24
28
  const StrokeOptions_1 = require("./StrokeOptions");
29
+ /**
30
+ * Enumeration of methods used to sample an elliptical arc in [[Arc3d.constructCircularArcChainApproximation]].
31
+ * * Because ellipses have two axes of symmetry, samples are computed for one quadrant and reflected across each
32
+ * axis to the other quadrants. Any samples that fall outside the arc sweep are filtered out.
33
+ * @public
34
+ */
35
+ var EllipticalArcSampleMethod;
36
+ (function (EllipticalArcSampleMethod) {
37
+ /** Generate n samples uniformly interpolated between the min and max parameters of a full ellipse quadrant. */
38
+ EllipticalArcSampleMethod[EllipticalArcSampleMethod["UniformParameter"] = 0] = "UniformParameter";
39
+ /** Generate n samples uniformly interpolated between the min and max curvatures of a full ellipse quadrant. */
40
+ EllipticalArcSampleMethod[EllipticalArcSampleMethod["UniformCurvature"] = 1] = "UniformCurvature";
41
+ /**
42
+ * Generate n samples interpolated between the min and max curvatures of a full ellipse quadrant, using a
43
+ * [[FractionMapper]] callback to generate the interpolation weights.
44
+ */
45
+ EllipticalArcSampleMethod[EllipticalArcSampleMethod["NonUniformCurvature"] = 2] = "NonUniformCurvature";
46
+ /**
47
+ * Generate samples by subdividing parameter space until the approximation has less than a given max
48
+ * distance to the elliptical arc.
49
+ */
50
+ EllipticalArcSampleMethod[EllipticalArcSampleMethod["AdaptiveSubdivision"] = 3] = "AdaptiveSubdivision";
51
+ })(EllipticalArcSampleMethod || (exports.EllipticalArcSampleMethod = EllipticalArcSampleMethod = {}));
52
+ /**
53
+ * Options for generating samples for the construction of an approximation to an elliptical arc.
54
+ * * Used by [[Arc3d.constructCircularArcChainApproximation]].
55
+ * @public
56
+ */
57
+ class EllipticalArcApproximationOptions {
58
+ constructor(method, numSamplesInQuadrant, maxError, remapFunction, forcePath) {
59
+ this._sampleMethod = method;
60
+ this._numSamplesInQuadrant = numSamplesInQuadrant;
61
+ this._maxError = maxError;
62
+ this._remapFunction = remapFunction;
63
+ this._forcePath = forcePath;
64
+ }
65
+ /**
66
+ * Construct options with optional defaults.
67
+ * @param method sample method, default [[EllipticalArcSampleMethod.AdaptiveSubdivision]].
68
+ * @param numSamplesInQuadrant samples in each full quadrant for interpolation methods, default 4.
69
+ * @param maxError positive maximum distance to ellipse for the subdivision method, default 1cm.
70
+ * @param remapFunction optional callback to remap fraction space for [[EllipticalArcSampleMethod.NonUniformCurvature]],
71
+ * default quadratic. For best results, this function should be a bijection.
72
+ * @param forcePath whether to return a [[Path]] instead of a [[Loop]] when approximating a full elliptical arc,
73
+ * default false.
74
+ */
75
+ static create(method = EllipticalArcSampleMethod.AdaptiveSubdivision, numSamplesInQuadrant = 4, maxError = this.defaultMaxError, remapFunction = (x) => x * x, forcePath = false) {
76
+ if (numSamplesInQuadrant < 2)
77
+ numSamplesInQuadrant = 2;
78
+ if (maxError <= 0)
79
+ maxError = this.defaultMaxError;
80
+ return new EllipticalArcApproximationOptions(method, numSamplesInQuadrant, maxError, remapFunction, forcePath);
81
+ }
82
+ /** Clone the options. */
83
+ clone() {
84
+ return new EllipticalArcApproximationOptions(this.sampleMethod, this.numSamplesInQuadrant, this.maxError, this.remapFunction, this.forcePath);
85
+ }
86
+ /** Method used to sample the elliptical arc. */
87
+ get sampleMethod() {
88
+ return this._sampleMethod;
89
+ }
90
+ set sampleMethod(method) {
91
+ this._sampleMethod = method;
92
+ }
93
+ /**
94
+ * Number of samples to return in each full quadrant, including endpoint(s).
95
+ * * Used by interpolation sample methods.
96
+ * * In general, for n samples, the approximating [[Path]] consists of n-1 primitives,
97
+ * and the approximating [[Loop]] consists of n primitives.
98
+ * * Minimum value is 2.
99
+ */
100
+ get numSamplesInQuadrant() {
101
+ return this._numSamplesInQuadrant;
102
+ }
103
+ set numSamplesInQuadrant(numSamples) {
104
+ this._numSamplesInQuadrant = numSamples;
105
+ }
106
+ /**
107
+ * Maximum distance (in meters) of the computed approximation to the elliptical arc.
108
+ * * Used by [[EllipticalArcSampleMethod.AdaptiveSubdivision]].
109
+ */
110
+ get maxError() {
111
+ return this._maxError;
112
+ }
113
+ set maxError(error) {
114
+ this._maxError = error;
115
+ }
116
+ /**
117
+ * Callback function to remap fraction space to fraction space.
118
+ * * Used by [[EllipticalArcSampleMethod.NonUniformCurvature]].
119
+ */
120
+ get remapFunction() {
121
+ return this._remapFunction;
122
+ }
123
+ set remapFunction(f) {
124
+ this._remapFunction = f;
125
+ }
126
+ /** Whether to return a [[Path]] instead of a [[Loop]] when approximating a full (closed) ellipse. */
127
+ get forcePath() {
128
+ return this._forcePath;
129
+ }
130
+ set forcePath(value) {
131
+ this._forcePath = value;
132
+ }
133
+ }
134
+ exports.EllipticalArcApproximationOptions = EllipticalArcApproximationOptions;
135
+ /** Default error tolerance. */
136
+ EllipticalArcApproximationOptions.defaultMaxError = Constant_1.Constant.oneCentimeter;
25
137
  /**
26
138
  * Circular or elliptic arc.
27
139
  * * The angle to point equation is:
28
- * * `X = center + cos(theta) * vector0 + sin(theta) * vector90`
140
+ * * `X = center + cos(theta) * vector0 + sin(theta) * vector90`
29
141
  * * When the two vectors are perpendicular and have equal length, it is a true circle.
30
142
  * * Non-perpendicular vectors are always elliptic.
31
143
  * * Vectors of unequal length are always elliptic.
32
144
  * * To create an ellipse in the common "major and minor axis" form of an ellipse:
33
- * ** vector0 is the vector from the center to the major axis extreme.
34
- * ** vector90 is the vector from the center to the minor axis extreme.
35
- * ** note that constructing the vectors to the extreme points makes them perpendicular.
36
- * * The method toScaledMatrix3d() can be called to convert the unrestricted vector0,vector90 to perpendicular form.
37
- * * The unrestricted form is much easier to work with for common calculations -- stroking, projection to 2d,
38
- * intersection with plane.
145
+ * * vector0 is the vector from the center to the major axis extreme.
146
+ * * vector90 is the vector from the center to the minor axis extreme.
147
+ * * Note that constructing these vectors to the extreme points makes them perpendicular.
148
+ * * The method toScaledMatrix3d() can be called to convert the unrestricted vector0, vector90 to perpendicular form.
149
+ * * The unrestricted form is much easier to work with for common calculations: stroking, projection to 2d, intersection with plane.
39
150
  * @public
40
151
  */
41
152
  class Arc3d extends CurvePrimitive_1.CurvePrimitive {
@@ -170,7 +281,7 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
170
281
  * @param center arc center
171
282
  * @param vector0 vector to 0 degrees (commonly major axis)
172
283
  * @param vector90 vector to 90 degree point (commonly minor axis)
173
- * @param sweep sweep limits
284
+ * @param sweep sweep limits (default full sweep)
174
285
  * @param result optional preallocated result
175
286
  */
176
287
  static create(center, vector0, vector90, sweep, result) {
@@ -179,12 +290,12 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
179
290
  return Arc3d.createRefs(center !== undefined ? center.clone() : Point3dVector3d_1.Point3d.create(0, 0, 0), matrix, sweep ? sweep.clone() : AngleSweep_1.AngleSweep.create360(), result);
180
291
  }
181
292
  /**
182
- * Create an arc from three points on the ellipse: two points on an axis and one in between.
293
+ * Create an elliptical arc from three points on the ellipse: two points on an axis and one in between.
183
294
  * @param point0 start of arc, on an axis
184
295
  * @param point1 point on arc somewhere between `point0` and `point2`
185
296
  * @param point2 point on arc directly opposite `point0`
186
297
  * @param sweep angular sweep, measured from `point0` in the direction of `point1`.
187
- * For a semicircle from `point0` to `point2` passing through `point1`, pass `AngleSweep.createStartEndDegrees(0,180)`.
298
+ * For a half-ellipse from `point0` to `point2` passing through `point1`, pass `AngleSweep.createStartEndDegrees(0,180)`.
188
299
  * Default value is full sweep to create the entire ellipse.
189
300
  * @param result optional preallocated result
190
301
  * @returns elliptical arc, or undefined if construction impossible.
@@ -207,6 +318,68 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
207
318
  vector90.scaleInPlace(v90Len);
208
319
  return Arc3d.create(center, vector0, vector90, sweep, result);
209
320
  }
321
+ /**
322
+ * Create a circular arc defined by start point, tangent at start point, and end point.
323
+ * If tangent is parallel to line segment from start to end, return the line segment.
324
+ */
325
+ static createCircularStartTangentEnd(start, tangentAtStart, end, result) {
326
+ // To find the circle passing through start and end with tangentAtStart at start:
327
+ // - find line 1: the perpendicular bisector of the line from start to end.
328
+ // - find line 2: the perpendicular to the tangentAtStart.
329
+ // - intersection of the two lines would be the circle center.
330
+ const vector = Point3dVector3d_1.Vector3d.createStartEnd(start, end);
331
+ const normal = tangentAtStart.crossProduct(vector).normalize();
332
+ if (normal) {
333
+ const vectorPerp = normal.crossProduct(vector);
334
+ const tangentPerp = normal.crossProduct(tangentAtStart);
335
+ const midPoint = start.plusScaled(vector, 0.5);
336
+ const lineSeg1 = LineSegment3d_1.LineSegment3d.create(start, start.plusScaled(tangentPerp, 1));
337
+ const lineSeg2 = LineSegment3d_1.LineSegment3d.create(midPoint, midPoint.plusScaled(vectorPerp, 1));
338
+ const intersection = LineSegment3d_1.LineSegment3d.closestApproach(lineSeg1, true, lineSeg2, true);
339
+ if (intersection) {
340
+ const center = intersection.detailA.point;
341
+ const vector0 = Point3dVector3d_1.Vector3d.createStartEnd(center, start);
342
+ const vector90 = normal.crossProduct(vector0);
343
+ const endVector = Point3dVector3d_1.Vector3d.createStartEnd(center, end);
344
+ const sweep = AngleSweep_1.AngleSweep.create(vector0.signedAngleTo(endVector, normal));
345
+ return Arc3d.create(center, vector0, vector90, sweep, result);
346
+ }
347
+ }
348
+ return LineSegment3d_1.LineSegment3d.create(start, end);
349
+ }
350
+ /**
351
+ * Create a circular arc defined by start and end points and radius.
352
+ * @param start start point of the arc
353
+ * @param end end point of the arc
354
+ * @param helper a third point near the arc in its plane, or a vector in the direction of the arc normal
355
+ * @returns the constructed arc, or undefined if desired arc cannot be constructed
356
+ */
357
+ static createCircularStartEndRadius(start, end, radius, helper) {
358
+ // Construct a line segment from start to end. It is a chord of the circle,
359
+ // so the circle center is on its perpendicular bisector.
360
+ const semiChordLen2 = 0.25 * start.distanceSquared(end);
361
+ const radius2 = radius * radius;
362
+ if (radius2 < semiChordLen2)
363
+ return undefined;
364
+ const height = Math.sqrt(radius2 - semiChordLen2); // Pythagoras gives us distance from chord to center
365
+ const normal = Point3dVector3d_1.Vector3d.createZero(this._workVectorU);
366
+ const vecToCenter = Point3dVector3d_1.Vector3d.createZero(this._workVectorV);
367
+ // the helper gives us the circle normal
368
+ if (helper instanceof Point3dVector3d_1.Point3d)
369
+ start.crossProductToPoints(helper, end, normal);
370
+ else
371
+ normal.setFrom(helper);
372
+ // the normal and chord direction give us the side of the chord on which the center resides
373
+ if (!normal.normalizeInPlace() || !normal.crossProductStartEnd(start, end, vecToCenter).scaleToLength(height, vecToCenter))
374
+ return undefined;
375
+ const center = Point3dVector3d_1.Point3d.createZero();
376
+ start.interpolate(0.5, end, center).addInPlace(vecToCenter);
377
+ const vector0 = Point3dVector3d_1.Vector3d.createStartEnd(center, start, this._workVectorW);
378
+ const endVector = Point3dVector3d_1.Vector3d.createStartEnd(center, end, this._workVectorV); // reuse static
379
+ const sweep = AngleSweep_1.AngleSweep.create(vector0.signedAngleTo(endVector, normal));
380
+ const vector90 = normal.crossProduct(vector0, this._workVectorV); // has length radius (reuse static)
381
+ return Arc3d.createRefs(center, Matrix3d_1.Matrix3d.createColumns(vector0, vector90, normal), sweep);
382
+ }
210
383
  /**
211
384
  * Return a clone of this arc, projected to given z value.
212
385
  * * If `z` is omitted, the clone is at the z of the center.
@@ -250,10 +423,10 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
250
423
  const ac2 = vectorAC.magnitudeSquared();
251
424
  const normal = vectorAB.sizedCrossProduct(vectorAC, Math.sqrt(Math.sqrt(ab2 * ac2)));
252
425
  if (normal) {
253
- const vectorToCenter = Polynomials_1.SmallSystem.linearSystem3d(normal.x, normal.y, normal.z, vectorAB.x, vectorAB.y, vectorAB.z, vectorAC.x, vectorAC.y, vectorAC.z, 0, // vectorToCenter DOT normal = 0
254
- 0.5 * ab2, // vectorToCenter DOT vectorAB = 0.5 * vectorAB DOT vectorAB (Rayleigh quotient)
426
+ const vectorToCenter = Polynomials_1.SmallSystem.linearSystem3d(normal.x, normal.y, normal.z, vectorAB.x, vectorAB.y, vectorAB.z, vectorAC.x, vectorAC.y, vectorAC.z, 0, // vectorToCenter DOT normal = 0 (ensure normal is perp to the plane of the 3 points)
427
+ 0.5 * ab2, // vectorToCenter DOT vectorAB = ab2 / 2 (ensure the projection of vectorToCenter on AB bisects AB)
255
428
  0.5 * ac2);
256
- if (vectorToCenter) {
429
+ if (vectorToCenter) { // i.e., the negative of vectorX
257
430
  const center = Point3dVector3d_1.Point3d.create(pointA.x, pointA.y, pointA.z).plus(vectorToCenter);
258
431
  const vectorX = Point3dVector3d_1.Vector3d.createStartEnd(center, pointA);
259
432
  const vectorY = Point3dVector3d_1.Vector3d.createRotateVectorAroundVector(vectorX, normal, Angle_1.Angle.createDegrees(90));
@@ -337,7 +510,7 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
337
510
  return result;
338
511
  }
339
512
  /**
340
- * Evaluate the point and derivative with respect to the angle (in radians)
513
+ * Evaluate the point with respect to the angle (in radians)
341
514
  * @param radians angular position
342
515
  * @param result optional preallocated ray.
343
516
  */
@@ -379,14 +552,14 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
379
552
  return result;
380
553
  }
381
554
  /**
382
- * Return the start point tof the arc.
555
+ * Return the start point of the arc.
383
556
  * @param result optional preallocated result
384
557
  */
385
558
  startPoint(result) {
386
559
  return this.fractionToPoint(0.0, result);
387
560
  }
388
561
  /**
389
- * Return the end point tof the arc.
562
+ * Return the end point of the arc.
390
563
  * @param result optional preallocated result
391
564
  */
392
565
  endPoint(result) {
@@ -474,19 +647,19 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
474
647
  return CurveLocationDetail_1.CurveLocationDetail.createConditionalMoveSignedDistance(allowExtension, this, startFraction, startFraction + signedFractionMove, signedDistance, result);
475
648
  }
476
649
  /**
477
- * Return all angles (in radians) where the ellipse tangent is perpendicular to the vector to a spacePoint.
650
+ * Return all radian angles where the ellipse tangent is perpendicular to the vector to a spacePoint.
478
651
  * @param spacePoint point of origin of vectors to the ellipse
479
- * @param _extend (NOT SUPPORTED -- ALWAYS ACTS AS "true")
480
- * @param _endpoints if true, force the end radians into the result.
652
+ * @param _extend always true. Sweep is ignored: perpendiculars for the full ellipse are returned.
653
+ * @param endpoints if true, force the end radians into the result.
481
654
  */
482
- allPerpendicularAngles(spacePoint, _extend = true, _endpoints = false) {
655
+ allPerpendicularAngles(spacePoint, _extend = true, endpoints = false) {
483
656
  const radians = [];
484
657
  const vectorQ = spacePoint.vectorTo(this.center);
485
658
  const uu = this._matrix.columnXMagnitudeSquared();
486
659
  const uv = this._matrix.columnXDotColumnY();
487
660
  const vv = this._matrix.columnYMagnitudeSquared();
488
661
  Polynomials_1.TrigPolynomial.solveUnitCircleImplicitQuadricIntersection(uv, vv - uu, -uv, this._matrix.dotColumnY(vectorQ), -this._matrix.dotColumnX(vectorQ), 0.0, radians);
489
- if (_endpoints) {
662
+ if (endpoints) {
490
663
  radians.push(this.sweep.startRadians);
491
664
  radians.push(this.sweep.endRadians);
492
665
  }
@@ -682,7 +855,7 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
682
855
  result.set(plane.altitude(this._center), plane.velocityXYZ(this._matrix.coffs[0], this._matrix.coffs[3], this._matrix.coffs[6]), plane.velocityXYZ(this._matrix.coffs[1], this._matrix.coffs[4], this._matrix.coffs[7]));
683
856
  return result;
684
857
  }
685
- /** Create a new arc which is a unit circle centered at the origin. */
858
+ /** Create a new arc which is a unit circle in the xy-plane centered at the origin. */
686
859
  static createUnitCircle() {
687
860
  return Arc3d.createRefs(Point3dVector3d_1.Point3d.create(0, 0, 0), Matrix3d_1.Matrix3d.createIdentity(), AngleSweep_1.AngleSweep.create360());
688
861
  }
@@ -693,7 +866,7 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
693
866
  * @param sweep sweep limits. defaults to full circle.
694
867
  */
695
868
  static createXY(center, radius, sweep = AngleSweep_1.AngleSweep.create360()) {
696
- return new Arc3d(center.clone(), Matrix3d_1.Matrix3d.createScale(radius, radius, 1.0), sweep);
869
+ return new Arc3d(center.clone(), Matrix3d_1.Matrix3d.createScale(radius, radius, 1.0), sweep.clone());
697
870
  }
698
871
  /**
699
872
  * Create a new arc which is parallel to the xy plane, with given center and x,y radii, and optional angle sweep
@@ -703,7 +876,7 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
703
876
  * @param sweep angle sweep
704
877
  */
705
878
  static createXYEllipse(center, radiusA, radiusB, sweep = AngleSweep_1.AngleSweep.create360()) {
706
- return new Arc3d(center.clone(), Matrix3d_1.Matrix3d.createScale(radiusA, radiusB, 1.0), sweep);
879
+ return new Arc3d(center.clone(), Matrix3d_1.Matrix3d.createScale(radiusA, radiusB, 1.0), sweep.clone());
707
880
  }
708
881
  /**
709
882
  * Replace the arc's 0 and 90 degree vectors.
@@ -720,8 +893,8 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
720
893
  const vector90A = this._matrix.multiplyXY(-angleData.s, angleData.c);
721
894
  const axes = Matrix3d_1.Matrix3d.createRigidFromColumns(vector0A, vector90A, Geometry_1.AxisOrder.XYZ);
722
895
  return {
896
+ center: this._center.clone(),
723
897
  axes: (axes ? axes : Matrix3d_1.Matrix3d.createIdentity()),
724
- center: this._center,
725
898
  r0: vector0A.magnitude(),
726
899
  r90: vector90A.magnitude(),
727
900
  sweep: this.sweep.cloneMinusRadians(angleData.radians),
@@ -730,10 +903,10 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
730
903
  /** Return the arc definition with center, two vectors, and angle sweep; */
731
904
  toVectors() {
732
905
  return {
733
- center: this.center,
906
+ center: this.center.clone(),
734
907
  vector0: this._matrix.columnX(),
735
908
  vector90: this._matrix.columnY(),
736
- sweep: this.sweep,
909
+ sweep: this.sweep.clone(),
737
910
  };
738
911
  }
739
912
  /** Return the arc definition with center, two vectors, and angle sweep, optionally transformed. */
@@ -742,13 +915,13 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
742
915
  center: transform.multiplyPoint3d(this._center),
743
916
  vector0: transform.multiplyVector(this._matrix.columnX()),
744
917
  vector90: transform.multiplyVector(this._matrix.columnY()),
745
- sweep: this.sweep,
918
+ sweep: this.sweep.clone(),
746
919
  }
747
920
  : {
748
921
  center: this._center.clone(),
749
922
  vector0: this._matrix.columnX(),
750
923
  vector90: this._matrix.columnY(),
751
- sweep: this.sweep,
924
+ sweep: this.sweep.clone(),
752
925
  };
753
926
  }
754
927
  /** Return the arc definition with center, two vectors, and angle sweep, transformed to 4d points. */
@@ -757,7 +930,7 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
757
930
  center: matrix.multiplyPoint3d(this._center, 1.0),
758
931
  vector0: matrix.multiplyPoint3d(this._matrix.columnX(), 0.0),
759
932
  vector90: matrix.multiplyPoint3d(this._matrix.columnY(), 0.0),
760
- sweep: this.sweep,
933
+ sweep: this.sweep.clone(),
761
934
  };
762
935
  }
763
936
  /**
@@ -997,6 +1170,20 @@ class Arc3d extends CurvePrimitive_1.CurvePrimitive {
997
1170
  projectedParameterRange(ray, lowHigh) {
998
1171
  return PlaneAltitudeRangeContext_1.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
999
1172
  }
1173
+ /**
1174
+ * Construct a circular arc chain approximation to the instance elliptical arc.
1175
+ * @param options bundle of options for sampling an elliptical arc (use default options if undefined)
1176
+ * @returns the approximating curve chain, the circular instance, or undefined if construction fails.
1177
+ */
1178
+ constructCircularArcChainApproximation(options) {
1179
+ if (!options)
1180
+ options = EllipticalArcApproximationOptions.create();
1181
+ const context = EllipticalArcApproximationContext_1.EllipticalArcApproximationContext.create(this);
1182
+ const result = context.constructCircularArcChainApproximation(options);
1183
+ if (!result && this.isCircular)
1184
+ return (this.sweep.isFullCircle && options.forcePath) ? Path_1.Path.create(this) : this;
1185
+ return result;
1186
+ }
1000
1187
  }
1001
1188
  exports.Arc3d = Arc3d;
1002
1189
  Arc3d._workPointA = Point3dVector3d_1.Point3d.create();
@@ -1004,6 +1191,7 @@ Arc3d._workPointB = Point3dVector3d_1.Point3d.create();
1004
1191
  Arc3d._workPointC = Point3dVector3d_1.Point3d.create();
1005
1192
  Arc3d._workVectorU = Point3dVector3d_1.Vector3d.create();
1006
1193
  Arc3d._workVectorV = Point3dVector3d_1.Vector3d.create();
1194
+ Arc3d._workVectorW = Point3dVector3d_1.Vector3d.create();
1007
1195
  // !! misspelled Gauss in the published static !! Declare it ok.
1008
1196
  // cspell::word Guass
1009
1197
  /** Gauss point quadrature count for evaluating curve length. (The number of intervals is adjusted to the arc sweep) */