@itwin/core-geometry 5.8.0-dev.8 → 5.9.0-dev.1

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 (576) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/Constant.js.map +1 -1
  3. package/lib/cjs/Geometry.d.ts +24 -14
  4. package/lib/cjs/Geometry.d.ts.map +1 -1
  5. package/lib/cjs/Geometry.js +34 -14
  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.d.ts +1 -0
  31. package/lib/cjs/core-geometry.d.ts.map +1 -1
  32. package/lib/cjs/core-geometry.js +1 -0
  33. package/lib/cjs/core-geometry.js.map +1 -1
  34. package/lib/cjs/curve/Arc3d.d.ts +4 -0
  35. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  36. package/lib/cjs/curve/Arc3d.js +14 -0
  37. package/lib/cjs/curve/Arc3d.js.map +1 -1
  38. package/lib/cjs/curve/ConstrainedCurve2d.d.ts +149 -0
  39. package/lib/cjs/curve/ConstrainedCurve2d.d.ts.map +1 -0
  40. package/lib/cjs/curve/ConstrainedCurve2d.js +317 -0
  41. package/lib/cjs/curve/ConstrainedCurve2d.js.map +1 -0
  42. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  43. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  44. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  45. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  46. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  47. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  48. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  49. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  50. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  51. package/lib/cjs/curve/CurveOps.js.map +1 -1
  52. package/lib/cjs/curve/CurvePrimitive.d.ts +2 -2
  53. package/lib/cjs/curve/CurvePrimitive.js +2 -2
  54. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  55. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  56. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  57. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  58. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  59. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  60. package/lib/cjs/curve/LineString3d.js.map +1 -1
  61. package/lib/cjs/curve/Loop.js.map +1 -1
  62. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  63. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  64. package/lib/cjs/curve/Path.js.map +1 -1
  65. package/lib/cjs/curve/PointString3d.js.map +1 -1
  66. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  67. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  68. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  69. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  70. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  71. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  72. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  73. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  74. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  75. package/lib/cjs/curve/RegionOps.js.map +1 -1
  76. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  77. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  78. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  79. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  81. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  82. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  83. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  86. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  87. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  88. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  89. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  90. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  93. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  94. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  95. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  96. package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.d.ts +26 -0
  97. package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.d.ts.map +1 -0
  98. package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.js +78 -0
  99. package/lib/cjs/curve/internalContexts/PointToCurveTangentHandler.js.map +1 -0
  100. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  101. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  102. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -1
  103. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  104. package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts +152 -0
  105. package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts.map +1 -0
  106. package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js +843 -0
  107. package/lib/cjs/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js.map +1 -0
  108. package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.d.ts +97 -0
  109. package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.d.ts.map +1 -0
  110. package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.js +300 -0
  111. package/lib/cjs/curve/internalContexts/geometry2d/ConstraintSet.js.map +1 -0
  112. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts +105 -0
  113. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts.map +1 -0
  114. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.js +141 -0
  115. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2d.js.map +1 -0
  116. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts +27 -0
  117. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts.map +1 -0
  118. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js +152 -0
  119. package/lib/cjs/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js.map +1 -0
  120. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts +81 -0
  121. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts.map +1 -0
  122. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.js +170 -0
  123. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedCircle2d.js.map +1 -0
  124. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts +96 -0
  125. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts.map +1 -0
  126. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.js +187 -0
  127. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedEllipse2d.js.map +1 -0
  128. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts +91 -0
  129. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts.map +1 -0
  130. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js +197 -0
  131. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js.map +1 -0
  132. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts +129 -0
  133. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts.map +1 -0
  134. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.js +208 -0
  135. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedLine2d.js.map +1 -0
  136. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts +87 -0
  137. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts.map +1 -0
  138. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.js +193 -0
  139. package/lib/cjs/curve/internalContexts/geometry2d/UnboundedParabola2d.js.map +1 -0
  140. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  141. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  142. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  143. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  144. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  145. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  146. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  147. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  148. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  149. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  150. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  151. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  152. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  153. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  154. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  155. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  156. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  157. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  158. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  159. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  160. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  161. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  162. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  163. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  164. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  165. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  166. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  167. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  168. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  169. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  170. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  171. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  172. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  173. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  174. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  175. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  176. package/lib/cjs/geometry3d/Point2dVector2d.d.ts +7 -0
  177. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  178. package/lib/cjs/geometry3d/Point2dVector2d.js +9 -0
  179. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  180. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  181. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  182. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  183. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  184. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  185. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  186. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  187. package/lib/cjs/geometry3d/Range.js.map +1 -1
  188. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  189. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  190. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  191. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  192. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  193. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  194. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  195. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  196. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  197. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  198. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  199. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  200. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  201. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  202. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  203. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  204. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  205. package/lib/cjs/numerics/Complex.js.map +1 -1
  206. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  207. package/lib/cjs/numerics/Newton.js.map +1 -1
  208. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  209. package/lib/cjs/numerics/PolarData.js.map +1 -1
  210. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  211. package/lib/cjs/numerics/Polynomials.js +8 -6
  212. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  213. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  214. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  215. package/lib/cjs/numerics/SmallSystem.js.map +1 -1
  216. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  217. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  218. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  219. package/lib/cjs/polyface/AuxData.js.map +1 -1
  220. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  221. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  222. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  223. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  224. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  225. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  226. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  227. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  228. package/lib/cjs/polyface/Polyface.js.map +1 -1
  229. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  230. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  231. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  232. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  233. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  234. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  235. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  236. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  237. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  238. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  239. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  240. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  241. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  242. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  243. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  244. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  245. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  246. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  247. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  248. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  249. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  250. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  251. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  252. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  253. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  254. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  255. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  256. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  257. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  258. package/lib/cjs/solid/Box.js.map +1 -1
  259. package/lib/cjs/solid/Cone.js.map +1 -1
  260. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  261. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  262. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  263. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  264. package/lib/cjs/solid/Sphere.js.map +1 -1
  265. package/lib/cjs/solid/SweepContour.js.map +1 -1
  266. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  267. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  268. package/lib/cjs/topology/Graph.js.map +1 -1
  269. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  270. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  271. package/lib/cjs/topology/HalfEdgeGraphSpineContext.d.ts.map +1 -1
  272. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +3 -1
  273. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  274. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  275. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  276. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  277. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  278. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  279. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  280. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  281. package/lib/cjs/topology/MaskManager.js.map +1 -1
  282. package/lib/cjs/topology/Merging.js.map +1 -1
  283. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  284. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  285. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  286. package/lib/cjs/topology/Triangulation.js.map +1 -1
  287. package/lib/cjs/topology/Voronoi.js.map +1 -1
  288. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  289. package/lib/esm/Constant.js.map +1 -1
  290. package/lib/esm/Geometry.d.ts +24 -14
  291. package/lib/esm/Geometry.d.ts.map +1 -1
  292. package/lib/esm/Geometry.js +34 -14
  293. package/lib/esm/Geometry.js.map +1 -1
  294. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  295. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  296. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  297. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  298. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  299. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  300. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  301. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  302. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  303. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  304. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  305. package/lib/esm/bspline/KnotVector.js.map +1 -1
  306. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  307. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  308. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  309. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  310. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  311. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  312. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  313. package/lib/esm/clipping/ClipVector.js.map +1 -1
  314. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  315. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  316. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  317. package/lib/esm/core-geometry.d.ts +1 -0
  318. package/lib/esm/core-geometry.d.ts.map +1 -1
  319. package/lib/esm/core-geometry.js +1 -0
  320. package/lib/esm/core-geometry.js.map +1 -1
  321. package/lib/esm/curve/Arc3d.d.ts +4 -0
  322. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  323. package/lib/esm/curve/Arc3d.js +14 -0
  324. package/lib/esm/curve/Arc3d.js.map +1 -1
  325. package/lib/esm/curve/ConstrainedCurve2d.d.ts +149 -0
  326. package/lib/esm/curve/ConstrainedCurve2d.d.ts.map +1 -0
  327. package/lib/esm/curve/ConstrainedCurve2d.js +313 -0
  328. package/lib/esm/curve/ConstrainedCurve2d.js.map +1 -0
  329. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  330. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  331. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  332. package/lib/esm/curve/CurveCollection.js.map +1 -1
  333. package/lib/esm/curve/CurveCurve.js.map +1 -1
  334. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  335. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  336. package/lib/esm/curve/CurveFactory.js.map +1 -1
  337. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  338. package/lib/esm/curve/CurveOps.js.map +1 -1
  339. package/lib/esm/curve/CurvePrimitive.d.ts +2 -2
  340. package/lib/esm/curve/CurvePrimitive.js +2 -2
  341. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  342. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  343. package/lib/esm/curve/CurveTypes.js.map +1 -1
  344. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  345. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  346. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  347. package/lib/esm/curve/LineString3d.js.map +1 -1
  348. package/lib/esm/curve/Loop.js.map +1 -1
  349. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  350. package/lib/esm/curve/ParityRegion.js.map +1 -1
  351. package/lib/esm/curve/Path.js.map +1 -1
  352. package/lib/esm/curve/PointString3d.js.map +1 -1
  353. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  354. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  355. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  356. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  357. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  358. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  359. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  360. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  361. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  362. package/lib/esm/curve/RegionOps.js.map +1 -1
  363. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  364. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  365. package/lib/esm/curve/UnionRegion.js.map +1 -1
  366. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
  367. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  368. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  369. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  370. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  371. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  372. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  373. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  374. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  375. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  376. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  377. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  378. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  379. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  380. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  381. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  382. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  383. package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.d.ts +26 -0
  384. package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.d.ts.map +1 -0
  385. package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.js +74 -0
  386. package/lib/esm/curve/internalContexts/PointToCurveTangentHandler.js.map +1 -0
  387. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  388. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  389. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -1
  390. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  391. package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts +152 -0
  392. package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.d.ts.map +1 -0
  393. package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js +839 -0
  394. package/lib/esm/curve/internalContexts/geometry2d/ConstrainedImplicitCurve2d.js.map +1 -0
  395. package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.d.ts +97 -0
  396. package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.d.ts.map +1 -0
  397. package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.js +295 -0
  398. package/lib/esm/curve/internalContexts/geometry2d/ConstraintSet.js.map +1 -0
  399. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts +105 -0
  400. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.d.ts.map +1 -0
  401. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.js +135 -0
  402. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2d.js.map +1 -0
  403. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts +27 -0
  404. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.d.ts.map +1 -0
  405. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js +148 -0
  406. package/lib/esm/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.js.map +1 -0
  407. package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts +81 -0
  408. package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.d.ts.map +1 -0
  409. package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.js +166 -0
  410. package/lib/esm/curve/internalContexts/geometry2d/UnboundedCircle2d.js.map +1 -0
  411. package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts +96 -0
  412. package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.d.ts.map +1 -0
  413. package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.js +183 -0
  414. package/lib/esm/curve/internalContexts/geometry2d/UnboundedEllipse2d.js.map +1 -0
  415. package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts +91 -0
  416. package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.d.ts.map +1 -0
  417. package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js +193 -0
  418. package/lib/esm/curve/internalContexts/geometry2d/UnboundedHyperbola2d.js.map +1 -0
  419. package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts +129 -0
  420. package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.d.ts.map +1 -0
  421. package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.js +204 -0
  422. package/lib/esm/curve/internalContexts/geometry2d/UnboundedLine2d.js.map +1 -0
  423. package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts +87 -0
  424. package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.d.ts.map +1 -0
  425. package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.js +189 -0
  426. package/lib/esm/curve/internalContexts/geometry2d/UnboundedParabola2d.js.map +1 -0
  427. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  428. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  429. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  430. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  431. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  432. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  433. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  434. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  435. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  436. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  437. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  438. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  439. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  440. package/lib/esm/geometry3d/Angle.js.map +1 -1
  441. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  442. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  443. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  444. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  445. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  446. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  447. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  448. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  449. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  450. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  451. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  452. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  453. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  454. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  455. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  456. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  457. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  458. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  459. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  460. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  461. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  462. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  463. package/lib/esm/geometry3d/Point2dVector2d.d.ts +7 -0
  464. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  465. package/lib/esm/geometry3d/Point2dVector2d.js +9 -0
  466. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  467. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  468. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  469. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  470. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  471. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  472. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  473. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  474. package/lib/esm/geometry3d/Range.js.map +1 -1
  475. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  476. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  477. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  478. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  479. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  480. package/lib/esm/geometry3d/Transform.js.map +1 -1
  481. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  482. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  483. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  484. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  485. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  486. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  487. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  488. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  489. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  490. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  491. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  492. package/lib/esm/numerics/Complex.js.map +1 -1
  493. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  494. package/lib/esm/numerics/Newton.js.map +1 -1
  495. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  496. package/lib/esm/numerics/PolarData.js.map +1 -1
  497. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  498. package/lib/esm/numerics/Polynomials.js +8 -6
  499. package/lib/esm/numerics/Polynomials.js.map +1 -1
  500. package/lib/esm/numerics/Quadrature.js.map +1 -1
  501. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  502. package/lib/esm/numerics/SmallSystem.js.map +1 -1
  503. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  504. package/lib/esm/numerics/UnionFind.js.map +1 -1
  505. package/lib/esm/numerics/UsageSums.js.map +1 -1
  506. package/lib/esm/polyface/AuxData.js.map +1 -1
  507. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  508. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  509. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  510. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  511. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  512. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  513. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  514. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  515. package/lib/esm/polyface/Polyface.js.map +1 -1
  516. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  517. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  518. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  519. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  520. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  521. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  522. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  523. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  524. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  525. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  526. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  527. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  528. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  529. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  530. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  531. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  532. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  533. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  534. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  535. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  536. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  537. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  538. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  539. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  540. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  541. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  542. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  543. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  544. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  545. package/lib/esm/solid/Box.js.map +1 -1
  546. package/lib/esm/solid/Cone.js.map +1 -1
  547. package/lib/esm/solid/LinearSweep.js.map +1 -1
  548. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  549. package/lib/esm/solid/RuledSweep.js.map +1 -1
  550. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  551. package/lib/esm/solid/Sphere.js.map +1 -1
  552. package/lib/esm/solid/SweepContour.js.map +1 -1
  553. package/lib/esm/solid/TorusPipe.js.map +1 -1
  554. package/lib/esm/topology/ChainMerge.js.map +1 -1
  555. package/lib/esm/topology/Graph.js.map +1 -1
  556. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  557. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  558. package/lib/esm/topology/HalfEdgeGraphSpineContext.d.ts.map +1 -1
  559. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +3 -1
  560. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  561. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  562. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  563. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  564. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  565. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  566. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  567. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  568. package/lib/esm/topology/MaskManager.js.map +1 -1
  569. package/lib/esm/topology/Merging.js.map +1 -1
  570. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  571. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  572. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  573. package/lib/esm/topology/Triangulation.js.map +1 -1
  574. package/lib/esm/topology/Voronoi.js.map +1 -1
  575. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  576. package/package.json +3 -3
@@ -0,0 +1,105 @@
1
+ /** @packageDocumentation
2
+ * @module CartesianGeometry
3
+ */
4
+ import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d";
5
+ import { XAndY } from "../../../geometry3d/XYZProps";
6
+ /**
7
+ * Abstract base class for curves with an implicit 2d function.
8
+ * * Curves in the class are required to have an implicit function f(x,y)=0.
9
+ * * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d.
10
+ * @internal
11
+ */
12
+ export declare abstract class ImplicitCurve2d {
13
+ /**
14
+ * Return the implicit function value at xy, i.e, f(x,y).
15
+ * @param xy point for evaluation.
16
+ */
17
+ abstract functionValue(xy: XAndY): number;
18
+ /**
19
+ * Return the implicit function gradient at xy.
20
+ * @param xy point for evaluation.
21
+ */
22
+ abstract gradient(xy: XAndY): Vector2d;
23
+ /** Map a gradient vector (du,dv) from its local frame to global. */
24
+ static gradientLocalToGlobal(du: number, dv: number, vectorU: Vector2d, vectorV: Vector2d): Vector2d;
25
+ /**
26
+ * Find all perpendiculars from space point to the curve.
27
+ * Pass each in turn to the handler.
28
+ * @param spacePoint the space point.
29
+ * @handler the handler to receive all the points on the curve and radians where perpendicular happens.
30
+ */
31
+ abstract emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any): any;
32
+ /**
33
+ * Call emitPerpendiculars. Return the closest of the perpendiculars.
34
+ * * Return undefined if no perpendiculars are received.
35
+ * @param spacePoint the space point.
36
+ */
37
+ closestPoint(spacePoint: Point2d): Point2d | undefined;
38
+ /** Return true if the item has degenerate defining data. */
39
+ abstract isDegenerate(): boolean;
40
+ /** Return a clone of the curve. */
41
+ abstract clone(): ImplicitCurve2d;
42
+ /**
43
+ * OPTIONAL method to return a Point2d at given radians value.
44
+ * * The default implementation returns undefined.
45
+ * * Concrete classes that can be expressed as a function of radians should implement this.
46
+ */
47
+ radiansToPoint2d(_radians: number): Point2d | undefined;
48
+ /**
49
+ * OPTIONAL method to return the tangent at given radians value.
50
+ * * The default implementation returns undefined.
51
+ * * Concrete classes that can be expressed as a function of radians should implement this.
52
+ */
53
+ radiansToTangentVector2d(_radians: number): Vector2d | undefined;
54
+ }
55
+ /**
56
+ * Carrier class containing:
57
+ * * a point
58
+ * * the curve to which the point is related.
59
+ * @internal
60
+ */
61
+ export declare class Point2dImplicitCurve2d {
62
+ point: Point2d;
63
+ curve: ImplicitCurve2d;
64
+ /**
65
+ * CAPTURE a point and curve.
66
+ * @param point point member
67
+ * @param curve curve member
68
+ */
69
+ constructor(point: Point2d, curve: ImplicitCurve2d);
70
+ }
71
+ /**
72
+ * Carrier class containing:
73
+ * * a curve which is a subclass of ImplicitCurve2d
74
+ * * an array of paired point and ImplicitCurve2d.
75
+ * @internal
76
+ */
77
+ export declare class ImplicitGeometryMarkup<GeometryType extends ImplicitCurve2d> {
78
+ curve: GeometryType;
79
+ data: Point2dImplicitCurve2d[];
80
+ /**
81
+ * Construct a new carrier. The data array is created empty.
82
+ * @param curve curve to CAPTURE
83
+ */
84
+ constructor(curve: GeometryType);
85
+ /**
86
+ * * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve.
87
+ * * For each such point, compute distance from bias point.
88
+ * * Choose the one whose distance is closest to biasDistance.
89
+ * * push the chosen point on the data array.
90
+ * @param spacePoint point to project to otherCurve
91
+ * @param otherCurve target curve for projection
92
+ * @param referencePoint reference point for point selection
93
+ * @param biasDistance preferred distance.
94
+ */
95
+ appendClosePoint(spacePoint: Point2d, otherCurve: ImplicitCurve2d, referencePoint: XAndY, biasDistance: number): boolean;
96
+ /**
97
+ * Find closest points of an array of curves.
98
+ * @param spacePoint point to project to otherCurve
99
+ * @param referencePoint reference point for point selection
100
+ * @param biasDistance preferred distance.
101
+ * @param otherCurves array of curves to check.
102
+ */
103
+ closePointsOfGeometry(spacePoint: Point2d, referencePoint: Point2d, biasRadius: number, otherCurves: ImplicitCurve2d[]): void;
104
+ }
105
+ //# sourceMappingURL=ImplicitCurve2d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImplicitCurve2d.d.ts","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,C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O,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,GAC5F,OAAO;IAoBV;;;;;;OAMG;IACI,qBAAqB,CAC1B,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAC/F,IAAI;CAIR"}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module CartesianGeometry
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ImplicitGeometryMarkup = exports.Point2dImplicitCurve2d = exports.ImplicitCurve2d = void 0;
11
+ const Point2dVector2d_1 = require("../../../geometry3d/Point2dVector2d");
12
+ const SmallSystem_1 = require("../../../numerics/SmallSystem");
13
+ /**
14
+ * Abstract base class for curves with an implicit 2d function.
15
+ * * Curves in the class are required to have an implicit function f(x,y)=0.
16
+ * * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d.
17
+ * @internal
18
+ */
19
+ class ImplicitCurve2d {
20
+ /** Map a gradient vector (du,dv) from its local frame to global. */
21
+ static gradientLocalToGlobal(du, dv, vectorU, vectorV) {
22
+ const result = Point2dVector2d_1.Vector2d.create();
23
+ // use INVERSE of TRANSPOSE of [UV] matrix to map gradient terms
24
+ if (SmallSystem_1.SmallSystem.linearSystem2d(vectorU.x, vectorU.y, vectorV.x, vectorV.y, du, dv, result))
25
+ return result;
26
+ return Point2dVector2d_1.Vector2d.create(0, 0);
27
+ }
28
+ /**
29
+ * Call emitPerpendiculars. Return the closest of the perpendiculars.
30
+ * * Return undefined if no perpendiculars are received.
31
+ * @param spacePoint the space point.
32
+ */
33
+ closestPoint(spacePoint) {
34
+ let minDistanceSquared = Number.MAX_SAFE_INTEGER;
35
+ let point;
36
+ // console.log ({space: spacePoint.toJSON()});
37
+ this.emitPerpendiculars(spacePoint, (curvePoint, _radians) => {
38
+ const distanceSquared = curvePoint.distanceSquared(spacePoint);
39
+ // console.log ({distanceSquared, xy: curvePoint.toJSON(), minD: minDistanceSquared});
40
+ if (distanceSquared < minDistanceSquared) {
41
+ point = curvePoint.clone();
42
+ minDistanceSquared = distanceSquared;
43
+ }
44
+ });
45
+ return point;
46
+ }
47
+ /**
48
+ * OPTIONAL method to return a Point2d at given radians value.
49
+ * * The default implementation returns undefined.
50
+ * * Concrete classes that can be expressed as a function of radians should implement this.
51
+ */
52
+ radiansToPoint2d(_radians) {
53
+ return undefined;
54
+ }
55
+ /**
56
+ * OPTIONAL method to return the tangent at given radians value.
57
+ * * The default implementation returns undefined.
58
+ * * Concrete classes that can be expressed as a function of radians should implement this.
59
+ */
60
+ radiansToTangentVector2d(_radians) {
61
+ return undefined;
62
+ }
63
+ }
64
+ exports.ImplicitCurve2d = ImplicitCurve2d;
65
+ /**
66
+ * Carrier class containing:
67
+ * * a point
68
+ * * the curve to which the point is related.
69
+ * @internal
70
+ */
71
+ class Point2dImplicitCurve2d {
72
+ point;
73
+ curve;
74
+ /**
75
+ * CAPTURE a point and curve.
76
+ * @param point point member
77
+ * @param curve curve member
78
+ */
79
+ constructor(point, curve) {
80
+ this.point = point;
81
+ this.curve = curve;
82
+ }
83
+ }
84
+ exports.Point2dImplicitCurve2d = Point2dImplicitCurve2d;
85
+ /**
86
+ * Carrier class containing:
87
+ * * a curve which is a subclass of ImplicitCurve2d
88
+ * * an array of paired point and ImplicitCurve2d.
89
+ * @internal
90
+ */
91
+ class ImplicitGeometryMarkup {
92
+ curve;
93
+ data;
94
+ /**
95
+ * Construct a new carrier. The data array is created empty.
96
+ * @param curve curve to CAPTURE
97
+ */
98
+ constructor(curve) {
99
+ this.curve = curve;
100
+ this.data = [];
101
+ }
102
+ /**
103
+ * * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve.
104
+ * * For each such point, compute distance from bias point.
105
+ * * Choose the one whose distance is closest to biasDistance.
106
+ * * push the chosen point on the data array.
107
+ * @param spacePoint point to project to otherCurve
108
+ * @param otherCurve target curve for projection
109
+ * @param referencePoint reference point for point selection
110
+ * @param biasDistance preferred distance.
111
+ */
112
+ appendClosePoint(spacePoint, otherCurve, referencePoint, biasDistance) {
113
+ let dMin;
114
+ let closestPoint;
115
+ otherCurve.emitPerpendiculars(spacePoint, (curvePoint, _radians) => {
116
+ const d = Math.abs(curvePoint.distance(referencePoint) - Math.abs(biasDistance));
117
+ if (dMin === undefined || d < dMin) {
118
+ dMin = d;
119
+ closestPoint = curvePoint.clone();
120
+ }
121
+ });
122
+ if (closestPoint !== undefined) {
123
+ this.data.push(new Point2dImplicitCurve2d(closestPoint, otherCurve));
124
+ return true;
125
+ }
126
+ return false;
127
+ }
128
+ /**
129
+ * Find closest points of an array of curves.
130
+ * @param spacePoint point to project to otherCurve
131
+ * @param referencePoint reference point for point selection
132
+ * @param biasDistance preferred distance.
133
+ * @param otherCurves array of curves to check.
134
+ */
135
+ closePointsOfGeometry(spacePoint, referencePoint, biasRadius, otherCurves) {
136
+ for (const c of otherCurves)
137
+ this.appendClosePoint(spacePoint, c, referencePoint, biasRadius);
138
+ }
139
+ }
140
+ exports.ImplicitGeometryMarkup = ImplicitGeometryMarkup;
141
+ //# sourceMappingURL=ImplicitCurve2d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImplicitCurve2d.js","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yEAAwE;AAExE,+DAA4D;AAE5D;;;;;GAKG;AACH,MAAsB,eAAe;IAWnC,oEAAoE;IAC7D,MAAM,CAAC,qBAAqB,CAAC,EAAU,EAAE,EAAU,EAAE,OAAiB,EAAE,OAAiB;QAC9F,MAAM,MAA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YC;AACD;;;;;GAKG;AACH,MAAa,sBAAsB;IAC1B,KAAK,CAAe;IACpB,IAAI,CAA2B;IACtC;;;OAGG;IACH,YAAmB,KAAmB;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,CAAC;IACD;;;;;;;;;OASG;IACI,gBAAgB,CACrB,UAAmB,EAAE,UAA2B,EAAE,cAAqB,EAAE,YAAoB;QAE7F,IAAI,IAAwB,CAAC;QAE7B,IAAI,YAAY,CAAC;QACjB,UAAU,CAAC,kBAAkB,CAC3B,UAAU,EACV,CAAC,UAAmB,EAAE,QAA4B,EAAE,EAAE;YACpD,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;YACjF,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;gBACnC,IAAI,GAAG,CAAC,CAAC;gBACT,YAAY,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;YACpC,CAAC;QACH,CAAC,CACF,CAAC;QACF,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;YACrE,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD;;;;;;OAMG;IACI,qBAAqB,CAC1B,UAAmB,EAAE,cAAuB,EAAE,UAAkB,EAAE,WAA8B;QAEhG,KAAK,MAAM,CAAC,IAAI,WAAW;YACzB,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IACrE,CAAC;CACF;AAxDD,wDAwDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { Point2d, Vector2d } from \"../../../geometry3d/Point2dVector2d\";\nimport { XAndY } from \"../../../geometry3d/XYZProps\";\nimport { SmallSystem } from \"../../../numerics/SmallSystem\";\n\n/**\n * Abstract base class for curves with an implicit 2d function.\n * * Curves in the class are required to have an implicit function f(x,y)=0.\n * * They MAY (but are not required to) implement a parametric evaluator radiansToPoint2d.\n * @internal\n */\nexport abstract class ImplicitCurve2d {\n /**\n * Return the implicit function value at xy, i.e, f(x,y).\n * @param xy point for evaluation.\n */\n public abstract functionValue(xy: XAndY): number;\n /**\n * Return the implicit function gradient at xy.\n * @param xy point for evaluation.\n */\n public abstract gradient(xy: XAndY): Vector2d;\n /** Map a gradient vector (du,dv) from its local frame to global. */\n public static gradientLocalToGlobal(du: number, dv: number, vectorU: Vector2d, vectorV: Vector2d): Vector2d {\n const result = Vector2d.create();\n // use INVERSE of TRANSPOSE of [UV] matrix to map gradient terms\n if (SmallSystem.linearSystem2d(vectorU.x, vectorU.y, vectorV.x, vectorV.y, du, dv, result))\n return result;\n return Vector2d.create(0, 0);\n }\n /**\n * Find all perpendiculars from space point to the curve.\n * Pass each in turn to the handler.\n * @param spacePoint the space point.\n * @handler the handler to receive all the points on the curve and radians where perpendicular happens.\n */\n public abstract emitPerpendiculars(\n spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any,\n ): any;\n /**\n * Call emitPerpendiculars. Return the closest of the perpendiculars.\n * * Return undefined if no perpendiculars are received.\n * @param spacePoint the space point.\n */\n public closestPoint(spacePoint: Point2d): Point2d | undefined {\n let minDistanceSquared: number = Number.MAX_SAFE_INTEGER;\n let point: Point2d | undefined;\n // console.log ({space: spacePoint.toJSON()});\n this.emitPerpendiculars(\n spacePoint,\n (curvePoint: Point2d, _radians: number | undefined) => {\n const distanceSquared = curvePoint.distanceSquared(spacePoint);\n // console.log ({distanceSquared, xy: curvePoint.toJSON(), minD: minDistanceSquared});\n if (distanceSquared < minDistanceSquared) {\n point = curvePoint.clone();\n minDistanceSquared = distanceSquared;\n }\n }\n );\n return point;\n }\n /** Return true if the item has degenerate defining data. */\n public abstract isDegenerate(): boolean;\n /** Return a clone of the curve. */\n public abstract clone(): ImplicitCurve2d;\n /**\n * OPTIONAL method to return a Point2d at given radians value.\n * * The default implementation returns undefined.\n * * Concrete classes that can be expressed as a function of radians should implement this.\n */\n public radiansToPoint2d(_radians: number): Point2d | undefined {\n return undefined;\n }\n /**\n * OPTIONAL method to return the tangent at given radians value.\n * * The default implementation returns undefined.\n * * Concrete classes that can be expressed as a function of radians should implement this.\n */\n public radiansToTangentVector2d(_radians: number): Vector2d | undefined {\n return undefined;\n }\n}\n\n/**\n * Carrier class containing:\n * * a point\n * * the curve to which the point is related.\n * @internal\n */\nexport class Point2dImplicitCurve2d {\n public point: Point2d;\n public curve: ImplicitCurve2d;\n /**\n * CAPTURE a point and curve.\n * @param point point member\n * @param curve curve member\n */\n public constructor(point: Point2d, curve: ImplicitCurve2d) {\n this.point = point;\n this.curve = curve;\n }\n}\n/**\n * Carrier class containing:\n * * a curve which is a subclass of ImplicitCurve2d\n * * an array of paired point and ImplicitCurve2d.\n * @internal\n */\nexport class ImplicitGeometryMarkup<GeometryType extends ImplicitCurve2d> {\n public curve: GeometryType;\n public data: Point2dImplicitCurve2d[];\n /**\n * Construct a new carrier. The data array is created empty.\n * @param curve curve to CAPTURE\n */\n public constructor(curve: GeometryType) {\n this.curve = curve;\n this.data = [];\n }\n /**\n * * Use the otherCurve's emitPerpendiculars method to examine all perpendiculars from spacePoint to the curve.\n * * For each such point, compute distance from bias point.\n * * Choose the one whose distance is closest to biasDistance.\n * * push the chosen point on the data array.\n * @param spacePoint point to project to otherCurve\n * @param otherCurve target curve for projection\n * @param referencePoint reference point for point selection\n * @param biasDistance preferred distance.\n */\n public appendClosePoint(\n spacePoint: Point2d, otherCurve: ImplicitCurve2d, referencePoint: XAndY, biasDistance: number,\n ): boolean {\n let dMin: undefined | number;\n \n let closestPoint;\n otherCurve.emitPerpendiculars(\n spacePoint,\n (curvePoint: Point2d, _radians: number | undefined) => {\n const d = Math.abs(curvePoint.distance(referencePoint) - Math.abs(biasDistance));\n if (dMin === undefined || d < dMin) {\n dMin = d;\n closestPoint = curvePoint.clone();\n }\n }\n );\n if (closestPoint !== undefined) {\n this.data.push(new Point2dImplicitCurve2d(closestPoint, otherCurve));\n return true;\n }\n return false;\n }\n /**\n * Find closest points of an array of curves.\n * @param spacePoint point to project to otherCurve\n * @param referencePoint reference point for point selection\n * @param biasDistance preferred distance.\n * @param otherCurves array of curves to check.\n */\n public closePointsOfGeometry(\n spacePoint: Point2d, referencePoint: Point2d, biasRadius: number, otherCurves: ImplicitCurve2d[],\n ): void {\n for (const c of otherCurves)\n this.appendClosePoint(spacePoint, c, referencePoint, biasRadius);\n }\n}\n"]}
@@ -0,0 +1,27 @@
1
+ /** @packageDocumentation
2
+ * @module CartesianGeometry
3
+ */
4
+ import { CurvePrimitive } from "../../CurvePrimitive";
5
+ import { ImplicitCurve2d } from "./ImplicitCurve2d";
6
+ /**
7
+ * Class to convert between `CurvePrimitive` and `ImplicitCurve2d`.
8
+ * @internal
9
+ */
10
+ export declare class ImplicitCurve2dConverter {
11
+ /**
12
+ * Return an implicit curve for the XY parts of the given curve3d.
13
+ * * z components of the input curve are completely ignored
14
+ * * input Arc3d can convert to UnboundedEllipse2d or circle
15
+ * * Returned curves are untrimmed, i.e. lines do not record endpoints and arcs have no angle range.
16
+ * @param curve3d curve to convert. Must be a LineSegment3d or Arc3d. Other curve types return `undefined`.
17
+ */
18
+ static createImplicitCurve2dFromCurvePrimitiveXY(curve3d: CurvePrimitive): ImplicitCurve2d | ImplicitCurve2d[] | undefined;
19
+ /**
20
+ * Create a curve primitive from an implicit curve.
21
+ * @param source the implicit curve(s) to convert.
22
+ * @param sizeHint for unbounded curves, the size hint is used when creating a curve primitive. Larger values create a
23
+ * longer curve primitive. Ignored for bounded curves. Default is 10.
24
+ */
25
+ static createCurvePrimitiveFromImplicitCurve(source: ImplicitCurve2d | ImplicitCurve2d[], sizeHint?: number): CurvePrimitive | CurvePrimitive[] | undefined;
26
+ }
27
+ //# sourceMappingURL=ImplicitCurve2dConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImplicitCurve2dConverter.d.ts","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAOH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD;;;GAGG;AACH,qBAAa,wBAAwB;IACnC;;;;;;OAMG;WACW,yCAAyC,CAAC,OAAO,EAAE,cAAc,GAC7E,eAAe,GAAG,eAAe,EAAE,GAAG,SAAS;IAqBjD;;;;;OAKG;WACW,qCAAqC,CACjD,MAAM,EAAE,eAAe,GAAG,eAAe,EAAE,EAAE,QAAQ,GAAE,MAAW,GACjE,cAAc,GAAG,cAAc,EAAE,GAAG,SAAS;CA4FjD"}
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module CartesianGeometry
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ImplicitCurve2dConverter = void 0;
11
+ const BezierCurve3dH_1 = require("../../../bspline/BezierCurve3dH");
12
+ const Point2dVector2d_1 = require("../../../geometry3d/Point2dVector2d");
13
+ const Point3dVector3d_1 = require("../../../geometry3d/Point3dVector3d");
14
+ const Point4d_1 = require("../../../geometry4d/Point4d");
15
+ const Arc3d_1 = require("../../Arc3d");
16
+ const CurvePrimitive_1 = require("../../CurvePrimitive");
17
+ const LineSegment3d_1 = require("../../LineSegment3d");
18
+ const UnboundedCircle2d_1 = require("./UnboundedCircle2d");
19
+ const UnboundedEllipse2d_1 = require("./UnboundedEllipse2d");
20
+ const UnboundedHyperbola2d_1 = require("./UnboundedHyperbola2d");
21
+ const UnboundedLine2d_1 = require("./UnboundedLine2d");
22
+ const UnboundedParabola2d_1 = require("./UnboundedParabola2d");
23
+ /**
24
+ * Class to convert between `CurvePrimitive` and `ImplicitCurve2d`.
25
+ * @internal
26
+ */
27
+ class ImplicitCurve2dConverter {
28
+ /**
29
+ * Return an implicit curve for the XY parts of the given curve3d.
30
+ * * z components of the input curve are completely ignored
31
+ * * input Arc3d can convert to UnboundedEllipse2d or circle
32
+ * * Returned curves are untrimmed, i.e. lines do not record endpoints and arcs have no angle range.
33
+ * @param curve3d curve to convert. Must be a LineSegment3d or Arc3d. Other curve types return `undefined`.
34
+ */
35
+ static createImplicitCurve2dFromCurvePrimitiveXY(curve3d) {
36
+ if (curve3d instanceof LineSegment3d_1.LineSegment3d) {
37
+ const pointA = curve3d.startPoint();
38
+ const pointB = curve3d.endPoint();
39
+ return UnboundedLine2d_1.UnboundedLine2dByPointAndNormal.createPointXYPointXY(pointA.x, pointA.y, pointB.x, pointB.y);
40
+ }
41
+ else if (curve3d instanceof Arc3d_1.Arc3d) {
42
+ const center = curve3d.center;
43
+ const columnX = curve3d.matrixRef.columnX();
44
+ const columnY = curve3d.matrixRef.columnY();
45
+ if (curve3d.isCircularXY || curve3d.isDegenerateCircle) {
46
+ return UnboundedCircle2d_1.UnboundedCircle2dByCenterAndRadius.createXYRadius(center.x, center.y, columnX.magnitudeXY());
47
+ }
48
+ else {
49
+ return UnboundedEllipse2d_1.UnboundedEllipse2d.createCenterAndAxisVectors(center, Point2dVector2d_1.Vector2d.createFrom(columnX), Point2dVector2d_1.Vector2d.createFrom(columnY));
50
+ }
51
+ }
52
+ return undefined;
53
+ }
54
+ /**
55
+ * Create a curve primitive from an implicit curve.
56
+ * @param source the implicit curve(s) to convert.
57
+ * @param sizeHint for unbounded curves, the size hint is used when creating a curve primitive. Larger values create a
58
+ * longer curve primitive. Ignored for bounded curves. Default is 10.
59
+ */
60
+ static createCurvePrimitiveFromImplicitCurve(source, sizeHint = 10) {
61
+ if (Array.isArray(source)) {
62
+ const result = [];
63
+ for (const s of source) {
64
+ const c = this.createCurvePrimitiveFromImplicitCurve(s);
65
+ if (c === undefined) {
66
+ // ignore it
67
+ }
68
+ else if (c instanceof CurvePrimitive_1.CurvePrimitive) {
69
+ result.push(c);
70
+ }
71
+ else if (Array.isArray(c)) {
72
+ for (const c1 of c)
73
+ result.push(c1);
74
+ }
75
+ }
76
+ return result;
77
+ }
78
+ // source is a single curve
79
+ if (source instanceof UnboundedCircle2d_1.UnboundedCircle2dByCenterAndRadius) {
80
+ return Arc3d_1.Arc3d.createXY(Point3dVector3d_1.Point3d.createFrom(source.center), source.radius);
81
+ }
82
+ else if (source instanceof UnboundedLine2d_1.UnboundedLine2dByPointAndNormal) {
83
+ const vectorAlong = source.vectorAlongLine();
84
+ return LineSegment3d_1.LineSegment3d.createXYXY(source.point.x - sizeHint * vectorAlong.x, source.point.y - sizeHint * vectorAlong.y, source.point.x + sizeHint * vectorAlong.x, source.point.y + sizeHint * vectorAlong.y);
85
+ }
86
+ else if (source instanceof UnboundedHyperbola2d_1.UnboundedHyperbola2d) {
87
+ const result = [];
88
+ /* COMMENTED CODE FOR LINESTRING APPROXIMATION
89
+ const degreeStep = 10.0;
90
+ const degreeLimit = 80.0;
91
+ for (const signX of [1, -1]) {
92
+ const strokes = [];
93
+ for (const theta = Angle.createDegrees(-degreeLimit);
94
+ theta.degrees < degreeLimit + 1;
95
+ theta.setDegrees(theta.degrees + degreeStep)) {
96
+ const c = signX * theta.cos();
97
+ const s = theta.sin();
98
+ const xy = Point3d.createFrom(source.pointA.plus2Scaled(source.vectorU, 1.0 / c, source.vectorV, s / c));
99
+ strokes.push(Point3d.createFrom(xy));
100
+ }
101
+ result.push(LineString3d.create(strokes));
102
+ }
103
+ */
104
+ // The bezier branches open on plus and minus u axes, with asymptotes at 45 degree angles in local space
105
+ // Construct a bezier for 180 degrees of unit circle from negative y to plus 1 with (c,s,w)
106
+ // Reverse c and w so its normalized form is (sec, tan, 1)
107
+ // Map those so bezier 0 maps to U-V asymptote, bezier 1 maps to U+v, and bezier 0.5 maps to A
108
+ // but the secants have 0 weight and evaluate at infinity
109
+ // so subdivide to safely within 0..1
110
+ // Repeat with negated sign for U to get the other branch.
111
+ for (const signU of [1, -1]) {
112
+ const poles = [
113
+ Point4d_1.Point4d.create(signU * source.vectorU.x + source.vectorV.x, signU * source.vectorU.y + source.vectorV.y, 0, 0),
114
+ Point4d_1.Point4d.create(source.center.x, source.center.y, 0, 1),
115
+ Point4d_1.Point4d.create(signU * source.vectorU.x - source.vectorV.x, signU * source.vectorU.y - source.vectorV.y, 0, 0),
116
+ ];
117
+ const fullBezier = BezierCurve3dH_1.BezierCurve3dH.create(poles);
118
+ if (fullBezier) {
119
+ const branch = fullBezier?.clonePartialCurve(0.05, 0.95);
120
+ result.push(branch);
121
+ }
122
+ }
123
+ return result;
124
+ }
125
+ else if (source instanceof UnboundedEllipse2d_1.UnboundedEllipse2d) {
126
+ return Arc3d_1.Arc3d.create(Point3dVector3d_1.Point3d.createFrom(source.center), Point3dVector3d_1.Vector3d.createFrom(source.vectorU), Point3dVector3d_1.Vector3d.createFrom(source.vectorV));
127
+ }
128
+ else if (source instanceof UnboundedParabola2d_1.UnboundedParabola2d) {
129
+ /*
130
+ const halfParabolaPoles = [
131
+ Point4d.create (2 * source.pointA.x, 2 *source.pointA.y, 0, 2),
132
+ Point4d.create (source.vectorU.x, source.vectorU.y, 0, 0),
133
+ Point4d.create (2 * source.vectorV.x, 2 * source.vectorV.y, 0, 0),
134
+ ];
135
+ */
136
+ const point0 = source.center.plus2Scaled(source.vectorU, 1, source.vectorV, 1);
137
+ const point1 = source.center.minus(source.vectorV);
138
+ const point2 = source.center.plus2Scaled(source.vectorU, -1, source.vectorV, 1);
139
+ const poles = [
140
+ Point4d_1.Point4d.create(point0.x, point0.y, 0, 1),
141
+ Point4d_1.Point4d.create(point1.x, point1.y, 0, 1),
142
+ Point4d_1.Point4d.create(point2.x, point2.y, 0, 1),
143
+ ];
144
+ const centerBezier = BezierCurve3dH_1.BezierCurve3dH.create(poles);
145
+ if (centerBezier !== undefined)
146
+ return centerBezier.clonePartialCurve(-2, 3);
147
+ }
148
+ return undefined;
149
+ }
150
+ }
151
+ exports.ImplicitCurve2dConverter = ImplicitCurve2dConverter;
152
+ //# sourceMappingURL=ImplicitCurve2dConverter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImplicitCurve2dConverter.js","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/ImplicitCurve2dConverter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oEAAiE;AACjE,yEAA+D;AAC/D,yEAAwE;AACxE,yDAAsD;AACtD,uCAAoC;AACpC,yDAAsD;AACtD,uDAAoD;AAEpD,2DAAyE;AACzE,6DAA0D;AAC1D,iEAA8D;AAC9D,uDAAoE;AACpE,+DAA4D;AAE5D;;;GAGG;AACH,MAAa,wBAAwB;IACnC;;;;;;OAMG;IACI,MAAM,CAAC,yCAAyC,CAAC,OAAuB;QAE7E,IAAI,OAAO,YAAY,6BAAa,EAAE,CAAC;YACrC,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;YACpC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;YAClC,OAAO,iDAA+B,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QACtG,CAAC;aAAM,IAAI,OAAO,YAAY,aAAK,EAAE,CAAC;YACpC,M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M,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAChF,MAAM,KAAK,GAAG;gBACZ,iBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACxC,iBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACxC,iBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACzC,CAAC;YAEF,MAAM,YAAY,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAClD,IAAI,YAAY,KAAK,SAAS;gBAC5B,OAAO,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAlID,4DAkIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { BezierCurve3dH } from \"../../../bspline/BezierCurve3dH\";\nimport { Vector2d } from \"../../../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../../../geometry3d/Point3dVector3d\";\nimport { Point4d } from \"../../../geometry4d/Point4d\";\nimport { Arc3d } from \"../../Arc3d\";\nimport { CurvePrimitive } from \"../../CurvePrimitive\";\nimport { LineSegment3d } from \"../../LineSegment3d\";\nimport { ImplicitCurve2d } from \"./ImplicitCurve2d\";\nimport { UnboundedCircle2dByCenterAndRadius } from \"./UnboundedCircle2d\";\nimport { UnboundedEllipse2d } from \"./UnboundedEllipse2d\";\nimport { UnboundedHyperbola2d } from \"./UnboundedHyperbola2d\";\nimport { UnboundedLine2dByPointAndNormal } from \"./UnboundedLine2d\";\nimport { UnboundedParabola2d } from \"./UnboundedParabola2d\";\n\n/**\n * Class to convert between `CurvePrimitive` and `ImplicitCurve2d`.\n * @internal\n */\nexport class ImplicitCurve2dConverter {\n /**\n * Return an implicit curve for the XY parts of the given curve3d.\n * * z components of the input curve are completely ignored\n * * input Arc3d can convert to UnboundedEllipse2d or circle\n * * Returned curves are untrimmed, i.e. lines do not record endpoints and arcs have no angle range.\n * @param curve3d curve to convert. Must be a LineSegment3d or Arc3d. Other curve types return `undefined`.\n */\n public static createImplicitCurve2dFromCurvePrimitiveXY(curve3d: CurvePrimitive):\n ImplicitCurve2d | ImplicitCurve2d[] | undefined {\n if (curve3d instanceof LineSegment3d) {\n const pointA = curve3d.startPoint();\n const pointB = curve3d.endPoint();\n return UnboundedLine2dByPointAndNormal.createPointXYPointXY(pointA.x, pointA.y, pointB.x, pointB.y);\n } else if (curve3d instanceof Arc3d) {\n const center = curve3d.center;\n const columnX = curve3d.matrixRef.columnX()\n const columnY = curve3d.matrixRef.columnY()\n if (curve3d.isCircularXY || curve3d.isDegenerateCircle) {\n return UnboundedCircle2dByCenterAndRadius.createXYRadius(\n center.x, center.y, columnX.magnitudeXY(),\n );\n } else {\n return UnboundedEllipse2d.createCenterAndAxisVectors(\n center, Vector2d.createFrom(columnX), Vector2d.createFrom(columnY),\n );\n }\n }\n return undefined;\n }\n /**\n * Create a curve primitive from an implicit curve.\n * @param source the implicit curve(s) to convert.\n * @param sizeHint for unbounded curves, the size hint is used when creating a curve primitive. Larger values create a\n * longer curve primitive. Ignored for bounded curves. Default is 10.\n */\n public static createCurvePrimitiveFromImplicitCurve(\n source: ImplicitCurve2d | ImplicitCurve2d[], sizeHint: number = 10,\n ): CurvePrimitive | CurvePrimitive[] | undefined {\n if (Array.isArray(source)) {\n const result: CurvePrimitive[] = [];\n for (const s of source) {\n const c = this.createCurvePrimitiveFromImplicitCurve(s);\n if (c === undefined) {\n // ignore it\n } else if (c instanceof CurvePrimitive) {\n result.push(c);\n } else if (Array.isArray(c)) {\n for (const c1 of c)\n result.push(c1);\n }\n }\n return result;\n }\n // source is a single curve\n if (source instanceof UnboundedCircle2dByCenterAndRadius) {\n return Arc3d.createXY(Point3d.createFrom(source.center), source.radius);\n } else if (source instanceof UnboundedLine2dByPointAndNormal) {\n const vectorAlong = source.vectorAlongLine();\n return LineSegment3d.createXYXY(\n source.point.x - sizeHint * vectorAlong.x, source.point.y - sizeHint * vectorAlong.y,\n source.point.x + sizeHint * vectorAlong.x, source.point.y + sizeHint * vectorAlong.y,\n );\n } else if (source instanceof UnboundedHyperbola2d) {\n const result: CurvePrimitive[] = [];\n /* COMMENTED CODE FOR LINESTRING APPROXIMATION\n const degreeStep = 10.0;\n const degreeLimit = 80.0;\n for (const signX of [1, -1]) {\n const strokes = [];\n for (const theta = Angle.createDegrees(-degreeLimit);\n theta.degrees < degreeLimit + 1;\n theta.setDegrees(theta.degrees + degreeStep)) {\n const c = signX * theta.cos();\n const s = theta.sin();\n const xy = Point3d.createFrom(source.pointA.plus2Scaled(source.vectorU, 1.0 / c, source.vectorV, s / c));\n strokes.push(Point3d.createFrom(xy));\n }\n result.push(LineString3d.create(strokes));\n }\n */\n // The bezier branches open on plus and minus u axes, with asymptotes at 45 degree angles in local space\n // Construct a bezier for 180 degrees of unit circle from negative y to plus 1 with (c,s,w)\n // Reverse c and w so its normalized form is (sec, tan, 1)\n // Map those so bezier 0 maps to U-V asymptote, bezier 1 maps to U+v, and bezier 0.5 maps to A\n // but the secants have 0 weight and evaluate at infinity\n // so subdivide to safely within 0..1\n // Repeat with negated sign for U to get the other branch.\n for (const signU of [1, -1]) {\n const poles = [\n Point4d.create(signU * source.vectorU.x + source.vectorV.x, signU * source.vectorU.y + source.vectorV.y, 0, 0),\n Point4d.create(source.center.x, source.center.y, 0, 1),\n Point4d.create(signU * source.vectorU.x - source.vectorV.x, signU * source.vectorU.y - source.vectorV.y, 0, 0),\n ];\n const fullBezier = BezierCurve3dH.create(poles);\n if (fullBezier) {\n const branch = fullBezier?.clonePartialCurve(0.05, 0.95);\n result.push(branch);\n }\n }\n return result;\n } else if (source instanceof UnboundedEllipse2d) {\n return Arc3d.create(\n Point3d.createFrom(source.center),\n Vector3d.createFrom(source.vectorU),\n Vector3d.createFrom(source.vectorV),\n );\n } else if (source instanceof UnboundedParabola2d) {\n /*\n const halfParabolaPoles = [\n Point4d.create (2 * source.pointA.x, 2 *source.pointA.y, 0, 2),\n Point4d.create (source.vectorU.x, source.vectorU.y, 0, 0),\n Point4d.create (2 * source.vectorV.x, 2 * source.vectorV.y, 0, 0),\n ];\n */\n const point0 = source.center.plus2Scaled(source.vectorU, 1, source.vectorV, 1);\n const point1 = source.center.minus(source.vectorV);\n const point2 = source.center.plus2Scaled(source.vectorU, -1, source.vectorV, 1);\n const poles = [\n Point4d.create(point0.x, point0.y, 0, 1),\n Point4d.create(point1.x, point1.y, 0, 1),\n Point4d.create(point2.x, point2.y, 0, 1),\n ];\n\n const centerBezier = BezierCurve3dH.create(poles);\n if (centerBezier !== undefined)\n return centerBezier.clonePartialCurve(-2, 3);\n }\n return undefined;\n }\n}\n"]}
@@ -0,0 +1,81 @@
1
+ /** @packageDocumentation
2
+ * @module CartesianGeometry
3
+ */
4
+ import { Point2d, Vector2d } from "../../../geometry3d/Point2dVector2d";
5
+ import { XAndY } from "../../../geometry3d/XYZProps";
6
+ import { ImplicitCurve2d } from "./ImplicitCurve2d";
7
+ import { UnboundedLine2dByPointAndNormal } from "./UnboundedLine2d";
8
+ /**
9
+ * Internal class for a complete circle in the xy plane, with center and radius stored.
10
+ * @internal
11
+ */
12
+ export declare class UnboundedCircle2dByCenterAndRadius extends ImplicitCurve2d {
13
+ /** The circle's center. */
14
+ center: Point2d;
15
+ /** The circle radius. */
16
+ radius: number;
17
+ private constructor();
18
+ /** Return a clone of this circle. */
19
+ clone(): UnboundedCircle2dByCenterAndRadius;
20
+ /** Return a clone of this circle, with radius negated. */
21
+ cloneNegateRadius(): UnboundedCircle2dByCenterAndRadius;
22
+ /**
23
+ * Create an ImplicitCircle2d from XY parts of its center and its radius.
24
+ * @param centerX x coordinate of center
25
+ * @param centerY y coordinate of center
26
+ * @param radius circle radius
27
+ * @returns newly created circle object
28
+ */
29
+ static createXYRadius(centerX: number, centerY: number, radius: number): UnboundedCircle2dByCenterAndRadius;
30
+ /**
31
+ * Create an ImplicitCircle2d from an xy object and a radius.
32
+ * * Zero radius is valid.
33
+ * * The input coordinates are copied -- the center is NOT captured.
34
+ * @param center xy coordinates of center
35
+ * @param radius circle radius
36
+ * @returns newly created circle object
37
+ */
38
+ static createPointRadius(center: XAndY, radius: number): UnboundedCircle2dByCenterAndRadius;
39
+ /**
40
+ * Returns gradient of the implicit function.
41
+ * @param xy space point
42
+ * @returns squared distance to center minus squared radius.
43
+ */
44
+ functionValue(xy: XAndY): number;
45
+ /**
46
+ * Returns gradient of the implicit function.
47
+ * @param xy space point
48
+ */
49
+ gradient(xy: XAndY): Vector2d;
50
+ /**
51
+ * Emit circle points for which a vector to the space point is perpendicular to the circle.
52
+ * * For a non-zero radius circle, there are two perpendiculars. The one on the side of the space point is emitted first.
53
+ * * For a zero radius circle, the vector from center to the space point is the only perpendicular.
54
+ * @param spacePoint the space point.
55
+ * @handler the handler to receive all the points on the curve and radians where perpendicular happens.
56
+ */
57
+ emitPerpendiculars(spacePoint: Point2d, handler: (curvePoint: Point2d, radians: number | undefined) => any): void;
58
+ /**
59
+ * Returns true if the circle radius is near zero.
60
+ */
61
+ isDegenerate(): boolean;
62
+ /**
63
+ * Test if the centers and radii of two circles are close.
64
+ * @param other second circle
65
+ * @returns true if identical to tolerance.
66
+ */
67
+ isSameCircle(other: UnboundedCircle2dByCenterAndRadius, negatedRadiiAreEqual: boolean): boolean;
68
+ /**
69
+ * Compute intersections with another circle.
70
+ * @param other second circle
71
+ * @return array of 0, 1, or 2 points of intersection
72
+ */
73
+ intersectCircle(other: UnboundedCircle2dByCenterAndRadius): Point2d[];
74
+ /**
75
+ * Compute intersections with a line
76
+ * @param line the line.
77
+ * @return array of 0, 1, or 2 points of intersection
78
+ */
79
+ intersectLine(line: UnboundedLine2dByPointAndNormal): Point2d[];
80
+ }
81
+ //# sourceMappingURL=UnboundedCircle2d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnboundedCircle2d.d.ts","sourceRoot":"","sources":["../../../../../src/curve/internalContexts/geometry2d/UnboundedCircle2d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAEpE;;;GAGG;AACH,qBAAa,kCAAmC,SAAQ,eAAe;IACrE,2BAA2B;IACpB,MAAM,EAAE,OAAO,CAAC;IACvB,yBAAyB;IAClB,MAAM,EAAE,MAAM,CAAC;IAEtB,OAAO;IAKP,qCAAqC;IAC9B,KAAK,IAAI,kCAAkC;IAIlD,0DAA0D;IACnD,iBAAiB,IAAI,kCAAkC;IAI9D;;;;;;OAMG;WACW,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,kCAAkC;IAGlH;;;;;;;OAOG;WACW,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,kCAAkC;IAGlG;;;;OAIG;IACa,aAAa,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM;IAGhD;;;OAGG;IACa,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,QAAQ;IAG7C;;;;;;OAMG;IACa,kBAAkB,CAChC,UA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