@itwin/core-geometry 4.1.0-dev.68 → 4.1.0-dev.69

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 (349) hide show
  1. package/lib/cjs/Geometry.js.map +1 -1
  2. package/lib/cjs/bspline/BSplineCurve.d.ts +1 -1
  3. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  4. package/lib/cjs/bspline/BSplineCurve.js +2 -2
  5. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  6. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  7. package/lib/cjs/bspline/BSplineSurface.js +1 -1
  8. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  9. package/lib/cjs/bspline/BezierCurveBase.d.ts +1 -1
  10. package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
  11. package/lib/cjs/bspline/BezierCurveBase.js +2 -2
  12. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  13. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  14. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  15. package/lib/cjs/core-geometry.d.ts +3 -2
  16. package/lib/cjs/core-geometry.d.ts.map +1 -1
  17. package/lib/cjs/core-geometry.js +4 -5
  18. package/lib/cjs/core-geometry.js.map +1 -1
  19. package/lib/cjs/curve/Arc3d.d.ts +1 -1
  20. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  21. package/lib/cjs/curve/Arc3d.js +2 -2
  22. package/lib/cjs/curve/Arc3d.js.map +1 -1
  23. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +1 -1
  24. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  25. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +2 -2
  26. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  27. package/lib/cjs/curve/CurveCollection.d.ts +2 -2
  28. package/lib/cjs/curve/CurveCollection.js +2 -2
  29. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  30. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  31. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  32. package/lib/cjs/curve/CurveOps.d.ts +77 -0
  33. package/lib/cjs/curve/CurveOps.d.ts.map +1 -0
  34. package/lib/cjs/curve/CurveOps.js +160 -0
  35. package/lib/cjs/curve/CurveOps.js.map +1 -0
  36. package/lib/cjs/curve/CurvePrimitive.d.ts +13 -13
  37. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  38. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  39. package/lib/cjs/curve/GeometryQuery.d.ts +2 -2
  40. package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
  41. package/lib/cjs/curve/GeometryQuery.js +2 -2
  42. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  43. package/lib/cjs/curve/LineSegment3d.d.ts +1 -1
  44. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  45. package/lib/cjs/curve/LineSegment3d.js +2 -2
  46. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  47. package/lib/cjs/curve/LineString3d.d.ts +1 -1
  48. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  49. package/lib/cjs/curve/LineString3d.js +2 -2
  50. package/lib/cjs/curve/LineString3d.js.map +1 -1
  51. package/lib/cjs/curve/Loop.js.map +1 -1
  52. package/lib/cjs/curve/OffsetOptions.d.ts +97 -0
  53. package/lib/cjs/curve/OffsetOptions.d.ts.map +1 -0
  54. package/lib/cjs/curve/OffsetOptions.js +166 -0
  55. package/lib/cjs/curve/OffsetOptions.js.map +1 -0
  56. package/lib/cjs/curve/ProxyCurve.d.ts +1 -1
  57. package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
  58. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  59. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  60. package/lib/cjs/curve/RegionOps.d.ts +10 -13
  61. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  62. package/lib/cjs/curve/RegionOps.js +16 -17
  63. package/lib/cjs/curve/RegionOps.js.map +1 -1
  64. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +2 -2
  65. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  66. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  67. package/lib/cjs/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
  68. package/lib/cjs/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
  69. package/lib/cjs/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
  70. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -0
  71. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +59 -74
  72. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  73. package/lib/cjs/curve/internalContexts/MultiChainCollector.js +130 -223
  74. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  75. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  76. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +6 -100
  77. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  78. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +12 -167
  79. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  80. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +1 -1
  81. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  82. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +1 -1
  83. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  84. package/lib/cjs/curve/spiral/TransitionSpiral3d.js +2 -2
  85. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  86. package/lib/cjs/curve/spiral/XYCurveEvaluator.js +1 -1
  87. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  88. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  89. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  90. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  91. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  92. package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
  93. package/lib/cjs/geometry3d/GrowableBlockedArray.js +1 -1
  94. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  95. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  96. package/lib/cjs/geometry3d/GrowableFloat64Array.js +1 -1
  97. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  98. package/lib/cjs/geometry3d/Matrix3d.js +5 -5
  99. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  100. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  101. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  102. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  103. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  104. package/lib/cjs/geometry3d/Point2dVector2d.d.ts +8 -9
  105. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  106. package/lib/cjs/geometry3d/Point2dVector2d.js +9 -10
  107. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  108. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  109. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  110. package/lib/cjs/geometry3d/Point3dVector3d.js +5 -5
  111. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  112. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  113. package/lib/cjs/geometry3d/PointHelpers.js +5 -5
  114. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  115. package/lib/cjs/geometry3d/PolygonOps.d.ts +1 -2
  116. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  117. package/lib/cjs/geometry3d/PolygonOps.js +2 -3
  118. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  119. package/lib/cjs/geometry3d/Range.js.map +1 -1
  120. package/lib/cjs/geometry3d/Ray2d.d.ts +69 -0
  121. package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -0
  122. package/lib/cjs/geometry3d/Ray2d.js +146 -0
  123. package/lib/cjs/geometry3d/Ray2d.js.map +1 -0
  124. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  125. package/lib/cjs/geometry3d/Transform.js +3 -3
  126. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  127. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  128. package/lib/cjs/numerics/ConvexPolygon2d.d.ts +7 -49
  129. package/lib/cjs/numerics/ConvexPolygon2d.d.ts.map +1 -1
  130. package/lib/cjs/numerics/ConvexPolygon2d.js +16 -107
  131. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  132. package/lib/cjs/numerics/Newton.js.map +1 -1
  133. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  134. package/lib/cjs/numerics/Polynomials.js +0 -2
  135. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  136. package/lib/cjs/numerics/Quadrature.js +5 -5
  137. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  138. package/lib/cjs/polyface/IndexedEdgeMatcher.js +1 -1
  139. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  140. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  141. package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
  142. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  143. package/lib/cjs/polyface/PolyfaceQuery.d.ts +10 -7
  144. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  145. package/lib/cjs/polyface/PolyfaceQuery.js +13 -12
  146. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  147. package/lib/cjs/polyface/TaggedNumericData.js +1 -1
  148. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  149. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
  150. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  151. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  152. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  153. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  154. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  155. package/lib/cjs/serialization/IModelJsonSchema.d.ts +2 -7
  156. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  157. package/lib/cjs/serialization/IModelJsonSchema.js +2 -7
  158. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  159. package/lib/cjs/topology/ChainMerge.js +1 -1
  160. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  161. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  162. package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -1
  163. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  164. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +1 -1
  165. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  166. package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
  167. package/lib/cjs/topology/HalfEdgePriorityQueue.js +1 -1
  168. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  169. package/lib/cjs/topology/RegularizeFace.js +3 -3
  170. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  171. package/lib/cjs/topology/Triangulation.js +1 -1
  172. package/lib/cjs/topology/Triangulation.js.map +1 -1
  173. package/lib/esm/Geometry.js.map +1 -1
  174. package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
  175. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  176. package/lib/esm/bspline/BSplineCurve.js +1 -1
  177. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  178. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  179. package/lib/esm/bspline/BSplineSurface.js +1 -1
  180. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  181. package/lib/esm/bspline/BezierCurveBase.d.ts +1 -1
  182. package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
  183. package/lib/esm/bspline/BezierCurveBase.js +1 -1
  184. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  185. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  186. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  187. package/lib/esm/core-geometry.d.ts +3 -2
  188. package/lib/esm/core-geometry.d.ts.map +1 -1
  189. package/lib/esm/core-geometry.js +3 -3
  190. package/lib/esm/core-geometry.js.map +1 -1
  191. package/lib/esm/curve/Arc3d.d.ts +1 -1
  192. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  193. package/lib/esm/curve/Arc3d.js +1 -1
  194. package/lib/esm/curve/Arc3d.js.map +1 -1
  195. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +1 -1
  196. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  197. package/lib/esm/curve/CurveChainWithDistanceIndex.js +1 -1
  198. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  199. package/lib/esm/curve/CurveCollection.d.ts +2 -2
  200. package/lib/esm/curve/CurveCollection.js +2 -2
  201. package/lib/esm/curve/CurveCollection.js.map +1 -1
  202. package/lib/esm/curve/CurveCurve.js.map +1 -1
  203. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  204. package/lib/esm/curve/CurveOps.d.ts +77 -0
  205. package/lib/esm/curve/CurveOps.d.ts.map +1 -0
  206. package/lib/esm/curve/CurveOps.js +156 -0
  207. package/lib/esm/curve/CurveOps.js.map +1 -0
  208. package/lib/esm/curve/CurvePrimitive.d.ts +13 -13
  209. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  210. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  211. package/lib/esm/curve/GeometryQuery.d.ts +2 -2
  212. package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
  213. package/lib/esm/curve/GeometryQuery.js +2 -2
  214. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  215. package/lib/esm/curve/LineSegment3d.d.ts +1 -1
  216. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  217. package/lib/esm/curve/LineSegment3d.js +1 -1
  218. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  219. package/lib/esm/curve/LineString3d.d.ts +1 -1
  220. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  221. package/lib/esm/curve/LineString3d.js +1 -1
  222. package/lib/esm/curve/LineString3d.js.map +1 -1
  223. package/lib/esm/curve/Loop.js.map +1 -1
  224. package/lib/esm/curve/OffsetOptions.d.ts +97 -0
  225. package/lib/esm/curve/OffsetOptions.d.ts.map +1 -0
  226. package/lib/esm/curve/OffsetOptions.js +161 -0
  227. package/lib/esm/curve/OffsetOptions.js.map +1 -0
  228. package/lib/esm/curve/ProxyCurve.d.ts +1 -1
  229. package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
  230. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  231. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  232. package/lib/esm/curve/RegionOps.d.ts +10 -13
  233. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  234. package/lib/esm/curve/RegionOps.js +17 -18
  235. package/lib/esm/curve/RegionOps.js.map +1 -1
  236. package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -2
  237. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  238. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  239. package/lib/esm/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
  240. package/lib/esm/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
  241. package/lib/esm/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
  242. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -0
  243. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +59 -74
  244. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  245. package/lib/esm/curve/internalContexts/MultiChainCollector.js +129 -221
  246. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  247. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  248. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +6 -100
  249. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  250. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +9 -162
  251. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  252. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -1
  253. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  254. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +1 -1
  255. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  256. package/lib/esm/curve/spiral/TransitionSpiral3d.js +1 -1
  257. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  258. package/lib/esm/curve/spiral/XYCurveEvaluator.js +1 -1
  259. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  260. package/lib/esm/geometry3d/Angle.js.map +1 -1
  261. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  262. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  263. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  264. package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
  265. package/lib/esm/geometry3d/GrowableBlockedArray.js +1 -1
  266. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  267. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  268. package/lib/esm/geometry3d/GrowableFloat64Array.js +1 -1
  269. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  270. package/lib/esm/geometry3d/Matrix3d.js +5 -5
  271. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  272. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  273. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  274. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  275. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  276. package/lib/esm/geometry3d/Point2dVector2d.d.ts +8 -9
  277. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  278. package/lib/esm/geometry3d/Point2dVector2d.js +9 -10
  279. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  280. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  281. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  282. package/lib/esm/geometry3d/Point3dVector3d.js +5 -5
  283. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  284. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  285. package/lib/esm/geometry3d/PointHelpers.js +5 -5
  286. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  287. package/lib/esm/geometry3d/PolygonOps.d.ts +1 -2
  288. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  289. package/lib/esm/geometry3d/PolygonOps.js +2 -3
  290. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  291. package/lib/esm/geometry3d/Range.js.map +1 -1
  292. package/lib/esm/geometry3d/Ray2d.d.ts +69 -0
  293. package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -0
  294. package/lib/esm/geometry3d/Ray2d.js +142 -0
  295. package/lib/esm/geometry3d/Ray2d.js.map +1 -0
  296. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  297. package/lib/esm/geometry3d/Transform.js +3 -3
  298. package/lib/esm/geometry3d/Transform.js.map +1 -1
  299. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  300. package/lib/esm/numerics/ConvexPolygon2d.d.ts +7 -49
  301. package/lib/esm/numerics/ConvexPolygon2d.d.ts.map +1 -1
  302. package/lib/esm/numerics/ConvexPolygon2d.js +14 -104
  303. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  304. package/lib/esm/numerics/Newton.js.map +1 -1
  305. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  306. package/lib/esm/numerics/Polynomials.js +0 -2
  307. package/lib/esm/numerics/Polynomials.js.map +1 -1
  308. package/lib/esm/numerics/Quadrature.js +5 -5
  309. package/lib/esm/numerics/Quadrature.js.map +1 -1
  310. package/lib/esm/polyface/IndexedEdgeMatcher.js +1 -1
  311. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  312. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  313. package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
  314. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  315. package/lib/esm/polyface/PolyfaceQuery.d.ts +10 -7
  316. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  317. package/lib/esm/polyface/PolyfaceQuery.js +14 -13
  318. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  319. package/lib/esm/polyface/TaggedNumericData.js +1 -1
  320. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  321. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
  322. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  323. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  324. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  325. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  326. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  327. package/lib/esm/serialization/IModelJsonSchema.d.ts +2 -7
  328. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  329. package/lib/esm/serialization/IModelJsonSchema.js +2 -7
  330. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  331. package/lib/esm/topology/ChainMerge.js +1 -1
  332. package/lib/esm/topology/ChainMerge.js.map +1 -1
  333. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  334. package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -1
  335. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  336. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +1 -1
  337. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  338. package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
  339. package/lib/esm/topology/HalfEdgePriorityQueue.js +1 -1
  340. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  341. package/lib/esm/topology/RegularizeFace.js +3 -3
  342. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  343. package/lib/esm/topology/Triangulation.js +1 -1
  344. package/lib/esm/topology/Triangulation.js.map +1 -1
  345. package/package.json +5 -16
  346. package/lib/cjs/curve/ChainCollectorContext.d.ts.map +0 -1
  347. package/lib/cjs/curve/ChainCollectorContext.js.map +0 -1
  348. package/lib/esm/curve/ChainCollectorContext.d.ts.map +0 -1
  349. package/lib/esm/curve/ChainCollectorContext.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Loop.js","sourceRoot":"","sources":["../../../src/curve/Loop.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAS/F,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,YAAY,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AAC;IACtB,CAAC;CACF","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\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { AnyCurve } from \"./CurveChain\";\r\nimport { CurveChain } from \"./CurveCollection\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * A `Loop` is a curve chain that is the boundary of a closed (planar) loop.\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport class Loop extends CurveChain {\r\n /** String name for schema properties */\r\n public readonly curveCollectionType = \"loop\";\r\n /** Tag value that can be set to true for user code to mark inner and outer loops. */\r\n public override isInner: boolean = false;\r\n /** Test if `other` is a `Loop` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof Loop;\r\n }\r\n /** Test if `other` is an instance of `Loop` */\r\n public constructor() {\r\n super();\r\n }\r\n /**\r\n * Create a loop from variable length list of CurvePrimitives\r\n * @param curves array of individual curve primitives\r\n */\r\n public static create(...curves: CurvePrimitive[]): Loop {\r\n const result = new Loop();\r\n for (const curve of curves) {\r\n result.children.push(curve);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Create a loop from an array of curve primitives\r\n * @param curves array of individual curve primitives\r\n */\r\n public static createArray(curves: CurvePrimitive[]): Loop {\r\n const result = new Loop();\r\n for (const curve of curves) {\r\n result.children.push(curve);\r\n }\r\n return result;\r\n }\r\n /** Create a loop from an array of points */\r\n public static createPolygon(points: IndexedXYZCollection | Point3d[]): Loop {\r\n const linestring = LineString3d.create(points);\r\n linestring.addClosurePoint();\r\n return Loop.create(linestring);\r\n }\r\n /** Create a loop with the stroked form of this loop. */\r\n public cloneStroked(options?: StrokeOptions): AnyCurve {\r\n const strokes = LineString3d.create();\r\n for (const curve of this.children)\r\n curve.emitStrokes(strokes, options);\r\n // eliminate near-duplicate points between children\r\n strokes.removeDuplicatePoints();\r\n if (strokes.isPhysicallyClosed) {\r\n strokes.popPoint();\r\n strokes.addClosurePoint();\r\n }\r\n return Loop.create(strokes);\r\n }\r\n /** Return the boundary type (2) of a corresponding MicroStation CurveVector */\r\n public dgnBoundaryType(): number {\r\n /**\r\n * All \"Loop\" become \"outer\". TypeScript Loop object is equivalent to a native CurveVector with\r\n * boundaryType = BOUNDARY_TYPE_Outer. In other words, TypeScript has no flavor of Loop that\r\n * carries \"hole\" semantics.\r\n */\r\n return 2;\r\n }\r\n /** Invoke `processor.announceLoop(this, indexInParent)` */\r\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\r\n return processor.announceLoop(this, indexInParent);\r\n }\r\n /** Create a new `Loop` with no children */\r\n public cloneEmptyPeer(): Loop {\r\n return new Loop();\r\n }\r\n /** Second step of double dispatch: call `handler.handleLoop(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleLoop(this);\r\n }\r\n}\r\n\r\n/**\r\n * Structure carrying a pair of loops with curve geometry.\r\n * @public\r\n */\r\nexport class LoopCurveLoopCurve {\r\n /** First loop */\r\n public loopA?: Loop;\r\n /** A curve (typically an edge of loopA) */\r\n public curveA?: CurvePrimitive;\r\n /** second loop */\r\n public loopB?: Loop;\r\n /** A curve (typically an edge of loopB) */\r\n public curveB?: CurvePrimitive;\r\n /** Constructor */\r\n public constructor(\r\n loopA: Loop | undefined, curveA: CurvePrimitive | undefined, loopB: Loop | undefined, curveB: CurvePrimitive | undefined\r\n ) {\r\n this.loopA = loopA;\r\n this.curveA = curveA;\r\n this.loopB = loopB;\r\n this.curveB = curveB;\r\n }\r\n /** Set the loopA and curveA members */\r\n public setA(loop: Loop, curve: CurvePrimitive) {\r\n this.loopA = loop;\r\n this.curveA = curve;\r\n }\r\n /** Set the loopB and curveB members */\r\n public setB(loop: Loop, curve: CurvePrimitive) {\r\n this.loopB = loop;\r\n this.curveB = curve;\r\n }\r\n}\r\n\r\n/**\r\n * Carrier object for loops characterized by area sign\r\n * @public\r\n */\r\nexport interface SignedLoops {\r\n /** Array of loops that have positive area sign (i.e. counterclockwise loops). */\r\n positiveAreaLoops: Loop[];\r\n /** Array of loops that have negative area sign (i.e. clockwise loops). */\r\n negativeAreaLoops: Loop[];\r\n /** Slivers where there are coincident sections of input curves. */\r\n slivers: Loop[];\r\n /** Array indicating edges between loops */\r\n edges?: LoopCurveLoopCurve[];\r\n}\r\n"]}
1
+ {"version":3,"file":"Loop.js","sourceRoot":"","sources":["../../../src/curve/Loop.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAS/F,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;GAIG;AACH,MAAM,OAAO,IAAK,SAAQ,UAAU;IAKlC,kCAAkC;IAC3B,mBAAmB,CAAC,KAAoB;QAC7C,OAAO,KAAK,YAAY,IAAI,CAAC;IAC/B,CAAC;IACD,+CAA+C;IAC/C;QACE,KAAK,EAAE,CAAC;QAVV,wCAAwC;QACxB,wBAAmB,GAAG,MAAM,CAAC;QAC7C,qFAAqF;QACrE,YAAO,GAAY,KAAK,CAAC;IAQzC,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,MAAM,CAAC,GAAG,MAAwB;QAC9C,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QAC1B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YAC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IACD,2CAA2C;IACpC,cAAc;QACnB,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;IACD,uEAAuE;IAChE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAS7B,kBAAkB;IAClB,YACE,KAAuB,EAAE,MAAkC,EAAE,KAAuB,EAAE,MAAkC;QAExH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,uCAAuC;IAChC,IAAI,CAAC,IAAU,EAAE,KAAqB;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,uCAAuC;IAChC,IAAI,CAAC,IAAU,EAAE,KAAqB;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;CACF","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\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { IndexedXYZCollection } from \"../geometry3d/IndexedXYZCollection\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { AnyCurve } from \"./CurveChain\";\r\nimport { CurveChain } from \"./CurveCollection\";\r\nimport { CurvePrimitive } from \"./CurvePrimitive\";\r\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\r\nimport { GeometryQuery } from \"./GeometryQuery\";\r\nimport { LineString3d } from \"./LineString3d\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * A `Loop` is a curve chain that is the boundary of a closed (planar) loop.\r\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\r\n * @public\r\n */\r\nexport class Loop extends CurveChain {\r\n /** String name for schema properties */\r\n public readonly curveCollectionType = \"loop\";\r\n /** Tag value that can be set to true for user code to mark inner and outer loops. */\r\n public override isInner: boolean = false;\r\n /** Test if `other` is a `Loop` */\r\n public isSameGeometryClass(other: GeometryQuery): boolean {\r\n return other instanceof Loop;\r\n }\r\n /** Test if `other` is an instance of `Loop` */\r\n public constructor() {\r\n super();\r\n }\r\n /**\r\n * Create a loop from variable length list of CurvePrimitives\r\n * @param curves array of individual curve primitives\r\n */\r\n public static create(...curves: CurvePrimitive[]): Loop {\r\n const result = new Loop();\r\n for (const curve of curves) {\r\n result.children.push(curve);\r\n }\r\n return result;\r\n }\r\n /**\r\n * Create a loop from an array of curve primitives\r\n * @param curves array of individual curve primitives\r\n */\r\n public static createArray(curves: CurvePrimitive[]): Loop {\r\n const result = new Loop();\r\n for (const curve of curves) {\r\n result.children.push(curve);\r\n }\r\n return result;\r\n }\r\n /** Create a loop from an array of points */\r\n public static createPolygon(points: IndexedXYZCollection | Point3d[]): Loop {\r\n const linestring = LineString3d.create(points);\r\n linestring.addClosurePoint();\r\n return Loop.create(linestring);\r\n }\r\n /** Create a loop with the stroked form of this loop. */\r\n public cloneStroked(options?: StrokeOptions): AnyCurve {\r\n const strokes = LineString3d.create();\r\n for (const curve of this.children)\r\n curve.emitStrokes(strokes, options);\r\n // eliminate near-duplicate points between children\r\n strokes.removeDuplicatePoints();\r\n if (strokes.isPhysicallyClosed) {\r\n strokes.popPoint();\r\n strokes.addClosurePoint();\r\n }\r\n return Loop.create(strokes);\r\n }\r\n /** Return the boundary type (2) of a corresponding MicroStation CurveVector */\r\n public dgnBoundaryType(): number {\r\n /**\r\n * All \"Loop\" become \"outer\". TypeScript Loop object is equivalent to a native CurveVector with\r\n * boundaryType = BOUNDARY_TYPE_Outer. In other words, TypeScript has no flavor of Loop that\r\n * carries \"hole\" semantics.\r\n */\r\n return 2;\r\n }\r\n /** Invoke `processor.announceLoop(this, indexInParent)` */\r\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\r\n return processor.announceLoop(this, indexInParent);\r\n }\r\n /** Create a new `Loop` with no children */\r\n public cloneEmptyPeer(): Loop {\r\n return new Loop();\r\n }\r\n /** Second step of double dispatch: call `handler.handleLoop(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleLoop(this);\r\n }\r\n}\r\n\r\n/**\r\n * Structure carrying a pair of loops with curve geometry.\r\n * @public\r\n */\r\nexport class LoopCurveLoopCurve {\r\n /** First loop */\r\n public loopA?: Loop;\r\n /** A curve (typically an edge of loopA) */\r\n public curveA?: CurvePrimitive;\r\n /** second loop */\r\n public loopB?: Loop;\r\n /** A curve (typically an edge of loopB) */\r\n public curveB?: CurvePrimitive;\r\n /** Constructor */\r\n public constructor(\r\n loopA: Loop | undefined, curveA: CurvePrimitive | undefined, loopB: Loop | undefined, curveB: CurvePrimitive | undefined,\r\n ) {\r\n this.loopA = loopA;\r\n this.curveA = curveA;\r\n this.loopB = loopB;\r\n this.curveB = curveB;\r\n }\r\n /** Set the loopA and curveA members */\r\n public setA(loop: Loop, curve: CurvePrimitive) {\r\n this.loopA = loop;\r\n this.curveA = curve;\r\n }\r\n /** Set the loopB and curveB members */\r\n public setB(loop: Loop, curve: CurvePrimitive) {\r\n this.loopB = loop;\r\n this.curveB = curve;\r\n }\r\n}\r\n\r\n/**\r\n * Carrier object for loops characterized by area sign\r\n * @public\r\n */\r\nexport interface SignedLoops {\r\n /** Array of loops that have positive area sign (i.e. counterclockwise loops). */\r\n positiveAreaLoops: Loop[];\r\n /** Array of loops that have negative area sign (i.e. clockwise loops). */\r\n negativeAreaLoops: Loop[];\r\n /** Slivers where there are coincident sections of input curves. */\r\n slivers: Loop[];\r\n /** Array indicating edges between loops */\r\n edges?: LoopCurveLoopCurve[];\r\n}\r\n"]}
@@ -0,0 +1,97 @@
1
+ /** @packageDocumentation
2
+ * @module Curve
3
+ */
4
+ import { Angle } from "../geometry3d/Angle";
5
+ import { StrokeOptions } from "./StrokeOptions";
6
+ /**
7
+ * Control parameters for joint construction, used in offset construction methods such as [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].
8
+ * * Define a "joint" as the common point between adjacent segments of the input curve.
9
+ * * Define the "turn angle" at a joint to be the angle in [0,pi] between the first derivatives (tangents) of
10
+ * the segments at the joint.
11
+ * * When creating offsets, if an offset needs to do an "outside" turn, the first applicable construction is applied:
12
+ * * If the turn angle is larger than `options.minArcDegrees`, a circular arc is constructed to offset the joint.
13
+ * * If the turn angle is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to
14
+ * single intersection point (to create a sharp corner).
15
+ * * If the turn angle is larger than `options.maxChamferDegrees`, the joint is offset with a line string whose edges:
16
+ * * lie outside the arc that would have been created by the first construction
17
+ * * have uniform turn angle less than `options.maxChamferDegrees`
18
+ * * touch the arc at their midpoint (except first and last edge).
19
+ * @public
20
+ */
21
+ export declare class JointOptions {
22
+ /**
23
+ * Smallest arc to construct.
24
+ * * If this control angle is 180 degrees or more, arcs are never created.
25
+ */
26
+ minArcDegrees: number;
27
+ /** Largest turn angle at which to construct a sharp corner, or largest turn angle in a multi-segment chamfer. */
28
+ maxChamferTurnDegrees: number;
29
+ /**
30
+ * Whether to remove the internal turn angle upper bound for sharp corner construction.
31
+ * * By default, a sharp corner is not created at a joint when the turn angle is too large, so as to avoid offsets whose
32
+ * ranges blow up. Internally, this is implemented by applying an upper bound of 120 degrees to `maxChamferTurnDegrees`.
33
+ * * When `allowSharpestCorners` is true, this internal upper bound is removed, allowing sharp corners for turn angles
34
+ * up to `maxChamferTurnDegrees`.
35
+ * * Thus, if you know your input turn angles are no greater than `maxChamferTurnDegrees`, you can create an offset with
36
+ * sharp corners at each joint by setting `maxChamferTurnDegrees < minArcDegrees` and `allowSharpestCorners` to true.
37
+ */
38
+ allowSharpestCorners: boolean;
39
+ /** Offset distance, positive to left of base curve. */
40
+ leftOffsetDistance: number;
41
+ /** Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default). */
42
+ preserveEllipticalArcs: boolean;
43
+ /**
44
+ * Construct JointOptions.
45
+ * * leftOffsetDistance is required
46
+ * * minArcDegrees and maxChamferDegrees are optional.
47
+ */
48
+ constructor(leftOffsetDistance: number, minArcDegrees?: number, maxChamferDegrees?: number, preserveEllipticalArcs?: boolean, allowSharpestCorners?: boolean);
49
+ /** Return a deep clone. */
50
+ clone(): JointOptions;
51
+ /** Copy values of input options */
52
+ setFrom(other: JointOptions): void;
53
+ /**
54
+ * Parse a number or JointOptions up to JointOptions:
55
+ * * If leftOffsetDistanceOptions is a number, create a JointOptions with other options set to default values.
56
+ * * If leftOffsetDistanceOrOptions is a JointOptions, return it unchanged.
57
+ * @param leftOffsetDistanceOrOptions
58
+ */
59
+ static create(leftOffsetDistanceOrOptions: number | JointOptions): JointOptions;
60
+ /** Return true if the options indicate this amount of turn should be handled with an arc. */
61
+ needArc(theta: Angle): boolean;
62
+ /** Return the number of corners needed to chamfer the given turn angle. */
63
+ numChamferPoints(theta: Angle): number;
64
+ }
65
+ /**
66
+ * Options for offsetting a curve, used in offset construction methods such as [[CurvePrimitive.constructOffsetXY]], [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].
67
+ * @public
68
+ */
69
+ export declare class OffsetOptions {
70
+ /** Options for offsetting and joining CurvePrimitives */
71
+ jointOptions: JointOptions;
72
+ /** Options for generating a B-spline curve offset */
73
+ strokeOptions: StrokeOptions;
74
+ /** Options that are provided are captured. */
75
+ constructor(offsetDistanceOrOptions: number | JointOptions, strokeOptions?: StrokeOptions);
76
+ get minArcDegrees(): number;
77
+ set minArcDegrees(value: number);
78
+ get maxChamferTurnDegrees(): number;
79
+ set maxChamferTurnDegrees(value: number);
80
+ get allowSharpestCorners(): boolean;
81
+ set allowSharpestCorners(value: boolean);
82
+ get leftOffsetDistance(): number;
83
+ set leftOffsetDistance(value: number);
84
+ get preserveEllipticalArcs(): boolean;
85
+ set preserveEllipticalArcs(value: boolean);
86
+ /**
87
+ * Convert variant input into OffsetOptions.
88
+ * * If a JointOptions is provided, it is captured.
89
+ * * If an OffsetOptions is provided, a reference to it is returned.
90
+ */
91
+ static create(offsetDistanceOrOptions: number | JointOptions | OffsetOptions): OffsetOptions;
92
+ /** Convert variant input into offset distance */
93
+ static getOffsetDistance(offsetDistanceOrOptions: number | JointOptions | OffsetOptions): number;
94
+ /** Return a deep clone. */
95
+ clone(): OffsetOptions;
96
+ }
97
+ //# sourceMappingURL=OffsetOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffsetOptions.d.ts","sourceRoot":"","sources":["../../../src/curve/OffsetOptions.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,YAAY;IACvB;;;OAGG;IACI,aAAa,SAAS;IAC7B,iHAAiH;IAC1G,qBAAqB,SAAM;IAClC;;;;;;;;OAQG;IACI,oBAAoB,UAAS;IACpC,uDAAuD;IAChD,kBAAkB,EAAE,MAAM,CAAK;IACtC,0GAA0G;IACnG,sBAAsB,UAAS;IACtC;;;;OAIG;gBAED,kBAAkB,EAAE,MAAM,EAAE,aAAa,SAAM,EAAE,iBAAiB,SAAK,EACvE,sBAAsB,UAAQ,EAAE,oBAAoB,UAAQ;IAQ9D,2BAA2B;IACpB,KAAK,IAAI,YAAY;IAM5B,mCAAmC;IAC5B,OAAO,CAAC,KAAK,EAAE,YAAY;IAOlC;;;;;OAKG;WACW,MAAM,CAAC,2BAA2B,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY;IAKtF,6FAA6F;IACtF,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAGrC,2EAA2E;IACpE,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;CAY9C;AAED;;;GAGG;AACH,qBAAa,aAAa;IACxB,yDAAyD;IAClD,YAAY,EAAE,YAAY,CAAC;IAClC,qDAAqD;IAC9C,aAAa,EAAE,aAAa,CAAC;IACpC,8CAA8C;gBAClC,uBAAuB,EAAE,MAAM,GAAG,YAAY,EAAE,aAAa,CAAC,EAAE,aAAa;IAIzF,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,IAAW,aAAa,CAAC,KAAK,EAAE,MAAM,EAErC;IACD,IAAW,qBAAqB,IAAI,MAAM,CAEzC;IACD,IAAW,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAE7C;IACD,IAAW,oBAAoB,IAAI,OAAO,CAEzC;IACD,IAAW,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAE7C;IACD,IAAW,kBAAkB,IAAI,MAAM,CAEtC;IACD,IAAW,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAE1C;IACD,IAAW,sBAAsB,IAAI,OAAO,CAE3C;IACD,IAAW,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAE/C;IACD;;;;OAIG;WACW,MAAM,CAAC,uBAAuB,EAAE,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa;IAKnG,iDAAiD;WACnC,iBAAiB,CAAC,uBAAuB,EAAE,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM;IAKvG,2BAA2B;IACpB,KAAK,IAAI,aAAa;CAG9B"}
@@ -0,0 +1,161 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Curve
7
+ */
8
+ import { Geometry } from "../Geometry";
9
+ import { StrokeOptions } from "./StrokeOptions";
10
+ /**
11
+ * Control parameters for joint construction, used in offset construction methods such as [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].
12
+ * * Define a "joint" as the common point between adjacent segments of the input curve.
13
+ * * Define the "turn angle" at a joint to be the angle in [0,pi] between the first derivatives (tangents) of
14
+ * the segments at the joint.
15
+ * * When creating offsets, if an offset needs to do an "outside" turn, the first applicable construction is applied:
16
+ * * If the turn angle is larger than `options.minArcDegrees`, a circular arc is constructed to offset the joint.
17
+ * * If the turn angle is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to
18
+ * single intersection point (to create a sharp corner).
19
+ * * If the turn angle is larger than `options.maxChamferDegrees`, the joint is offset with a line string whose edges:
20
+ * * lie outside the arc that would have been created by the first construction
21
+ * * have uniform turn angle less than `options.maxChamferDegrees`
22
+ * * touch the arc at their midpoint (except first and last edge).
23
+ * @public
24
+ */
25
+ export class JointOptions {
26
+ /**
27
+ * Construct JointOptions.
28
+ * * leftOffsetDistance is required
29
+ * * minArcDegrees and maxChamferDegrees are optional.
30
+ */
31
+ constructor(leftOffsetDistance, minArcDegrees = 180, maxChamferDegrees = 90, preserveEllipticalArcs = false, allowSharpestCorners = false) {
32
+ /**
33
+ * Smallest arc to construct.
34
+ * * If this control angle is 180 degrees or more, arcs are never created.
35
+ */
36
+ this.minArcDegrees = 180.0;
37
+ /** Largest turn angle at which to construct a sharp corner, or largest turn angle in a multi-segment chamfer. */
38
+ this.maxChamferTurnDegrees = 90;
39
+ /**
40
+ * Whether to remove the internal turn angle upper bound for sharp corner construction.
41
+ * * By default, a sharp corner is not created at a joint when the turn angle is too large, so as to avoid offsets whose
42
+ * ranges blow up. Internally, this is implemented by applying an upper bound of 120 degrees to `maxChamferTurnDegrees`.
43
+ * * When `allowSharpestCorners` is true, this internal upper bound is removed, allowing sharp corners for turn angles
44
+ * up to `maxChamferTurnDegrees`.
45
+ * * Thus, if you know your input turn angles are no greater than `maxChamferTurnDegrees`, you can create an offset with
46
+ * sharp corners at each joint by setting `maxChamferTurnDegrees < minArcDegrees` and `allowSharpestCorners` to true.
47
+ */
48
+ this.allowSharpestCorners = false;
49
+ /** Offset distance, positive to left of base curve. */
50
+ this.leftOffsetDistance = 0;
51
+ /** Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default). */
52
+ this.preserveEllipticalArcs = false;
53
+ this.leftOffsetDistance = leftOffsetDistance;
54
+ this.minArcDegrees = minArcDegrees;
55
+ this.maxChamferTurnDegrees = maxChamferDegrees;
56
+ this.preserveEllipticalArcs = preserveEllipticalArcs;
57
+ this.allowSharpestCorners = allowSharpestCorners;
58
+ }
59
+ /** Return a deep clone. */
60
+ clone() {
61
+ return new JointOptions(this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees, this.preserveEllipticalArcs, this.allowSharpestCorners);
62
+ }
63
+ /** Copy values of input options */
64
+ setFrom(other) {
65
+ this.leftOffsetDistance = other.leftOffsetDistance;
66
+ this.minArcDegrees = other.minArcDegrees;
67
+ this.maxChamferTurnDegrees = other.maxChamferTurnDegrees;
68
+ this.preserveEllipticalArcs = other.preserveEllipticalArcs;
69
+ this.allowSharpestCorners = other.allowSharpestCorners;
70
+ }
71
+ /**
72
+ * Parse a number or JointOptions up to JointOptions:
73
+ * * If leftOffsetDistanceOptions is a number, create a JointOptions with other options set to default values.
74
+ * * If leftOffsetDistanceOrOptions is a JointOptions, return it unchanged.
75
+ * @param leftOffsetDistanceOrOptions
76
+ */
77
+ static create(leftOffsetDistanceOrOptions) {
78
+ if (leftOffsetDistanceOrOptions instanceof JointOptions)
79
+ return leftOffsetDistanceOrOptions;
80
+ return new JointOptions(leftOffsetDistanceOrOptions);
81
+ }
82
+ /** Return true if the options indicate this amount of turn should be handled with an arc. */
83
+ needArc(theta) {
84
+ return Math.abs(theta.degrees) >= this.minArcDegrees;
85
+ }
86
+ /** Return the number of corners needed to chamfer the given turn angle. */
87
+ numChamferPoints(theta) {
88
+ const degrees = Math.abs(theta.degrees);
89
+ const minStepDegreesClamp = 10;
90
+ let maxStepDegreesClamp = 120;
91
+ if (this.allowSharpestCorners) {
92
+ maxStepDegreesClamp = this.maxChamferTurnDegrees;
93
+ }
94
+ const stepDegrees = Geometry.clamp(this.maxChamferTurnDegrees, minStepDegreesClamp, maxStepDegreesClamp);
95
+ if (degrees <= stepDegrees)
96
+ return 1;
97
+ return Math.ceil(degrees / stepDegrees);
98
+ }
99
+ }
100
+ /**
101
+ * Options for offsetting a curve, used in offset construction methods such as [[CurvePrimitive.constructOffsetXY]], [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].
102
+ * @public
103
+ */
104
+ export class OffsetOptions {
105
+ /** Options that are provided are captured. */
106
+ constructor(offsetDistanceOrOptions, strokeOptions) {
107
+ this.jointOptions = JointOptions.create(offsetDistanceOrOptions);
108
+ this.strokeOptions = (strokeOptions !== undefined) ? strokeOptions : StrokeOptions.createForCurves();
109
+ }
110
+ get minArcDegrees() {
111
+ return this.jointOptions.minArcDegrees;
112
+ }
113
+ set minArcDegrees(value) {
114
+ this.jointOptions.minArcDegrees = value;
115
+ }
116
+ get maxChamferTurnDegrees() {
117
+ return this.jointOptions.maxChamferTurnDegrees;
118
+ }
119
+ set maxChamferTurnDegrees(value) {
120
+ this.jointOptions.maxChamferTurnDegrees = value;
121
+ }
122
+ get allowSharpestCorners() {
123
+ return this.jointOptions.allowSharpestCorners;
124
+ }
125
+ set allowSharpestCorners(value) {
126
+ this.jointOptions.allowSharpestCorners = value;
127
+ }
128
+ get leftOffsetDistance() {
129
+ return this.jointOptions.leftOffsetDistance;
130
+ }
131
+ set leftOffsetDistance(value) {
132
+ this.jointOptions.leftOffsetDistance = value;
133
+ }
134
+ get preserveEllipticalArcs() {
135
+ return this.jointOptions.preserveEllipticalArcs;
136
+ }
137
+ set preserveEllipticalArcs(value) {
138
+ this.jointOptions.preserveEllipticalArcs = value;
139
+ }
140
+ /**
141
+ * Convert variant input into OffsetOptions.
142
+ * * If a JointOptions is provided, it is captured.
143
+ * * If an OffsetOptions is provided, a reference to it is returned.
144
+ */
145
+ static create(offsetDistanceOrOptions) {
146
+ if (offsetDistanceOrOptions instanceof OffsetOptions)
147
+ return offsetDistanceOrOptions;
148
+ return new OffsetOptions(offsetDistanceOrOptions);
149
+ }
150
+ /** Convert variant input into offset distance */
151
+ static getOffsetDistance(offsetDistanceOrOptions) {
152
+ if (typeof offsetDistanceOrOptions === "number")
153
+ return offsetDistanceOrOptions;
154
+ return offsetDistanceOrOptions.leftOffsetDistance;
155
+ }
156
+ /** Return a deep clone. */
157
+ clone() {
158
+ return new OffsetOptions(this.jointOptions.clone(), this.strokeOptions.clone());
159
+ }
160
+ }
161
+ //# sourceMappingURL=OffsetOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OffsetOptions.js","sourceRoot":"","sources":["../../../src/curve/OffsetOptions.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,YAAY;IAsBvB;;;;OAIG;IACH,YACE,kBAA0B,EAAE,aAAa,GAAG,GAAG,EAAE,iBAAiB,GAAG,EAAE,EACvE,sBAAsB,GAAG,KAAK,EAAE,oBAAoB,GAAG,KAAK;QA5B9D;;;WAGG;QACI,kBAAa,GAAG,KAAK,CAAC;QAC7B,iHAAiH;QAC1G,0BAAqB,GAAG,EAAE,CAAC;QAClC;;;;;;;;WAQG;QACI,yBAAoB,GAAG,KAAK,CAAC;QACpC,uDAAuD;QAChD,uBAAkB,GAAW,CAAC,CAAC;QACtC,0GAA0G;QACnG,2BAAsB,GAAG,KAAK,CAAC;QAUp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,CAAC;IACjD,CAAC;IACD,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC;IAC9C,CAAC;IACD,IAAW,kBAAkB,CAAC,KAAa;QACzC,IAAI,CAAC,YAAY,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAC/C,CAAC;IACD,IAAW,sBAAsB;QAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC;IAClD,CAAC;IACD,IAAW,sBAAsB,CAAC,KAAc;QAC9C,IAAI,CAAC,YAAY,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACnD,CAAC;IACD;;;;OAIG;IACI,MAAM,CAAC,MAAM,CAAC,uBAA8D;QACjF,IAAI,uBAAuB,YAAY,aAAa;YAClD,OAAO,uBAAuB,CAAC;QACjC,OAAO,IAAI,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IACD,iDAAiD;IAC1C,MAAM,CAAC,iBAAiB,CAAC,uBAA8D;QAC5F,IAAI,OAAO,uBAAuB,KAAK,QAAQ;YAC7C,OAAO,uBAAuB,CAAC;QACjC,OAAO,uBAAuB,CAAC,kBAAkB,CAAC;IACpD,CAAC;IACD,2BAA2B;IACpB,KAAK;QACV,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC;IAClF,CAAC;CACF","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/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Angle } from \"../geometry3d/Angle\";\r\nimport { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * Control parameters for joint construction, used in offset construction methods such as [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].\r\n * * Define a \"joint\" as the common point between adjacent segments of the input curve.\r\n * * Define the \"turn angle\" at a joint to be the angle in [0,pi] between the first derivatives (tangents) of\r\n * the segments at the joint.\r\n * * When creating offsets, if an offset needs to do an \"outside\" turn, the first applicable construction is applied:\r\n * * If the turn angle is larger than `options.minArcDegrees`, a circular arc is constructed to offset the joint.\r\n * * If the turn angle is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to\r\n * single intersection point (to create a sharp corner).\r\n * * If the turn angle is larger than `options.maxChamferDegrees`, the joint is offset with a line string whose edges:\r\n * * lie outside the arc that would have been created by the first construction\r\n * * have uniform turn angle less than `options.maxChamferDegrees`\r\n * * touch the arc at their midpoint (except first and last edge).\r\n * @public\r\n */\r\nexport class JointOptions {\r\n /**\r\n * Smallest arc to construct.\r\n * * If this control angle is 180 degrees or more, arcs are never created.\r\n */\r\n public minArcDegrees = 180.0;\r\n /** Largest turn angle at which to construct a sharp corner, or largest turn angle in a multi-segment chamfer. */\r\n public maxChamferTurnDegrees = 90;\r\n /**\r\n * Whether to remove the internal turn angle upper bound for sharp corner construction.\r\n * * By default, a sharp corner is not created at a joint when the turn angle is too large, so as to avoid offsets whose\r\n * ranges blow up. Internally, this is implemented by applying an upper bound of 120 degrees to `maxChamferTurnDegrees`.\r\n * * When `allowSharpestCorners` is true, this internal upper bound is removed, allowing sharp corners for turn angles\r\n * up to `maxChamferTurnDegrees`.\r\n * * Thus, if you know your input turn angles are no greater than `maxChamferTurnDegrees`, you can create an offset with\r\n * sharp corners at each joint by setting `maxChamferTurnDegrees < minArcDegrees` and `allowSharpestCorners` to true.\r\n */\r\n public allowSharpestCorners = false;\r\n /** Offset distance, positive to left of base curve. */\r\n public leftOffsetDistance: number = 0;\r\n /** Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default). */\r\n public preserveEllipticalArcs = false;\r\n /**\r\n * Construct JointOptions.\r\n * * leftOffsetDistance is required\r\n * * minArcDegrees and maxChamferDegrees are optional.\r\n */\r\n constructor(\r\n leftOffsetDistance: number, minArcDegrees = 180, maxChamferDegrees = 90,\r\n preserveEllipticalArcs = false, allowSharpestCorners = false,\r\n ) {\r\n this.leftOffsetDistance = leftOffsetDistance;\r\n this.minArcDegrees = minArcDegrees;\r\n this.maxChamferTurnDegrees = maxChamferDegrees;\r\n this.preserveEllipticalArcs = preserveEllipticalArcs;\r\n this.allowSharpestCorners = allowSharpestCorners;\r\n }\r\n /** Return a deep clone. */\r\n public clone(): JointOptions {\r\n return new JointOptions(\r\n this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees,\r\n this.preserveEllipticalArcs, this.allowSharpestCorners,\r\n );\r\n }\r\n /** Copy values of input options */\r\n public setFrom(other: JointOptions) {\r\n this.leftOffsetDistance = other.leftOffsetDistance;\r\n this.minArcDegrees = other.minArcDegrees;\r\n this.maxChamferTurnDegrees = other.maxChamferTurnDegrees;\r\n this.preserveEllipticalArcs = other.preserveEllipticalArcs;\r\n this.allowSharpestCorners = other.allowSharpestCorners;\r\n }\r\n /**\r\n * Parse a number or JointOptions up to JointOptions:\r\n * * If leftOffsetDistanceOptions is a number, create a JointOptions with other options set to default values.\r\n * * If leftOffsetDistanceOrOptions is a JointOptions, return it unchanged.\r\n * @param leftOffsetDistanceOrOptions\r\n */\r\n public static create(leftOffsetDistanceOrOptions: number | JointOptions): JointOptions {\r\n if (leftOffsetDistanceOrOptions instanceof JointOptions)\r\n return leftOffsetDistanceOrOptions;\r\n return new JointOptions(leftOffsetDistanceOrOptions);\r\n }\r\n /** Return true if the options indicate this amount of turn should be handled with an arc. */\r\n public needArc(theta: Angle): boolean {\r\n return Math.abs(theta.degrees) >= this.minArcDegrees;\r\n }\r\n /** Return the number of corners needed to chamfer the given turn angle. */\r\n public numChamferPoints(theta: Angle): number {\r\n const degrees = Math.abs(theta.degrees);\r\n const minStepDegreesClamp = 10;\r\n let maxStepDegreesClamp = 120;\r\n if (this.allowSharpestCorners) {\r\n maxStepDegreesClamp = this.maxChamferTurnDegrees;\r\n }\r\n const stepDegrees = Geometry.clamp(this.maxChamferTurnDegrees, minStepDegreesClamp, maxStepDegreesClamp);\r\n if (degrees <= stepDegrees)\r\n return 1;\r\n return Math.ceil(degrees / stepDegrees);\r\n }\r\n}\r\n\r\n/**\r\n * Options for offsetting a curve, used in offset construction methods such as [[CurvePrimitive.constructOffsetXY]], [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].\r\n * @public\r\n */\r\nexport class OffsetOptions {\r\n /** Options for offsetting and joining CurvePrimitives */\r\n public jointOptions: JointOptions;\r\n /** Options for generating a B-spline curve offset */\r\n public strokeOptions: StrokeOptions;\r\n /** Options that are provided are captured. */\r\n constructor(offsetDistanceOrOptions: number | JointOptions, strokeOptions?: StrokeOptions) {\r\n this.jointOptions = JointOptions.create(offsetDistanceOrOptions);\r\n this.strokeOptions = (strokeOptions !== undefined) ? strokeOptions : StrokeOptions.createForCurves();\r\n }\r\n public get minArcDegrees(): number {\r\n return this.jointOptions.minArcDegrees;\r\n }\r\n public set minArcDegrees(value: number) {\r\n this.jointOptions.minArcDegrees = value;\r\n }\r\n public get maxChamferTurnDegrees(): number {\r\n return this.jointOptions.maxChamferTurnDegrees;\r\n }\r\n public set maxChamferTurnDegrees(value: number) {\r\n this.jointOptions.maxChamferTurnDegrees = value;\r\n }\r\n public get allowSharpestCorners(): boolean {\r\n return this.jointOptions.allowSharpestCorners;\r\n }\r\n public set allowSharpestCorners(value: boolean) {\r\n this.jointOptions.allowSharpestCorners = value;\r\n }\r\n public get leftOffsetDistance(): number {\r\n return this.jointOptions.leftOffsetDistance;\r\n }\r\n public set leftOffsetDistance(value: number) {\r\n this.jointOptions.leftOffsetDistance = value;\r\n }\r\n public get preserveEllipticalArcs(): boolean {\r\n return this.jointOptions.preserveEllipticalArcs;\r\n }\r\n public set preserveEllipticalArcs(value: boolean) {\r\n this.jointOptions.preserveEllipticalArcs = value;\r\n }\r\n /**\r\n * Convert variant input into OffsetOptions.\r\n * * If a JointOptions is provided, it is captured.\r\n * * If an OffsetOptions is provided, a reference to it is returned.\r\n */\r\n public static create(offsetDistanceOrOptions: number | JointOptions | OffsetOptions): OffsetOptions {\r\n if (offsetDistanceOrOptions instanceof OffsetOptions)\r\n return offsetDistanceOrOptions;\r\n return new OffsetOptions(offsetDistanceOrOptions);\r\n }\r\n /** Convert variant input into offset distance */\r\n public static getOffsetDistance(offsetDistanceOrOptions: number | JointOptions | OffsetOptions): number {\r\n if (typeof offsetDistanceOrOptions === \"number\")\r\n return offsetDistanceOrOptions;\r\n return offsetDistanceOrOptions.leftOffsetDistance;\r\n }\r\n /** Return a deep clone. */\r\n public clone(): OffsetOptions {\r\n return new OffsetOptions(this.jointOptions.clone(), this.strokeOptions.clone());\r\n }\r\n}\r\n"]}
@@ -9,7 +9,7 @@ import type { Ray3d } from "../geometry3d/Ray3d";
9
9
  import type { Transform } from "../geometry3d/Transform";
10
10
  import type { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
11
11
  import type { Range1d, Range3d } from "../geometry3d/Range";
12
- import type { OffsetOptions } from "./internalContexts/PolygonOffsetContext";
12
+ import type { OffsetOptions } from "./OffsetOptions";
13
13
  import type { LineString3d } from "./LineString3d";
14
14
  import type { StrokeOptions } from "./StrokeOptions";
15
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ProxyCurve.d.ts","sourceRoot":"","sources":["../../../src/curve/ProxyCurve.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAq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AA8B,CACnC,QAAgB,EAAE,MAAkC;QAEpD,OAAO,IAAI,CAAC,WAAW,CAAC,8BAA8B,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3E,CAAC;IACD,8BAA8B;IACvB,SAAS,CAAC,KAAmC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,8BAA8B;IACvB,WAAW;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IACxC,CAAC;IACD,8BAA8B;IACd,iBAAiB,CAC/B,uBAA+C;QAE/C,OAAO,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;IACrE,CAAC;IACD,8BAA8B;IACd,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF","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 { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\n\r\nimport type { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\r\nimport type { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\r\nimport type { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\r\nimport type { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport type { Transform } from \"../geometry3d/Transform\";\r\nimport type { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport type { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport type { OffsetOptions } from \"./internalContexts/PolygonOffsetContext\";\r\nimport type { LineString3d } from \"./LineString3d\";\r\nimport type { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * A ProxyCurve is expected to be used as a base class for curve types that use some existing curve (the proxy)\r\n * for evaluation and display but carry other defining data.\r\n * * The ProxyCurve implements all required CurvePrimitive methods by dispatching to the proxy.\r\n * * These methods presumably require support from the application class and are left abstract:\r\n * * clone\r\n * * curvePrimitiveType\r\n * * isSameCurvePrimitiveType\r\n * * isSameGeometryClass\r\n * * tryTransformInPlace\r\n * * reverseInPlace\r\n *\r\n * @public\r\n */\r\nexport abstract class ProxyCurve extends CurvePrimitive {\r\n public dispatchToGeometryHandler(handler: GeometryHandler) {\r\n return this._proxyCurve.dispatchToGeometryHandler(handler);\r\n }\r\n protected _proxyCurve: CurvePrimitive;\r\n /** Constructor CAPTURES the proxyCurve pointer */\r\n public constructor(proxyCurve: CurvePrimitive) {\r\n super();\r\n this._proxyCurve = proxyCurve;\r\n }\r\n /** Return the (pointer to) the proxy curve. */\r\n public get proxyCurve(): CurvePrimitive {\r\n return this._proxyCurve;\r\n }\r\n /** Implement by proxyCurve */\r\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\r\n return this._proxyCurve.computeStrokeCountForOptions(options);\r\n }\r\n /** Implement by proxyCurve */\r\n public emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void {\r\n this._proxyCurve.emitStrokableParts(dest, options);\r\n }\r\n /** Return a deep clone. This override removes the undefined variant return. */\r\n public abstract override clone(): ProxyCurve;\r\n /** Return a transformed clone. */\r\n public override cloneTransformed(transform: Transform): ProxyCurve | undefined {\r\n const myClone = this.clone();\r\n if (myClone.tryTransformInPlace(transform))\r\n return myClone;\r\n return undefined;\r\n }\r\n /** Implement by proxyCurve. Subclasses may eventually override this default implementation. */\r\n public override clonePartialCurve(fractionA: number, fractionB: number): CurvePrimitive | undefined {\r\n return this._proxyCurve.clonePartialCurve(fractionA, fractionB);\r\n }\r\n /** Implement by proxyCurve */\r\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\r\n this._proxyCurve.emitStrokes(dest, options);\r\n }\r\n /** Implement by proxyCurve */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n this._proxyCurve.extendRange(rangeToExtend, transform);\r\n }\r\n /** Implement by proxyCurve */\r\n public override range(transform?: Transform, result?: Range3d): Range3d {\r\n return this._proxyCurve.range(transform, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\r\n return this._proxyCurve.fractionToPoint(fraction, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\r\n return this._proxyCurve.fractionToPointAndDerivative(fraction, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public fractionToPointAnd2Derivatives(\r\n fraction: number, result?: Plane3dByOriginAndVectors\r\n ): Plane3dByOriginAndVectors | undefined {\r\n return this._proxyCurve.fractionToPointAnd2Derivatives(fraction, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\r\n return this._proxyCurve.isInPlane(plane);\r\n }\r\n /** Implement by proxyCurve */\r\n public quickLength(): number {\r\n return this._proxyCurve.quickLength();\r\n }\r\n /** Implement by proxyCurve */\r\n public override constructOffsetXY(\r\n offsetDistanceOrOptions: number | OffsetOptions\r\n ): CurvePrimitive | CurvePrimitive[] | undefined {\r\n return this._proxyCurve.constructOffsetXY(offsetDistanceOrOptions);\r\n }\r\n /** Implement by proxyCurve */\r\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\r\n return this._proxyCurve.projectedParameterRange(ray, lowHigh);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ProxyCurve.js","sourceRoot":"","sources":["../../../src/curve/ProxyCurve.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AA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AS,CAAC,CAAC;IACzD,CAAC;IACD,8BAA8B;IACd,KAAK,CAAC,SAAqB,EAAE,MAAgB;QAC3D,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IACD,8BAA8B;IACvB,eAAe,CAAC,QAAgB,EAAE,MAAgB;QACvD,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACD,8BAA8B;IACvB,4BAA4B,CAAC,QAAgB,EAAE,MAAc;QAClE,OAAO,IAAI,CAAC,WAAW,CAAC,4BAA4B,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzE,CAAC;IACD,8BAA8B;IACvB,8BAA8B,CACnC,QAAgB,EAAE,MAAkC;QAEpD,OAAO,IAAI,CAAC,WAAW,CAAC,8BAA8B,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3E,CAAC;IACD,8BAA8B;IACvB,SAAS,CAAC,KAAmC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,8BAA8B;IACvB,WAAW;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IACxC,CAAC;IACD,8BAA8B;IACd,iBAAiB,CAC/B,uBAA+C;QAE/C,OAAO,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;IACrE,CAAC;IACD,8BAA8B;IACd,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF","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 { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\n\r\nimport type { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\r\nimport type { Plane3dByOriginAndUnitNormal } from \"../geometry3d/Plane3dByOriginAndUnitNormal\";\r\nimport type { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\r\nimport type { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport type { Transform } from \"../geometry3d/Transform\";\r\nimport type { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport type { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport type { OffsetOptions } from \"./OffsetOptions\";\r\nimport type { LineString3d } from \"./LineString3d\";\r\nimport type { StrokeOptions } from \"./StrokeOptions\";\r\n\r\n/**\r\n * A ProxyCurve is expected to be used as a base class for curve types that use some existing curve (the proxy)\r\n * for evaluation and display but carry other defining data.\r\n * * The ProxyCurve implements all required CurvePrimitive methods by dispatching to the proxy.\r\n * * These methods presumably require support from the application class and are left abstract:\r\n * * clone\r\n * * curvePrimitiveType\r\n * * isSameCurvePrimitiveType\r\n * * isSameGeometryClass\r\n * * tryTransformInPlace\r\n * * reverseInPlace\r\n *\r\n * @public\r\n */\r\nexport abstract class ProxyCurve extends CurvePrimitive {\r\n public dispatchToGeometryHandler(handler: GeometryHandler) {\r\n return this._proxyCurve.dispatchToGeometryHandler(handler);\r\n }\r\n protected _proxyCurve: CurvePrimitive;\r\n /** Constructor CAPTURES the proxyCurve pointer */\r\n public constructor(proxyCurve: CurvePrimitive) {\r\n super();\r\n this._proxyCurve = proxyCurve;\r\n }\r\n /** Return the (pointer to) the proxy curve. */\r\n public get proxyCurve(): CurvePrimitive {\r\n return this._proxyCurve;\r\n }\r\n /** Implement by proxyCurve */\r\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\r\n return this._proxyCurve.computeStrokeCountForOptions(options);\r\n }\r\n /** Implement by proxyCurve */\r\n public emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void {\r\n this._proxyCurve.emitStrokableParts(dest, options);\r\n }\r\n /** Return a deep clone. This override removes the undefined variant return. */\r\n public abstract override clone(): ProxyCurve;\r\n /** Return a transformed clone. */\r\n public override cloneTransformed(transform: Transform): ProxyCurve | undefined {\r\n const myClone = this.clone();\r\n if (myClone.tryTransformInPlace(transform))\r\n return myClone;\r\n return undefined;\r\n }\r\n /** Implement by proxyCurve. Subclasses may eventually override this default implementation. */\r\n public override clonePartialCurve(fractionA: number, fractionB: number): CurvePrimitive | undefined {\r\n return this._proxyCurve.clonePartialCurve(fractionA, fractionB);\r\n }\r\n /** Implement by proxyCurve */\r\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\r\n this._proxyCurve.emitStrokes(dest, options);\r\n }\r\n /** Implement by proxyCurve */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n this._proxyCurve.extendRange(rangeToExtend, transform);\r\n }\r\n /** Implement by proxyCurve */\r\n public override range(transform?: Transform, result?: Range3d): Range3d {\r\n return this._proxyCurve.range(transform, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\r\n return this._proxyCurve.fractionToPoint(fraction, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\r\n return this._proxyCurve.fractionToPointAndDerivative(fraction, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public fractionToPointAnd2Derivatives(\r\n fraction: number, result?: Plane3dByOriginAndVectors,\r\n ): Plane3dByOriginAndVectors | undefined {\r\n return this._proxyCurve.fractionToPointAnd2Derivatives(fraction, result);\r\n }\r\n /** Implement by proxyCurve */\r\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\r\n return this._proxyCurve.isInPlane(plane);\r\n }\r\n /** Implement by proxyCurve */\r\n public quickLength(): number {\r\n return this._proxyCurve.quickLength();\r\n }\r\n /** Implement by proxyCurve */\r\n public override constructOffsetXY(\r\n offsetDistanceOrOptions: number | OffsetOptions,\r\n ): CurvePrimitive | CurvePrimitive[] | undefined {\r\n return this._proxyCurve.constructOffsetXY(offsetDistanceOrOptions);\r\n }\r\n /** Implement by proxyCurve */\r\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\r\n return this._proxyCurve.projectedParameterRange(ray, lowHigh);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StrokeCountMap.js","sourceRoot":"","sources":["../../../../src/curve/Query/StrokeCountMap.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,cAAc;IAezB;;;;;;;;;OASG;IACH,YAAoB,SAAiB,EAAE,WAAmB,EAAE,EAAU,EAAE,EAAU,EAAE,aAAgC;QAClH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,wBAAwB,CACpC,SAAyB,EAAE,SAAiB,EAAE,WAAmB,EAAE,EAAU,EAAE,EAAU,EAAE,aAAgC;QAE3H,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC;QACjF,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,wBAAwB,CACpC,iBAAyB,CAAC,EA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AAI,KAAK,CAAC,aAAa,KAAK,SAAS;YACvE,OAAO,IAAI,CAAC;QACd,IAAI,IAAI,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,EAAE;YAC7C,uCAAuC;YACvC,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,KAAK,CAAC,aAAa,CAAC,MAAM;gBAC1D,OAAO,KAAK,CAAC;YACf,MAAM,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;YACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBACxB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC;oBAC9F,OAAO,KAAK,CAAC;YACjB,OAAO,IAAI,CAAC;SACb;QACD,wCAAwC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD;;;OAGG;IACI,KAAK;QACV,MAAM,CAAC,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QACjF,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,CAAC,CAAC,aAAa,GAAG,EAAE,CAAC;YACrB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,aAAa;gBACpC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;SACvC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD;;;OAGG;IACI,WAAW,CAAC,QAAgB;QACjC,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF","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/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { CurvePrimitive } from \"../CurvePrimitive\";\r\n\r\n/**\r\n * Data carrier interface for per-primitive stroke counts and distances used by PolyfaceBuilder.\r\n * * For a simple primitive (line segment or arc) that is stroked with uniform fraction, the members are:\r\n * * `numStroke` = total number of strokes\r\n * * `curveLength` = length of this curve\r\n * * `a0` = external mapped coordinate for fraction 0 on this primitive or component\r\n * * `a1` = external mapped coordinate for fraction 1 on this primitive or component\r\n *\r\n * * For linestring and bspline curve, those numbers are totals for the overall curve, and breakdown within\r\n * the components (line segments or bezier spans) is recorded on the optional array `componentData[]`\r\n * * Members of the array are annotated with componentIndex within the linestring or bspline curve\r\n * @public\r\n */\r\nexport class StrokeCountMap {\r\n /** Number of strokes expected in this interval. */\r\n public numStroke: number;\r\n /** Length of the curve interval. */\r\n public curveLength: number;\r\n /** Start coordinate (in user-defined space) for fraction 0 on this primitive or component */\r\n public a0: number;\r\n /** End coordinate (in user-defined space) for fraction 0 on this primitive or component */\r\n public a1: number;\r\n /** Further StrokeCountMap's within this interval (e.g. for individual segments of a linestring.) */\r\n public componentData?: StrokeCountMap[];\r\n /** The curve that this map represents */\r\n public primitive?: CurvePrimitive;\r\n /** This curve's index within its parent. */\r\n public componentIndex?: number;\r\n /**\r\n * Constructor. Initialize all fields from arguments.\r\n * * Callers that expect to announce numStroke and curveLength for multiple components send an empty componentData array.\r\n * * Callers that do not have multiple components send undefined component data.\r\n * @param numStroke\r\n * @param curveLength\r\n * @param a0\r\n * @param a1\r\n * @param componentData\r\n */\r\n private constructor(numStroke: number, curveLength: number, a0: number, a1: number, componentData?: StrokeCountMap[]) {\r\n this.numStroke = numStroke;\r\n this.curveLength = curveLength;\r\n this.a0 = a0;\r\n this.a1 = a1;\r\n this.componentData = componentData;\r\n }\r\n /**\r\n * Create a `StrokeCountMap` with curve primitive and optional componentData array.\r\n * @param primitive\r\n * @param numStroke\r\n * @param curveLength\r\n * @param a0\r\n * @param a1\r\n * @param componentData\r\n */\r\n public static createWithCurvePrimitive(\r\n primitive: CurvePrimitive, numStroke: number, curveLength: number, a0: number, a1: number, componentData?: StrokeCountMap[]\r\n ): StrokeCountMap {\r\n const result = new StrokeCountMap(numStroke, curveLength, a0, a1, componentData);\r\n result.primitive = primitive;\r\n return result;\r\n }\r\n /**\r\n * Create a `StrokeCountMap` with `componentIndex` (but no primitive or componentData array)\r\n * @param index\r\n * @param numStroke\r\n * @param curveLength\r\n * @param a0\r\n * @param a1\r\n */\r\n public static createWithComponentIndex(\r\n componentIndex: number = 0, numStroke: number = 0, curveLength: number = 0, a0: number = 0, a1: number = 0\r\n ): StrokeCountMap {\r\n const result = new StrokeCountMap(numStroke, curveLength, a0, a1);\r\n result.componentIndex = componentIndex;\r\n return result;\r\n }\r\n /**\r\n * Create a StrokeCountMap, optionally\r\n * * (a) use parent a1 as new a0\r\n * * (b) attach a (usually empty) array for component counts.\r\n * @param parentMap optional map whose a1 becomes a0 in the new map.\r\n * @param componentData optional array of component StrokeCountMaps.\r\n */\r\n public static createWithCurvePrimitiveAndOptionalParent(\r\n curvePrimitive: CurvePrimitive, parentMap?: StrokeCountMap, componentData?: StrokeCountMap[]\r\n ): StrokeCountMap {\r\n const a0 = parentMap ? parentMap.a1 : 0.0;\r\n const result = new StrokeCountMap(0, 0, a0, a0, componentData);\r\n result.primitive = curvePrimitive;\r\n return result;\r\n }\r\n /**\r\n * Apply stroke count and curve length from a component to a parent map.\r\n * If componentData is present, install the new count and length with distance limits\r\n * @param parentMap map to be updated.\r\n * @param numStroke number of strokes on new child curve\r\n * @param curveLength curve length for new child curve.\r\n */\r\n public addToCountAndLength(numStroke: number, curveLength: number): void {\r\n const a2 = this.a1 + curveLength;\r\n if (this.componentData) {\r\n this.componentData.push(\r\n new StrokeCountMap(numStroke, curveLength, this.a1, a2));\r\n }\r\n this.numStroke += numStroke;\r\n this.curveLength += curveLength;\r\n this.a1 = a2;\r\n }\r\n /**\r\n * Return true if `other` has the same component structure as `this`\r\n * * Testing recurses through corresponding members of componentData arrays.\r\n */\r\n public isCompatibleComponentStructure(other: StrokeCountMap, enforceCounts: boolean): boolean {\r\n if (enforceCounts && this.numStroke !== other.numStroke)\r\n return false;\r\n if (this.componentData === undefined && other.componentData === undefined)\r\n return true;\r\n if (this.componentData && other.componentData) {\r\n // both have components. Recurse . . ..\r\n if (this.componentData.length !== other.componentData.length)\r\n return false;\r\n const n = this.componentData.length;\r\n for (let i = 0; i < n; i++)\r\n if (!this.componentData[i].isCompatibleComponentStructure(other.componentData[i], enforceCounts))\r\n return false;\r\n return true;\r\n }\r\n // one has componentData, the other not.\r\n return false;\r\n }\r\n /**\r\n * Clone all data from root.\r\n * * clone componentData arrays recursively.\r\n */\r\n public clone(): StrokeCountMap {\r\n const a = new StrokeCountMap(this.numStroke, this.curveLength, this.a0, this.a1);\r\n if (this.componentData) {\r\n a.componentData = [];\r\n for (const child of this.componentData)\r\n a.componentData.push(child.clone());\r\n }\r\n return a;\r\n }\r\n /**\r\n * Interpolate in the a0,a1 mapping.\r\n * @param fraction fractional position between a0 and a1\r\n */\r\n public fractionToA(fraction: number) {\r\n return Geometry.interpolate(this.a0, fraction, this.a1);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"StrokeCountMap.js","sourceRoot":"","sources":["../../../../src/curve/Query/StrokeCountMap.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,cAAc;IAezB;;;;;;;;;OASG;IACH,YAAoB,SAAiB,EAAE,WAAmB,EAAE,EAAU,EAAE,EAAU,EAAE,aAAgC;QAClH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI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AAS,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QACjF,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,CAAC,CAAC,aAAa,GAAG,EAAE,CAAC;YACrB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,aAAa;gBACpC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;SACvC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD;;;OAGG;IACI,WAAW,CAAC,QAAgB;QACjC,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF","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/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { CurvePrimitive } from \"../CurvePrimitive\";\r\n\r\n/**\r\n * Data carrier interface for per-primitive stroke counts and distances used by PolyfaceBuilder.\r\n * * For a simple primitive (line segment or arc) that is stroked with uniform fraction, the members are:\r\n * * `numStroke` = total number of strokes\r\n * * `curveLength` = length of this curve\r\n * * `a0` = external mapped coordinate for fraction 0 on this primitive or component\r\n * * `a1` = external mapped coordinate for fraction 1 on this primitive or component\r\n *\r\n * * For linestring and bspline curve, those numbers are totals for the overall curve, and breakdown within\r\n * the components (line segments or bezier spans) is recorded on the optional array `componentData[]`\r\n * * Members of the array are annotated with componentIndex within the linestring or bspline curve\r\n * @public\r\n */\r\nexport class StrokeCountMap {\r\n /** Number of strokes expected in this interval. */\r\n public numStroke: number;\r\n /** Length of the curve interval. */\r\n public curveLength: number;\r\n /** Start coordinate (in user-defined space) for fraction 0 on this primitive or component */\r\n public a0: number;\r\n /** End coordinate (in user-defined space) for fraction 0 on this primitive or component */\r\n public a1: number;\r\n /** Further StrokeCountMap's within this interval (e.g. for individual segments of a linestring.) */\r\n public componentData?: StrokeCountMap[];\r\n /** The curve that this map represents */\r\n public primitive?: CurvePrimitive;\r\n /** This curve's index within its parent. */\r\n public componentIndex?: number;\r\n /**\r\n * Constructor. Initialize all fields from arguments.\r\n * * Callers that expect to announce numStroke and curveLength for multiple components send an empty componentData array.\r\n * * Callers that do not have multiple components send undefined component data.\r\n * @param numStroke\r\n * @param curveLength\r\n * @param a0\r\n * @param a1\r\n * @param componentData\r\n */\r\n private constructor(numStroke: number, curveLength: number, a0: number, a1: number, componentData?: StrokeCountMap[]) {\r\n this.numStroke = numStroke;\r\n this.curveLength = curveLength;\r\n this.a0 = a0;\r\n this.a1 = a1;\r\n this.componentData = componentData;\r\n }\r\n /**\r\n * Create a `StrokeCountMap` with curve primitive and optional componentData array.\r\n * @param primitive\r\n * @param numStroke\r\n * @param curveLength\r\n * @param a0\r\n * @param a1\r\n * @param componentData\r\n */\r\n public static createWithCurvePrimitive(\r\n primitive: CurvePrimitive, numStroke: number, curveLength: number, a0: number, a1: number, componentData?: StrokeCountMap[],\r\n ): StrokeCountMap {\r\n const result = new StrokeCountMap(numStroke, curveLength, a0, a1, componentData);\r\n result.primitive = primitive;\r\n return result;\r\n }\r\n /**\r\n * Create a `StrokeCountMap` with `componentIndex` (but no primitive or componentData array)\r\n * @param index\r\n * @param numStroke\r\n * @param curveLength\r\n * @param a0\r\n * @param a1\r\n */\r\n public static createWithComponentIndex(\r\n componentIndex: number = 0, numStroke: number = 0, curveLength: number = 0, a0: number = 0, a1: number = 0,\r\n ): StrokeCountMap {\r\n const result = new StrokeCountMap(numStroke, curveLength, a0, a1);\r\n result.componentIndex = componentIndex;\r\n return result;\r\n }\r\n /**\r\n * Create a StrokeCountMap, optionally\r\n * * (a) use parent a1 as new a0\r\n * * (b) attach a (usually empty) array for component counts.\r\n * @param parentMap optional map whose a1 becomes a0 in the new map.\r\n * @param componentData optional array of component StrokeCountMaps.\r\n */\r\n public static createWithCurvePrimitiveAndOptionalParent(\r\n curvePrimitive: CurvePrimitive, parentMap?: StrokeCountMap, componentData?: StrokeCountMap[],\r\n ): StrokeCountMap {\r\n const a0 = parentMap ? parentMap.a1 : 0.0;\r\n const result = new StrokeCountMap(0, 0, a0, a0, componentData);\r\n result.primitive = curvePrimitive;\r\n return result;\r\n }\r\n /**\r\n * Apply stroke count and curve length from a component to a parent map.\r\n * If componentData is present, install the new count and length with distance limits\r\n * @param parentMap map to be updated.\r\n * @param numStroke number of strokes on new child curve\r\n * @param curveLength curve length for new child curve.\r\n */\r\n public addToCountAndLength(numStroke: number, curveLength: number): void {\r\n const a2 = this.a1 + curveLength;\r\n if (this.componentData) {\r\n this.componentData.push(\r\n new StrokeCountMap(numStroke, curveLength, this.a1, a2));\r\n }\r\n this.numStroke += numStroke;\r\n this.curveLength += curveLength;\r\n this.a1 = a2;\r\n }\r\n /**\r\n * Return true if `other` has the same component structure as `this`\r\n * * Testing recurses through corresponding members of componentData arrays.\r\n */\r\n public isCompatibleComponentStructure(other: StrokeCountMap, enforceCounts: boolean): boolean {\r\n if (enforceCounts && this.numStroke !== other.numStroke)\r\n return false;\r\n if (this.componentData === undefined && other.componentData === undefined)\r\n return true;\r\n if (this.componentData && other.componentData) {\r\n // both have components. Recurse . . ..\r\n if (this.componentData.length !== other.componentData.length)\r\n return false;\r\n const n = this.componentData.length;\r\n for (let i = 0; i < n; i++)\r\n if (!this.componentData[i].isCompatibleComponentStructure(other.componentData[i], enforceCounts))\r\n return false;\r\n return true;\r\n }\r\n // one has componentData, the other not.\r\n return false;\r\n }\r\n /**\r\n * Clone all data from root.\r\n * * clone componentData arrays recursively.\r\n */\r\n public clone(): StrokeCountMap {\r\n const a = new StrokeCountMap(this.numStroke, this.curveLength, this.a0, this.a1);\r\n if (this.componentData) {\r\n a.componentData = [];\r\n for (const child of this.componentData)\r\n a.componentData.push(child.clone());\r\n }\r\n return a;\r\n }\r\n /**\r\n * Interpolate in the a0,a1 mapping.\r\n * @param fraction fractional position between a0 and a1\r\n */\r\n public fractionToA(fraction: number) {\r\n return Geometry.interpolate(this.a0, fraction, this.a1);\r\n }\r\n}\r\n"]}
@@ -9,8 +9,8 @@ import { MultiLineStringDataVariant } from "../topology/Triangulation";
9
9
  import { AnyCurve, AnyRegion } from "./CurveChain";
10
10
  import { BagOfCurves, ConsolidateAdjacentCurvePrimitivesOptions, CurveChain, CurveCollection } from "./CurveCollection";
11
11
  import { CurvePrimitive } from "./CurvePrimitive";
12
- import { JointOptions, OffsetOptions } from "./internalContexts/PolygonOffsetContext";
13
12
  import { Loop, SignedLoops } from "./Loop";
13
+ import { JointOptions, OffsetOptions } from "./OffsetOptions";
14
14
  import { Path } from "./Path";
15
15
  /**
16
16
  * Possible return types from [[splitToPathsBetweenBreaks]], [[collectInsideAndOutsideOffsets]] and
@@ -169,8 +169,6 @@ export declare class RegionOps {
169
169
  * the xy-plane.
170
170
  * * The construction algorithm attempts to eliminate some self-intersections within the offsets, but does not
171
171
  * guarantee a simple area offset.
172
- * * If offsetDistance is given as a number, default OffsetOptions are applied.
173
- * * See [[JointOptions]] class doc for offset construction rules.
174
172
  * @param points a single loop or path
175
173
  * @param wrap true to include wraparound
176
174
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or JointOptions
@@ -181,8 +179,6 @@ export declare class RegionOps {
181
179
  * Construct curves that are offset from a Path or Loop as viewed in xy-plane (ignoring z).
182
180
  * * The construction will remove "some" local effects of features smaller than the offset distance, but will
183
181
  * not detect self intersection among widely separated edges.
184
- * * If offsetDistance is given as a number, default OffsetOptions are applied.
185
- * * See [[JointOptions]] class doc for offset construction rules.
186
182
  * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/Offset
187
183
  * @param curves base curves.
188
184
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
@@ -231,11 +227,12 @@ export declare class RegionOps {
231
227
  */
232
228
  static splitToPathsBetweenBreaks(source: AnyCurve | undefined, makeClones: boolean): ChainTypes;
233
229
  /**
234
- * Restructure curve fragments as chains, and construct (left and right) chain offsets in the xy-plane.
235
- * * BEWARE that if the input is not a loop, the classification of outputs is suspect.
236
- * @param fragments fragments to be chained, z-coordinates ignored
237
- * @param offsetDistance offset distance
238
- * @param gapTolerance absolute endpoint tolerance for computing chains
230
+ * Restructure curve fragments as Paths and Loops, and construct xy-offsets of the chains.
231
+ * * If the inputs do not form Loop(s), the classification of offsets is suspect.
232
+ * * For best offset results, the inputs should be parallel to the xy-plane.
233
+ * @param fragments fragments to be chained and offset
234
+ * @param offsetDistance offset distance, applied to both sides of each fragment to produce inside and outside xy-offset curves.
235
+ * @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
239
236
  * @returns object with named chains, insideOffsets, outsideOffsets
240
237
  */
241
238
  static collectInsideAndOutsideOffsets(fragments: AnyCurve[], offsetDistance: number, gapTolerance: number): {
@@ -244,10 +241,10 @@ export declare class RegionOps {
244
241
  chains: ChainTypes;
245
242
  };
246
243
  /**
247
- * Restructure curve fragments as chains.
244
+ * Restructure curve fragments as Paths and Loops.
248
245
  * @param fragments fragments to be chained
249
- * @param gapTolerance absolute endpoint tolerance for computing chains
250
- * @returns chains, possibly wrapped in BagOfCurves if there multiple chains
246
+ * @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
247
+ * @returns chains, possibly wrapped in a [[BagOfCurves]].
251
248
  */
252
249
  static collectChains(fragments: AnyCurve[], gapTolerance?: number): ChainTypes;
253
250
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"RegionOps.d.ts","sourceRoot":"","sources":["../../../src/curve/RegionOps.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE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AAO,CAAC,EAAE,yCAAyC,GAC3E,IAAI;IAIP;;;;;;;;;;;OAWG;WACW,uBAAuB,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,GAAG,oBAAoB,CAAC,GAAG,SAAS;IAY3F;;;;;;;;;;;;;;;;;;OAkBG;WACW,yBAAyB,CACrC,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,EAAE,EAAE,SAAS,GAAE,MAAqC,GACxF,WAAW,EAAE;IAQhB;;;;;;;;;;OAUG;WACW,sBAAsB,CAClC,UAAU,EAAE,QAAQ,GAAG,QAAQ,EAAE,EACjC,cAAc,CAAC,EAAE,cAAc,EAAE,EACjC,0BAA0B,GAAE,OAAe,EAC3C,kBAAkB,GAAE,OAAe,GAClC,cAAc,EAAE;IAanB;;;;;OAKG;WACW,iBAAiB,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;IAe/E;;;;OAIG;WACW,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,SAAS,GAAG,OAAO;CAkB5E"}
@@ -19,16 +19,17 @@ import { PolyfaceBuilder } from "../polyface/PolyfaceBuilder";
19
19
  import { HalfEdgeMask } from "../topology/Graph";
20
20
  import { HalfEdgeGraphSearch } from "../topology/HalfEdgeGraphSearch";
21
21
  import { Triangulator } from "../topology/Triangulation";
22
- import { ChainCollectorContext } from "./ChainCollectorContext";
23
22
  import { BagOfCurves, CurveChain, CurveCollection } from "./CurveCollection";
24
23
  import { CurveCurve } from "./CurveCurve";
24
+ import { CurveOps } from "./CurveOps";
25
25
  import { CurvePrimitive } from "./CurvePrimitive";
26
26
  import { CurveWireMomentsXYZ } from "./CurveWireMomentsXYZ";
27
27
  import { GeometryQuery } from "./GeometryQuery";
28
- import { OffsetHelpers } from "./internalContexts/MultiChainCollector";
29
- import { CurveChainWireOffsetContext, PolygonWireOffsetContext } from "./internalContexts/PolygonOffsetContext";
28
+ import { ChainCollectorContext } from "./internalContexts/ChainCollectorContext";
29
+ import { PolygonWireOffsetContext } from "./internalContexts/PolygonOffsetContext";
30
30
  import { LineString3d } from "./LineString3d";
31
31
  import { Loop } from "./Loop";
32
+ import { OffsetOptions } from "./OffsetOptions";
32
33
  import { ParityRegion } from "./ParityRegion";
33
34
  import { Path } from "./Path";
34
35
  import { ConsolidateAdjacentCurvePrimitivesContext } from "./Query/ConsolidateAdjacentPrimitivesContext";
@@ -314,8 +315,6 @@ export class RegionOps {
314
315
  * the xy-plane.
315
316
  * * The construction algorithm attempts to eliminate some self-intersections within the offsets, but does not
316
317
  * guarantee a simple area offset.
317
- * * If offsetDistance is given as a number, default OffsetOptions are applied.
318
- * * See [[JointOptions]] class doc for offset construction rules.
319
318
  * @param points a single loop or path
320
319
  * @param wrap true to include wraparound
321
320
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or JointOptions
@@ -329,14 +328,13 @@ export class RegionOps {
329
328
  * Construct curves that are offset from a Path or Loop as viewed in xy-plane (ignoring z).
330
329
  * * The construction will remove "some" local effects of features smaller than the offset distance, but will
331
330
  * not detect self intersection among widely separated edges.
332
- * * If offsetDistance is given as a number, default OffsetOptions are applied.
333
- * * See [[JointOptions]] class doc for offset construction rules.
334
331
  * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/Offset
335
332
  * @param curves base curves.
336
333
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
337
334
  */
338
335
  static constructCurveXYOffset(curves, offsetDistanceOrOptions) {
339
- return CurveChainWireOffsetContext.constructCurveXYOffset(curves, offsetDistanceOrOptions);
336
+ const offsetOptions = OffsetOptions.create(offsetDistanceOrOptions);
337
+ return CurveOps.constructCurveXYOffset(curves, offsetOptions);
340
338
  }
341
339
  /**
342
340
  * Test if point (x,y) is IN, OUT or ON a region.
@@ -421,24 +419,25 @@ export class RegionOps {
421
419
  return chainCollector.grabResult();
422
420
  }
423
421
  /**
424
- * Restructure curve fragments as chains, and construct (left and right) chain offsets in the xy-plane.
425
- * * BEWARE that if the input is not a loop, the classification of outputs is suspect.
426
- * @param fragments fragments to be chained, z-coordinates ignored
427
- * @param offsetDistance offset distance
428
- * @param gapTolerance absolute endpoint tolerance for computing chains
422
+ * Restructure curve fragments as Paths and Loops, and construct xy-offsets of the chains.
423
+ * * If the inputs do not form Loop(s), the classification of offsets is suspect.
424
+ * * For best offset results, the inputs should be parallel to the xy-plane.
425
+ * @param fragments fragments to be chained and offset
426
+ * @param offsetDistance offset distance, applied to both sides of each fragment to produce inside and outside xy-offset curves.
427
+ * @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
429
428
  * @returns object with named chains, insideOffsets, outsideOffsets
430
429
  */
431
430
  static collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance) {
432
- return OffsetHelpers.collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance);
431
+ return CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
433
432
  }
434
433
  /**
435
- * Restructure curve fragments as chains.
434
+ * Restructure curve fragments as Paths and Loops.
436
435
  * @param fragments fragments to be chained
437
- * @param gapTolerance absolute endpoint tolerance for computing chains
438
- * @returns chains, possibly wrapped in BagOfCurves if there multiple chains
436
+ * @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
437
+ * @returns chains, possibly wrapped in a [[BagOfCurves]].
439
438
  */
440
439
  static collectChains(fragments, gapTolerance = Geometry.smallMetricDistance) {
441
- return OffsetHelpers.collectChains(fragments, gapTolerance);
440
+ return CurveOps.collectChains(fragments, gapTolerance);
442
441
  }
443
442
  /**
444
443
  * Find all intersections among curves in `curvesToCut` against the boundaries of `region` and return fragments