@itwin/core-geometry 4.1.0-dev.67 → 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 (367) 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 +11 -13
  61. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  62. package/lib/cjs/curve/RegionOps.js +17 -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 +7 -101
  77. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  78. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +13 -168
  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.d.ts +41 -32
  102. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  103. package/lib/cjs/geometry3d/Plane3d.js +11 -8
  104. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  105. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
  106. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  107. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
  108. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  109. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  110. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +2 -0
  111. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  112. package/lib/cjs/geometry3d/Point2dVector2d.d.ts +8 -9
  113. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  114. package/lib/cjs/geometry3d/Point2dVector2d.js +9 -10
  115. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  116. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  117. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  118. package/lib/cjs/geometry3d/Point3dVector3d.js +5 -5
  119. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  120. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  121. package/lib/cjs/geometry3d/PointHelpers.js +5 -5
  122. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  123. package/lib/cjs/geometry3d/PolygonOps.d.ts +1 -2
  124. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  125. package/lib/cjs/geometry3d/PolygonOps.js +2 -3
  126. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  127. package/lib/cjs/geometry3d/Range.js.map +1 -1
  128. package/lib/cjs/geometry3d/Ray2d.d.ts +69 -0
  129. package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -0
  130. package/lib/cjs/geometry3d/Ray2d.js +146 -0
  131. package/lib/cjs/geometry3d/Ray2d.js.map +1 -0
  132. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  133. package/lib/cjs/geometry3d/Transform.d.ts +3 -3
  134. package/lib/cjs/geometry3d/Transform.js +6 -6
  135. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  136. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  137. package/lib/cjs/numerics/ConvexPolygon2d.d.ts +7 -49
  138. package/lib/cjs/numerics/ConvexPolygon2d.d.ts.map +1 -1
  139. package/lib/cjs/numerics/ConvexPolygon2d.js +16 -107
  140. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  141. package/lib/cjs/numerics/Newton.js.map +1 -1
  142. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  143. package/lib/cjs/numerics/Polynomials.js +0 -2
  144. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  145. package/lib/cjs/numerics/Quadrature.js +5 -5
  146. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  147. package/lib/cjs/polyface/IndexedEdgeMatcher.js +1 -1
  148. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  149. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  150. package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
  151. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  152. package/lib/cjs/polyface/PolyfaceQuery.d.ts +10 -7
  153. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  154. package/lib/cjs/polyface/PolyfaceQuery.js +13 -12
  155. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  156. package/lib/cjs/polyface/TaggedNumericData.js +1 -1
  157. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  158. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
  159. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  160. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  161. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  162. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  163. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  164. package/lib/cjs/serialization/IModelJsonSchema.d.ts +2 -7
  165. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  166. package/lib/cjs/serialization/IModelJsonSchema.js +2 -7
  167. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  168. package/lib/cjs/topology/ChainMerge.js +1 -1
  169. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  170. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  171. package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -1
  172. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  173. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +1 -1
  174. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  175. package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
  176. package/lib/cjs/topology/HalfEdgePriorityQueue.js +1 -1
  177. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  178. package/lib/cjs/topology/RegularizeFace.js +3 -3
  179. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  180. package/lib/cjs/topology/Triangulation.js +1 -1
  181. package/lib/cjs/topology/Triangulation.js.map +1 -1
  182. package/lib/esm/Geometry.js.map +1 -1
  183. package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
  184. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  185. package/lib/esm/bspline/BSplineCurve.js +1 -1
  186. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  187. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  188. package/lib/esm/bspline/BSplineSurface.js +1 -1
  189. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  190. package/lib/esm/bspline/BezierCurveBase.d.ts +1 -1
  191. package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
  192. package/lib/esm/bspline/BezierCurveBase.js +1 -1
  193. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  194. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  195. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  196. package/lib/esm/core-geometry.d.ts +3 -2
  197. package/lib/esm/core-geometry.d.ts.map +1 -1
  198. package/lib/esm/core-geometry.js +3 -3
  199. package/lib/esm/core-geometry.js.map +1 -1
  200. package/lib/esm/curve/Arc3d.d.ts +1 -1
  201. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  202. package/lib/esm/curve/Arc3d.js +1 -1
  203. package/lib/esm/curve/Arc3d.js.map +1 -1
  204. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +1 -1
  205. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  206. package/lib/esm/curve/CurveChainWithDistanceIndex.js +1 -1
  207. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  208. package/lib/esm/curve/CurveCollection.d.ts +2 -2
  209. package/lib/esm/curve/CurveCollection.js +2 -2
  210. package/lib/esm/curve/CurveCollection.js.map +1 -1
  211. package/lib/esm/curve/CurveCurve.js.map +1 -1
  212. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  213. package/lib/esm/curve/CurveOps.d.ts +77 -0
  214. package/lib/esm/curve/CurveOps.d.ts.map +1 -0
  215. package/lib/esm/curve/CurveOps.js +156 -0
  216. package/lib/esm/curve/CurveOps.js.map +1 -0
  217. package/lib/esm/curve/CurvePrimitive.d.ts +13 -13
  218. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  219. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  220. package/lib/esm/curve/GeometryQuery.d.ts +2 -2
  221. package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
  222. package/lib/esm/curve/GeometryQuery.js +2 -2
  223. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  224. package/lib/esm/curve/LineSegment3d.d.ts +1 -1
  225. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  226. package/lib/esm/curve/LineSegment3d.js +1 -1
  227. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  228. package/lib/esm/curve/LineString3d.d.ts +1 -1
  229. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  230. package/lib/esm/curve/LineString3d.js +1 -1
  231. package/lib/esm/curve/LineString3d.js.map +1 -1
  232. package/lib/esm/curve/Loop.js.map +1 -1
  233. package/lib/esm/curve/OffsetOptions.d.ts +97 -0
  234. package/lib/esm/curve/OffsetOptions.d.ts.map +1 -0
  235. package/lib/esm/curve/OffsetOptions.js +161 -0
  236. package/lib/esm/curve/OffsetOptions.js.map +1 -0
  237. package/lib/esm/curve/ProxyCurve.d.ts +1 -1
  238. package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
  239. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  240. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  241. package/lib/esm/curve/RegionOps.d.ts +11 -13
  242. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  243. package/lib/esm/curve/RegionOps.js +18 -18
  244. package/lib/esm/curve/RegionOps.js.map +1 -1
  245. package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -2
  246. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  247. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  248. package/lib/esm/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
  249. package/lib/esm/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
  250. package/lib/esm/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
  251. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -0
  252. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +59 -74
  253. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  254. package/lib/esm/curve/internalContexts/MultiChainCollector.js +129 -221
  255. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  256. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  257. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +7 -101
  258. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  259. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +10 -163
  260. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  261. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -1
  262. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  263. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +1 -1
  264. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  265. package/lib/esm/curve/spiral/TransitionSpiral3d.js +1 -1
  266. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  267. package/lib/esm/curve/spiral/XYCurveEvaluator.js +1 -1
  268. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  269. package/lib/esm/geometry3d/Angle.js.map +1 -1
  270. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  271. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  272. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  273. package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
  274. package/lib/esm/geometry3d/GrowableBlockedArray.js +1 -1
  275. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  276. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  277. package/lib/esm/geometry3d/GrowableFloat64Array.js +1 -1
  278. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  279. package/lib/esm/geometry3d/Matrix3d.js +5 -5
  280. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  281. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  282. package/lib/esm/geometry3d/Plane3d.d.ts +41 -32
  283. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  284. package/lib/esm/geometry3d/Plane3d.js +11 -8
  285. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  286. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
  287. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  288. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
  289. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  290. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  291. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +2 -0
  292. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  293. package/lib/esm/geometry3d/Point2dVector2d.d.ts +8 -9
  294. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  295. package/lib/esm/geometry3d/Point2dVector2d.js +9 -10
  296. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  297. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  298. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  299. package/lib/esm/geometry3d/Point3dVector3d.js +5 -5
  300. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  301. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  302. package/lib/esm/geometry3d/PointHelpers.js +5 -5
  303. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  304. package/lib/esm/geometry3d/PolygonOps.d.ts +1 -2
  305. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  306. package/lib/esm/geometry3d/PolygonOps.js +2 -3
  307. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  308. package/lib/esm/geometry3d/Range.js.map +1 -1
  309. package/lib/esm/geometry3d/Ray2d.d.ts +69 -0
  310. package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -0
  311. package/lib/esm/geometry3d/Ray2d.js +142 -0
  312. package/lib/esm/geometry3d/Ray2d.js.map +1 -0
  313. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  314. package/lib/esm/geometry3d/Transform.d.ts +3 -3
  315. package/lib/esm/geometry3d/Transform.js +6 -6
  316. package/lib/esm/geometry3d/Transform.js.map +1 -1
  317. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  318. package/lib/esm/numerics/ConvexPolygon2d.d.ts +7 -49
  319. package/lib/esm/numerics/ConvexPolygon2d.d.ts.map +1 -1
  320. package/lib/esm/numerics/ConvexPolygon2d.js +14 -104
  321. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  322. package/lib/esm/numerics/Newton.js.map +1 -1
  323. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  324. package/lib/esm/numerics/Polynomials.js +0 -2
  325. package/lib/esm/numerics/Polynomials.js.map +1 -1
  326. package/lib/esm/numerics/Quadrature.js +5 -5
  327. package/lib/esm/numerics/Quadrature.js.map +1 -1
  328. package/lib/esm/polyface/IndexedEdgeMatcher.js +1 -1
  329. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  330. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  331. package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
  332. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  333. package/lib/esm/polyface/PolyfaceQuery.d.ts +10 -7
  334. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  335. package/lib/esm/polyface/PolyfaceQuery.js +14 -13
  336. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  337. package/lib/esm/polyface/TaggedNumericData.js +1 -1
  338. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  339. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
  340. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  341. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  342. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  343. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  344. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  345. package/lib/esm/serialization/IModelJsonSchema.d.ts +2 -7
  346. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  347. package/lib/esm/serialization/IModelJsonSchema.js +2 -7
  348. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  349. package/lib/esm/topology/ChainMerge.js +1 -1
  350. package/lib/esm/topology/ChainMerge.js.map +1 -1
  351. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  352. package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -1
  353. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  354. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +1 -1
  355. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  356. package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
  357. package/lib/esm/topology/HalfEdgePriorityQueue.js +1 -1
  358. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  359. package/lib/esm/topology/RegularizeFace.js +3 -3
  360. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  361. package/lib/esm/topology/Triangulation.js +1 -1
  362. package/lib/esm/topology/Triangulation.js.map +1 -1
  363. package/package.json +5 -16
  364. package/lib/cjs/curve/ChainCollectorContext.d.ts.map +0 -1
  365. package/lib/cjs/curve/ChainCollectorContext.js.map +0 -1
  366. package/lib/esm/curve/ChainCollectorContext.d.ts.map +0 -1
  367. package/lib/esm/curve/ChainCollectorContext.js.map +0 -1
@@ -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,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AW,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,166 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Curve
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.OffsetOptions = exports.JointOptions = void 0;
11
+ const Geometry_1 = require("../Geometry");
12
+ const StrokeOptions_1 = require("./StrokeOptions");
13
+ /**
14
+ * Control parameters for joint construction, used in offset construction methods such as [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].
15
+ * * Define a "joint" as the common point between adjacent segments of the input curve.
16
+ * * Define the "turn angle" at a joint to be the angle in [0,pi] between the first derivatives (tangents) of
17
+ * the segments at the joint.
18
+ * * When creating offsets, if an offset needs to do an "outside" turn, the first applicable construction is applied:
19
+ * * If the turn angle is larger than `options.minArcDegrees`, a circular arc is constructed to offset the joint.
20
+ * * If the turn angle is less than or equal to `options.maxChamferTurnDegrees`, extend curves along tangent to
21
+ * single intersection point (to create a sharp corner).
22
+ * * If the turn angle is larger than `options.maxChamferDegrees`, the joint is offset with a line string whose edges:
23
+ * * lie outside the arc that would have been created by the first construction
24
+ * * have uniform turn angle less than `options.maxChamferDegrees`
25
+ * * touch the arc at their midpoint (except first and last edge).
26
+ * @public
27
+ */
28
+ class JointOptions {
29
+ /**
30
+ * Construct JointOptions.
31
+ * * leftOffsetDistance is required
32
+ * * minArcDegrees and maxChamferDegrees are optional.
33
+ */
34
+ constructor(leftOffsetDistance, minArcDegrees = 180, maxChamferDegrees = 90, preserveEllipticalArcs = false, allowSharpestCorners = false) {
35
+ /**
36
+ * Smallest arc to construct.
37
+ * * If this control angle is 180 degrees or more, arcs are never created.
38
+ */
39
+ this.minArcDegrees = 180.0;
40
+ /** Largest turn angle at which to construct a sharp corner, or largest turn angle in a multi-segment chamfer. */
41
+ this.maxChamferTurnDegrees = 90;
42
+ /**
43
+ * Whether to remove the internal turn angle upper bound for sharp corner construction.
44
+ * * By default, a sharp corner is not created at a joint when the turn angle is too large, so as to avoid offsets whose
45
+ * ranges blow up. Internally, this is implemented by applying an upper bound of 120 degrees to `maxChamferTurnDegrees`.
46
+ * * When `allowSharpestCorners` is true, this internal upper bound is removed, allowing sharp corners for turn angles
47
+ * up to `maxChamferTurnDegrees`.
48
+ * * Thus, if you know your input turn angles are no greater than `maxChamferTurnDegrees`, you can create an offset with
49
+ * sharp corners at each joint by setting `maxChamferTurnDegrees < minArcDegrees` and `allowSharpestCorners` to true.
50
+ */
51
+ this.allowSharpestCorners = false;
52
+ /** Offset distance, positive to left of base curve. */
53
+ this.leftOffsetDistance = 0;
54
+ /** Whether to offset elliptical arcs as elliptical arcs (true) or as B-spline curves (false, default). */
55
+ this.preserveEllipticalArcs = false;
56
+ this.leftOffsetDistance = leftOffsetDistance;
57
+ this.minArcDegrees = minArcDegrees;
58
+ this.maxChamferTurnDegrees = maxChamferDegrees;
59
+ this.preserveEllipticalArcs = preserveEllipticalArcs;
60
+ this.allowSharpestCorners = allowSharpestCorners;
61
+ }
62
+ /** Return a deep clone. */
63
+ clone() {
64
+ return new JointOptions(this.leftOffsetDistance, this.minArcDegrees, this.maxChamferTurnDegrees, this.preserveEllipticalArcs, this.allowSharpestCorners);
65
+ }
66
+ /** Copy values of input options */
67
+ setFrom(other) {
68
+ this.leftOffsetDistance = other.leftOffsetDistance;
69
+ this.minArcDegrees = other.minArcDegrees;
70
+ this.maxChamferTurnDegrees = other.maxChamferTurnDegrees;
71
+ this.preserveEllipticalArcs = other.preserveEllipticalArcs;
72
+ this.allowSharpestCorners = other.allowSharpestCorners;
73
+ }
74
+ /**
75
+ * Parse a number or JointOptions up to JointOptions:
76
+ * * If leftOffsetDistanceOptions is a number, create a JointOptions with other options set to default values.
77
+ * * If leftOffsetDistanceOrOptions is a JointOptions, return it unchanged.
78
+ * @param leftOffsetDistanceOrOptions
79
+ */
80
+ static create(leftOffsetDistanceOrOptions) {
81
+ if (leftOffsetDistanceOrOptions instanceof JointOptions)
82
+ return leftOffsetDistanceOrOptions;
83
+ return new JointOptions(leftOffsetDistanceOrOptions);
84
+ }
85
+ /** Return true if the options indicate this amount of turn should be handled with an arc. */
86
+ needArc(theta) {
87
+ return Math.abs(theta.degrees) >= this.minArcDegrees;
88
+ }
89
+ /** Return the number of corners needed to chamfer the given turn angle. */
90
+ numChamferPoints(theta) {
91
+ const degrees = Math.abs(theta.degrees);
92
+ const minStepDegreesClamp = 10;
93
+ let maxStepDegreesClamp = 120;
94
+ if (this.allowSharpestCorners) {
95
+ maxStepDegreesClamp = this.maxChamferTurnDegrees;
96
+ }
97
+ const stepDegrees = Geometry_1.Geometry.clamp(this.maxChamferTurnDegrees, minStepDegreesClamp, maxStepDegreesClamp);
98
+ if (degrees <= stepDegrees)
99
+ return 1;
100
+ return Math.ceil(degrees / stepDegrees);
101
+ }
102
+ }
103
+ exports.JointOptions = JointOptions;
104
+ /**
105
+ * Options for offsetting a curve, used in offset construction methods such as [[CurvePrimitive.constructOffsetXY]], [[RegionOps.constructPolygonWireXYOffset]] and [[Region.Ops.constructCurveXYOffset]].
106
+ * @public
107
+ */
108
+ class OffsetOptions {
109
+ /** Options that are provided are captured. */
110
+ constructor(offsetDistanceOrOptions, strokeOptions) {
111
+ this.jointOptions = JointOptions.create(offsetDistanceOrOptions);
112
+ this.strokeOptions = (strokeOptions !== undefined) ? strokeOptions : StrokeOptions_1.StrokeOptions.createForCurves();
113
+ }
114
+ get minArcDegrees() {
115
+ return this.jointOptions.minArcDegrees;
116
+ }
117
+ set minArcDegrees(value) {
118
+ this.jointOptions.minArcDegrees = value;
119
+ }
120
+ get maxChamferTurnDegrees() {
121
+ return this.jointOptions.maxChamferTurnDegrees;
122
+ }
123
+ set maxChamferTurnDegrees(value) {
124
+ this.jointOptions.maxChamferTurnDegrees = value;
125
+ }
126
+ get allowSharpestCorners() {
127
+ return this.jointOptions.allowSharpestCorners;
128
+ }
129
+ set allowSharpestCorners(value) {
130
+ this.jointOptions.allowSharpestCorners = value;
131
+ }
132
+ get leftOffsetDistance() {
133
+ return this.jointOptions.leftOffsetDistance;
134
+ }
135
+ set leftOffsetDistance(value) {
136
+ this.jointOptions.leftOffsetDistance = value;
137
+ }
138
+ get preserveEllipticalArcs() {
139
+ return this.jointOptions.preserveEllipticalArcs;
140
+ }
141
+ set preserveEllipticalArcs(value) {
142
+ this.jointOptions.preserveEllipticalArcs = value;
143
+ }
144
+ /**
145
+ * Convert variant input into OffsetOptions.
146
+ * * If a JointOptions is provided, it is captured.
147
+ * * If an OffsetOptions is provided, a reference to it is returned.
148
+ */
149
+ static create(offsetDistanceOrOptions) {
150
+ if (offsetDistanceOrOptions instanceof OffsetOptions)
151
+ return offsetDistanceOrOptions;
152
+ return new OffsetOptions(offsetDistanceOrOptions);
153
+ }
154
+ /** Convert variant input into offset distance */
155
+ static getOffsetDistance(offsetDistanceOrOptions) {
156
+ if (typeof offsetDistanceOrOptions === "number")
157
+ return offsetDistanceOrOptions;
158
+ return offsetDistanceOrOptions.leftOffsetDistance;
159
+ }
160
+ /** Return a deep clone. */
161
+ clone() {
162
+ return new OffsetOptions(this.jointOptions.clone(), this.strokeOptions.clone());
163
+ }
164
+ }
165
+ exports.OffsetOptions = OffsetOptions;
166
+ //# 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,0CAAuC;AAEvC,mDAAgD;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAa,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;QAUpC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,qBAAqB,GAAG,iBAAiB,CAAC;QAC/C,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;QACrD,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IACD,2BAA2B;IACpB,KAAK;QACV,OAAO,IAAI,YAAY,CACrB,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,qBAAqB,EACvE,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,oBAAoB,CACvD,CAAC;IACJ,CAAC;IACD,mCAAmC;IAC5B,OAAO,CAAC,KAAmB;QAChC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC;QACnD,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QACzC,I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AC,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;AA5DD,sCA4DC","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,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,8BAAsB,UAAW,SAAQ,cAAc;IAC9C,yBAAyB,CAAC,OAAO,EAAE,eAAe;IAGzD,SAAS,CAAC,WAAW,EAAE,cAAc,CAAC;IACtC,kDAAkD;gBAC/B,UAAU,EAAE,cAAc;IAI7C,+CAA+C;I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F;AA/ED,gCA+EC","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,4DAAyD;AAazD;;;;;;;;;;;;;GAaG;AACH,MAAsB,UAAW,SAAQ,+BAAc;IAC9C,yBAAyB,CAAC,OAAwB;QACvD,OAAO,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,kDAAkD;IAClD,YAAmB,UAA0B;QAC3C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IACD,+CAA+C;IAC/C,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACD,8BAA8B;IACvB,4BAA4B,CAAC,OAAuB;QACzD,OAAO,IAAI,CAAC,WAAW,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;IACD,8BAA8B;IACvB,kBAAkB,CAAC,IAAoB,EAAE,OAAuB;QACrE,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAGD,kC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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;AA/ED,gCA+EC","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,6CAA0C;AAG1C;;;;;;;;;;;;GAYG;AACH,MAAa,cAAc;IAezB;;;;;;;;;OASG;IACH,YAAoB,SAAiB,EAAE,WAAmB,EAAE,EAAU,EAAE,EAAU,EAAE,aAAgC;QAClH,IAAI,CAAC,SAAS,GAAG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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,mBAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAzID,wCAyIC","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,6CAA0C;AAG1C;;;;;;;;;;;;GAYG;AACH,MAAa,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,EAAE,YAAoB,CAAC,EAAE,cAAsB,CAAC,EAAE,KAAa,CAAC,EAAE,KAAa,CAAC;QAE1G,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,EA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AI,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,mBAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAzID,wCAyIC","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,7 @@ 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.
182
+ * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/Offset
186
183
  * @param curves base curves.
187
184
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
188
185
  */
@@ -230,11 +227,12 @@ export declare class RegionOps {
230
227
  */
231
228
  static splitToPathsBetweenBreaks(source: AnyCurve | undefined, makeClones: boolean): ChainTypes;
232
229
  /**
233
- * Restructure curve fragments as chains, and construct (left and right) chain offsets in the xy-plane.
234
- * * BEWARE that if the input is not a loop, the classification of outputs is suspect.
235
- * @param fragments fragments to be chained, z-coordinates ignored
236
- * @param offsetDistance offset distance
237
- * @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
238
236
  * @returns object with named chains, insideOffsets, outsideOffsets
239
237
  */
240
238
  static collectInsideAndOutsideOffsets(fragments: AnyCurve[], offsetDistance: number, gapTolerance: number): {
@@ -243,10 +241,10 @@ export declare class RegionOps {
243
241
  chains: ChainTypes;
244
242
  };
245
243
  /**
246
- * Restructure curve fragments as chains.
244
+ * Restructure curve fragments as Paths and Loops.
247
245
  * @param fragments fragments to be chained
248
- * @param gapTolerance absolute endpoint tolerance for computing chains
249
- * @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]].
250
248
  */
251
249
  static collectChains(fragments: AnyCurve[], gapTolerance?: number): ChainTypes;
252
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,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAyB,0BAA0B,EAAgB,MAAM,2BAA2B,CAAC;AAE5G,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,yCAAyC,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAExH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAA+B,YAAY,EAAE,aAAa,EAA4B,MAAM,yCAAyC,CAAC;AAE7I,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,IAAI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 +22,17 @@ const PolyfaceBuilder_1 = require("../polyface/PolyfaceBuilder");
22
22
  const Graph_1 = require("../topology/Graph");
23
23
  const HalfEdgeGraphSearch_1 = require("../topology/HalfEdgeGraphSearch");
24
24
  const Triangulation_1 = require("../topology/Triangulation");
25
- const ChainCollectorContext_1 = require("./ChainCollectorContext");
26
25
  const CurveCollection_1 = require("./CurveCollection");
27
26
  const CurveCurve_1 = require("./CurveCurve");
27
+ const CurveOps_1 = require("./CurveOps");
28
28
  const CurvePrimitive_1 = require("./CurvePrimitive");
29
29
  const CurveWireMomentsXYZ_1 = require("./CurveWireMomentsXYZ");
30
30
  const GeometryQuery_1 = require("./GeometryQuery");
31
- const MultiChainCollector_1 = require("./internalContexts/MultiChainCollector");
31
+ const ChainCollectorContext_1 = require("./internalContexts/ChainCollectorContext");
32
32
  const PolygonOffsetContext_1 = require("./internalContexts/PolygonOffsetContext");
33
33
  const LineString3d_1 = require("./LineString3d");
34
34
  const Loop_1 = require("./Loop");
35
+ const OffsetOptions_1 = require("./OffsetOptions");
35
36
  const ParityRegion_1 = require("./ParityRegion");
36
37
  const Path_1 = require("./Path");
37
38
  const ConsolidateAdjacentPrimitivesContext_1 = require("./Query/ConsolidateAdjacentPrimitivesContext");
@@ -317,8 +318,6 @@ class RegionOps {
317
318
  * the xy-plane.
318
319
  * * The construction algorithm attempts to eliminate some self-intersections within the offsets, but does not
319
320
  * guarantee a simple area offset.
320
- * * If offsetDistance is given as a number, default OffsetOptions are applied.
321
- * * See [[JointOptions]] class doc for offset construction rules.
322
321
  * @param points a single loop or path
323
322
  * @param wrap true to include wraparound
324
323
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or JointOptions
@@ -332,13 +331,13 @@ class RegionOps {
332
331
  * Construct curves that are offset from a Path or Loop as viewed in xy-plane (ignoring z).
333
332
  * * The construction will remove "some" local effects of features smaller than the offset distance, but will
334
333
  * not detect self intersection among widely separated edges.
335
- * * If offsetDistance is given as a number, default OffsetOptions are applied.
336
- * * See [[JointOptions]] class doc for offset construction rules.
334
+ * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/Offset
337
335
  * @param curves base curves.
338
336
  * @param offsetDistanceOrOptions offset distance (positive to left of curve, negative to right) or options object.
339
337
  */
340
338
  static constructCurveXYOffset(curves, offsetDistanceOrOptions) {
341
- return PolygonOffsetContext_1.CurveChainWireOffsetContext.constructCurveXYOffset(curves, offsetDistanceOrOptions);
339
+ const offsetOptions = OffsetOptions_1.OffsetOptions.create(offsetDistanceOrOptions);
340
+ return CurveOps_1.CurveOps.constructCurveXYOffset(curves, offsetOptions);
342
341
  }
343
342
  /**
344
343
  * Test if point (x,y) is IN, OUT or ON a region.
@@ -423,24 +422,25 @@ class RegionOps {
423
422
  return chainCollector.grabResult();
424
423
  }
425
424
  /**
426
- * Restructure curve fragments as chains, and construct (left and right) chain offsets in the xy-plane.
427
- * * BEWARE that if the input is not a loop, the classification of outputs is suspect.
428
- * @param fragments fragments to be chained, z-coordinates ignored
429
- * @param offsetDistance offset distance
430
- * @param gapTolerance absolute endpoint tolerance for computing chains
425
+ * Restructure curve fragments as Paths and Loops, and construct xy-offsets of the chains.
426
+ * * If the inputs do not form Loop(s), the classification of offsets is suspect.
427
+ * * For best offset results, the inputs should be parallel to the xy-plane.
428
+ * @param fragments fragments to be chained and offset
429
+ * @param offsetDistance offset distance, applied to both sides of each fragment to produce inside and outside xy-offset curves.
430
+ * @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
431
431
  * @returns object with named chains, insideOffsets, outsideOffsets
432
432
  */
433
433
  static collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance) {
434
- return MultiChainCollector_1.OffsetHelpers.collectInsideAndOutsideOffsets(fragments, offsetDistance, gapTolerance);
434
+ return CurveOps_1.CurveOps.collectInsideAndOutsideXYOffsets(fragments, offsetDistance, gapTolerance);
435
435
  }
436
436
  /**
437
- * Restructure curve fragments as chains.
437
+ * Restructure curve fragments as Paths and Loops.
438
438
  * @param fragments fragments to be chained
439
- * @param gapTolerance absolute endpoint tolerance for computing chains
440
- * @returns chains, possibly wrapped in BagOfCurves if there multiple chains
439
+ * @param gapTolerance distance to be treated as "effectively zero" when assembling fragments head-to-tail
440
+ * @returns chains, possibly wrapped in a [[BagOfCurves]].
441
441
  */
442
442
  static collectChains(fragments, gapTolerance = Geometry_1.Geometry.smallMetricDistance) {
443
- return MultiChainCollector_1.OffsetHelpers.collectChains(fragments, gapTolerance);
443
+ return CurveOps_1.CurveOps.collectChains(fragments, gapTolerance);
444
444
  }
445
445
  /**
446
446
  * Find all intersections among curves in `curvesToCut` against the boundaries of `region` and return fragments