@itwin/core-geometry 5.1.0-dev.17 → 5.1.0-dev.18

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 (277) hide show
  1. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  2. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  3. package/lib/cjs/clipping/ClipPlane.js +9 -5
  4. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  5. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  6. package/lib/cjs/clipping/ConvexClipPlaneSet.js +12 -23
  7. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  8. package/lib/cjs/core-geometry.d.ts +1 -0
  9. package/lib/cjs/core-geometry.d.ts.map +1 -1
  10. package/lib/cjs/core-geometry.js +1 -0
  11. package/lib/cjs/core-geometry.js.map +1 -1
  12. package/lib/cjs/curve/Arc3d.d.ts +53 -31
  13. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  14. package/lib/cjs/curve/Arc3d.js +55 -36
  15. package/lib/cjs/curve/Arc3d.js.map +1 -1
  16. package/lib/cjs/curve/CurveCollection.d.ts +2 -0
  17. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  18. package/lib/cjs/curve/CurveCollection.js +14 -0
  19. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  20. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  21. package/lib/cjs/curve/LineSegment3d.js +1 -0
  22. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  23. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  24. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  25. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  26. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  27. package/lib/cjs/curve/Query/PlanarSubdivision.js +7 -2
  28. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  29. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  30. package/lib/cjs/curve/RegionMomentsXY.js +1 -1
  31. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  32. package/lib/cjs/curve/RegionOps.d.ts +32 -28
  33. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  34. package/lib/cjs/curve/RegionOps.js +32 -28
  35. package/lib/cjs/curve/RegionOps.js.map +1 -1
  36. package/lib/cjs/geometry3d/AngleSweep.d.ts +14 -11
  37. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  38. package/lib/cjs/geometry3d/AngleSweep.js +14 -11
  39. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  40. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +7 -2
  41. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  42. package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -2
  43. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  44. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +2 -1
  45. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  46. package/lib/cjs/geometry3d/IndexedXYZCollection.js +7 -3
  47. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  48. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  49. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  50. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  51. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  52. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  53. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  54. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  55. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  56. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  57. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  58. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  59. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  60. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +3 -3
  61. package/lib/cjs/geometry3d/Point3dVector3d.js +3 -3
  62. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  63. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  64. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  65. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  66. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  67. package/lib/cjs/geometry3d/PolygonOps.d.ts +49 -2
  68. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  69. package/lib/cjs/geometry3d/PolygonOps.js +38 -2
  70. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  71. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  72. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  73. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  74. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  75. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  76. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  77. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  78. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  79. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  80. package/lib/cjs/geometry3d/Ray3d.js +11 -23
  81. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  82. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  83. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  84. package/lib/cjs/geometry3d/Transform.js +32 -13
  85. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  86. package/lib/cjs/geometry4d/Point4d.d.ts +4 -2
  87. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  88. package/lib/cjs/geometry4d/Point4d.js +17 -13
  89. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  90. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  91. package/lib/cjs/polyface/FacetOrientation.js +1 -1
  92. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  93. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  94. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  95. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  96. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  97. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  98. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  99. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  100. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  101. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  102. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  103. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +47 -32
  104. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  105. package/lib/cjs/polyface/Polyface.d.ts +17 -3
  106. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  107. package/lib/cjs/polyface/Polyface.js +16 -0
  108. package/lib/cjs/polyface/Polyface.js.map +1 -1
  109. package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
  110. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  111. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  112. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  113. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  114. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  115. package/lib/cjs/polyface/PolyfaceQuery.d.ts +116 -75
  116. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  117. package/lib/cjs/polyface/PolyfaceQuery.js +312 -228
  118. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  119. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  120. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  121. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  122. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  123. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  124. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  125. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  126. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  127. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  128. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  129. package/lib/cjs/solid/LinearSweep.d.ts +2 -3
  130. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  131. package/lib/cjs/solid/LinearSweep.js +2 -3
  132. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  133. package/lib/cjs/solid/RotationalSweep.d.ts +2 -2
  134. package/lib/cjs/solid/RotationalSweep.js +2 -2
  135. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  136. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  137. package/lib/cjs/topology/ChainMerge.js +1 -1
  138. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  139. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  140. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  141. package/lib/esm/clipping/ClipPlane.js +9 -5
  142. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  143. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  144. package/lib/esm/clipping/ConvexClipPlaneSet.js +12 -23
  145. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  146. package/lib/esm/core-geometry.d.ts +1 -0
  147. package/lib/esm/core-geometry.d.ts.map +1 -1
  148. package/lib/esm/core-geometry.js +1 -0
  149. package/lib/esm/core-geometry.js.map +1 -1
  150. package/lib/esm/curve/Arc3d.d.ts +53 -31
  151. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  152. package/lib/esm/curve/Arc3d.js +55 -36
  153. package/lib/esm/curve/Arc3d.js.map +1 -1
  154. package/lib/esm/curve/CurveCollection.d.ts +2 -0
  155. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  156. package/lib/esm/curve/CurveCollection.js +14 -0
  157. package/lib/esm/curve/CurveCollection.js.map +1 -1
  158. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  159. package/lib/esm/curve/LineSegment3d.js +1 -0
  160. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  161. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  162. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  163. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  164. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  165. package/lib/esm/curve/Query/PlanarSubdivision.js +7 -2
  166. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  167. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  168. package/lib/esm/curve/RegionMomentsXY.js +1 -1
  169. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  170. package/lib/esm/curve/RegionOps.d.ts +32 -28
  171. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  172. package/lib/esm/curve/RegionOps.js +32 -28
  173. package/lib/esm/curve/RegionOps.js.map +1 -1
  174. package/lib/esm/geometry3d/AngleSweep.d.ts +14 -11
  175. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  176. package/lib/esm/geometry3d/AngleSweep.js +14 -11
  177. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  178. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +7 -2
  179. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  180. package/lib/esm/geometry3d/GrowableXYZArray.js +20 -2
  181. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  182. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +2 -1
  183. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  184. package/lib/esm/geometry3d/IndexedXYZCollection.js +7 -3
  185. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  186. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  187. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  188. package/lib/esm/geometry3d/Plane3d.js +6 -1
  189. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  190. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  191. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  192. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  193. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  194. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  195. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  196. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  197. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  198. package/lib/esm/geometry3d/Point3dVector3d.d.ts +3 -3
  199. package/lib/esm/geometry3d/Point3dVector3d.js +3 -3
  200. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  201. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  202. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  203. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  204. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  205. package/lib/esm/geometry3d/PolygonOps.d.ts +49 -2
  206. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  207. package/lib/esm/geometry3d/PolygonOps.js +38 -2
  208. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  209. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  210. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  211. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  212. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  213. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  214. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  215. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  216. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  217. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  218. package/lib/esm/geometry3d/Ray3d.js +11 -23
  219. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  220. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  221. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  222. package/lib/esm/geometry3d/Transform.js +32 -13
  223. package/lib/esm/geometry3d/Transform.js.map +1 -1
  224. package/lib/esm/geometry4d/Point4d.d.ts +4 -2
  225. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  226. package/lib/esm/geometry4d/Point4d.js +17 -13
  227. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  228. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  229. package/lib/esm/polyface/FacetOrientation.js +1 -1
  230. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  231. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  232. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  233. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  234. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  235. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  236. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  237. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  238. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  239. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  240. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  241. package/lib/esm/polyface/IndexedPolyfaceWalker.js +47 -32
  242. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  243. package/lib/esm/polyface/Polyface.d.ts +17 -3
  244. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  245. package/lib/esm/polyface/Polyface.js +16 -0
  246. package/lib/esm/polyface/Polyface.js.map +1 -1
  247. package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
  248. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  249. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  250. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  251. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  252. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  253. package/lib/esm/polyface/PolyfaceQuery.d.ts +116 -75
  254. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  255. package/lib/esm/polyface/PolyfaceQuery.js +313 -229
  256. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  257. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  258. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  259. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  260. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  261. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  262. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  263. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  264. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  265. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  266. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  267. package/lib/esm/solid/LinearSweep.d.ts +2 -3
  268. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  269. package/lib/esm/solid/LinearSweep.js +2 -3
  270. package/lib/esm/solid/LinearSweep.js.map +1 -1
  271. package/lib/esm/solid/RotationalSweep.d.ts +2 -2
  272. package/lib/esm/solid/RotationalSweep.js +2 -2
  273. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  274. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  275. package/lib/esm/topology/ChainMerge.js +1 -1
  276. package/lib/esm/topology/ChainMerge.js.map +1 -1
  277. package/package.json +3 -3
@@ -12,10 +12,9 @@ import { XAndY } from "../geometry3d/XYZProps";
12
12
  import { SolidPrimitive } from "./SolidPrimitive";
13
13
  import { SweepContour } from "./SweepContour";
14
14
  /**
15
- * A LinearSweep is a `SolidPrimitive` defined by
16
- * * A set of curves (any Loop, Path, or parityRegion)
15
+ * A LinearSweep is a `SolidPrimitive` defined by:
16
+ * * A set of curves (any Loop, Path, or parityRegion). If the object is "capped", the curves must be planar.
17
17
  * * A sweep vector
18
- * If the object is "capped", the curves must be planar.
19
18
  * @public
20
19
  */
21
20
  export declare class LinearSweep extends SolidPrimitive {
@@ -1 +1 @@
1
- {"version":3,"file":"LinearSweep.d.ts","sourceRoot":"","sources":["../../../src/solid/LinearSweep.ts"],"names":[],"mappings":"AAKA;;GAE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AO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,UAAU,CAAW;IAE7B,OAAO;IAKP;;;;;OAKG;WACW,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS;IAMtG;;;;;;;;;;OAUG;WACW,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS;IAWlH,0CAA0C;IACnC,YAAY,IAAI,eAAe;IACtC,6EAA6E;IACtE,kBAAkB,IAAI,YAAY;IACzC,yCAAyC;IAClC,gBAAgB,IAAI,QAAQ;IACnC,2DAA2D;IACpD,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAC/C,0BAA0B;IACnB,KAAK,IAAI,WAAW;IAG3B;;;OAGG;IACI,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO;IAUzD;;;;OAIG;IACI,oBAAoB,IAAI,SAAS,GAAG,SAAS;IAGpD;;;OAGG;IACI,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS;IAItE,uDAAuD;IACvC,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAQ5D,8DAA8D;IACvD,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;IAG/D;;;OAGG;IACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAMvE,uDAAuD;IAChD,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,SAAS;IAahE;;OAEG;IACH,IAAW,cAAc,IAAI,OAAO,CAEnC;CACF"}
@@ -14,10 +14,9 @@ const Transform_1 = require("../geometry3d/Transform");
14
14
  const SolidPrimitive_1 = require("./SolidPrimitive");
15
15
  const SweepContour_1 = require("./SweepContour");
16
16
  /**
17
- * A LinearSweep is a `SolidPrimitive` defined by
18
- * * A set of curves (any Loop, Path, or parityRegion)
17
+ * A LinearSweep is a `SolidPrimitive` defined by:
18
+ * * A set of curves (any Loop, Path, or parityRegion). If the object is "capped", the curves must be planar.
19
19
  * * A sweep vector
20
- * If the object is "capped", the curves must be planar.
21
20
  * @public
22
21
  */
23
22
  class LinearSweep extends SolidPrimitive_1.SolidPrimitive {
@@ -1 +1 @@
1
- {"version":3,"file":"LinearSweep.js","sourceRoot":"","sources":["../../../src/solid/LinearSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,wDAAqD;AACrD,wCAAqC;AACrC,wCAAqC;AAErC,mEAAyD;AACzD,yDAAsD;AAEtD,uDAAoD;AAEpD,qDAAkD;AAClD,iDAA8C;AAE9C;;;;;;GAMG;AACH,MAAa,WAAY,SAAQ,+BAAc;IAC7C,wCAAwC;IACxB,kBAAkB,GAAG,aAAa,CAAC;IAE3C,QAAQ,CAAe;IACvB,UAAU,CAAW;IAE7B,YAAoB,OAAqB,EAAE,SAAmB,EAAE,MAAe;QAC7E,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,MAAM,CAAC,OAAiB,EAAE,SAAmB,EAAE,MAAe;QAC1E,MAAM,SAAS,GAAG,2BAAY,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxE,IAAI,CAAC,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,OAAO,IAAI,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IACD;;;;;;;;;;OAUG;IACI,MAAM,CAAC,YAAY,CAAC,QAAiB,EAAE,CAAS,EAAE,MAAc,EAAE,MAAe;QACtF,MAAM,GAAG,GAAG,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AAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7F,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,uDAAuD;IAChD,WAAW,CAAC,aAAsB,EAAE,SAAqB;QAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3D,aAAa,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,oBAAoB,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACvE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;YAClD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC7C,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;QACD,aAAa,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;IACD;;OAEG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC;IAC7D,CAAC;CACF;AAnID,kCAmIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Loop } from \"../curve/Loop\";\nimport { Path } from \"../curve/Path\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { XAndY } from \"../geometry3d/XYZProps\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * A LinearSweep is a `SolidPrimitive` defined by\n * * A set of curves (any Loop, Path, or parityRegion)\n * * A sweep vector\n * If the object is \"capped\", the curves must be planar.\n * @public\n */\nexport class LinearSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"linearSweep\";\n\n private _contour: SweepContour;\n private _direction: Vector3d;\n\n private constructor(contour: SweepContour, direction: Vector3d, capped: boolean) {\n super(capped);\n this._contour = contour;\n this._direction = direction;\n }\n /**\n * Create a sweep of a starting contour.\n * @param contour contour to be swept, CAPTURED\n * @param direction sweep vector. The contour is swept the full length of the vector.\n * @param capped true to include end caps\n */\n public static create(contour: AnyCurve, direction: Vector3d, capped: boolean): LinearSweep | undefined {\n const sweepable = SweepContour.createForLinearSweep(contour, direction);\n if (!sweepable)\n return undefined;\n return new LinearSweep(sweepable, direction, capped);\n }\n /** Create a z-direction sweep of the polyline or polygon given as xy linestring values.\n * * If not capped, the xyPoints array is always used unchanged.\n * * If capped but the xyPoints array does not close, exact closure will be enforced by one of these:\n * * * If the final point is almost equal to the first, it is replaced by the exact first point.\n * * * if the final point is not close to the first an extra point is added.\n * * If capped, the point order will be reversed if necessary to produce positive volume.\n * @param xyPoints array of xy coordinates\n * @param z z value to be used for all coordinates\n * @param zSweep the sweep distance in the z direction.\n * @param capped true if caps are to be added.\n */\n public static createZSweep(xyPoints: XAndY[], z: number, zSweep: number, capped: boolean): LinearSweep | undefined {\n const xyz = LineString3d.createXY(xyPoints, z, capped);\n if (capped) {\n xyz.addClosurePoint();\n const area = PolygonOps.areaXY(xyz.points);\n if (area * zSweep < 0.0)\n xyz.points.reverse();\n }\n const contour: CurveCollection = capped ? Loop.create(xyz) : Path.create(xyz);\n return LinearSweep.create(contour, Vector3d.create(0, 0, zSweep), capped);\n }\n /** get a reference to the swept curves */\n public getCurvesRef(): CurveCollection { return this._contour.curves; }\n /** Get a reference to the `SweepContour` carrying the plane of the curves */\n public getSweepContourRef(): SweepContour { return this._contour; }\n /** return a clone of the sweep vector */\n public cloneSweepVector(): Vector3d { return this._direction.clone(); }\n /** Test if `other` is also an instance of `LinearSweep` */\n public isSameGeometryClass(other: any): boolean { return other instanceof LinearSweep; }\n /** Return a deep clone */\n public clone(): LinearSweep {\n return new LinearSweep(this._contour.clone(), this._direction.clone(), this.capped);\n }\n /**\n * Apply a transform to the curves and sweep vector\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n if (this._contour.tryTransformInPlace(transform)) {\n transform.multiplyVector(this._direction, this._direction);\n return true;\n }\n return false;\n }\n\n /** Return a coordinate frame (right handed unit vectors)\n * * origin on base contour\n * * x, y directions from base contour.\n * * z direction perpendicular\n */\n public getConstructiveFrame(): Transform | undefined {\n return this._contour.localToWorld.cloneRigid();\n }\n /**\n * Return a transformed clone.\n * * This fails if the transformation is singular.\n */\n public cloneTransformed(transform: Transform): LinearSweep | undefined {\n const result = this.clone();\n return result.tryTransformInPlace(transform) ? result : undefined;\n }\n /** Test for near-equality of coordinates in `other` */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof LinearSweep) {\n return this._contour.isAlmostEqual(other._contour)\n && this._direction.isAlmostEqual(other._direction)\n && this.capped === other.capped;\n }\n return false;\n }\n /** Invoke strongly typed `handler.handleLinearSweep(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleLinearSweep(this);\n }\n /**\n * Return the curves at a fraction along the sweep direction.\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const section = this._contour.curves.clone();\n if (section && vFraction !== 0.0)\n section.tryTransformInPlace(Transform.createTranslation(this._direction.scale(vFraction)));\n return section;\n }\n /** Extend `rangeToExtend` to include this geometry. */\n public extendRange(rangeToExtend: Range3d, transform?: Transform) {\n const contourRange = this._contour.curves.range(transform);\n rangeToExtend.extendRange(contourRange);\n if (transform) {\n const transformedDirection = transform.multiplyVector(this._direction);\n contourRange.low.addInPlace(transformedDirection);\n contourRange.high.addInPlace(transformedDirection);\n } else {\n contourRange.low.addInPlace(this._direction);\n contourRange.high.addInPlace(this._direction);\n }\n rangeToExtend.extendRange(contourRange);\n }\n /**\n * @return true if this is a closed volume.\n */\n public get isClosedVolume(): boolean {\n return this.capped && this._contour.curves.isAnyRegionType;\n }\n}\n"]}
1
+ {"version":3,"file":"LinearSweep.js","sourceRoot":"","sources":["../../../src/solid/LinearSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,wDAAqD;AACrD,wCAAqC;AACrC,wCAAqC;AAErC,mEAAyD;AACzD,yDAAsD;AAEtD,uDAAoD;AAEpD,qDAAkD;AAClD,iDAA8C;AAE9C;;;;;GAKG;AACH,MAAa,WAAY,SAAQ,+BAAc;IAC7C,wCAAwC;IACxB,kBAAkB,GAAG,aAAa,CAAC;IAE3C,QAAQ,CAAe;IACvB,UAAU,CAAW;IAE7B,YAAoB,OAAqB,EAAE,SAAmB,EAAE,MAAe;QAC7E,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,MAAM,CAAC,OAAiB,EAAE,SAAmB,EAAE,MAAe;QAC1E,MAAM,SAAS,GAAG,2BAAY,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxE,IAAI,CAAC,SAA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zC,CAAC;IACD;;;OAGG;IACI,gBAAgB,CAAC,SAAiB;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC7C,IAAI,OAAO,IAAI,SAAS,KAAK,GAAG;YAC9B,OAAO,CAAC,mBAAmB,CAAC,qBAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7F,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,uDAAuD;IAChD,WAAW,CAAC,aAAsB,EAAE,SAAqB;QAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC3D,aAAa,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,oBAAoB,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACvE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;YAClD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC7C,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC;QACD,aAAa,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;IACD;;OAEG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC;IAC7D,CAAC;CACF;AAnID,kCAmIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Loop } from \"../curve/Loop\";\nimport { Path } from \"../curve/Path\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { XAndY } from \"../geometry3d/XYZProps\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * A LinearSweep is a `SolidPrimitive` defined by:\n * * A set of curves (any Loop, Path, or parityRegion). If the object is \"capped\", the curves must be planar.\n * * A sweep vector\n * @public\n */\nexport class LinearSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"linearSweep\";\n\n private _contour: SweepContour;\n private _direction: Vector3d;\n\n private constructor(contour: SweepContour, direction: Vector3d, capped: boolean) {\n super(capped);\n this._contour = contour;\n this._direction = direction;\n }\n /**\n * Create a sweep of a starting contour.\n * @param contour contour to be swept, CAPTURED\n * @param direction sweep vector. The contour is swept the full length of the vector.\n * @param capped true to include end caps\n */\n public static create(contour: AnyCurve, direction: Vector3d, capped: boolean): LinearSweep | undefined {\n const sweepable = SweepContour.createForLinearSweep(contour, direction);\n if (!sweepable)\n return undefined;\n return new LinearSweep(sweepable, direction, capped);\n }\n /** Create a z-direction sweep of the polyline or polygon given as xy linestring values.\n * * If not capped, the xyPoints array is always used unchanged.\n * * If capped but the xyPoints array does not close, exact closure will be enforced by one of these:\n * * * If the final point is almost equal to the first, it is replaced by the exact first point.\n * * * if the final point is not close to the first an extra point is added.\n * * If capped, the point order will be reversed if necessary to produce positive volume.\n * @param xyPoints array of xy coordinates\n * @param z z value to be used for all coordinates\n * @param zSweep the sweep distance in the z direction.\n * @param capped true if caps are to be added.\n */\n public static createZSweep(xyPoints: XAndY[], z: number, zSweep: number, capped: boolean): LinearSweep | undefined {\n const xyz = LineString3d.createXY(xyPoints, z, capped);\n if (capped) {\n xyz.addClosurePoint();\n const area = PolygonOps.areaXY(xyz.points);\n if (area * zSweep < 0.0)\n xyz.points.reverse();\n }\n const contour: CurveCollection = capped ? Loop.create(xyz) : Path.create(xyz);\n return LinearSweep.create(contour, Vector3d.create(0, 0, zSweep), capped);\n }\n /** get a reference to the swept curves */\n public getCurvesRef(): CurveCollection { return this._contour.curves; }\n /** Get a reference to the `SweepContour` carrying the plane of the curves */\n public getSweepContourRef(): SweepContour { return this._contour; }\n /** return a clone of the sweep vector */\n public cloneSweepVector(): Vector3d { return this._direction.clone(); }\n /** Test if `other` is also an instance of `LinearSweep` */\n public isSameGeometryClass(other: any): boolean { return other instanceof LinearSweep; }\n /** Return a deep clone */\n public clone(): LinearSweep {\n return new LinearSweep(this._contour.clone(), this._direction.clone(), this.capped);\n }\n /**\n * Apply a transform to the curves and sweep vector\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n if (this._contour.tryTransformInPlace(transform)) {\n transform.multiplyVector(this._direction, this._direction);\n return true;\n }\n return false;\n }\n\n /** Return a coordinate frame (right handed unit vectors)\n * * origin on base contour\n * * x, y directions from base contour.\n * * z direction perpendicular\n */\n public getConstructiveFrame(): Transform | undefined {\n return this._contour.localToWorld.cloneRigid();\n }\n /**\n * Return a transformed clone.\n * * This fails if the transformation is singular.\n */\n public cloneTransformed(transform: Transform): LinearSweep | undefined {\n const result = this.clone();\n return result.tryTransformInPlace(transform) ? result : undefined;\n }\n /** Test for near-equality of coordinates in `other` */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof LinearSweep) {\n return this._contour.isAlmostEqual(other._contour)\n && this._direction.isAlmostEqual(other._direction)\n && this.capped === other.capped;\n }\n return false;\n }\n /** Invoke strongly typed `handler.handleLinearSweep(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleLinearSweep(this);\n }\n /**\n * Return the curves at a fraction along the sweep direction.\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const section = this._contour.curves.clone();\n if (section && vFraction !== 0.0)\n section.tryTransformInPlace(Transform.createTranslation(this._direction.scale(vFraction)));\n return section;\n }\n /** Extend `rangeToExtend` to include this geometry. */\n public extendRange(rangeToExtend: Range3d, transform?: Transform) {\n const contourRange = this._contour.curves.range(transform);\n rangeToExtend.extendRange(contourRange);\n if (transform) {\n const transformedDirection = transform.multiplyVector(this._direction);\n contourRange.low.addInPlace(transformedDirection);\n contourRange.high.addInPlace(transformedDirection);\n } else {\n contourRange.low.addInPlace(this._direction);\n contourRange.high.addInPlace(this._direction);\n }\n rangeToExtend.extendRange(contourRange);\n }\n /**\n * @return true if this is a closed volume.\n */\n public get isClosedVolume(): boolean {\n return this.capped && this._contour.curves.isAnyRegionType;\n }\n}\n"]}
@@ -12,8 +12,8 @@ import { Transform } from "../geometry3d/Transform";
12
12
  import { SolidPrimitive } from "./SolidPrimitive";
13
13
  import { SweepContour } from "./SweepContour";
14
14
  /**
15
- * A RotationalSweep is
16
- * * A planar contour (any Loop, Path, or parityRegion).
15
+ * A RotationalSweep is:
16
+ * * A planar contour (any Loop, Path, or parityRegion)
17
17
  * * An axis vector.
18
18
  * * The planar contour is expected to be in the plane of the axis vector.
19
19
  * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.
@@ -13,8 +13,8 @@ const Transform_1 = require("../geometry3d/Transform");
13
13
  const SolidPrimitive_1 = require("./SolidPrimitive");
14
14
  const SweepContour_1 = require("./SweepContour");
15
15
  /**
16
- * A RotationalSweep is
17
- * * A planar contour (any Loop, Path, or parityRegion).
16
+ * A RotationalSweep is:
17
+ * * A planar contour (any Loop, Path, or parityRegion)
18
18
  * * An axis vector.
19
19
  * * The planar contour is expected to be in the plane of the axis vector.
20
20
  * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.
@@ -1 +1 @@
1
- {"version":3,"file":"RotationalSweep.js","sourceRoot":"","sources":["../../../src/solid/RotationalSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,0DAAuD;AACvD,0CAAkD;AAClD,+CAA4C;AAE5C,qDAAkD;AAGlD,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAE9C;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,+BAAc;IACjD,wCAAwC;IACxB,kBAAkB,GAAG,iBAAiB,CAAC;IAE/C,QAAQ,CAAe;IACvB,eAAe,CAAQ;IACvB,WAAW,CAAQ;IAC3B,YAAoB,OAAqB,EAAE,cAAqB,EAAE,UAAiB,EAAE,MAAe;QAClG,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,OAAiB,EAAE,IAAW,EAAE,UAAiB,EAAE,MAAe;QACrF,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;YACpC,OAAO,SAAS,CAAC;QACnB,MAAM,SAAS,GAAG,2BAAY,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAChE,IAAI,CAAC,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,OAAO,IAAI,eAAe,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;IACD;;;;;OAKG;IACI,oBAAoB;QACzB,MAAM,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ClC,SAAS,CAAC,0BAA0B,CAClC,IAAI,CAAC,8BAA8B,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,EAAE,kBAAkB,CACpF,CAAC;gBACF,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE;gBAC/B,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,8BAA8B,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;QAChG,CAAC;IACH,CAAC;IACD,kDAAkD;IAClD,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;IACtD,CAAC;CACF;AAnJD,0CAmJC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { AxisOrder, Geometry } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * A RotationalSweep is\n * * A planar contour (any Loop, Path, or parityRegion).\n * * An axis vector.\n * * The planar contour is expected to be in the plane of the axis vector.\n * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.\n * * A sweep angle.\n * @public\n */\nexport class RotationalSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"rotationalSweep\";\n\n private _contour: SweepContour;\n private _normalizedAxis: Ray3d;\n private _sweepAngle: Angle;\n private constructor(contour: SweepContour, normalizedAxis: Ray3d, sweepAngle: Angle, capped: boolean) {\n super(capped);\n this._contour = contour;\n this._normalizedAxis = normalizedAxis;\n this._sweepAngle = sweepAngle;\n }\n /**\n * Create a rotational sweep.\n * @param contour profile to sweep, coplanar with axis (CAPTURED).\n * @param axis rotation axis.\n * @param sweepAngle signed angular sweep.\n * @param capped whether to cap the surface to make a solid.\n */\n public static create(contour: AnyCurve, axis: Ray3d, sweepAngle: Angle, capped: boolean): RotationalSweep | undefined {\n if (!axis.direction.normalizeInPlace())\n return undefined;\n const sweepable = SweepContour.createForRotation(contour, axis);\n if (!sweepable)\n return undefined;\n return new RotationalSweep(sweepable, axis, sweepAngle.clone(), capped);\n }\n /**\n * Return a coordinate frame (right handed unit vectors).\n * * origin at origin of rotation ray.\n * * z direction along the rotation ray.\n * * y direction perpendicular to the base contour plane.\n */\n public getConstructiveFrame(): Transform | undefined {\n const contourPerpendicular = this._contour.localToWorld.matrix.columnZ();\n const axes = Matrix3d.createRigidFromColumns(contourPerpendicular, this._normalizedAxis.direction, AxisOrder.YZX);\n if (axes) {\n return Transform.createOriginAndMatrix(this._normalizedAxis.origin, axes);\n }\n return undefined;\n }\n /** Return clone of (not reference to) the axis vector. */\n public cloneAxisRay(): Ray3d {\n return this._normalizedAxis.clone();\n }\n /** Return (REFERENCE TO) the swept curves. */\n public getCurves(): CurveCollection {\n return this._contour.curves;\n }\n /** Return (REFERENCE TO) the swept curves with containing plane markup. */\n public getSweepContourRef(): SweepContour {\n return this._contour;\n }\n /** Return the sweep angle. */\n public getSweep(): Angle {\n return this._sweepAngle.clone();\n }\n /** Test if `other` is a `RotationalSweep` */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof RotationalSweep;\n }\n /** Test for same axis, capping, and swept geometry. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof RotationalSweep) {\n return this._contour.isAlmostEqual(other._contour)\n && this._normalizedAxis.isAlmostEqual(other._normalizedAxis)\n && this._sweepAngle.isAlmostEqual(other._sweepAngle)\n && this.capped === other.capped;\n }\n return false;\n }\n /** Return a deep clone */\n public clone(): RotationalSweep {\n return new RotationalSweep(this._contour.clone(), this._normalizedAxis.clone(), this._sweepAngle.clone(), this.capped);\n }\n /**\n * Transform the contour and axis.\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n if (this._contour.tryTransformInPlace(transform)) {\n this._normalizedAxis.transformInPlace(transform);\n if (transform.matrix.determinant() < 0.0)\n this._sweepAngle.setRadians(-this._sweepAngle.radians);\n return this._normalizedAxis.direction.normalizeInPlace();\n }\n return false;\n }\n /**\n * Return a transformed clone.\n * * This fails if the transformation is singular.\n */\n public cloneTransformed(transform: Transform): RotationalSweep | undefined {\n const result = this.clone();\n return result.tryTransformInPlace(transform) ? result : undefined;\n }\n /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleRotationalSweep(this);\n }\n /** Return a transform that rotates around the rotational axis by a fraction of the total sweep. */\n public getFractionalRotationTransform(vFraction: number, result?: Transform): Transform {\n const radians = this._sweepAngle.radians * vFraction;\n const rotation = Transform.createFixedPointAndMatrix(this._normalizedAxis.origin,\n Matrix3d.createRotationAroundVector(this._normalizedAxis.direction, Angle.createRadians(radians),\n result ? result.matrix : undefined) as Matrix3d);\n return rotation;\n }\n /**\n * Return the curves of a constant-v section of the solid.\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const section = this._contour.curves.clone();\n if (section) {\n section.tryTransformInPlace(this.getFractionalRotationTransform(vFraction));\n }\n return section;\n }\n /** Extend range using sampled points on the surface. */\n public extendRange(range: Range3d, transform?: Transform) {\n const degreeStep = 360 / 32;\n const options = StrokeOptions.createForCurves();\n options.angleTol = Angle.createDegrees(degreeStep);\n const strokes = this._contour.curves.cloneStroked(options);\n const numStep = Geometry.stepCount(degreeStep, this._sweepAngle.degrees, 4, 32);\n const stepTransform = Transform.createIdentity();\n if (transform) {\n const compositeTransform = Transform.createIdentity();\n for (let i = 0; i <= numStep; i++) {\n transform.multiplyTransformTransform(\n this.getFractionalRotationTransform(i / numStep, stepTransform), compositeTransform,\n );\n strokes.extendRange(range, compositeTransform);\n }\n } else {\n for (let i = 0; i <= numStep; i++)\n strokes.extendRange(range, this.getFractionalRotationTransform(i / numStep, stepTransform));\n }\n }\n /** Specify if the sweep forms a closed volume. */\n public get isClosedVolume(): boolean {\n return this.capped || this._sweepAngle.isFullCircle;\n }\n}\n"]}
1
+ {"version":3,"file":"RotationalSweep.js","sourceRoot":"","sources":["../../../src/solid/RotationalSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,0DAAuD;AACvD,0CAAkD;AAClD,+CAA4C;AAE5C,qDAAkD;AAGlD,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAE9C;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,+BAAc;IACjD,wCAAwC;IACxB,kBAAkB,GAAG,iBAAiB,CAAC;IAE/C,QAAQ,CAAe;IACvB,eAAe,CAAQ;IACvB,WAAW,CAAQ;IAC3B,YAAoB,OAAqB,EAAE,cAAqB,EAAE,UAAiB,EAAE,MAAe;QAClG,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAAM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AQ,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,mBAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAChF,MAAM,aAAa,GAAG,qBAAS,CAAC,cAAc,EAAE,CAAC;QACjD,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,kBAAkB,GAAG,qBAAS,CAAC,cAAc,EAAE,CAAC;YACtD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;gBAClC,SAAS,CAAC,0BAA0B,CAClC,IAAI,CAAC,8BAA8B,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,EAAE,kBAAkB,CACpF,CAAC;gBACF,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE;gBAC/B,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,8BAA8B,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;QAChG,CAAC;IACH,CAAC;IACD,kDAAkD;IAClD,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;IACtD,CAAC;CACF;AAnJD,0CAmJC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Solid\n */\n\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { AxisOrder, Geometry } from \"../Geometry\";\nimport { Angle } from \"../geometry3d/Angle\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * A RotationalSweep is:\n * * A planar contour (any Loop, Path, or parityRegion)\n * * An axis vector.\n * * The planar contour is expected to be in the plane of the axis vector.\n * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.\n * * A sweep angle.\n * @public\n */\nexport class RotationalSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"rotationalSweep\";\n\n private _contour: SweepContour;\n private _normalizedAxis: Ray3d;\n private _sweepAngle: Angle;\n private constructor(contour: SweepContour, normalizedAxis: Ray3d, sweepAngle: Angle, capped: boolean) {\n super(capped);\n this._contour = contour;\n this._normalizedAxis = normalizedAxis;\n this._sweepAngle = sweepAngle;\n }\n /**\n * Create a rotational sweep.\n * @param contour profile to sweep, coplanar with axis (CAPTURED).\n * @param axis rotation axis.\n * @param sweepAngle signed angular sweep.\n * @param capped whether to cap the surface to make a solid.\n */\n public static create(contour: AnyCurve, axis: Ray3d, sweepAngle: Angle, capped: boolean): RotationalSweep | undefined {\n if (!axis.direction.normalizeInPlace())\n return undefined;\n const sweepable = SweepContour.createForRotation(contour, axis);\n if (!sweepable)\n return undefined;\n return new RotationalSweep(sweepable, axis, sweepAngle.clone(), capped);\n }\n /**\n * Return a coordinate frame (right handed unit vectors).\n * * origin at origin of rotation ray.\n * * z direction along the rotation ray.\n * * y direction perpendicular to the base contour plane.\n */\n public getConstructiveFrame(): Transform | undefined {\n const contourPerpendicular = this._contour.localToWorld.matrix.columnZ();\n const axes = Matrix3d.createRigidFromColumns(contourPerpendicular, this._normalizedAxis.direction, AxisOrder.YZX);\n if (axes) {\n return Transform.createOriginAndMatrix(this._normalizedAxis.origin, axes);\n }\n return undefined;\n }\n /** Return clone of (not reference to) the axis vector. */\n public cloneAxisRay(): Ray3d {\n return this._normalizedAxis.clone();\n }\n /** Return (REFERENCE TO) the swept curves. */\n public getCurves(): CurveCollection {\n return this._contour.curves;\n }\n /** Return (REFERENCE TO) the swept curves with containing plane markup. */\n public getSweepContourRef(): SweepContour {\n return this._contour;\n }\n /** Return the sweep angle. */\n public getSweep(): Angle {\n return this._sweepAngle.clone();\n }\n /** Test if `other` is a `RotationalSweep` */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof RotationalSweep;\n }\n /** Test for same axis, capping, and swept geometry. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof RotationalSweep) {\n return this._contour.isAlmostEqual(other._contour)\n && this._normalizedAxis.isAlmostEqual(other._normalizedAxis)\n && this._sweepAngle.isAlmostEqual(other._sweepAngle)\n && this.capped === other.capped;\n }\n return false;\n }\n /** Return a deep clone */\n public clone(): RotationalSweep {\n return new RotationalSweep(this._contour.clone(), this._normalizedAxis.clone(), this._sweepAngle.clone(), this.capped);\n }\n /**\n * Transform the contour and axis.\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n if (this._contour.tryTransformInPlace(transform)) {\n this._normalizedAxis.transformInPlace(transform);\n if (transform.matrix.determinant() < 0.0)\n this._sweepAngle.setRadians(-this._sweepAngle.radians);\n return this._normalizedAxis.direction.normalizeInPlace();\n }\n return false;\n }\n /**\n * Return a transformed clone.\n * * This fails if the transformation is singular.\n */\n public cloneTransformed(transform: Transform): RotationalSweep | undefined {\n const result = this.clone();\n return result.tryTransformInPlace(transform) ? result : undefined;\n }\n /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleRotationalSweep(this);\n }\n /** Return a transform that rotates around the rotational axis by a fraction of the total sweep. */\n public getFractionalRotationTransform(vFraction: number, result?: Transform): Transform {\n const radians = this._sweepAngle.radians * vFraction;\n const rotation = Transform.createFixedPointAndMatrix(this._normalizedAxis.origin,\n Matrix3d.createRotationAroundVector(this._normalizedAxis.direction, Angle.createRadians(radians),\n result ? result.matrix : undefined) as Matrix3d);\n return rotation;\n }\n /**\n * Return the curves of a constant-v section of the solid.\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const section = this._contour.curves.clone();\n if (section) {\n section.tryTransformInPlace(this.getFractionalRotationTransform(vFraction));\n }\n return section;\n }\n /** Extend range using sampled points on the surface. */\n public extendRange(range: Range3d, transform?: Transform) {\n const degreeStep = 360 / 32;\n const options = StrokeOptions.createForCurves();\n options.angleTol = Angle.createDegrees(degreeStep);\n const strokes = this._contour.curves.cloneStroked(options);\n const numStep = Geometry.stepCount(degreeStep, this._sweepAngle.degrees, 4, 32);\n const stepTransform = Transform.createIdentity();\n if (transform) {\n const compositeTransform = Transform.createIdentity();\n for (let i = 0; i <= numStep; i++) {\n transform.multiplyTransformTransform(\n this.getFractionalRotationTransform(i / numStep, stepTransform), compositeTransform,\n );\n strokes.extendRange(range, compositeTransform);\n }\n } else {\n for (let i = 0; i <= numStep; i++)\n strokes.extendRange(range, this.getFractionalRotationTransform(i / numStep, stepTransform));\n }\n }\n /** Specify if the sweep forms a closed volume. */\n public get isClosedVolume(): boolean {\n return this.capped || this._sweepAngle.isFullCircle;\n }\n}\n"]}
@@ -110,7 +110,7 @@ export declare class ChainMergeContext {
110
110
  * * Return the number of excisions.
111
111
  */
112
112
  private exciseAndMarkSlingEdges;
113
- /** Collect chains which have maximum edge count, broken at an vertex with other than 2 edges.
113
+ /** Collect chains which have maximum edge count, broken at vertices with more than 2 edges.
114
114
  * * This is assumed to be preceded by a call to a vertex-cluster step such as `clusterAndMergeVerticesYXZ`
115
115
  */
116
116
  collectMaximalChains(): LineString3d[];
@@ -250,7 +250,7 @@ class ChainMergeContext {
250
250
  }
251
251
  return n;
252
252
  }
253
- /** Collect chains which have maximum edge count, broken at an vertex with other than 2 edges.
253
+ /** Collect chains which have maximum edge count, broken at vertices with more than 2 edges.
254
254
  * * This is assumed to be preceded by a call to a vertex-cluster step such as `clusterAndMergeVerticesYXZ`
255
255
  */
256
256
  collectMaximalChains() {
@@ -1 +1 @@
1
- {"version":3,"file":"ChainMerge.js","sourceRoot":"","sources":["../../../src/topology/ChainMerge.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAQ/F,wDAAqD;AACrD,0CAA+D;AAC/D,qEAAkE;AAClE,mEAAkE;AAClE,mCAAgE;AAChE,uCAA6C;AAoB7C,oGAAoG;AACpG,MAAM,iCAAiC;IACrC;;OAEG;IACI,SAAS,CAAS;IACzB;;OAEG;IACK,MAAM,CAAU,4BAA4B,GAAG,0BAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IAC/G;;OAEG;IACI,oBAAoB,CAAW;IACtC;;OAEG;IACI,MAAM,CAAC,uBAAuB,CAAC,MAAiB;QACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,GAAG,IAAI,CAAC,4BAA4B,CAAC,KAAK,EAAE,CAAC;QACrD,CAAC;QACD,OAAO,MAAM,CAAC,oBAAoB,CAChC,iCAAiC,CAAC,4BAA4B,CAAC,CAAC,EAChE,iCAAiC,CAAC,4BAA4B,CAAC,CAAC,EAChE,iCAAiC,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;IACD;;;;OAIG;IACH,YAAoB,SAAiB,EAAE,wBAAkC;QACvE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;IACvD,CAAC;IACD,qCAAqC;IAC9B,MAAM,CA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KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAC7C,IAAI,CAAC,2CAA2C,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAjOD,8CAiOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Topology\n */\n\nimport { ConvexClipPlaneSet } from \"../clipping/ConvexClipPlaneSet\";\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { HalfEdge, HalfEdgeGraph, HalfEdgeMask } from \"./Graph\";\nimport { HalfEdgeGraphOps } from \"./Merging\";\n\n/**\n * interface containing various options appropriate to merging lines segments into chains.\n * @internal\n */\nexport interface ChainMergeContextOptions {\n /**\n * Tolerance for declaring points equal\n * * Default is `Geometry.smallMetricDistance`\n */\n tolerance?: number;\n /**\n * Direction for primary sort.\n * * Default is `Vector3d.create(0.294234298, 0.72391399, 0.45234328798)`\n * * this vector should NOT be along a principal x,y,z direction.\n * * The internal form will be normalized.\n */\n primarySortDirection?: Vector3d;\n}\n/** Internal form of ChainMergeContextOptions -- same field names, but required to have contents. */\nclass ChainMergeContextValidatedOptions {\n /**\n * Tolerance for declaring points equal.\n */\n public tolerance: number;\n /** UNNORMALIZED base vector for sorting.\n * * Actual vector hoisted into an instance is normalized.\n */\n private static readonly _defaultPrimarySortDirection = Vector3d.create(0.294234298, 0.72391399, 0.45234328798);\n /**\n * Direction for primary sort. This is normalized !!!\n */\n public primarySortDirection: Vector3d;\n /** return a unit vector aligned with optional direction.\n * * Default return is into the first quadrant at a quirky angle so any perpendicular plane is unlikely to hit many points\n */\n public static createPrimarySortVector(vector?: Vector3d): Vector3d {\n if (vector === undefined) {\n vector = this._defaultPrimarySortDirection.clone();\n }\n return vector.normalizeWithDefault(\n ChainMergeContextValidatedOptions._defaultPrimarySortDirection.x,\n ChainMergeContextValidatedOptions._defaultPrimarySortDirection.y,\n ChainMergeContextValidatedOptions._defaultPrimarySortDirection.z);\n }\n /**\n * PRIVATE constructor -- assumes all inputs are validated in public create method !!!!\n * @param tolerance\n * @param unitVectorForPrimarySort\n */\n private constructor(tolerance: number, unitVectorForPrimarySort: Vector3d) {\n this.tolerance = tolerance;\n this.primarySortDirection = unitVectorForPrimarySort;\n }\n /** return the default option set. */\n public static createFromUnValidated(options?: ChainMergeContextOptions): ChainMergeContextValidatedOptions {\n const result = new ChainMergeContextValidatedOptions(Geometry.smallMetricDistance, ChainMergeContextValidatedOptions.createPrimarySortVector());\n if (options !== undefined) {\n if (options.tolerance !== undefined)\n result.tolerance = options.tolerance;\n if (options.primarySortDirection !== undefined)\n result.primarySortDirection = ChainMergeContextValidatedOptions.createPrimarySortVector();\n }\n return result;\n }\n /** Clone this context. */\n public clone(): ChainMergeContextValidatedOptions {\n return new ChainMergeContextValidatedOptions(this.tolerance, this.primarySortDirection);\n }\n}\n/**\n * * Context for assembling line segments into chains.\n * * Use the context in phases:\n * * Create the context: `context = ChainMergeContext.create ()`\n * * Add line with any combination of:\n * * `context.addSegment(pointA, pointB)`\n * * `context.addLineSegment3dArray (segments)`\n * * Scan all coordinate data for common coordinates. Twist nodes together to form chains:\n * * `context.clusterAndMergeVerticesXYZ ()`\n * * Collect the chains:\n * * myLinestringArray = context.collectMaximalChains();\n * * The context carries an optional plane which is used by addSegmentsOnPlane\n *\n * @internal\n */\nexport class ChainMergeContext {\n\n private _graph: HalfEdgeGraph;\n private _options: ChainMergeContextValidatedOptions;\n private _plane?: PlaneAltitudeEvaluator;\n private _convexClipper?: ConvexClipPlaneSet;\n private constructor(options: ChainMergeContextValidatedOptions) {\n this._graph = new HalfEdgeGraph();\n this._options = options;\n }\n /** Save a reference plane for later use, e.g. in addSegmentsOnPlane */\n public set plane(value: PlaneAltitudeEvaluator | undefined) { this._plane = value; }\n /** Property access for the reference plane. */\n public get plane(): PlaneAltitudeEvaluator | undefined { return this._plane; }\n\n /** Save a reference plane for later use, e.g. in addSegmentsOnPlane */\n public set convexClipper(value: ConvexClipPlaneSet | undefined) { this._convexClipper = value; }\n /** Property access for the reference plane. */\n public get convexClipper(): ConvexClipPlaneSet | undefined { return this._convexClipper; }\n\n /**\n * * Construct an empty chain merge graph.\n * * The options parameter may contain any combination of the options values.\n * * tolerance = absolute tolerance for declaring points equal.\n * * Default is `Geometry.smallMetricDistance`\n * * primarySortDirection = direction for first sort.\n * * To minimize clash among points on primary sort, this should NOT be perpendicular to any principal plane.\n * * The default points into the first octant with non-obvious components.\n */\n public static create(options?: ChainMergeContextOptions): ChainMergeContext {\n const validatedOptions = ChainMergeContextValidatedOptions.createFromUnValidated(options);\n return new ChainMergeContext(validatedOptions);\n }\n /** Add a segment to the evolving graph. */\n public addSegment(pointA: Point3d, pointB: Point3d) {\n this._graph.createEdgeXYZXYZ(pointA.x, pointA.y, pointA.z, 0, pointB.x, pointB.y, pointB.z, 0);\n }\n /** Add all segments from an array to the graph. */\n public addLineSegment3dArray(data: LineSegment3d[]) {\n for (const segment of data) {\n this.addSegment(segment.point0Ref, segment.point1Ref);\n }\n }\n /** Add edges for all segments that are \"on\" the plane.\n * * No action if `this.plane` is undefined.\n */\n public addSegmentsOnPlane(points: GrowableXYZArray, addClosure: boolean = false) {\n if (!this._plane)\n return;\n const plane = this._plane;\n let i0 = addClosure ? points.length - 1 : 0;\n let a0 = points.evaluateUncheckedIndexPlaneAltitude(i0, plane);\n let i1 = addClosure ? 0 : 1;\n let a1;\n for (; i1 < points.length; i0 = i1++ , a0 = a1) {\n a1 = points.evaluateUncheckedIndexPlaneAltitude(i1, plane);\n if (Geometry.isSmallMetricDistance(a0) && Geometry.isSmallMetricDistance(a1))\n this._graph.createEdgeXYZXYZ(\n points.getXAtUncheckedPointIndex(i0), points.getYAtUncheckedPointIndex(i0), points.getZAtUncheckedPointIndex(i0), 0,\n points.getXAtUncheckedPointIndex(i1), points.getYAtUncheckedPointIndex(i1), points.getZAtUncheckedPointIndex(i1), 0);\n }\n }\n /**\n * Return a numeric value to be used for sorting, with little chance widely separated nodes will have identical key.\n * * Any single x,y,z component is a poor choice because horizontal and vertical alignment is common.\n * * Hence take dot product of x,y,z with non-trivial fraction values.\n * @param node node with x,y,z coordinates\n */\n private primarySortKey(node: HalfEdge): number {\n return this._options.primarySortDirection.dotProductXYZ(node.x, node.y, node.z);\n }\n /** Return difference of sortData members as sort comparison */\n private static nodeCompareSortData(nodeA: HalfEdge, nodeB: HalfEdge): number {\n return nodeA.sortData! - nodeB.sortData!;\n }\n /** test if nodeA is a dangling edge end (i.e. edges around vertex equal 1, but detect it without walking all the way around. */\n private static isIsolatedEnd(nodeA: HalfEdge): boolean {\n return nodeA.vertexSuccessor === nodeA;\n }\n\n /** test if nodeA is at a vertex with exactly 2 edges (i.e. edges around vertex equal w, but detect it without walking all the way around. */\n private static isChainInteriorVertex(nodeA: HalfEdge): boolean {\n const nodeB = nodeA.vertexSuccessor;\n return nodeB !== nodeA && nodeB.vertexSuccessor === nodeA;\n }\n\n /**\n * * isolate all edge ends.\n * * perform cluster analysis to determine nearly coincident points.\n * * pinch all edges together at each vertex.\n */\n public clusterAndMergeVerticesXYZ() {\n HalfEdgeGraphOps.isolateAllEdges(this._graph);\n for (const p of this._graph.allHalfEdges) {\n p.sortData = this.primarySortKey(p);\n }\n const sortArray = this._graph.allHalfEdges.slice();\n sortArray.sort((nodeA, nodeB) => ChainMergeContext.nodeCompareSortData(nodeA, nodeB));\n const xyzTolerance = this._options.tolerance;\n // A node is unvisited if it is its own vertex successor !!!\n // otherwise the node has already been twisted into a base vertex.\n const n = sortArray.length;\n for (let i0 = 0; i0 < n; i0++) {\n const node0 = sortArray[i0];\n const qMin = node0.sortData!;\n const qMax = qMin + xyzTolerance;\n if (ChainMergeContext.isIsolatedEnd(node0)) {\n for (let i1 = i0 + 1; i1 < n; i1++) {\n const node1 = sortArray[i1];\n if (ChainMergeContext.isIsolatedEnd(node1)) {\n if (node1.sortData! > qMax)\n break;\n if (node0.distanceXYZ(node1) <= xyzTolerance) {\n HalfEdge.pinch(node0, node1);\n node1.setXYZFrom(node0); // force true equal coordinates.\n }\n }\n }\n }\n }\n }\n /**\n * If node0 is not visited, creating a linestring with that starting edge and all successive edges along a chain.\n * @param chains growing array of chains.\n * @param node0 start node for search.\n */\n private collectMaximalLineString3dFromStartNode(chains: LineString3d[], node0: HalfEdge, visitMask: HalfEdgeMask) {\n if (!node0.isMaskSet(visitMask)) {\n const ls = LineString3d.create();\n ls.addPointXYZ(node0.x, node0.y, node0.z);\n for (; ;) {\n node0.setMask(visitMask);\n node0.edgeMate.setMask(visitMask);\n node0 = node0.faceSuccessor;\n ls.addPointXYZ(node0.x, node0.y, node0.z);\n if (node0.isMaskSet(visitMask) || !ChainMergeContext.isChainInteriorVertex(node0))\n break;\n }\n chains.push(ls);\n }\n }\n /**\n * If node0 is not visited, creating a linestring with that starting edge and all successive edges along a chain.\n * @param chains growing array of chains.\n * @param node0 start node for search.\n */\n private collectMaximalGrowableXYXArrayFromStartNode(result: GrowableXYZArray[], node0: HalfEdge, visitMask: HalfEdgeMask) {\n if (!node0.isMaskSet(visitMask)) {\n const points = new GrowableXYZArray();\n points.pushXYZ(node0.x, node0.y, node0.z);\n for (; ;) {\n node0.setMask(visitMask);\n node0.edgeMate.setMask(visitMask);\n node0 = node0.faceSuccessor;\n points.pushXYZ(node0.x, node0.y, node0.z);\n if (node0.isMaskSet(visitMask) || !ChainMergeContext.isChainInteriorVertex(node0))\n break;\n }\n if (points.length > 0)\n result.push(points);\n }\n }\n\n /**\n * * find edges with start, end in same vertex loop.\n * * pinch them away from the loop\n * * set mask on both sides.\n * * Return the number of excisions.\n */\n private exciseAndMarkSlingEdges(mask: HalfEdgeMask): number {\n let n = 0;\n for (const p of this._graph.allHalfEdges) {\n if (p.distanceXYZ(p.edgeMate) < this._options.tolerance\n && !p.isMaskSet(mask)) {\n const q = p.edgeMate;\n HalfEdge.pinch(p, p.vertexPredecessor);\n HalfEdge.pinch(q, q.vertexPredecessor);\n p.setMask(mask);\n q.setMask(mask);\n n++;\n }\n }\n return n;\n }\n /** Collect chains which have maximum edge count, broken at an vertex with other than 2 edges.\n * * This is assumed to be preceded by a call to a vertex-cluster step such as `clusterAndMergeVerticesYXZ`\n */\n public collectMaximalChains(): LineString3d[] {\n const result: LineString3d[] = [];\n const visitMask = HalfEdgeMask.VISITED;\n // Pass 0: excise and mark zero-length edges.\n this.exciseAndMarkSlingEdges(visitMask);\n this._graph.clearMask(visitMask);\n // Pass 1: only start at non-interior edges -- vertices with one edge or more than 2 edges.\n // (Note that collectMaximalChain checks the visit mask.)\n for (const node0 of this._graph.allHalfEdges) {\n if (!ChainMergeContext.isChainInteriorVertex(node0)) {\n this.collectMaximalLineString3dFromStartNode(result, node0, visitMask);\n }\n }\n // Pass 2: start anywhere in an unvisited loop.\n for (const node0 of this._graph.allHalfEdges) {\n this.collectMaximalLineString3dFromStartNode(result, node0, visitMask);\n }\n return result;\n }\n public collectMaximalGrowableXYZArrays(): GrowableXYZArray[] {\n const result: GrowableXYZArray[] = [];\n const visitMask = HalfEdgeMask.VISITED;\n // Pass 0: excise and mark zero-length edges.\n this.exciseAndMarkSlingEdges(visitMask);\n this._graph.clearMask(visitMask);\n // Pass 1: only start at non-interior edges -- vertices with one edge or more than 2 edges.\n // (Note that collectMaximalChain checks the visit mask.)\n for (const node0 of this._graph.allHalfEdges) {\n if (!ChainMergeContext.isChainInteriorVertex(node0)) {\n this.collectMaximalGrowableXYXArrayFromStartNode(result, node0, visitMask);\n }\n }\n // Pass 2: start anywhere in an unvisited loop.\n for (const node0 of this._graph.allHalfEdges) {\n this.collectMaximalGrowableXYXArrayFromStartNode(result, node0, visitMask);\n }\n return result;\n }\n}\n"]}
1
+ {"version":3,"file":"ChainMerge.js","sourceRoot":"","sources":["../../../src/topology/ChainMerge.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAQ/F,wDAAqD;AACrD,0CAA+D;AAC/D,qEAAkE;AAClE,mEAAkE;AAClE,mCAAgE;AAChE,uCAA6C;AAoB7C,oGAAoG;AACpG,MAAM,iCAAiC;IACrC;;OAEG;IACI,SAAS,CAAS;IACzB;;OAEG;IACK,MAAM,CAAU,4BAA4B,GAAG,0BAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IAC/G;;OAEG;IACI,oBAAoB,CAAW;IACtC;;OAEG;IACI,MAAM,CAAC,uBAAuB,CAAC,MAAiB;QACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,GAAG,IAAI,CAAC,4BAA4B,CAAC,KAAK,EAAE,CAAC;QACrD,CAAC;QACD,OAAO,MAAM,CAAC,oBAAoB,CAChC,iCAAiC,CAAC,4BAA4B,CAAC,CAAC,EAChE,iCAAiC,CAAC,4BAA4B,CAAC,CAAC,EAChE,iCAAiC,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;IACD;;;;OAIG;IACH,YAAoB,SAAiB,EAAE,wBAAkC;QACvE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;IACvD,CAAC;IACD,qCAAqC;IAC9B,MAAM,CAAC,qBAAqB,CAAC,OAAkC;QACpE,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAAC,mBAAQ,CAAC,mBAAmB,EAAE,iCAAiC,CAAC,uBAAuB,EAAE,CAAC,CAAC;QAChJ,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,OAAO,CAAC,SAAS,KAAK,SA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------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Topology\n */\n\nimport { ConvexClipPlaneSet } from \"../clipping/ConvexClipPlaneSet\";\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { HalfEdge, HalfEdgeGraph, HalfEdgeMask } from \"./Graph\";\nimport { HalfEdgeGraphOps } from \"./Merging\";\n\n/**\n * interface containing various options appropriate to merging lines segments into chains.\n * @internal\n */\nexport interface ChainMergeContextOptions {\n /**\n * Tolerance for declaring points equal\n * * Default is `Geometry.smallMetricDistance`\n */\n tolerance?: number;\n /**\n * Direction for primary sort.\n * * Default is `Vector3d.create(0.294234298, 0.72391399, 0.45234328798)`\n * * this vector should NOT be along a principal x,y,z direction.\n * * The internal form will be normalized.\n */\n primarySortDirection?: Vector3d;\n}\n/** Internal form of ChainMergeContextOptions -- same field names, but required to have contents. */\nclass ChainMergeContextValidatedOptions {\n /**\n * Tolerance for declaring points equal.\n */\n public tolerance: number;\n /** UNNORMALIZED base vector for sorting.\n * * Actual vector hoisted into an instance is normalized.\n */\n private static readonly _defaultPrimarySortDirection = Vector3d.create(0.294234298, 0.72391399, 0.45234328798);\n /**\n * Direction for primary sort. This is normalized !!!\n */\n public primarySortDirection: Vector3d;\n /** return a unit vector aligned with optional direction.\n * * Default return is into the first quadrant at a quirky angle so any perpendicular plane is unlikely to hit many points\n */\n public static createPrimarySortVector(vector?: Vector3d): Vector3d {\n if (vector === undefined) {\n vector = this._defaultPrimarySortDirection.clone();\n }\n return vector.normalizeWithDefault(\n ChainMergeContextValidatedOptions._defaultPrimarySortDirection.x,\n ChainMergeContextValidatedOptions._defaultPrimarySortDirection.y,\n ChainMergeContextValidatedOptions._defaultPrimarySortDirection.z);\n }\n /**\n * PRIVATE constructor -- assumes all inputs are validated in public create method !!!!\n * @param tolerance\n * @param unitVectorForPrimarySort\n */\n private constructor(tolerance: number, unitVectorForPrimarySort: Vector3d) {\n this.tolerance = tolerance;\n this.primarySortDirection = unitVectorForPrimarySort;\n }\n /** return the default option set. */\n public static createFromUnValidated(options?: ChainMergeContextOptions): ChainMergeContextValidatedOptions {\n const result = new ChainMergeContextValidatedOptions(Geometry.smallMetricDistance, ChainMergeContextValidatedOptions.createPrimarySortVector());\n if (options !== undefined) {\n if (options.tolerance !== undefined)\n result.tolerance = options.tolerance;\n if (options.primarySortDirection !== undefined)\n result.primarySortDirection = ChainMergeContextValidatedOptions.createPrimarySortVector();\n }\n return result;\n }\n /** Clone this context. */\n public clone(): ChainMergeContextValidatedOptions {\n return new ChainMergeContextValidatedOptions(this.tolerance, this.primarySortDirection);\n }\n}\n/**\n * * Context for assembling line segments into chains.\n * * Use the context in phases:\n * * Create the context: `context = ChainMergeContext.create ()`\n * * Add line with any combination of:\n * * `context.addSegment(pointA, pointB)`\n * * `context.addLineSegment3dArray (segments)`\n * * Scan all coordinate data for common coordinates. Twist nodes together to form chains:\n * * `context.clusterAndMergeVerticesXYZ ()`\n * * Collect the chains:\n * * myLinestringArray = context.collectMaximalChains();\n * * The context carries an optional plane which is used by addSegmentsOnPlane\n *\n * @internal\n */\nexport class ChainMergeContext {\n\n private _graph: HalfEdgeGraph;\n private _options: ChainMergeContextValidatedOptions;\n private _plane?: PlaneAltitudeEvaluator;\n private _convexClipper?: ConvexClipPlaneSet;\n private constructor(options: ChainMergeContextValidatedOptions) {\n this._graph = new HalfEdgeGraph();\n this._options = options;\n }\n /** Save a reference plane for later use, e.g. in addSegmentsOnPlane */\n public set plane(value: PlaneAltitudeEvaluator | undefined) { this._plane = value; }\n /** Property access for the reference plane. */\n public get plane(): PlaneAltitudeEvaluator | undefined { return this._plane; }\n\n /** Save a reference plane for later use, e.g. in addSegmentsOnPlane */\n public set convexClipper(value: ConvexClipPlaneSet | undefined) { this._convexClipper = value; }\n /** Property access for the reference plane. */\n public get convexClipper(): ConvexClipPlaneSet | undefined { return this._convexClipper; }\n\n /**\n * * Construct an empty chain merge graph.\n * * The options parameter may contain any combination of the options values.\n * * tolerance = absolute tolerance for declaring points equal.\n * * Default is `Geometry.smallMetricDistance`\n * * primarySortDirection = direction for first sort.\n * * To minimize clash among points on primary sort, this should NOT be perpendicular to any principal plane.\n * * The default points into the first octant with non-obvious components.\n */\n public static create(options?: ChainMergeContextOptions): ChainMergeContext {\n const validatedOptions = ChainMergeContextValidatedOptions.createFromUnValidated(options);\n return new ChainMergeContext(validatedOptions);\n }\n /** Add a segment to the evolving graph. */\n public addSegment(pointA: Point3d, pointB: Point3d) {\n this._graph.createEdgeXYZXYZ(pointA.x, pointA.y, pointA.z, 0, pointB.x, pointB.y, pointB.z, 0);\n }\n /** Add all segments from an array to the graph. */\n public addLineSegment3dArray(data: LineSegment3d[]) {\n for (const segment of data) {\n this.addSegment(segment.point0Ref, segment.point1Ref);\n }\n }\n /** Add edges for all segments that are \"on\" the plane.\n * * No action if `this.plane` is undefined.\n */\n public addSegmentsOnPlane(points: GrowableXYZArray, addClosure: boolean = false) {\n if (!this._plane)\n return;\n const plane = this._plane;\n let i0 = addClosure ? points.length - 1 : 0;\n let a0 = points.evaluateUncheckedIndexPlaneAltitude(i0, plane);\n let i1 = addClosure ? 0 : 1;\n let a1;\n for (; i1 < points.length; i0 = i1++ , a0 = a1) {\n a1 = points.evaluateUncheckedIndexPlaneAltitude(i1, plane);\n if (Geometry.isSmallMetricDistance(a0) && Geometry.isSmallMetricDistance(a1))\n this._graph.createEdgeXYZXYZ(\n points.getXAtUncheckedPointIndex(i0), points.getYAtUncheckedPointIndex(i0), points.getZAtUncheckedPointIndex(i0), 0,\n points.getXAtUncheckedPointIndex(i1), points.getYAtUncheckedPointIndex(i1), points.getZAtUncheckedPointIndex(i1), 0);\n }\n }\n /**\n * Return a numeric value to be used for sorting, with little chance widely separated nodes will have identical key.\n * * Any single x,y,z component is a poor choice because horizontal and vertical alignment is common.\n * * Hence take dot product of x,y,z with non-trivial fraction values.\n * @param node node with x,y,z coordinates\n */\n private primarySortKey(node: HalfEdge): number {\n return this._options.primarySortDirection.dotProductXYZ(node.x, node.y, node.z);\n }\n /** Return difference of sortData members as sort comparison */\n private static nodeCompareSortData(nodeA: HalfEdge, nodeB: HalfEdge): number {\n return nodeA.sortData! - nodeB.sortData!;\n }\n /** test if nodeA is a dangling edge end (i.e. edges around vertex equal 1, but detect it without walking all the way around. */\n private static isIsolatedEnd(nodeA: HalfEdge): boolean {\n return nodeA.vertexSuccessor === nodeA;\n }\n\n /** test if nodeA is at a vertex with exactly 2 edges (i.e. edges around vertex equal w, but detect it without walking all the way around. */\n private static isChainInteriorVertex(nodeA: HalfEdge): boolean {\n const nodeB = nodeA.vertexSuccessor;\n return nodeB !== nodeA && nodeB.vertexSuccessor === nodeA;\n }\n\n /**\n * * isolate all edge ends.\n * * perform cluster analysis to determine nearly coincident points.\n * * pinch all edges together at each vertex.\n */\n public clusterAndMergeVerticesXYZ() {\n HalfEdgeGraphOps.isolateAllEdges(this._graph);\n for (const p of this._graph.allHalfEdges) {\n p.sortData = this.primarySortKey(p);\n }\n const sortArray = this._graph.allHalfEdges.slice();\n sortArray.sort((nodeA, nodeB) => ChainMergeContext.nodeCompareSortData(nodeA, nodeB));\n const xyzTolerance = this._options.tolerance;\n // A node is unvisited if it is its own vertex successor !!!\n // otherwise the node has already been twisted into a base vertex.\n const n = sortArray.length;\n for (let i0 = 0; i0 < n; i0++) {\n const node0 = sortArray[i0];\n const qMin = node0.sortData!;\n const qMax = qMin + xyzTolerance;\n if (ChainMergeContext.isIsolatedEnd(node0)) {\n for (let i1 = i0 + 1; i1 < n; i1++) {\n const node1 = sortArray[i1];\n if (ChainMergeContext.isIsolatedEnd(node1)) {\n if (node1.sortData! > qMax)\n break;\n if (node0.distanceXYZ(node1) <= xyzTolerance) {\n HalfEdge.pinch(node0, node1);\n node1.setXYZFrom(node0); // force true equal coordinates.\n }\n }\n }\n }\n }\n }\n /**\n * If node0 is not visited, creating a linestring with that starting edge and all successive edges along a chain.\n * @param chains growing array of chains.\n * @param node0 start node for search.\n */\n private collectMaximalLineString3dFromStartNode(chains: LineString3d[], node0: HalfEdge, visitMask: HalfEdgeMask) {\n if (!node0.isMaskSet(visitMask)) {\n const ls = LineString3d.create();\n ls.addPointXYZ(node0.x, node0.y, node0.z);\n for (; ;) {\n node0.setMask(visitMask);\n node0.edgeMate.setMask(visitMask);\n node0 = node0.faceSuccessor;\n ls.addPointXYZ(node0.x, node0.y, node0.z);\n if (node0.isMaskSet(visitMask) || !ChainMergeContext.isChainInteriorVertex(node0))\n break;\n }\n chains.push(ls);\n }\n }\n /**\n * If node0 is not visited, creating a linestring with that starting edge and all successive edges along a chain.\n * @param chains growing array of chains.\n * @param node0 start node for search.\n */\n private collectMaximalGrowableXYXArrayFromStartNode(result: GrowableXYZArray[], node0: HalfEdge, visitMask: HalfEdgeMask) {\n if (!node0.isMaskSet(visitMask)) {\n const points = new GrowableXYZArray();\n points.pushXYZ(node0.x, node0.y, node0.z);\n for (; ;) {\n node0.setMask(visitMask);\n node0.edgeMate.setMask(visitMask);\n node0 = node0.faceSuccessor;\n points.pushXYZ(node0.x, node0.y, node0.z);\n if (node0.isMaskSet(visitMask) || !ChainMergeContext.isChainInteriorVertex(node0))\n break;\n }\n if (points.length > 0)\n result.push(points);\n }\n }\n\n /**\n * * find edges with start, end in same vertex loop.\n * * pinch them away from the loop\n * * set mask on both sides.\n * * Return the number of excisions.\n */\n private exciseAndMarkSlingEdges(mask: HalfEdgeMask): number {\n let n = 0;\n for (const p of this._graph.allHalfEdges) {\n if (p.distanceXYZ(p.edgeMate) < this._options.tolerance\n && !p.isMaskSet(mask)) {\n const q = p.edgeMate;\n HalfEdge.pinch(p, p.vertexPredecessor);\n HalfEdge.pinch(q, q.vertexPredecessor);\n p.setMask(mask);\n q.setMask(mask);\n n++;\n }\n }\n return n;\n }\n /** Collect chains which have maximum edge count, broken at vertices with more than 2 edges.\n * * This is assumed to be preceded by a call to a vertex-cluster step such as `clusterAndMergeVerticesYXZ`\n */\n public collectMaximalChains(): LineString3d[] {\n const result: LineString3d[] = [];\n const visitMask = HalfEdgeMask.VISITED;\n // Pass 0: excise and mark zero-length edges.\n this.exciseAndMarkSlingEdges(visitMask);\n this._graph.clearMask(visitMask);\n // Pass 1: only start at non-interior edges -- vertices with one edge or more than 2 edges.\n // (Note that collectMaximalChain checks the visit mask.)\n for (const node0 of this._graph.allHalfEdges) {\n if (!ChainMergeContext.isChainInteriorVertex(node0)) {\n this.collectMaximalLineString3dFromStartNode(result, node0, visitMask);\n }\n }\n // Pass 2: start anywhere in an unvisited loop.\n for (const node0 of this._graph.allHalfEdges) {\n this.collectMaximalLineString3dFromStartNode(result, node0, visitMask);\n }\n return result;\n }\n public collectMaximalGrowableXYZArrays(): GrowableXYZArray[] {\n const result: GrowableXYZArray[] = [];\n const visitMask = HalfEdgeMask.VISITED;\n // Pass 0: excise and mark zero-length edges.\n this.exciseAndMarkSlingEdges(visitMask);\n this._graph.clearMask(visitMask);\n // Pass 1: only start at non-interior edges -- vertices with one edge or more than 2 edges.\n // (Note that collectMaximalChain checks the visit mask.)\n for (const node0 of this._graph.allHalfEdges) {\n if (!ChainMergeContext.isChainInteriorVertex(node0)) {\n this.collectMaximalGrowableXYXArrayFromStartNode(result, node0, visitMask);\n }\n }\n // Pass 2: start anywhere in an unvisited loop.\n for (const node0 of this._graph.allHalfEdges) {\n this.collectMaximalGrowableXYXArrayFromStartNode(result, node0, visitMask);\n }\n return result;\n }\n}\n"]}
@@ -27,9 +27,9 @@ export interface ClipPlaneProps {
27
27
  normal?: XYZProps;
28
28
  /** The plane's signed distance from the origin. */
29
29
  dist?: number;
30
- /** Defaults to `false`. */
30
+ /** Defaults to `false`. Interpretation of this flag is algorithm-specific. */
31
31
  invisible?: boolean;
32
- /** Defaults to `false`. */
32
+ /** Defaults to `false`. Interpretation of this flag is algorithm-specific. */
33
33
  interior?: boolean;
34
34
  }
35
35
  /**
@@ -113,9 +113,9 @@ export declare class ClipPlane extends Plane3d implements Clipper, PolygonClippe
113
113
  get distance(): number;
114
114
  /** * Return the stored inward normal property. */
115
115
  get inwardNormalRef(): Vector3d;
116
- /** Return the "interior" property bit */
116
+ /** Return the "interior" property flag. Interpretation of this flag is algorithm-specific. */
117
117
  get interior(): boolean;
118
- /** Return the "invisible" property bit. */
118
+ /** Return the "invisible" property flag. Interpretation of this flag is algorithm-specific. */
119
119
  get invisible(): boolean;
120
120
  /**
121
121
  * Create a plane defined by two points, an up vector, and a tilt angle relative to the up vector.
@@ -222,7 +222,7 @@ export declare class ClipPlane extends Plane3d implements Clipper, PolygonClippe
222
222
  getBoundedSegmentSimpleIntersection(pointA: Point3d, pointB: Point3d): number | undefined;
223
223
  /** Apply transform to the origin. Apply inverse transpose of the matrix part to th normal vector. */
224
224
  transformInPlace(transform: Transform): boolean;
225
- /** Set the invisible flag. Interpretation of this is up to the use code algorithms. */
225
+ /** Set the invisible flag. Interpretation of this flag is algorithm-specific. */
226
226
  setInvisible(invisible: boolean): void;
227
227
  /** Reverse the sign of all coefficients, so outside and inside reverse */
228
228
  negateInPlace(): void;
@@ -280,5 +280,7 @@ export declare class ClipPlane extends Plane3d implements Clipper, PolygonClippe
280
280
  appendPolygonClip(xyz: IndexedXYZCollection, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): void;
281
281
  /** Project a point in space to the plane. */
282
282
  projectPointToPlane(spacePoint: Point3d, result?: Point3d): Point3d;
283
+ /** Return the projection of (x,y,z) onto the plane. */
284
+ projectXYZToPlane(x: number, y: number, z: number, result?: Point3d): Point3d;
283
285
  }
284
286
  //# sourceMappingURL=ClipPlane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cl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;OAKG;IACI,QAAQ,IAAI,SAAS;IAM5B;;;;OAIG;IACI,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,eAAe,GAAE,OAAe,GAAG,gBAAgB,GAAG,SAAS;IAuBrG;;;;;;;;OAQG;IACI,iBAAiB,CACtB,GAAG,EAAE,oBAAoB,EACzB,eAAe,EAAE,gBAAgB,EAAE,EACnC,gBAAgB,EAAE,gBAAgB,EAAE,EACpC,UAAU,EAAE,qBAAqB,GAChC,IAAI;IAUP,6CAA6C;IACtC,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;IAG1E,uDAAuD;IACvC,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;CAI9F"}
@@ -194,11 +194,11 @@ export class ClipPlane extends Plane3d {
194
194
  get inwardNormalRef() {
195
195
  return this._inwardNormal;
196
196
  }
197
- /** Return the "interior" property bit */
197
+ /** Return the "interior" property flag. Interpretation of this flag is algorithm-specific. */
198
198
  get interior() {
199
199
  return this._interior;
200
200
  }
201
- /** Return the "invisible" property bit. */
201
+ /** Return the "invisible" property flag. Interpretation of this flag is algorithm-specific. */
202
202
  get invisible() {
203
203
  return this._invisible;
204
204
  }
@@ -417,7 +417,7 @@ export class ClipPlane extends Plane3d {
417
417
  this._distanceFromOrigin = this._inwardNormal.dotProduct(plane.getOriginRef());
418
418
  return true;
419
419
  }
420
- /** Set the invisible flag. Interpretation of this is up to the use code algorithms. */
420
+ /** Set the invisible flag. Interpretation of this flag is algorithm-specific. */
421
421
  setInvisible(invisible) {
422
422
  this._invisible = invisible;
423
423
  }
@@ -561,8 +561,12 @@ export class ClipPlane extends Plane3d {
561
561
  }
562
562
  /** Project a point in space to the plane. */
563
563
  projectPointToPlane(spacePoint, result) {
564
- const d = -this.altitude(spacePoint);
565
- return spacePoint.plusXYZ(d * this._inwardNormal.x, d * this._inwardNormal.y, d * this._inwardNormal.z, result);
564
+ return this.projectXYZToPlane(spacePoint.x, spacePoint.y, spacePoint.z, result);
565
+ }
566
+ /** Return the projection of (x,y,z) onto the plane. */
567
+ projectXYZToPlane(x, y, z, result) {
568
+ const scale = -this.altitudeXYZ(x, y, z);
569
+ return Point3d.create(x + scale * this._inwardNormal.x, y + scale * this._inwardNormal.y, z + scale * this._inwardNormal.z, result);
566
570
  }
567
571
  }
568
572
  //# sourceMappingURL=ClipPlane.js.map