@itwin/core-geometry 4.1.0-dev.4 → 4.1.0-dev.40

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 (570) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/lib/cjs/Constant.js.map +1 -1
  3. package/lib/cjs/Geometry.js.map +1 -1
  4. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  5. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  6. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  7. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  8. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  10. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  11. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  12. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  13. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  14. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  15. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  16. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  17. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  18. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  19. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  20. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  21. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  22. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  23. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  24. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  25. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  26. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  27. package/lib/cjs/core-geometry.d.ts +1 -0
  28. package/lib/cjs/core-geometry.d.ts.map +1 -1
  29. package/lib/cjs/core-geometry.js +4 -1
  30. package/lib/cjs/core-geometry.js.map +1 -1
  31. package/lib/cjs/curve/Arc3d.d.ts +71 -86
  32. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  33. package/lib/cjs/curve/Arc3d.js +110 -96
  34. package/lib/cjs/curve/Arc3d.js.map +1 -1
  35. package/lib/cjs/curve/ChainCollectorContext.js.map +1 -1
  36. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  37. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  38. package/lib/cjs/curve/CurveChain.js.map +1 -1
  39. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +61 -41
  40. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  41. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +69 -46
  42. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  43. package/lib/cjs/curve/CurveCollection.d.ts +73 -46
  44. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  45. package/lib/cjs/curve/CurveCollection.js +100 -64
  46. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  47. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  48. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  49. package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
  50. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  51. package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
  52. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  53. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  54. package/lib/cjs/curve/CurveLocationDetail.d.ts +45 -46
  55. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  56. package/lib/cjs/curve/CurveLocationDetail.js +39 -41
  57. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  58. package/lib/cjs/curve/CurvePrimitive.d.ts +138 -92
  59. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  60. package/lib/cjs/curve/CurvePrimitive.js +115 -75
  61. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  62. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  63. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  64. package/lib/cjs/curve/GeometryQuery.d.ts +26 -20
  65. package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
  66. package/lib/cjs/curve/GeometryQuery.js +11 -9
  67. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  68. package/lib/cjs/curve/LineSegment3d.d.ts +38 -27
  69. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  70. package/lib/cjs/curve/LineSegment3d.js +77 -39
  71. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  72. package/lib/cjs/curve/LineString3d.d.ts +70 -51
  73. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  74. package/lib/cjs/curve/LineString3d.js +120 -71
  75. package/lib/cjs/curve/LineString3d.js.map +1 -1
  76. package/lib/cjs/curve/Loop.d.ts +7 -5
  77. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  78. package/lib/cjs/curve/Loop.js +18 -6
  79. package/lib/cjs/curve/Loop.js.map +1 -1
  80. package/lib/cjs/curve/ParityRegion.d.ts +7 -7
  81. package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
  82. package/lib/cjs/curve/ParityRegion.js +19 -11
  83. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  84. package/lib/cjs/curve/Path.d.ts +6 -6
  85. package/lib/cjs/curve/Path.d.ts.map +1 -1
  86. package/lib/cjs/curve/Path.js +15 -9
  87. package/lib/cjs/curve/Path.js.map +1 -1
  88. package/lib/cjs/curve/PointString3d.js.map +1 -1
  89. package/lib/cjs/curve/ProxyCurve.d.ts +4 -6
  90. package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
  91. package/lib/cjs/curve/ProxyCurve.js +7 -7
  92. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  93. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  94. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  95. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  96. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  97. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  98. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  99. package/lib/cjs/curve/Query/StrokeCountMap.d.ts +14 -13
  100. package/lib/cjs/curve/Query/StrokeCountMap.d.ts.map +1 -1
  101. package/lib/cjs/curve/Query/StrokeCountMap.js +9 -8
  102. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  103. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  104. package/lib/cjs/curve/RegionOps.d.ts +69 -47
  105. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  106. package/lib/cjs/curve/RegionOps.js +70 -47
  107. package/lib/cjs/curve/RegionOps.js.map +1 -1
  108. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  109. package/lib/cjs/curve/StrokeOptions.d.ts +29 -21
  110. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  111. package/lib/cjs/curve/StrokeOptions.js +50 -24
  112. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  113. package/lib/cjs/curve/UnionRegion.d.ts +6 -5
  114. package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
  115. package/lib/cjs/curve/UnionRegion.js +17 -8
  116. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  117. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  118. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  119. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  120. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  121. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  122. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  123. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  124. package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts +2 -1
  125. package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
  126. package/lib/cjs/curve/internalContexts/GapSearchContext.js +6 -2
  127. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  128. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +4 -0
  129. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  130. package/lib/cjs/curve/internalContexts/MultiChainCollector.js +5 -2
  131. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  132. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  133. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
  134. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
  135. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
  136. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  137. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +56 -34
  138. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  139. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +152 -87
  140. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  141. package/lib/cjs/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
  142. package/lib/cjs/curve/internalContexts/SumLengthsContext.js +4 -1
  143. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  144. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  145. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  146. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  147. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  148. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  149. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  150. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  151. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  152. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  153. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  154. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  155. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  156. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  157. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  158. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  159. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  160. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  161. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  162. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  163. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  164. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  165. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  166. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  167. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  168. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  169. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  170. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  171. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  172. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  173. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  174. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  175. package/lib/cjs/geometry3d/Matrix3d.d.ts +2 -2
  176. package/lib/cjs/geometry3d/Matrix3d.js +2 -2
  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.d.ts +36 -32
  182. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  183. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +35 -32
  184. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  185. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  186. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  187. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  188. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  189. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  190. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  191. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  192. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  193. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  194. package/lib/cjs/geometry3d/Range.d.ts +133 -93
  195. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  196. package/lib/cjs/geometry3d/Range.js +296 -144
  197. package/lib/cjs/geometry3d/Range.js.map +1 -1
  198. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  199. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  200. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  201. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  202. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  203. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  204. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  205. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  206. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  207. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  208. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  209. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  210. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  211. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  212. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  213. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  214. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  215. package/lib/cjs/numerics/Complex.js.map +1 -1
  216. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  217. package/lib/cjs/numerics/Newton.js.map +1 -1
  218. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  219. package/lib/cjs/numerics/PolarData.js.map +1 -1
  220. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  221. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  222. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  223. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  224. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  225. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  226. package/lib/cjs/polyface/AuxData.js.map +1 -1
  227. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  228. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  229. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  230. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  231. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  232. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  233. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  234. package/lib/cjs/polyface/Polyface.js.map +1 -1
  235. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  236. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  237. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  238. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  239. package/lib/cjs/polyface/RangeLengthData.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/GeometrySamples.js.map +1 -1
  257. package/lib/cjs/serialization/IModelJsonSchema.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.js.map +1 -1
  272. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  273. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  274. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  275. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  276. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  277. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  278. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  279. package/lib/cjs/topology/MaskManager.js.map +1 -1
  280. package/lib/cjs/topology/Merging.js.map +1 -1
  281. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  282. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  283. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  284. package/lib/cjs/topology/Triangulation.js.map +1 -1
  285. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  286. package/lib/esm/Constant.js.map +1 -1
  287. package/lib/esm/Geometry.js.map +1 -1
  288. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  289. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  290. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  291. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  292. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  293. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  294. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  295. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  296. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  297. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  298. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  299. package/lib/esm/bspline/KnotVector.js.map +1 -1
  300. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  301. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  302. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  303. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  304. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  305. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  306. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  307. package/lib/esm/clipping/ClipVector.js.map +1 -1
  308. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  309. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  310. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  311. package/lib/esm/core-geometry.d.ts +1 -0
  312. package/lib/esm/core-geometry.d.ts.map +1 -1
  313. package/lib/esm/core-geometry.js +2 -0
  314. package/lib/esm/core-geometry.js.map +1 -1
  315. package/lib/esm/curve/Arc3d.d.ts +71 -86
  316. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  317. package/lib/esm/curve/Arc3d.js +110 -96
  318. package/lib/esm/curve/Arc3d.js.map +1 -1
  319. package/lib/esm/curve/ChainCollectorContext.js.map +1 -1
  320. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  321. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  322. package/lib/esm/curve/CurveChain.js.map +1 -1
  323. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +61 -41
  324. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  325. package/lib/esm/curve/CurveChainWithDistanceIndex.js +69 -46
  326. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  327. package/lib/esm/curve/CurveCollection.d.ts +73 -46
  328. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  329. package/lib/esm/curve/CurveCollection.js +100 -64
  330. package/lib/esm/curve/CurveCollection.js.map +1 -1
  331. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  332. package/lib/esm/curve/CurveCurve.js.map +1 -1
  333. package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
  334. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  335. package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
  336. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  337. package/lib/esm/curve/CurveFactory.js.map +1 -1
  338. package/lib/esm/curve/CurveLocationDetail.d.ts +45 -46
  339. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  340. package/lib/esm/curve/CurveLocationDetail.js +39 -41
  341. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  342. package/lib/esm/curve/CurvePrimitive.d.ts +138 -92
  343. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  344. package/lib/esm/curve/CurvePrimitive.js +115 -75
  345. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  346. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  347. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  348. package/lib/esm/curve/GeometryQuery.d.ts +26 -20
  349. package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
  350. package/lib/esm/curve/GeometryQuery.js +11 -9
  351. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  352. package/lib/esm/curve/LineSegment3d.d.ts +38 -27
  353. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  354. package/lib/esm/curve/LineSegment3d.js +77 -39
  355. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  356. package/lib/esm/curve/LineString3d.d.ts +70 -51
  357. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  358. package/lib/esm/curve/LineString3d.js +120 -71
  359. package/lib/esm/curve/LineString3d.js.map +1 -1
  360. package/lib/esm/curve/Loop.d.ts +7 -5
  361. package/lib/esm/curve/Loop.d.ts.map +1 -1
  362. package/lib/esm/curve/Loop.js +18 -6
  363. package/lib/esm/curve/Loop.js.map +1 -1
  364. package/lib/esm/curve/ParityRegion.d.ts +7 -7
  365. package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
  366. package/lib/esm/curve/ParityRegion.js +19 -11
  367. package/lib/esm/curve/ParityRegion.js.map +1 -1
  368. package/lib/esm/curve/Path.d.ts +6 -6
  369. package/lib/esm/curve/Path.d.ts.map +1 -1
  370. package/lib/esm/curve/Path.js +15 -9
  371. package/lib/esm/curve/Path.js.map +1 -1
  372. package/lib/esm/curve/PointString3d.js.map +1 -1
  373. package/lib/esm/curve/ProxyCurve.d.ts +4 -6
  374. package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
  375. package/lib/esm/curve/ProxyCurve.js +7 -7
  376. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  377. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  378. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  379. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  380. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  381. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  382. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  383. package/lib/esm/curve/Query/StrokeCountMap.d.ts +14 -13
  384. package/lib/esm/curve/Query/StrokeCountMap.d.ts.map +1 -1
  385. package/lib/esm/curve/Query/StrokeCountMap.js +9 -8
  386. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  387. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  388. package/lib/esm/curve/RegionOps.d.ts +69 -47
  389. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  390. package/lib/esm/curve/RegionOps.js +70 -47
  391. package/lib/esm/curve/RegionOps.js.map +1 -1
  392. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  393. package/lib/esm/curve/StrokeOptions.d.ts +29 -21
  394. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  395. package/lib/esm/curve/StrokeOptions.js +50 -24
  396. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  397. package/lib/esm/curve/UnionRegion.d.ts +6 -5
  398. package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
  399. package/lib/esm/curve/UnionRegion.js +17 -8
  400. package/lib/esm/curve/UnionRegion.js.map +1 -1
  401. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  402. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  403. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  404. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  405. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  406. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  407. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  408. package/lib/esm/curve/internalContexts/GapSearchContext.d.ts +2 -1
  409. package/lib/esm/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
  410. package/lib/esm/curve/internalContexts/GapSearchContext.js +6 -2
  411. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  412. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +4 -0
  413. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  414. package/lib/esm/curve/internalContexts/MultiChainCollector.js +5 -2
  415. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  416. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  417. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
  418. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
  419. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
  420. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  421. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +56 -34
  422. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  423. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +152 -87
  424. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  425. package/lib/esm/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
  426. package/lib/esm/curve/internalContexts/SumLengthsContext.js +4 -1
  427. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  428. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  429. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  430. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  431. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  432. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  433. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  434. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  435. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  436. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  437. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  438. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  439. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  440. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  441. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  442. package/lib/esm/geometry3d/Angle.js.map +1 -1
  443. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  444. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  445. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  446. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  447. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  448. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  449. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  450. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  451. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  452. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  453. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  454. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  455. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  456. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  457. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  458. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  459. package/lib/esm/geometry3d/Matrix3d.d.ts +2 -2
  460. package/lib/esm/geometry3d/Matrix3d.js +2 -2
  461. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  462. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  463. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  464. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  465. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
  466. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  467. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +35 -32
  468. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  469. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  470. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  471. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  472. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  473. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  474. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  475. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  476. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  477. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  478. package/lib/esm/geometry3d/Range.d.ts +133 -93
  479. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  480. package/lib/esm/geometry3d/Range.js +296 -144
  481. package/lib/esm/geometry3d/Range.js.map +1 -1
  482. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  483. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  484. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  485. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  486. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  487. package/lib/esm/geometry3d/Transform.js.map +1 -1
  488. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  489. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  490. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  491. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  492. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  493. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  494. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  495. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  496. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  497. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  498. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  499. package/lib/esm/numerics/Complex.js.map +1 -1
  500. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  501. package/lib/esm/numerics/Newton.js.map +1 -1
  502. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  503. package/lib/esm/numerics/PolarData.js.map +1 -1
  504. package/lib/esm/numerics/Polynomials.js.map +1 -1
  505. package/lib/esm/numerics/Quadrature.js.map +1 -1
  506. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  507. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  508. package/lib/esm/numerics/UnionFind.js.map +1 -1
  509. package/lib/esm/numerics/UsageSums.js.map +1 -1
  510. package/lib/esm/polyface/AuxData.js.map +1 -1
  511. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  512. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  513. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  514. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  515. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  516. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  517. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  518. package/lib/esm/polyface/Polyface.js.map +1 -1
  519. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  520. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  521. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  522. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  523. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  524. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  525. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  526. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  527. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  528. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  529. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  530. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  531. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  532. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  533. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  534. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  535. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  536. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  537. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  538. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  539. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  540. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  541. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  542. package/lib/esm/solid/Box.js.map +1 -1
  543. package/lib/esm/solid/Cone.js.map +1 -1
  544. package/lib/esm/solid/LinearSweep.js.map +1 -1
  545. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  546. package/lib/esm/solid/RuledSweep.js.map +1 -1
  547. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  548. package/lib/esm/solid/Sphere.js.map +1 -1
  549. package/lib/esm/solid/SweepContour.js.map +1 -1
  550. package/lib/esm/solid/TorusPipe.js.map +1 -1
  551. package/lib/esm/topology/ChainMerge.js.map +1 -1
  552. package/lib/esm/topology/Graph.js.map +1 -1
  553. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  554. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  555. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  556. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  557. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  558. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  559. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  560. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  561. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  562. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  563. package/lib/esm/topology/MaskManager.js.map +1 -1
  564. package/lib/esm/topology/Merging.js.map +1 -1
  565. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  566. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  567. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  568. package/lib/esm/topology/Triangulation.js.map +1 -1
  569. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  570. package/package.json +3 -3
@@ -18,36 +18,38 @@ import { LineString3d } from "./LineString3d";
18
18
  import { StrokeOptions } from "./StrokeOptions";
19
19
  /**
20
20
  * A LineSegment3d is:
21
- *
22
21
  * * A 3d line segment represented by its start and end coordinates
23
22
  * * startPoint
24
23
  * * endPoint
25
- * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. either of these equivalent forms to map fraction `f` to a point `X(f)`
24
+ * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these
25
+ * equivalent forms maps fraction `f` to a point `X(f)`:
26
26
  * ```
27
27
  * equation
28
- * X(f) = P_0 + f * (P_1 - P_0)\newline
29
- * X(f) = (1-f)*P_0 + f * P_0
28
+ * X(f) = P_0 + f*(P_1 - P_0)\newline
29
+ * X(f) = (1-f)*P_0 + f*P_1
30
30
  * ```
31
31
  * @public
32
32
  */
33
33
  export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {
34
34
  /** String name for schema properties */
35
35
  readonly curvePrimitiveType = "lineSegment";
36
- /** test if `other` is of class `LineSegment3d` */
36
+ /** Test if `other` is of class `LineSegment3d` */
37
37
  isSameGeometryClass(other: GeometryQuery): boolean;
38
+ /** Start point of the segment */
38
39
  private _point0;
40
+ /** End point of the segment */
39
41
  private _point1;
40
- /** Return REFERENCE to the start point of this segment.
41
- * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
42
+ /**
43
+ * Return REFERENCE to the start point of this segment.
44
+ * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.
42
45
  */
43
46
  get point0Ref(): Point3d;
44
- /** Return REFERENCE to the end point of this segment.
45
- * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
46
- */
47
- get point1Ref(): Point3d;
48
47
  /**
49
- * A LineSegment3d extends along its infinite line.
48
+ * Return REFERENCE to the end point of this segment.
49
+ * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.
50
50
  */
51
+ get point1Ref(): Point3d;
52
+ /** A LineSegment3d extends along its infinite line. */
51
53
  get isExtensibleFractionSpace(): boolean;
52
54
  /**
53
55
  * CAPTURE point references as a `LineSegment3d`
@@ -59,15 +61,16 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
59
61
  setRefs(point0: Point3d, point1: Point3d): void;
60
62
  /** Set the start and endpoints by cloning the input parameters. */
61
63
  set(point0: Point3d, point1: Point3d): void;
62
- /** copy (clone) data from other */
64
+ /** Copy (clone) data from other */
63
65
  setFrom(other: LineSegment3d): void;
64
- /** Return a (clone of) the start point. (This is NOT a reference to the stored start point) */
66
+ /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */
65
67
  startPoint(result?: Point3d): Point3d;
66
- /** Return a (clone of) the end point. (This is NOT a reference to the stored end point) */
68
+ /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */
67
69
  endPoint(result?: Point3d): Point3d;
68
70
  /** Return the point and derivative vector at fractional position along the line segment. */
69
71
  fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d;
70
- /** Construct a plane with
72
+ /**
73
+ * Construct a plane with
71
74
  * * origin at the fractional position along the line segment
72
75
  * * x axis is the first derivative, i.e. along the line segment
73
76
  * * y axis is the second derivative, i.e. 000
@@ -81,7 +84,8 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
81
84
  static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d;
82
85
  /** Create with start and end points. The point contents are CAPTURED into the result */
83
86
  static createCapture(point0: Point3d, point1: Point3d): LineSegment3d;
84
- /** create a LineSegment3d from xy coordinates of start and end, with common z.
87
+ /**
88
+ * Create a LineSegment3d from xy coordinates of start and end, with common z.
85
89
  * @param x0 start point x coordinate.
86
90
  * @param y0 start point y coordinate.
87
91
  * @param x1 end point x coordinate.
@@ -90,7 +94,8 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
90
94
  * @param result optional existing LineSegment to be reinitialized.
91
95
  */
92
96
  static createXYXY(x0: number, y0: number, x1: number, y1: number, z?: number, result?: LineSegment3d): LineSegment3d;
93
- /** create a LineSegment3d from xy coordinates of start and end, with common z.
97
+ /**
98
+ * Create a LineSegment3d from xy coordinates of start and end, with common z.
94
99
  * @param x0 start point x coordinate.
95
100
  * @param y0 start point y coordinate.
96
101
  * @param x1 end point x coordinate.
@@ -110,16 +115,18 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
110
115
  /**
111
116
  * Returns a curve location detail with both xyz and fractional coordinates of the closest point.
112
117
  * @param spacePoint point in space
113
- * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on the unbounded line that contains the bounded segment.
118
+ * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on
119
+ * the unbounded line that contains the bounded segment.
114
120
  */
115
121
  closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): CurveLocationDetail;
116
- /** swap the endpoint references. */
122
+ /** Swap the endpoint references. */
117
123
  reverseInPlace(): void;
118
124
  /** Transform the two endpoints of this LinSegment. */
119
125
  tryTransformInPlace(transform: Transform): boolean;
120
126
  /** Test if both endpoints are in a plane (within tolerance) */
121
127
  isInPlane(plane: PlaneAltitudeEvaluator): boolean;
122
- /** Compute points of simple (transverse) with a plane.
128
+ /**
129
+ * Compute points of simple (transverse) with a plane.
123
130
  * * Use isInPlane to test if the line segment is completely in the plane.
124
131
  */
125
132
  appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number;
@@ -156,19 +163,20 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
156
163
  /** Emit strokes to caller-supplied handler */
157
164
  emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void;
158
165
  /**
159
- * return the stroke count required for given options.
166
+ * Return the stroke count required for given options.
160
167
  * @param options StrokeOptions that determine count
161
168
  */
162
169
  computeStrokeCountForOptions(options?: StrokeOptions): number;
163
- /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */
170
+ /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */
164
171
  dispatchToGeometryHandler(handler: GeometryHandler): any;
165
172
  /**
166
173
  * Find intervals of this curve primitive that are interior to a clipper
167
174
  * @param clipper clip structure (e.g. clip planes)
168
- * @param announce function to be called announcing fractional intervals" ` announce(fraction0, fraction1, curvePrimitive)`
175
+ * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`
169
176
  */
170
177
  announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
171
- /** Return (if possible) a curve primitive which is a portion of this curve.
178
+ /**
179
+ * Return (if possible) a curve primitive which is a portion of this curve.
172
180
  * @param fractionA [in] start fraction
173
181
  * @param fractionB [in] end fraction
174
182
  */
@@ -183,10 +191,13 @@ export declare class LineSegment3d extends CurvePrimitive implements BeJSONFunct
183
191
  * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
184
192
  */
185
193
  constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): CurvePrimitive | CurvePrimitive[] | undefined;
186
- /** Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.
194
+ /**
195
+ * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of
196
+ * projection.
187
197
  * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
188
198
  * @param lowHigh optional receiver for output
189
- * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the end of the ray.
199
+ * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
200
+ * end of the ray.
190
201
  */
191
202
  projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined;
192
203
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LineSegment3d.d.ts","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAY,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAsB,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAqB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,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AQ,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,aAAa;IAKjD,uCAAuC;IACvB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAO5D,iDAAiD;IAC1C,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IAIrE,8CAA8C;IACvC,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IAMjF;;;OAGG;IACI,4BAA4B,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;IASpE,+EAA+E;IACxE,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;IAG/D;;;;OAIG;IACa,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,kCAAkC,GAAG,OAAO;IAI/G;;;;OAIG;IACa,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa;IAGtF;;;OAGG;IACa,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO;IAgB3G;;;OAGG;IACa,iBAAiB,CAC/B,uBAAuB,EAAE,MAAM,GAAG,aAAa,GAC9C,cAAc,GAAG,cAAc,EAAE,GAAG,SAAS;IAWhD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAG,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;CAGvG"}
@@ -19,33 +19,41 @@ const PolygonOffsetContext_1 = require("./internalContexts/PolygonOffsetContext"
19
19
  /* eslint-disable @typescript-eslint/naming-convention, no-empty */
20
20
  /**
21
21
  * A LineSegment3d is:
22
- *
23
22
  * * A 3d line segment represented by its start and end coordinates
24
23
  * * startPoint
25
24
  * * endPoint
26
- * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. either of these equivalent forms to map fraction `f` to a point `X(f)`
25
+ * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these
26
+ * equivalent forms maps fraction `f` to a point `X(f)`:
27
27
  * ```
28
28
  * equation
29
- * X(f) = P_0 + f * (P_1 - P_0)\newline
30
- * X(f) = (1-f)*P_0 + f * P_0
29
+ * X(f) = P_0 + f*(P_1 - P_0)\newline
30
+ * X(f) = (1-f)*P_0 + f*P_1
31
31
  * ```
32
32
  * @public
33
33
  */
34
34
  class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
35
- /** test if `other` is of class `LineSegment3d` */
36
- isSameGeometryClass(other) { return other instanceof LineSegment3d; }
37
- /** Return REFERENCE to the start point of this segment.
38
- * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
39
- */
40
- get point0Ref() { return this._point0; }
41
- /** Return REFERENCE to the end point of this segment.
42
- * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point
35
+ /** Test if `other` is of class `LineSegment3d` */
36
+ isSameGeometryClass(other) {
37
+ return other instanceof LineSegment3d;
38
+ }
39
+ /**
40
+ * Return REFERENCE to the start point of this segment.
41
+ * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.
43
42
  */
44
- get point1Ref() { return this._point1; }
43
+ get point0Ref() {
44
+ return this._point0;
45
+ }
45
46
  /**
46
- * A LineSegment3d extends along its infinite line.
47
+ * Return REFERENCE to the end point of this segment.
48
+ * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.
47
49
  */
48
- get isExtensibleFractionSpace() { return true; }
50
+ get point1Ref() {
51
+ return this._point1;
52
+ }
53
+ /** A LineSegment3d extends along its infinite line. */
54
+ get isExtensibleFractionSpace() {
55
+ return true;
56
+ }
49
57
  /**
50
58
  * CAPTURE point references as a `LineSegment3d`
51
59
  * @param point0
@@ -59,12 +67,21 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
59
67
  this._point1 = point1;
60
68
  }
61
69
  /** Set the start and endpoints by capturing input references. */
62
- setRefs(point0, point1) { this._point0 = point0; this._point1 = point1; }
70
+ setRefs(point0, point1) {
71
+ this._point0 = point0;
72
+ this._point1 = point1;
73
+ }
63
74
  /** Set the start and endpoints by cloning the input parameters. */
64
- set(point0, point1) { this._point0 = point0.clone(); this._point1 = point1.clone(); }
65
- /** copy (clone) data from other */
66
- setFrom(other) { this._point0.setFrom(other._point0); this._point1.setFrom(other._point1); }
67
- /** Return a (clone of) the start point. (This is NOT a reference to the stored start point) */
75
+ set(point0, point1) {
76
+ this._point0 = point0.clone();
77
+ this._point1 = point1.clone();
78
+ }
79
+ /** Copy (clone) data from other */
80
+ setFrom(other) {
81
+ this._point0.setFrom(other._point0);
82
+ this._point1.setFrom(other._point1);
83
+ }
84
+ /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */
68
85
  startPoint(result) {
69
86
  if (result) {
70
87
  result.setFrom(this._point0);
@@ -72,7 +89,7 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
72
89
  }
73
90
  return this._point0.clone();
74
91
  }
75
- /** Return a (clone of) the end point. (This is NOT a reference to the stored end point) */
92
+ /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */
76
93
  endPoint(result) {
77
94
  if (result) {
78
95
  result.setFrom(this._point1);
@@ -87,7 +104,8 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
87
104
  this._point0.interpolate(fraction, this._point1, result.origin);
88
105
  return result;
89
106
  }
90
- /** Construct a plane with
107
+ /**
108
+ * Construct a plane with
91
109
  * * origin at the fractional position along the line segment
92
110
  * * x axis is the first derivative, i.e. along the line segment
93
111
  * * y axis is the second derivative, i.e. 000
@@ -100,7 +118,9 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
100
118
  return result;
101
119
  }
102
120
  /** Clone the LineSegment3d */
103
- clone() { return LineSegment3d.create(this._point0, this._point1); }
121
+ clone() {
122
+ return LineSegment3d.create(this._point0, this._point1);
123
+ }
104
124
  /** Clone and apply transform to the clone. */
105
125
  cloneTransformed(transform) {
106
126
  const c = this.clone();
@@ -119,7 +139,8 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
119
139
  static createCapture(point0, point1) {
120
140
  return new LineSegment3d(point0, point1);
121
141
  }
122
- /** create a LineSegment3d from xy coordinates of start and end, with common z.
142
+ /**
143
+ * Create a LineSegment3d from xy coordinates of start and end, with common z.
123
144
  * @param x0 start point x coordinate.
124
145
  * @param y0 start point y coordinate.
125
146
  * @param x1 end point x coordinate.
@@ -135,7 +156,8 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
135
156
  }
136
157
  return new LineSegment3d(Point3dVector3d_1.Point3d.create(x0, y0, z), Point3dVector3d_1.Point3d.create(x1, y1, z));
137
158
  }
138
- /** create a LineSegment3d from xy coordinates of start and end, with common z.
159
+ /**
160
+ * Create a LineSegment3d from xy coordinates of start and end, with common z.
139
161
  * @param x0 start point x coordinate.
140
162
  * @param y0 start point y coordinate.
141
163
  * @param x1 end point x coordinate.
@@ -152,19 +174,26 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
152
174
  return new LineSegment3d(Point3dVector3d_1.Point3d.create(x0, y0, z0), Point3dVector3d_1.Point3d.create(x1, y1, z1));
153
175
  }
154
176
  /** Return the point at fractional position along the line segment. */
155
- fractionToPoint(fraction, result) { return this._point0.interpolate(fraction, this._point1, result); }
177
+ fractionToPoint(fraction, result) {
178
+ return this._point0.interpolate(fraction, this._point1, result);
179
+ }
156
180
  /** Return the length of the segment. */
157
- curveLength() { return this._point0.distance(this._point1); }
181
+ curveLength() {
182
+ return this._point0.distance(this._point1);
183
+ }
158
184
  /** Return the length of the partial segment between fractions. */
159
185
  curveLengthBetweenFractions(fraction0, fraction1) {
160
186
  return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);
161
187
  }
162
188
  /** Return the length of the segment. */
163
- quickLength() { return this.curveLength(); }
189
+ quickLength() {
190
+ return this.curveLength();
191
+ }
164
192
  /**
165
193
  * Returns a curve location detail with both xyz and fractional coordinates of the closest point.
166
194
  * @param spacePoint point in space
167
- * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on the unbounded line that contains the bounded segment.
195
+ * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on
196
+ * the unbounded line that contains the bounded segment.
168
197
  */
169
198
  closestPoint(spacePoint, extend, result) {
170
199
  let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);
@@ -178,7 +207,7 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
178
207
  result.a = result.point.distance(spacePoint);
179
208
  return result;
180
209
  }
181
- /** swap the endpoint references. */
210
+ /** Swap the endpoint references. */
182
211
  reverseInPlace() {
183
212
  const a = this._point0;
184
213
  this._point0 = this._point1;
@@ -195,7 +224,8 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
195
224
  return Geometry_1.Geometry.isSmallMetricDistance(plane.altitude(this._point0))
196
225
  && Geometry_1.Geometry.isSmallMetricDistance(plane.altitude(this._point1));
197
226
  }
198
- /** Compute points of simple (transverse) with a plane.
227
+ /**
228
+ * Compute points of simple (transverse) with a plane.
199
229
  * * Use isInPlane to test if the line segment is completely in the plane.
200
230
  */
201
231
  appendPlaneIntersectionPoints(plane, result) {
@@ -253,12 +283,16 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
253
283
  }
254
284
  }
255
285
  /** A simple line segment's fraction and distance are proportional. */
256
- getFractionToDistanceScale() { return this.curveLength(); }
286
+ getFractionToDistanceScale() {
287
+ return this.curveLength();
288
+ }
257
289
  /**
258
290
  * Place the lineSegment3d start and points in a json object
259
291
  * @return {*} [[x,y,z],[x,y,z]]
260
292
  */
261
- toJSON() { return [this._point0.toJSON(), this._point1.toJSON()]; }
293
+ toJSON() {
294
+ return [this._point0.toJSON(), this._point1.toJSON()];
295
+ }
262
296
  /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */
263
297
  static fromJSON(json) {
264
298
  const result = new LineSegment3d(Point3dVector3d_1.Point3d.createZero(), Point3dVector3d_1.Point3d.create());
@@ -286,7 +320,7 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
286
320
  handler.endCurvePrimitive(this);
287
321
  }
288
322
  /**
289
- * return the stroke count required for given options.
323
+ * Return the stroke count required for given options.
290
324
  * @param options StrokeOptions that determine count
291
325
  */
292
326
  computeStrokeCountForOptions(options) {
@@ -298,19 +332,20 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
298
332
  }
299
333
  return numStroke;
300
334
  }
301
- /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */
335
+ /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */
302
336
  dispatchToGeometryHandler(handler) {
303
337
  return handler.handleLineSegment3d(this);
304
338
  }
305
339
  /**
306
340
  * Find intervals of this curve primitive that are interior to a clipper
307
341
  * @param clipper clip structure (e.g. clip planes)
308
- * @param announce function to be called announcing fractional intervals" ` announce(fraction0, fraction1, curvePrimitive)`
342
+ * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`
309
343
  */
310
344
  announceClipIntervals(clipper, announce) {
311
345
  return clipper.announceClippedSegmentIntervals(0.0, 1.0, this._point0, this._point1, announce ? (fraction0, fraction1) => announce(fraction0, fraction1, this) : undefined);
312
346
  }
313
- /** Return (if possible) a curve primitive which is a portion of this curve.
347
+ /**
348
+ * Return (if possible) a curve primitive which is a portion of this curve.
314
349
  * @param fractionA [in] start fraction
315
350
  * @param fractionB [in] end fraction
316
351
  */
@@ -350,10 +385,13 @@ class LineSegment3d extends CurvePrimitive_1.CurvePrimitive {
350
385
  }
351
386
  return undefined;
352
387
  }
353
- /** Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.
388
+ /**
389
+ * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of
390
+ * projection.
354
391
  * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
355
392
  * @param lowHigh optional receiver for output
356
- * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the end of the ray.
393
+ * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
394
+ * end of the ray.
357
395
  */
358
396
  projectedParameterRange(ray, lowHigh) {
359
397
  return PlaneAltitudeRangeContext_1.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
@@ -1 +1 @@
1
- {"version":3,"file":"LineSegment3d.js","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,0CAAgF;AAEhF,uFAAoF;AACpF,mEAAkE;AAClE,+CAAuD;AACvD,+CAA4C;AAE5C,qEAA6D;AAC7D,uDAAoF;AACpF,+DAA+E;AAC/E,qDAAsF;AAEtF,4FAAyF;AACzF,kFAAwE;AAIxE,mEAAmE;AAEnE;;;;;;;;;;;;;GAaG;AACH,MAAa,aAAc,SAAQ,+BAAc;IAI/C,kDAAkD;IAC3C,mBAAmB,CAAC,KAAoB,IAAa,OAAO,KAAK,YAAY,aAAa,CAAC,CAAC,CAAC;IAGpG;;OAEG;IACH,IAAW,SAAS,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD;;OAEG;IACH,IAAW,SAAS,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD;;OAEG;IACH,IAAoB,yBAAyB,KAAc,OAAO,IAAI,CAAC,CAAC,CAAC;IAEzE;;;;OAIG;IACH,YAAsB,MAAe,EAAE,MAAe;QAAI,KAAK,EAAE,CAAC;QAzBlE,wCAAwC;QACxB,uBAAkB,GAAG,aAAa,CAAC;QAwBgB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAAC,CAAC;IAClH,iEAAiE;IAC1D,OAAO,CAAC,MAAe,EAAE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AO,qDAAyB,CAAC,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF;AA1UD,sCA0UC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Clipper } from \"../clipping/ClipUtils\";\r\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\r\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Order2Bezier } from \"../numerics/BezierPolynomials\";\r\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"./CurveExtendMode\";\r\nimport { CurveIntervalRole, CurveLocationDetail } from \"./CurveLocationDetail\";\r\nimport { AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\r\nimport { OffsetOptions } from \"./internalContexts/PolygonOffsetContext\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n\r\n/**\r\n * A LineSegment3d is:\r\n *\r\n * * A 3d line segment represented by its start and end coordinates\r\n * * startPoint\r\n * * endPoint\r\n * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. either of these equivalent forms to map fraction `f` to a point `X(f)`\r\n * ```\r\n * equation\r\n * X(f) = P_0 + f * (P_1 - P_0)\\newline\r\n * X(f) = (1-f)*P_0 + f * P_0\r\n * ```\r\n * @public\r\n */\r\nexport class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {\r\n /** String name for schema properties */\r\n public readonly curvePrimitiveType = \"lineSegment\";\r\n\r\n /** test if `other` is of class `LineSegment3d` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean { return other instanceof LineSegment3d; }\r\n private _point0: Point3d;\r\n private _point1: Point3d;\r\n /** Return REFERENCE to the start point of this segment.\r\n * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point\r\n */\r\n public get point0Ref(): Point3d { return this._point0; }\r\n /** Return REFERENCE to the end point of this segment.\r\n * * (This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point\r\n */\r\n public get point1Ref(): Point3d { return this._point1; }\r\n /**\r\n * A LineSegment3d extends along its infinite line.\r\n */\r\n public override get isExtensibleFractionSpace(): boolean { return true; }\r\n\r\n /**\r\n * CAPTURE point references as a `LineSegment3d`\r\n * @param point0\r\n * @param point1\r\n */\r\n protected constructor(point0: Point3d, point1: Point3d) { super(); this._point0 = point0; this._point1 = point1; }\r\n /** Set the start and endpoints by capturing input references. */\r\n public setRefs(point0: Point3d, point1: Point3d) { this._point0 = point0; this._point1 = point1; }\r\n /** Set the start and endpoints by cloning the input parameters. */\r\n public set(point0: Point3d, point1: Point3d) { this._point0 = point0.clone(); this._point1 = point1.clone(); }\r\n /** copy (clone) data from other */\r\n public setFrom(other: LineSegment3d) { this._point0.setFrom(other._point0); this._point1.setFrom(other._point1); }\r\n /** Return a (clone of) the start point. (This is NOT a reference to the stored start point) */\r\n public override startPoint(result?: Point3d): Point3d {\r\n if (result) { result.setFrom(this._point0); return result; }\r\n return this._point0.clone();\r\n }\r\n /** Return a (clone of) the end point. (This is NOT a reference to the stored end point) */\r\n public override endPoint(result?: Point3d): Point3d {\r\n if (result) { result.setFrom(this._point1); return result; }\r\n return this._point1.clone();\r\n }\r\n /** Return the point and derivative vector at fractional position along the line segment. */\r\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\r\n result = result ? result : Ray3d.createZero();\r\n result.direction.setStartEnd(this._point0, this._point1);\r\n this._point0.interpolate(fraction, this._point1, result.origin);\r\n return result;\r\n }\r\n /** Construct a plane with\r\n * * origin at the fractional position along the line segment\r\n * * x axis is the first derivative, i.e. along the line segment\r\n * * y axis is the second derivative, i.e. 000\r\n */\r\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n result = result ? result : Plane3dByOriginAndVectors.createXYPlane();\r\n result.vectorU.setStartEnd(this._point0, this._point1);\r\n result.vectorV.set(0, 0, 0);\r\n this._point0.interpolate(fraction, this._point1, result.origin);\r\n return result;\r\n }\r\n\r\n /** Clone the LineSegment3d */\r\n public clone(): LineSegment3d { return LineSegment3d.create(this._point0, this._point1); }\r\n /** Clone and apply transform to the clone. */\r\n public cloneTransformed(transform: Transform): LineSegment3d { // we know tryTransformInPlace succeeds.\r\n const c = this.clone();\r\n c.tryTransformInPlace(transform);\r\n return c;\r\n }\r\n /** Create with start and end points. The point contents are cloned into the LineSegment3d. */\r\n public static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d {\r\n if (result) {\r\n result.set(point0, point1); // and this will clone them !!\r\n return result;\r\n }\r\n return new LineSegment3d(point0.clone(), point1.clone());\r\n }\r\n\r\n /** Create with start and end points. The point contents are CAPTURED into the result */\r\n public static createCapture(point0: Point3d, point1: Point3d): LineSegment3d {\r\n return new LineSegment3d(point0, point1);\r\n }\r\n /** create a LineSegment3d from xy coordinates of start and end, with common z.\r\n * @param x0 start point x coordinate.\r\n * @param y0 start point y coordinate.\r\n * @param x1 end point x coordinate.\r\n * @param y1 end point y coordinate.\r\n * @param z z coordinate to use for both points.\r\n * @param result optional existing LineSegment to be reinitialized.\r\n */\r\n public static createXYXY(x0: number, y0: number, x1: number, y1: number, z: number = 0, result?: LineSegment3d) {\r\n if (result) {\r\n result._point0.set(x0, y0, z);\r\n result._point1.set(x1, y1, z);\r\n return result;\r\n }\r\n return new LineSegment3d(Point3d.create(x0, y0, z), Point3d.create(x1, y1, z));\r\n }\r\n\r\n /** create a LineSegment3d from xy coordinates of start and end, with common z.\r\n * @param x0 start point x coordinate.\r\n * @param y0 start point y coordinate.\r\n * @param x1 end point x coordinate.\r\n * @param y1 end point y coordinate.\r\n * @param z z coordinate to use for both points.\r\n * @param result optional existing LineSegment to be reinitialized.\r\n */\r\n public static createXYZXYZ(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: LineSegment3d) {\r\n if (result) {\r\n result._point0.set(x0, y0, z0);\r\n result._point1.set(x1, y1, z1);\r\n return result;\r\n }\r\n return new LineSegment3d(Point3d.create(x0, y0, z0), Point3d.create(x1, y1, z1));\r\n }\r\n\r\n /** Return the point at fractional position along the line segment. */\r\n public fractionToPoint(fraction: number, result?: Point3d): Point3d { return this._point0.interpolate(fraction, this._point1, result); }\r\n /** Return the length of the segment. */\r\n public override curveLength(): number { return this._point0.distance(this._point1); }\r\n /** Return the length of the partial segment between fractions. */\r\n public override curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\r\n return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);\r\n }\r\n /** Return the length of the segment. */\r\n public quickLength(): number { return this.curveLength(); }\r\n\r\n /**\r\n * Returns a curve location detail with both xyz and fractional coordinates of the closest point.\r\n * @param spacePoint point in space\r\n * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on the unbounded line that contains the bounded segment.\r\n */\r\n public override closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): CurveLocationDetail {\r\n let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);\r\n fraction = CurveExtendOptions.correctFraction(extend, fraction);\r\n result = CurveLocationDetail.create(this, result);\r\n // remark: This can be done by result.setFP (fraction, thePoint, undefined, a)\r\n // but that creates a temporary point.\r\n result.fraction = fraction;\r\n this._point0.interpolate(fraction, this._point1, result.point);\r\n result.vectorInCurveLocationDetail = undefined;\r\n result.a = result.point.distance(spacePoint);\r\n return result;\r\n }\r\n /** swap the endpoint references. */\r\n public reverseInPlace(): void {\r\n const a = this._point0;\r\n this._point0 = this._point1;\r\n this._point1 = a;\r\n }\r\n /** Transform the two endpoints of this LinSegment. */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n this._point0 = transform.multiplyPoint3d(this._point0, this._point0);\r\n this._point1 = transform.multiplyPoint3d(this._point1, this._point1);\r\n return true;\r\n }\r\n /** Test if both endpoints are in a plane (within tolerance) */\r\n public isInPlane(plane: PlaneAltitudeEvaluator): boolean {\r\n return Geometry.isSmallMetricDistance(plane.altitude(this._point0))\r\n && Geometry.isSmallMetricDistance(plane.altitude(this._point1));\r\n }\r\n /** Compute points of simple (transverse) with a plane.\r\n * * Use isInPlane to test if the line segment is completely in the plane.\r\n */\r\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\r\n const h0 = plane.altitude(this._point0);\r\n const h1 = plane.altitude(this._point1);\r\n const fraction = Order2Bezier.solveCoffs(h0, h1);\r\n let numIntersection = 0;\r\n if (fraction !== undefined) {\r\n numIntersection++;\r\n const detail = CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));\r\n detail.intervalRole = CurveIntervalRole.isolated;\r\n result.push(detail);\r\n }\r\n return numIntersection;\r\n }\r\n /**\r\n * Extend a range to include the (optionally transformed) line segment\r\n * @param range range to extend\r\n * @param transform optional transform to apply to the end points\r\n */\r\n public extendRange(range: Range3d, transform?: Transform): void {\r\n if (transform) {\r\n range.extendTransformedPoint(transform, this._point0);\r\n range.extendTransformedPoint(transform, this._point1);\r\n } else {\r\n range.extendPoint(this._point0);\r\n range.extendPoint(this._point1);\r\n }\r\n }\r\n /**\r\n * Construct a line from either of these json forms:\r\n *\r\n * * object with named start and end:\r\n * `{startPoint: pointValue, endPoint: pointValue}`\r\n * * array of two point values:\r\n * `[pointValue, pointValue]`\r\n * The point values are any values accepted by the Point3d method setFromJSON.\r\n * @param json data to parse.\r\n */\r\n public setFromJSON(json?: any) {\r\n if (!json) {\r\n this._point0.set(0, 0, 0);\r\n this._point1.set(1, 0, 0);\r\n return;\r\n } else if (json.startPoint && json.endPoint) { // {startPoint:json point, endPoint:json point}\r\n this._point0.setFromJSON(json.startPoint);\r\n this._point1.setFromJSON(json.endPoint);\r\n } else if (Array.isArray(json)\r\n && json.length > 1) { // [json point, json point]\r\n this._point0.setFromJSON(json[0]);\r\n this._point1.setFromJSON(json[1]);\r\n }\r\n }\r\n /** A simple line segment's fraction and distance are proportional. */\r\n public override getFractionToDistanceScale(): number | undefined { return this.curveLength(); }\r\n /**\r\n * Place the lineSegment3d start and points in a json object\r\n * @return {*} [[x,y,z],[x,y,z]]\r\n */\r\n public toJSON(): any { return [this._point0.toJSON(), this._point1.toJSON()]; }\r\n /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */\r\n public static fromJSON(json?: any): LineSegment3d {\r\n const result = new LineSegment3d(Point3d.createZero(), Point3d.create());\r\n result.setFromJSON(json);\r\n return result;\r\n }\r\n /** Near equality test with `other`. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (other instanceof LineSegment3d) {\r\n const ls = other;\r\n return this._point0.isAlmostEqual(ls._point0) && this._point1.isAlmostEqual(ls._point1);\r\n }\r\n return false;\r\n }\r\n\r\n /** Emit strokes to caller-supplied linestring */\r\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\r\n const numStroke = this.computeStrokeCountForOptions(options);\r\n dest.appendFractionalStrokePoints(this, numStroke, 0.0, 1.0);\r\n }\r\n /** Emit strokes to caller-supplied handler */\r\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\r\n handler.startCurvePrimitive(this);\r\n const numStroke = this.computeStrokeCountForOptions(options);\r\n handler.announceSegmentInterval(this, this._point0, this._point1, numStroke, 0.0, 1.0);\r\n handler.endCurvePrimitive(this);\r\n }\r\n\r\n /**\r\n * return the stroke count required for given options.\r\n * @param options StrokeOptions that determine count\r\n */\r\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\r\n let numStroke = 1;\r\n if (options) {\r\n if (options.maxEdgeLength)\r\n numStroke = options.applyMaxEdgeLength(numStroke, this.curveLength());\r\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\r\n }\r\n return numStroke;\r\n }\r\n /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleLineSegment3d(this);\r\n }\r\n\r\n /**\r\n * Find intervals of this curve primitive that are interior to a clipper\r\n * @param clipper clip structure (e.g. clip planes)\r\n * @param announce function to be called announcing fractional intervals\" ` announce(fraction0, fraction1, curvePrimitive)`\r\n */\r\n public override announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n return clipper.announceClippedSegmentIntervals(0.0, 1.0, this._point0, this._point1,\r\n announce ? (fraction0: number, fraction1: number) => announce(fraction0, fraction1, this) : undefined);\r\n }\r\n\r\n /** Return (if possible) a curve primitive which is a portion of this curve.\r\n * @param fractionA [in] start fraction\r\n * @param fractionB [in] end fraction\r\n */\r\n public override clonePartialCurve(fractionA: number, fractionB: number): LineSegment3d {\r\n return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));\r\n }\r\n /**\r\n * Returns a (high accuracy) range of the curve between fractional positions\r\n * * Default implementation returns teh range of the curve from clonePartialCurve\r\n */\r\n public override rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\r\n // (This is cheap -- don't bother testing for fraction0===fraction1)\r\n if (!transform){\r\n const range = Range3d.create();\r\n range.extendInterpolated (this._point0, fraction0, this._point1);\r\n range.extendInterpolated (this._point0, fraction1, this._point1);\r\n return range;\r\n }\r\n const point0 = this.fractionToPoint (fraction0);\r\n const point1 = this.fractionToPoint (fraction1);\r\n if (transform){\r\n transform.multiplyPoint3d (point0, point0);\r\n transform.multiplyPoint3d (point1, point1);\r\n }\r\n return Range3d.create (point0, point1);\r\n }\r\n\r\n /**\r\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\r\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\r\n */\r\n public override constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): CurvePrimitive | CurvePrimitive[] | undefined {\r\n const offsetVec = Vector3d.createStartEnd(this._point0, this._point1);\r\n if (offsetVec.normalizeInPlace()) {\r\n offsetVec.rotate90CCWXY(offsetVec);\r\n const offsetDist = OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);\r\n return LineSegment3d.create(this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist));\r\n }\r\n return undefined;\r\n }\r\n\r\n /** Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.\r\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\r\n * @param lowHigh optional receiver for output\r\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the end of the ray.\r\n */\r\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\r\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LineSegment3d.js","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,0CAAgF;AAEhF,uFAAoF;AACpF,mEAAkE;AAClE,+CAAuD;AACvD,+CAA4C;AAE5C,qEAA6D;AAC7D,uDAAoF;AACpF,+DAA+E;AAC/E,qDAAsF;AAEtF,4FAAyF;AACzF,kFAAwE;AAIxE,mEAAmE;AAEnE;;;;;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AE,MAAM,CAAC,CAAC;IACxC,CAAC;IACD;;;OAGG;IACa,iBAAiB,CAC/B,uBAA+C;QAE/C,MAAM,SAAS,GAAG,0BAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,SAAS,CAAC,gBAAgB,EAAE,EAAE;YAChC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,UAAU,GAAG,oCAAa,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;YAC5E,OAAO,aAAa,CAAC,MAAM,CACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC/F,CAAC;SACH;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,qDAAyB,CAAC,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF;AAjXD,sCAiXC","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\n/** @packageDocumentation\n * @module Curve\n */\n\nimport { Clipper } from \"../clipping/ClipUtils\";\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Order2Bezier } from \"../numerics/BezierPolynomials\";\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveIntervalRole, CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"./CurvePrimitive\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { OffsetOptions } from \"./internalContexts/PolygonOffsetContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\n\n/**\n * A LineSegment3d is:\n * * A 3d line segment represented by its start and end coordinates\n * * startPoint\n * * endPoint\n * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these\n * equivalent forms maps fraction `f` to a point `X(f)`:\n * ```\n * equation\n * X(f) = P_0 + f*(P_1 - P_0)\\newline\n * X(f) = (1-f)*P_0 + f*P_1\n * ```\n * @public\n */\nexport class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {\n /** String name for schema properties */\n public readonly curvePrimitiveType = \"lineSegment\";\n /** Test if `other` is of class `LineSegment3d` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof LineSegment3d;\n }\n /** Start point of the segment */\n private _point0: Point3d;\n /** End point of the segment */\n private _point1: Point3d;\n /**\n * Return REFERENCE to the start point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.\n */\n public get point0Ref(): Point3d {\n return this._point0;\n }\n /**\n * Return REFERENCE to the end point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.\n */\n public get point1Ref(): Point3d {\n return this._point1;\n }\n /** A LineSegment3d extends along its infinite line. */\n public override get isExtensibleFractionSpace(): boolean {\n return true;\n }\n /**\n * CAPTURE point references as a `LineSegment3d`\n * @param point0\n * @param point1\n */\n protected constructor(point0: Point3d, point1: Point3d) {\n super();\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by capturing input references. */\n public setRefs(point0: Point3d, point1: Point3d) {\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by cloning the input parameters. */\n public set(point0: Point3d, point1: Point3d) {\n this._point0 = point0.clone();\n this._point1 = point1.clone();\n }\n /** Copy (clone) data from other */\n public setFrom(other: LineSegment3d) {\n this._point0.setFrom(other._point0);\n this._point1.setFrom(other._point1);\n }\n /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */\n public override startPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point0); return result; }\n return this._point0.clone();\n }\n /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */\n public override endPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point1); return result; }\n return this._point1.clone();\n }\n /** Return the point and derivative vector at fractional position along the line segment. */\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\n result = result ? result : Ray3d.createZero();\n result.direction.setStartEnd(this._point0, this._point1);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /**\n * Construct a plane with\n * * origin at the fractional position along the line segment\n * * x axis is the first derivative, i.e. along the line segment\n * * y axis is the second derivative, i.e. 000\n */\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n result = result ? result : Plane3dByOriginAndVectors.createXYPlane();\n result.vectorU.setStartEnd(this._point0, this._point1);\n result.vectorV.set(0, 0, 0);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /** Clone the LineSegment3d */\n public clone(): LineSegment3d {\n return LineSegment3d.create(this._point0, this._point1);\n }\n /** Clone and apply transform to the clone. */\n public cloneTransformed(transform: Transform): LineSegment3d { // we know tryTransformInPlace succeeds.\n const c = this.clone();\n c.tryTransformInPlace(transform);\n return c;\n }\n /** Create with start and end points. The point contents are cloned into the LineSegment3d. */\n public static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d {\n if (result) {\n result.set(point0, point1); // and this will clone them !!\n return result;\n }\n return new LineSegment3d(point0.clone(), point1.clone());\n }\n /** Create with start and end points. The point contents are CAPTURED into the result */\n public static createCapture(point0: Point3d, point1: Point3d): LineSegment3d {\n return new LineSegment3d(point0, point1);\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYXY(x0: number, y0: number, x1: number, y1: number, z: number = 0, result?: LineSegment3d) {\n if (result) {\n result._point0.set(x0, y0, z);\n result._point1.set(x1, y1, z);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z), Point3d.create(x1, y1, z));\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYZXYZ(\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: LineSegment3d\n ): LineSegment3d {\n if (result) {\n result._point0.set(x0, y0, z0);\n result._point1.set(x1, y1, z1);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z0), Point3d.create(x1, y1, z1));\n }\n /** Return the point at fractional position along the line segment. */\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\n return this._point0.interpolate(fraction, this._point1, result);\n }\n /** Return the length of the segment. */\n public override curveLength(): number {\n return this._point0.distance(this._point1);\n }\n /** Return the length of the partial segment between fractions. */\n public override curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\n return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);\n }\n /** Return the length of the segment. */\n public quickLength(): number {\n return this.curveLength();\n }\n /**\n * Returns a curve location detail with both xyz and fractional coordinates of the closest point.\n * @param spacePoint point in space\n * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on\n * the unbounded line that contains the bounded segment.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail\n ): CurveLocationDetail {\n let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);\n fraction = CurveExtendOptions.correctFraction(extend, fraction);\n result = CurveLocationDetail.create(this, result);\n // remark: This can be done by result.setFP (fraction, thePoint, undefined, a)\n // but that creates a temporary point.\n result.fraction = fraction;\n this._point0.interpolate(fraction, this._point1, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = result.point.distance(spacePoint);\n return result;\n }\n /** Swap the endpoint references. */\n public reverseInPlace(): void {\n const a = this._point0;\n this._point0 = this._point1;\n this._point1 = a;\n }\n /** Transform the two endpoints of this LinSegment. */\n public tryTransformInPlace(transform: Transform): boolean {\n this._point0 = transform.multiplyPoint3d(this._point0, this._point0);\n this._point1 = transform.multiplyPoint3d(this._point1, this._point1);\n return true;\n }\n /** Test if both endpoints are in a plane (within tolerance) */\n public isInPlane(plane: PlaneAltitudeEvaluator): boolean {\n return Geometry.isSmallMetricDistance(plane.altitude(this._point0))\n && Geometry.isSmallMetricDistance(plane.altitude(this._point1));\n }\n /**\n * Compute points of simple (transverse) with a plane.\n * * Use isInPlane to test if the line segment is completely in the plane.\n */\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const h0 = plane.altitude(this._point0);\n const h1 = plane.altitude(this._point1);\n const fraction = Order2Bezier.solveCoffs(h0, h1);\n let numIntersection = 0;\n if (fraction !== undefined) {\n numIntersection++;\n const detail = CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));\n detail.intervalRole = CurveIntervalRole.isolated;\n result.push(detail);\n }\n return numIntersection;\n }\n /**\n * Extend a range to include the (optionally transformed) line segment\n * @param range range to extend\n * @param transform optional transform to apply to the end points\n */\n public extendRange(range: Range3d, transform?: Transform): void {\n if (transform) {\n range.extendTransformedPoint(transform, this._point0);\n range.extendTransformedPoint(transform, this._point1);\n } else {\n range.extendPoint(this._point0);\n range.extendPoint(this._point1);\n }\n }\n /**\n * Construct a line from either of these json forms:\n *\n * * object with named start and end:\n * `{startPoint: pointValue, endPoint: pointValue}`\n * * array of two point values:\n * `[pointValue, pointValue]`\n * The point values are any values accepted by the Point3d method setFromJSON.\n * @param json data to parse.\n */\n public setFromJSON(json?: any) {\n if (!json) {\n this._point0.set(0, 0, 0);\n this._point1.set(1, 0, 0);\n return;\n } else if (json.startPoint && json.endPoint) { // {startPoint:json point, endPoint:json point}\n this._point0.setFromJSON(json.startPoint);\n this._point1.setFromJSON(json.endPoint);\n } else if (Array.isArray(json)\n && json.length > 1) { // [json point, json point]\n this._point0.setFromJSON(json[0]);\n this._point1.setFromJSON(json[1]);\n }\n }\n /** A simple line segment's fraction and distance are proportional. */\n public override getFractionToDistanceScale(): number | undefined {\n return this.curveLength();\n }\n /**\n * Place the lineSegment3d start and points in a json object\n * @return {*} [[x,y,z],[x,y,z]]\n */\n public toJSON(): any {\n return [this._point0.toJSON(), this._point1.toJSON()];\n }\n /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */\n public static fromJSON(json?: any): LineSegment3d {\n const result = new LineSegment3d(Point3d.createZero(), Point3d.create());\n result.setFromJSON(json);\n return result;\n }\n /** Near equality test with `other`. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof LineSegment3d) {\n const ls = other;\n return this._point0.isAlmostEqual(ls._point0) && this._point1.isAlmostEqual(ls._point1);\n }\n return false;\n }\n /** Emit strokes to caller-supplied linestring */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n const numStroke = this.computeStrokeCountForOptions(options);\n dest.appendFractionalStrokePoints(this, numStroke, 0.0, 1.0);\n }\n /** Emit strokes to caller-supplied handler */\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\n handler.startCurvePrimitive(this);\n const numStroke = this.computeStrokeCountForOptions(options);\n handler.announceSegmentInterval(this, this._point0, this._point1, numStroke, 0.0, 1.0);\n handler.endCurvePrimitive(this);\n }\n /**\n * Return the stroke count required for given options.\n * @param options StrokeOptions that determine count\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n let numStroke = 1;\n if (options) {\n if (options.maxEdgeLength)\n numStroke = options.applyMaxEdgeLength(numStroke, this.curveLength());\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\n }\n return numStroke;\n }\n /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleLineSegment3d(this);\n }\n /**\n * Find intervals of this curve primitive that are interior to a clipper\n * @param clipper clip structure (e.g. clip planes)\n * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`\n */\n public override announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n return clipper.announceClippedSegmentIntervals(0.0, 1.0, this._point0, this._point1,\n announce ? (fraction0: number, fraction1: number) => announce(fraction0, fraction1, this) : undefined);\n }\n /**\n * Return (if possible) a curve primitive which is a portion of this curve.\n * @param fractionA [in] start fraction\n * @param fractionB [in] end fraction\n */\n public override clonePartialCurve(fractionA: number, fractionB: number): LineSegment3d {\n return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));\n }\n /**\n * Returns a (high accuracy) range of the curve between fractional positions\n * * Default implementation returns teh range of the curve from clonePartialCurve\n */\n public override rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n // (This is cheap -- don't bother testing for fraction0===fraction1)\n if (!transform) {\n const range = Range3d.create();\n range.extendInterpolated(this._point0, fraction0, this._point1);\n range.extendInterpolated(this._point0, fraction1, this._point1);\n return range;\n }\n const point0 = this.fractionToPoint(fraction0);\n const point1 = this.fractionToPoint(fraction1);\n if (transform) {\n transform.multiplyPoint3d(point0, point0);\n transform.multiplyPoint3d(point1, point1);\n }\n return Range3d.create(point0, point1);\n }\n /**\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\n */\n public override constructOffsetXY(\n offsetDistanceOrOptions: number | OffsetOptions\n ): CurvePrimitive | CurvePrimitive[] | undefined {\n const offsetVec = Vector3d.createStartEnd(this._point0, this._point1);\n if (offsetVec.normalizeInPlace()) {\n offsetVec.rotate90CCWXY(offsetVec);\n const offsetDist = OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);\n return LineSegment3d.create(\n this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist)\n );\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of\n * projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n"]}