@itwin/core-geometry 5.0.0-dev.2 → 5.0.0-dev.20

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 (278) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
  3. package/lib/cjs/bspline/BSplineCurveOps.js +18 -21
  4. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  5. package/lib/cjs/curve/Arc3d.d.ts +30 -7
  6. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  7. package/lib/cjs/curve/Arc3d.js +53 -7
  8. package/lib/cjs/curve/Arc3d.js.map +1 -1
  9. package/lib/cjs/curve/CurveCollection.d.ts +16 -2
  10. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  11. package/lib/cjs/curve/CurveCollection.js +33 -2
  12. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  13. package/lib/cjs/curve/CurveFactory.d.ts +81 -53
  14. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  15. package/lib/cjs/curve/CurveFactory.js +190 -103
  16. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  17. package/lib/cjs/curve/LineString3d.d.ts +12 -8
  18. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  19. package/lib/cjs/curve/LineString3d.js +29 -8
  20. package/lib/cjs/curve/LineString3d.js.map +1 -1
  21. package/lib/cjs/curve/Loop.d.ts +12 -6
  22. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  23. package/lib/cjs/curve/Loop.js +12 -6
  24. package/lib/cjs/curve/Loop.js.map +1 -1
  25. package/lib/cjs/curve/Query/CylindricalRange.d.ts +8 -6
  26. package/lib/cjs/curve/Query/CylindricalRange.d.ts.map +1 -1
  27. package/lib/cjs/curve/Query/CylindricalRange.js +13 -9
  28. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  29. package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
  30. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  31. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  32. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
  33. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
  34. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  35. package/lib/cjs/geometry3d/AngleSweep.d.ts +1 -1
  36. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  37. package/lib/cjs/geometry3d/AngleSweep.js +1 -1
  38. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  39. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +14 -8
  40. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  41. package/lib/cjs/geometry3d/BarycentricTriangle.js +17 -8
  42. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  43. package/lib/cjs/geometry3d/FrameBuilder.js +4 -4
  44. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  45. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +2 -0
  46. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  47. package/lib/cjs/geometry3d/GrowableFloat64Array.js +4 -0
  48. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  49. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +32 -10
  50. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  51. package/lib/cjs/geometry3d/GrowableXYZArray.js +54 -16
  52. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  53. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +13 -2
  54. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  55. package/lib/cjs/geometry3d/IndexedXYZCollection.js +24 -10
  56. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  57. package/lib/cjs/geometry3d/Matrix3d.d.ts +11 -8
  58. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  59. package/lib/cjs/geometry3d/Matrix3d.js +28 -26
  60. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  61. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +1 -1
  62. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  63. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -6
  64. package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
  65. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  66. package/lib/cjs/geometry3d/PolygonOps.d.ts +12 -6
  67. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  68. package/lib/cjs/geometry3d/PolygonOps.js +94 -47
  69. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  70. package/lib/cjs/geometry3d/PolylineOps.d.ts +7 -4
  71. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  72. package/lib/cjs/geometry3d/PolylineOps.js +7 -4
  73. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  74. package/lib/cjs/geometry4d/MomentData.d.ts +72 -73
  75. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  76. package/lib/cjs/geometry4d/MomentData.js +62 -64
  77. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  78. package/lib/cjs/numerics/Polynomials.d.ts +5 -5
  79. package/lib/cjs/numerics/Polynomials.js +6 -6
  80. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  81. package/lib/cjs/polyface/AuxData.d.ts +2 -2
  82. package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
  83. package/lib/cjs/polyface/AuxData.js +11 -3
  84. package/lib/cjs/polyface/AuxData.js.map +1 -1
  85. package/lib/cjs/polyface/Polyface.d.ts +3 -5
  86. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  87. package/lib/cjs/polyface/Polyface.js +6 -13
  88. package/lib/cjs/polyface/Polyface.js.map +1 -1
  89. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +13 -6
  90. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  91. package/lib/cjs/polyface/PolyfaceBuilder.js +65 -38
  92. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  93. package/lib/cjs/polyface/PolyfaceData.d.ts +13 -3
  94. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  95. package/lib/cjs/polyface/PolyfaceData.js +21 -4
  96. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  97. package/lib/cjs/polyface/PolyfaceQuery.d.ts +2 -2
  98. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  99. package/lib/cjs/polyface/PolyfaceQuery.js +4 -3
  100. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  101. package/lib/cjs/serialization/GeometrySamples.d.ts +5 -5
  102. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  103. package/lib/cjs/serialization/GeometrySamples.js +5 -5
  104. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  105. package/lib/cjs/solid/Box.d.ts +9 -3
  106. package/lib/cjs/solid/Box.d.ts.map +1 -1
  107. package/lib/cjs/solid/Box.js +10 -5
  108. package/lib/cjs/solid/Box.js.map +1 -1
  109. package/lib/cjs/solid/Cone.d.ts +3 -2
  110. package/lib/cjs/solid/Cone.d.ts.map +1 -1
  111. package/lib/cjs/solid/Cone.js +3 -3
  112. package/lib/cjs/solid/Cone.js.map +1 -1
  113. package/lib/cjs/solid/LinearSweep.d.ts +9 -3
  114. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  115. package/lib/cjs/solid/LinearSweep.js +9 -4
  116. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  117. package/lib/cjs/solid/RotationalSweep.d.ts +15 -4
  118. package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
  119. package/lib/cjs/solid/RotationalSweep.js +20 -7
  120. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  121. package/lib/cjs/solid/RuledSweep.d.ts +35 -26
  122. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  123. package/lib/cjs/solid/RuledSweep.js +41 -28
  124. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  125. package/lib/cjs/solid/SolidPrimitive.d.ts +12 -11
  126. package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
  127. package/lib/cjs/solid/SolidPrimitive.js +8 -5
  128. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  129. package/lib/cjs/solid/Sphere.d.ts +17 -7
  130. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  131. package/lib/cjs/solid/Sphere.js +22 -16
  132. package/lib/cjs/solid/Sphere.js.map +1 -1
  133. package/lib/cjs/solid/SweepContour.d.ts +1 -1
  134. package/lib/cjs/solid/SweepContour.js +1 -1
  135. package/lib/cjs/solid/SweepContour.js.map +1 -1
  136. package/lib/cjs/solid/TorusPipe.d.ts +8 -2
  137. package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
  138. package/lib/cjs/solid/TorusPipe.js +9 -5
  139. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  140. package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
  141. package/lib/esm/bspline/BSplineCurveOps.js +18 -21
  142. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  143. package/lib/esm/curve/Arc3d.d.ts +30 -7
  144. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  145. package/lib/esm/curve/Arc3d.js +53 -7
  146. package/lib/esm/curve/Arc3d.js.map +1 -1
  147. package/lib/esm/curve/CurveCollection.d.ts +16 -2
  148. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  149. package/lib/esm/curve/CurveCollection.js +33 -2
  150. package/lib/esm/curve/CurveCollection.js.map +1 -1
  151. package/lib/esm/curve/CurveFactory.d.ts +81 -53
  152. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  153. package/lib/esm/curve/CurveFactory.js +190 -103
  154. package/lib/esm/curve/CurveFactory.js.map +1 -1
  155. package/lib/esm/curve/LineString3d.d.ts +12 -8
  156. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  157. package/lib/esm/curve/LineString3d.js +29 -8
  158. package/lib/esm/curve/LineString3d.js.map +1 -1
  159. package/lib/esm/curve/Loop.d.ts +12 -6
  160. package/lib/esm/curve/Loop.d.ts.map +1 -1
  161. package/lib/esm/curve/Loop.js +12 -6
  162. package/lib/esm/curve/Loop.js.map +1 -1
  163. package/lib/esm/curve/Query/CylindricalRange.d.ts +8 -6
  164. package/lib/esm/curve/Query/CylindricalRange.d.ts.map +1 -1
  165. package/lib/esm/curve/Query/CylindricalRange.js +13 -9
  166. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  167. package/lib/esm/curve/StrokeOptions.d.ts +1 -1
  168. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  169. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  170. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
  171. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
  172. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  173. package/lib/esm/geometry3d/AngleSweep.d.ts +1 -1
  174. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  175. package/lib/esm/geometry3d/AngleSweep.js +1 -1
  176. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  177. package/lib/esm/geometry3d/BarycentricTriangle.d.ts +14 -8
  178. package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  179. package/lib/esm/geometry3d/BarycentricTriangle.js +17 -8
  180. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  181. package/lib/esm/geometry3d/FrameBuilder.js +4 -4
  182. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  183. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +2 -0
  184. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  185. package/lib/esm/geometry3d/GrowableFloat64Array.js +4 -0
  186. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  187. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +32 -10
  188. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  189. package/lib/esm/geometry3d/GrowableXYZArray.js +54 -16
  190. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  191. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +13 -2
  192. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  193. package/lib/esm/geometry3d/IndexedXYZCollection.js +24 -10
  194. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  195. package/lib/esm/geometry3d/Matrix3d.d.ts +11 -8
  196. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  197. package/lib/esm/geometry3d/Matrix3d.js +28 -26
  198. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  199. package/lib/esm/geometry3d/Point3dArrayCarrier.js +1 -1
  200. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  201. package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -6
  202. package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
  203. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  204. package/lib/esm/geometry3d/PolygonOps.d.ts +12 -6
  205. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  206. package/lib/esm/geometry3d/PolygonOps.js +94 -47
  207. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  208. package/lib/esm/geometry3d/PolylineOps.d.ts +7 -4
  209. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  210. package/lib/esm/geometry3d/PolylineOps.js +7 -4
  211. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  212. package/lib/esm/geometry4d/MomentData.d.ts +72 -73
  213. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  214. package/lib/esm/geometry4d/MomentData.js +62 -64
  215. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  216. package/lib/esm/numerics/Polynomials.d.ts +5 -5
  217. package/lib/esm/numerics/Polynomials.js +6 -6
  218. package/lib/esm/numerics/Polynomials.js.map +1 -1
  219. package/lib/esm/polyface/AuxData.d.ts +2 -2
  220. package/lib/esm/polyface/AuxData.d.ts.map +1 -1
  221. package/lib/esm/polyface/AuxData.js +11 -3
  222. package/lib/esm/polyface/AuxData.js.map +1 -1
  223. package/lib/esm/polyface/Polyface.d.ts +3 -5
  224. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  225. package/lib/esm/polyface/Polyface.js +6 -13
  226. package/lib/esm/polyface/Polyface.js.map +1 -1
  227. package/lib/esm/polyface/PolyfaceBuilder.d.ts +13 -6
  228. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  229. package/lib/esm/polyface/PolyfaceBuilder.js +65 -38
  230. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  231. package/lib/esm/polyface/PolyfaceData.d.ts +13 -3
  232. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  233. package/lib/esm/polyface/PolyfaceData.js +21 -4
  234. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  235. package/lib/esm/polyface/PolyfaceQuery.d.ts +2 -2
  236. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  237. package/lib/esm/polyface/PolyfaceQuery.js +4 -3
  238. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  239. package/lib/esm/serialization/GeometrySamples.d.ts +5 -5
  240. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  241. package/lib/esm/serialization/GeometrySamples.js +5 -5
  242. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  243. package/lib/esm/solid/Box.d.ts +9 -3
  244. package/lib/esm/solid/Box.d.ts.map +1 -1
  245. package/lib/esm/solid/Box.js +10 -5
  246. package/lib/esm/solid/Box.js.map +1 -1
  247. package/lib/esm/solid/Cone.d.ts +3 -2
  248. package/lib/esm/solid/Cone.d.ts.map +1 -1
  249. package/lib/esm/solid/Cone.js +3 -3
  250. package/lib/esm/solid/Cone.js.map +1 -1
  251. package/lib/esm/solid/LinearSweep.d.ts +9 -3
  252. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  253. package/lib/esm/solid/LinearSweep.js +9 -4
  254. package/lib/esm/solid/LinearSweep.js.map +1 -1
  255. package/lib/esm/solid/RotationalSweep.d.ts +15 -4
  256. package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
  257. package/lib/esm/solid/RotationalSweep.js +20 -7
  258. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  259. package/lib/esm/solid/RuledSweep.d.ts +35 -26
  260. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  261. package/lib/esm/solid/RuledSweep.js +41 -28
  262. package/lib/esm/solid/RuledSweep.js.map +1 -1
  263. package/lib/esm/solid/SolidPrimitive.d.ts +12 -11
  264. package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
  265. package/lib/esm/solid/SolidPrimitive.js +8 -5
  266. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  267. package/lib/esm/solid/Sphere.d.ts +17 -7
  268. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  269. package/lib/esm/solid/Sphere.js +22 -16
  270. package/lib/esm/solid/Sphere.js.map +1 -1
  271. package/lib/esm/solid/SweepContour.d.ts +1 -1
  272. package/lib/esm/solid/SweepContour.js +1 -1
  273. package/lib/esm/solid/SweepContour.js.map +1 -1
  274. package/lib/esm/solid/TorusPipe.d.ts +8 -2
  275. package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
  276. package/lib/esm/solid/TorusPipe.js +9 -5
  277. package/lib/esm/solid/TorusPipe.js.map +1 -1
  278. package/package.json +4 -4
@@ -8,7 +8,6 @@ exports.CurveFactory = exports.MiteredSweepOutputSelect = void 0;
8
8
  /** @packageDocumentation
9
9
  * @module Curve
10
10
  */
11
- // import { Geometry, Angle, AngleSweep } from "../Geometry";
12
11
  const Geometry_1 = require("../Geometry");
13
12
  const Angle_1 = require("../geometry3d/Angle");
14
13
  const AngleSweep_1 = require("../geometry3d/AngleSweep");
@@ -33,6 +32,7 @@ const LineSegment3d_1 = require("./LineSegment3d");
33
32
  const LineString3d_1 = require("./LineString3d");
34
33
  const Loop_1 = require("./Loop");
35
34
  const Path_1 = require("./Path");
35
+ const RegionOps_1 = require("./RegionOps");
36
36
  const IntegratedSpiral3d_1 = require("./spiral/IntegratedSpiral3d");
37
37
  /**
38
38
  * Enumeration of geometric output for [CurveFactory.createMiteredSweepSections].
@@ -47,12 +47,13 @@ var MiteredSweepOutputSelect;
47
47
  /** Output planes and sections, as well as the assembled ruled sweep and its stroked mesh. */
48
48
  MiteredSweepOutputSelect[MiteredSweepOutputSelect["AlsoMesh"] = 2] = "AlsoMesh";
49
49
  })(MiteredSweepOutputSelect || (exports.MiteredSweepOutputSelect = MiteredSweepOutputSelect = {}));
50
+ ;
50
51
  /**
51
52
  * The `CurveFactory` class contains methods for specialized curve constructions.
52
53
  * @public
53
54
  */
54
55
  class CurveFactory {
55
- /** (cautiously) construct and save a line segment between fractional positions. */
56
+ /** (Cautiously) construct and save a line segment between fractional positions. */
56
57
  static addPartialSegment(path, allowBackup, pointA, pointB, fraction0, fraction1) {
57
58
  if (allowBackup || (fraction1 > fraction0)) {
58
59
  if (pointA !== undefined && pointB !== undefined && !Geometry_1.Geometry.isAlmostEqualNumber(fraction0, fraction1))
@@ -149,10 +150,11 @@ class CurveFactory {
149
150
  }
150
151
  return path;
151
152
  }
152
- /** Create a `Loop` with given xy corners and fixed z.
153
+ /**
154
+ * Create a `Loop` with given xy corners and fixed z.
153
155
  * * The corners always proceed counter clockwise from lower left.
154
156
  * * If the radius is too large for the outer rectangle size, it is reduced to half of the the smaller x or y size.
155
- */
157
+ */
156
158
  static createRectangleXY(x0, y0, x1, y1, z = 0, filletRadius) {
157
159
  let radius = Geometry_1.Geometry.correctSmallMetricDistance(filletRadius);
158
160
  const xMin = Math.min(x0, x1);
@@ -161,7 +163,13 @@ class CurveFactory {
161
163
  const yMax = Math.max(y0, y1);
162
164
  radius = Math.min(Math.abs(radius), 0.5 * (xMax - xMin), 0.5 * (yMax - yMin));
163
165
  if (radius === 0.0)
164
- return Loop_1.Loop.createPolygon([Point3dVector3d_1.Point3d.create(xMin, yMin, z), Point3dVector3d_1.Point3d.create(xMax, yMin, z), Point3dVector3d_1.Point3d.create(xMax, yMax, z), Point3dVector3d_1.Point3d.create(xMin, yMax, z), Point3dVector3d_1.Point3d.create(xMin, yMin, z)]);
166
+ return Loop_1.Loop.createPolygon([
167
+ Point3dVector3d_1.Point3d.create(xMin, yMin, z),
168
+ Point3dVector3d_1.Point3d.create(xMax, yMin, z),
169
+ Point3dVector3d_1.Point3d.create(xMax, yMax, z),
170
+ Point3dVector3d_1.Point3d.create(xMin, yMax, z),
171
+ Point3dVector3d_1.Point3d.create(xMin, yMin, z),
172
+ ]);
165
173
  else {
166
174
  const vectorU = Point3dVector3d_1.Vector3d.create(radius, 0, 0);
167
175
  const vectorV = Point3dVector3d_1.Vector3d.create(0, radius, 0);
@@ -169,7 +177,12 @@ class CurveFactory {
169
177
  const y0A = yMin + radius;
170
178
  const x1A = xMax - radius;
171
179
  const y1A = yMax - radius;
172
- const centers = [Point3dVector3d_1.Point3d.create(x1A, y1A, z), Point3dVector3d_1.Point3d.create(x0A, y1A, z), Point3dVector3d_1.Point3d.create(x0A, y0A, z), Point3dVector3d_1.Point3d.create(x1A, y0A, z)];
180
+ const centers = [
181
+ Point3dVector3d_1.Point3d.create(x1A, y1A, z),
182
+ Point3dVector3d_1.Point3d.create(x0A, y1A, z),
183
+ Point3dVector3d_1.Point3d.create(x0A, y0A, z),
184
+ Point3dVector3d_1.Point3d.create(x1A, y0A, z),
185
+ ];
173
186
  const loop = Loop_1.Loop.create();
174
187
  for (let i = 0; i < 4; i++) {
175
188
  const center = centers[i];
@@ -189,10 +202,10 @@ class CurveFactory {
189
202
  /**
190
203
  * If `arcB` is a continuation of `arcA`, extend `arcA` (in place) to include the range of `arcB`
191
204
  * * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.
192
- * @param arcA first arc, modified in place
193
- * @param arcB second arc, unmodified
194
- * @param allowReversed whether to consolidate even when second arc is reversed
195
- * @returns whether `arcA` was modified
205
+ * @param arcA first arc, modified in place.
206
+ * @param arcB second arc, unmodified.
207
+ * @param allowReversed whether to consolidate even when second arc is reversed.
208
+ * @returns whether `arcA` was modified.
196
209
  */
197
210
  static appendToArcInPlace(arcA, arcB, allowReverse = false) {
198
211
  if (arcA.center.isAlmostEqual(arcB.center)) {
@@ -208,7 +221,7 @@ class CurveFactory {
208
221
  arcA.sweep.setStartEndRadians(arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians + sweepSign * arcB.sweep.sweepRadians);
209
222
  return true;
210
223
  }
211
- // Also ok if negated tangent . ..
224
+ // Also ok if negated tangent
212
225
  if (allowReverse) {
213
226
  startB.direction.scaleInPlace(-1.0);
214
227
  if (endA.isAlmostEqual(startB)) {
@@ -221,7 +234,8 @@ class CurveFactory {
221
234
  }
222
235
  /**
223
236
  * Return a `Path` containing arcs are on the surface of an ellipsoid and pass through a sequence of points.
224
- * * Each arc passes through the two given endpoints and in the plane containing the true surface normal at given `fractionForIntermediateNormal`
237
+ * * Each arc passes through the two given endpoints and in the plane containing the true surface normal at
238
+ * given `fractionForIntermediateNormal`
225
239
  * @param ellipsoid
226
240
  * @param pathPoints
227
241
  * @param fractionForIntermediateNormal fractional position for surface normal used to create the section plane.
@@ -244,7 +258,7 @@ class CurveFactory {
244
258
  }
245
259
  /**
246
260
  * Create solid primitives for pipe segments (e.g. Cone or TorusPipe) around line and arc primitives.
247
- * @param centerline centerline geometry/
261
+ * @param centerline centerline geometry.
248
262
  * @param pipeRadius radius of pipe.
249
263
  */
250
264
  static createPipeSegments(centerline, pipeRadius) {
@@ -270,16 +284,22 @@ class CurveFactory {
270
284
  return undefined;
271
285
  }
272
286
  /**
273
- * * Create section arcs for mitered pipe.
274
- * * At each end of each pipe, the pipe is cut by the plane that bisects the angle between successive pipe centerlines.
275
- * * The arc definitions are constructed so that lines between corresponding fractional positions on the arcs are
276
- * axial lines on the pipes.
277
- * * This means that each arc definition axes (aka vector0 and vector90) are _not_ perpendicular to each other.
278
- * * Circular or elliptical pipe cross sections can be specified by supplying either a radius, a pair of semi-axis lengths, or a full Arc3d.
279
- * * For semi-axis length input, x corresponds to an ellipse local axis nominally situated parallel to the xy-plane.
280
- * * The center of Arc3d input is translated to the centerline start point to act as initial cross section.
281
- * @param centerline centerline of pipe
282
- * @param sectionData circle radius, ellipse semi-axis lengths, or full Arc3d
287
+ * Create section arcs for mitered pipe.
288
+ * * At the end of each pipe segment, the pipe is mitered by the plane that bisects the angle between successive
289
+ * centerline segments.
290
+ * * The section arcs are constructed so that lines between corresponding fractional positions on the arcs are
291
+ * axial lines on the pipes.
292
+ * * This means that the initial arc's vector0 and vector90 lengths and angular separation are _not_ preserved in
293
+ * the section arcs.
294
+ * * Circular or elliptical pipe cross sections can be specified by supplying either a radius, a pair of semi-axis
295
+ * lengths, or an Arc3d:
296
+ * * For semi-axis length input, x and y correspond to ellipse local axes perpendicular to each other and to the
297
+ * start tangent.
298
+ * * For Arc3d input, the center is translated to the centerline start point, but otherwise the arc is used as-is
299
+ * for the first section. For best results, the arc should be perpendicular to the centerline start tangent.
300
+ * @param centerline centerline of pipe. For best results, ensure no successive duplicate points with e.g.,
301
+ * [[GrowableXYZArray.createCompressed]].
302
+ * @param sectionData circle radius, ellipse semi-axis lengths, or full Arc3d (if not full, function makes it full).
283
303
  */
284
304
  static createMiteredPipeSections(centerline, sectionData) {
285
305
  const arcs = [];
@@ -288,15 +308,15 @@ class CurveFactory {
288
308
  const vector0 = Point3dVector3d_1.Vector3d.create();
289
309
  const vector90 = Point3dVector3d_1.Vector3d.create();
290
310
  const vectorBC = Point3dVector3d_1.Vector3d.create();
291
- const currentCenter = Point3dVector3d_1.Point3d.create();
292
- centerline.vectorIndexIndex(0, 1, vectorBC);
293
- centerline.getPoint3dAtUncheckedPointIndex(0, currentCenter);
294
- let initialSection;
311
+ const sweep = AngleSweep_1.AngleSweep.create360();
312
+ centerline.vectorIndexIndex(0, 1, vectorBC); // initially, the start tangent
295
313
  if (sectionData instanceof Arc3d_1.Arc3d) {
296
- initialSection = sectionData.clone();
297
- initialSection.center.setFrom(currentCenter);
298
314
  vector0.setFrom(sectionData.vector0);
299
315
  vector90.setFrom(sectionData.vector90);
316
+ sweep.setFrom(sectionData.sweep); // allow e.g., half-pipe
317
+ const sectionFacesForward = sectionData.matrixRef.columnDotXYZ(Geometry_1.AxisIndex.Z, vectorBC.x, vectorBC.y, vectorBC.z) > 0;
318
+ if (sectionFacesForward !== sectionData.sweep.isCCW)
319
+ sweep.reverseInPlace();
300
320
  }
301
321
  else if (typeof sectionData === "number" || Point3dVector3d_1.Point3d.isXAndY(sectionData)) {
302
322
  const length0 = (typeof sectionData === "number") ? sectionData : sectionData.x;
@@ -304,87 +324,161 @@ class CurveFactory {
304
324
  const baseFrame = Matrix3d_1.Matrix3d.createRigidHeadsUp(vectorBC, Geometry_1.AxisOrder.ZXY);
305
325
  baseFrame.columnX(vector0).scaleInPlace(length0);
306
326
  baseFrame.columnY(vector90).scaleInPlace(length90);
307
- initialSection = Arc3d_1.Arc3d.create(currentCenter, vector0, vector90, AngleSweep_1.AngleSweep.create360());
308
327
  }
309
328
  else {
310
329
  return [];
311
330
  }
331
+ // ASSUME: initial section normal points toward sweep direction for subsequent facet creation
332
+ const initialSection = Arc3d_1.Arc3d.create(undefined, vector0, vector90, sweep);
333
+ centerline.getPoint3dAtUncheckedPointIndex(0, initialSection.centerRef);
312
334
  arcs.push(initialSection);
313
335
  const vectorAB = Point3dVector3d_1.Vector3d.create();
314
336
  const bisector = Point3dVector3d_1.Vector3d.create();
337
+ const center = Point3dVector3d_1.Point3d.create();
315
338
  for (let i = 1; i < centerline.length; i++) {
316
339
  vectorAB.setFromVector3d(vectorBC);
317
- centerline.getPoint3dAtUncheckedPointIndex(i, currentCenter);
318
- if (i + 1 < centerline.length) {
340
+ centerline.getPoint3dAtUncheckedPointIndex(i, center);
341
+ if (i + 1 < centerline.length)
319
342
  centerline.vectorIndexIndex(i, i + 1, vectorBC);
320
- }
321
- else {
343
+ else
322
344
  vectorBC.setFromVector3d(vectorAB);
323
- }
324
345
  if (vectorAB.normalizeInPlace() && vectorBC.normalizeInPlace()) {
325
346
  vectorAB.interpolate(0.5, vectorBC, bisector);
326
- // On the end ellipse for this pipe section. ..
327
- // center comes directly from centerline[i]
328
- // vector0 and vector90 are obtained by sweeping the corresponding vectors of the start ellipse to the split plane.
347
+ // At pipe end, the ellipse center comes directly from centerline[i], and vector0/vector90 are
348
+ // obtained by sweeping the corresponding vectors of the pipe start ellipse to the bisector plane.
329
349
  moveVectorToPlane(vector0, vectorAB, bisector, vector0);
330
350
  moveVectorToPlane(vector90, vectorAB, bisector, vector90);
331
- arcs.push(Arc3d_1.Arc3d.create(currentCenter, vector0, vector90, AngleSweep_1.AngleSweep.create360()));
351
+ arcs.push(Arc3d_1.Arc3d.create(center, vector0, vector90, sweep));
332
352
  }
333
353
  }
334
354
  return arcs;
335
355
  }
356
+ /** For a smooth curve, stroke and return unnormalized start/end tangents. */
357
+ static strokeSmoothCurve(curve, options) {
358
+ let startTangent, endTangent;
359
+ if (curve instanceof CurvePrimitive_1.CurvePrimitive) {
360
+ startTangent = curve.fractionToPointAndDerivative(0.0).direction;
361
+ endTangent = curve.fractionToPointAndDerivative(1.0).direction;
362
+ const strokes = LineString3d_1.LineString3d.create();
363
+ curve.emitStrokes(strokes, options);
364
+ curve = strokes.packedPoints;
365
+ }
366
+ else if (curve instanceof CurveCollection_1.CurveChain) {
367
+ startTangent = curve.startPointAndDerivative()?.direction;
368
+ endTangent = curve.endPointAndDerivative()?.direction;
369
+ const strokes = curve.getPackedStrokes(options);
370
+ if (!strokes)
371
+ return undefined;
372
+ curve = strokes;
373
+ }
374
+ else if (Array.isArray(curve))
375
+ curve = new Point3dArrayCarrier_1.Point3dArrayCarrier(curve);
376
+ return { strokes: curve, startTangent, endTangent };
377
+ }
378
+ /**
379
+ * Align two bisector plane normals to given smooth rail tangents or optional overrides.
380
+ * * Optionally average the normals for physically closed rail.
381
+ */
382
+ static alignFirstAndLastBisectorPlanes(firstPlane, lastPlane, smoothRailData, options) {
383
+ const normal0 = options?.startTangent ?? (smoothRailData?.startTangent ?? firstPlane.getNormalRef());
384
+ const normal1 = options?.endTangent ?? (smoothRailData?.endTangent ?? lastPlane.getNormalRef());
385
+ if (options?.wrapIfPhysicallyClosed && firstPlane.getOriginRef().isAlmostEqual(lastPlane.getOriginRef())) {
386
+ const avgNormal = normal0.plus(normal1);
387
+ if (avgNormal.tryNormalizeInPlace()) { // ignore cusp at seam
388
+ firstPlane.getNormalRef().setFrom(avgNormal);
389
+ lastPlane.getNormalRef().setFrom(avgNormal);
390
+ return;
391
+ }
392
+ }
393
+ if (normal0.tryNormalizeInPlace())
394
+ firstPlane.getNormalRef().setFrom(normal0);
395
+ if (normal1.tryNormalizeInPlace())
396
+ lastPlane.getNormalRef().setFrom(normal1);
397
+ }
398
+ /** Reverse a closed curve or region if necessary so that its orientation is CCW with respect to the plane normal. */
399
+ static alignClosedCurveToPlane(curve, planeNormal) {
400
+ let closedCurve;
401
+ if (curve instanceof CurvePrimitive_1.CurvePrimitive) {
402
+ if (curve.startPoint().isAlmostEqual(curve.endPoint()))
403
+ closedCurve = Loop_1.Loop.create(curve);
404
+ }
405
+ else if (curve.isAnyRegion())
406
+ closedCurve = curve;
407
+ if (closedCurve) {
408
+ // The alignment condition is equivalent to positive projected curve area computed wrt to the plane normal.
409
+ const toLocal = Matrix3d_1.Matrix3d.createRigidHeadsUp(planeNormal).transpose();
410
+ const projection = closedCurve.cloneTransformed(Transform_1.Transform.createOriginAndMatrix(undefined, toLocal));
411
+ if (projection) { // now we can ignore z-coords
412
+ const areaXY = RegionOps_1.RegionOps.computeXYArea(projection);
413
+ if (areaXY && areaXY < 0)
414
+ curve.reverseInPlace();
415
+ }
416
+ }
417
+ }
336
418
  /**
337
- * Sweep the initialSection along each segment of the centerLine until it hits the bisector plane at the next vertex.
338
- * * The caller should place the initialSection on a plane perpendicular to the first edge.
339
- * * This plane is commonly (but not necessarily) through the start point itself.
340
- * * If the geometry is not "on a perpendicular plane", the output geometry will still be flattened onto the various planes.
341
- * * In the "open path" case (i.e when wrapIfPhysicallyClosed is false or the path does not have matched first and last points)
342
- * the first/last output plane will be at the start/end of the first/last edge and on a perpendicular plane.
343
- * * In the "closed path" case, the output plane for the first and last point is the bisector of the start and end planes from the "open path" case,
344
- * and the first/last section geometry may be different from `initialSection`.
345
- * * The centerline path does NOT have to be planar, however twisting effects effects will appear in the various bisector planes.
346
- * @param centerline sweep path, e.g., as stroked from a smooth centerline curve
347
- * @param initialSection profile curve to be swept. As noted above, this should be on a plane perpendicular to the first segment of the centerline.
348
- * @param options options for computation and output
349
- * @return array of sections, starting with `initialSection` projected along the first edge to the first plane.
419
+ * Projection to target plane, constructing sweep direction from two given planes.
420
+ * * If successful, push the target plane and swept section to the output arrays and return the swept section.
421
+ * * If unsuccessful, leave the output arrays alone and return the input section.
422
+ */
423
+ static doSweepToPlane(output, edgePlane0, edgePlane1, targetPlane, section) {
424
+ const sweepVector = Point3dVector3d_1.Vector3d.createStartEnd(edgePlane0.getOriginRef(), edgePlane1.getOriginRef());
425
+ const transform = Transform_1.Transform.createFlattenAlongVectorToPlane(sweepVector, targetPlane.getOriginRef(), targetPlane.getNormalRef());
426
+ if (transform === undefined)
427
+ return section;
428
+ const transformedSection = section.cloneTransformed(transform);
429
+ if (transformedSection === undefined)
430
+ return section;
431
+ output.planes.push(targetPlane);
432
+ output.sections.push(transformedSection);
433
+ return transformedSection;
434
+ }
435
+ /**
436
+ * Sweep the `initialSection` along each segment of the (stroked) `centerline` until it hits the bisector plane at
437
+ * the next vertex.
438
+ * * For best results, the caller should place `initialSection` in a plane perpendicular to the `centerline`
439
+ * start tangent.
440
+ * * This plane is commonly (but not necessarily) through the centerline start point itself.
441
+ * * To compute the sections, `initialSection` is projected in the direction of the centerline start tangent onto
442
+ * the first bisector plane at the centerline start. The result of this projection will be likewise projected onto
443
+ * the second plane, and so on in sequence.
444
+ * * By default, the first/last bisector plane normals are set to the centerline start/end tangents. The caller can
445
+ * override these with tangents supplied in `options`. If the centerline is physically closed and
446
+ * `options.wrapIfPhysicallyClosed` is true, the first and last plane normals are averaged and equated.
447
+ * * The centerline path does NOT have to be planar, however non-planarity will result in twisting of the sections
448
+ * in the bisector planes.
449
+ * @param centerline sweep path. Will be stroked if smooth.
450
+ * @param initialSection profile curve to be swept. As noted above, this should be on a plane perpendicular to the
451
+ * centerline start tangent.
452
+ * @param options options for computation and output.
453
+ * @return array of sections, formed from projecting `initialSection` successively onto the bisector planes.
350
454
  */
351
455
  static createMiteredSweepSections(centerline, initialSection, options) {
456
+ const rail = this.strokeSmoothCurve(centerline, options.strokeOptions);
457
+ if (!rail)
458
+ return undefined;
459
+ const planes = PolylineOps_1.PolylineOps.createBisectorPlanesForDistinctPoints(rail.strokes);
460
+ if (!planes || planes.length < 2)
461
+ return undefined;
462
+ this.alignFirstAndLastBisectorPlanes(planes[0], planes[planes.length - 1], rail, options);
463
+ // RuledSweep facet construction assumes the contours are oriented CCW with respect to the sweep direction so that
464
+ // facet normals point outward. We only have to align the first contour; the rest will inherit its orientation.
465
+ this.alignClosedCurveToPlane(initialSection, planes[0].getNormalRef());
352
466
  const sectionData = { sections: [], planes: [] };
353
- const planes = PolylineOps_1.PolylineOps.createBisectorPlanesForDistinctPoints(centerline, options.wrapIfPhysicallyClosed);
354
- if (planes !== undefined && planes.length > 1) {
355
- // Projection to target plane, constructing sweep direction from two given planes.
356
- // If successful, push the target plane and swept section to the output arrays and return the swept section.
357
- // If unsuccessful, leave the output arrays alone and return the input section.
358
- const doSweepToPlane = function (edgePlane0, edgePlane1, targetPlane, section) {
359
- const sweepVector = Point3dVector3d_1.Vector3d.createStartEnd(edgePlane0.getOriginRef(), edgePlane1.getOriginRef());
360
- const transform = Transform_1.Transform.createFlattenAlongVectorToPlane(sweepVector, targetPlane.getOriginRef(), targetPlane.getNormalRef());
361
- if (transform === undefined)
362
- return section;
363
- const section1 = section.cloneTransformed(transform);
364
- if (section1 === undefined)
365
- return section;
366
- sectionData.planes.push(targetPlane);
367
- sectionData.sections.push(section1);
368
- return section1;
369
- };
370
- let currentSection = doSweepToPlane(planes[0], planes[1], planes[0], initialSection);
371
- for (let i = 1; i < planes.length; i++) {
372
- currentSection = doSweepToPlane(planes[i - 1], planes[i], planes[i], currentSection);
373
- }
374
- if (options.outputSelect) {
375
- const ruledSweep = RuledSweep_1.RuledSweep.create(sectionData.sections, options.capped ?? false);
376
- if (ruledSweep) {
377
- sectionData.ruledSweep = ruledSweep;
378
- if (MiteredSweepOutputSelect.AlsoMesh === options.outputSelect) {
379
- const builder = PolyfaceBuilder_1.PolyfaceBuilder.create(options.strokeOptions);
380
- builder.addRuledSweep(ruledSweep);
381
- sectionData.mesh = builder.claimPolyface();
382
- }
467
+ let currentSection = this.doSweepToPlane(sectionData, planes[0], planes[1], planes[0], initialSection);
468
+ for (let i = 1; i < planes.length; i++)
469
+ currentSection = this.doSweepToPlane(sectionData, planes[i - 1], planes[i], planes[i], currentSection);
470
+ if (options.outputSelect) {
471
+ const ruledSweep = RuledSweep_1.RuledSweep.create(sectionData.sections, options.capped ?? false);
472
+ if (ruledSweep) {
473
+ sectionData.ruledSweep = ruledSweep;
474
+ if (MiteredSweepOutputSelect.AlsoMesh === options.outputSelect) {
475
+ const builder = PolyfaceBuilder_1.PolyfaceBuilder.create(options.strokeOptions);
476
+ builder.addRuledSweep(ruledSweep);
477
+ sectionData.mesh = builder.claimPolyface();
383
478
  }
384
479
  }
385
- return sectionData;
386
480
  }
387
- return undefined;
481
+ return sectionData;
388
482
  }
389
483
  /**
390
484
  * Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep.
@@ -401,11 +495,11 @@ class CurveFactory {
401
495
  /**
402
496
  * Compute 2 spirals (all in XY) for a symmetric line-to-line transition.
403
497
  * * First spiral begins at given start point.
404
- * * first tangent aims at shoulder
498
+ * * first tangent aims at shoulder.
405
499
  * * outbound spiral joins line from shoulder to target.
406
- * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE
500
+ * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE.
407
501
  * @param startPoint inbound start point.
408
- * @param shoulder point target point for (both) spiral-to-line tangencies
502
+ * @param shoulder point target point for (both) spiral-to-line tangencies.
409
503
  * @return array with the computed spirals, or undefined if failure.
410
504
  */
411
505
  static createLineSpiralSpiralLine(spiralType, startPoint, shoulderPoint, targetPoint) {
@@ -443,9 +537,9 @@ class CurveFactory {
443
537
  * Compute 2 spirals (all in XY) for a symmetric line-to-line transition.
444
538
  * * Spiral length is given.
445
539
  * * tangency points float on both lines.
446
- * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE
540
+ * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE.
447
541
  * @param pointA inbound start point.
448
- * @param shoulder point target point for (both) spiral-to-line tangencies
542
+ * @param shoulder point target point for (both) spiral-to-line tangencies.
449
543
  * @param spiralLength for each part of the spiral pair.
450
544
  * @return array with the computed spirals, or undefined if failure.
451
545
  */
@@ -483,12 +577,12 @@ class CurveFactory {
483
577
  }
484
578
  /**
485
579
  * Compute 2 spirals and an arc (all in XY) for a symmetric line-to-line transition.
486
- * Spiral lengths and arc radius are given. (e.g. from design speed standards.)
487
- * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE
580
+ * Spiral lengths and arc radius are given (e.g., from design speed standards).
581
+ * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE.
488
582
  * @param pointA inbound start point.
489
- * @param pointB shoulder (target) point for (both) spiral-to-line tangencies
490
- * @param lengthA inbound spiral length
491
- * @param lengthB outbound spiral length
583
+ * @param pointB shoulder (target) point for (both) spiral-to-line tangencies.
584
+ * @param lengthA inbound spiral length.
585
+ * @param lengthB outbound spiral length.
492
586
  * @return array with the computed spirals, or undefined if failure.
493
587
  */
494
588
  static createLineSpiralArcSpiralLine(spiralType, pointA, pointB, pointC, lengthA, lengthB, arcRadius) {
@@ -538,12 +632,7 @@ class CurveFactory {
538
632
  }
539
633
  return undefined;
540
634
  }
541
- /**
542
- * Return the intersection point of 3 planes.
543
- * @param planeA
544
- * @param planeB
545
- * @param planeC
546
- */
635
+ /** Return the intersection point of 3 planes. */
547
636
  static planePlaneIntersectionRay(planeA, planeB) {
548
637
  const altitudeA = planeA.altitudeXYZ(0, 0, 0);
549
638
  const altitudeB = planeB.altitudeXYZ(0, 0, 0);
@@ -564,9 +653,7 @@ class CurveFactory {
564
653
  }
565
654
  }
566
655
  exports.CurveFactory = CurveFactory;
567
- /**
568
- * Starting at vectorR, move parallel to vectorV until perpendicular to planeNormal
569
- */
656
+ /** Starting at vectorR, move parallel to vectorV until perpendicular to planeNormal. */
570
657
  function moveVectorToPlane(vectorR, vectorV, planeNormal, result) {
571
658
  // find s such that (vectorR + s * vectorV) DOT planeNormal = 0.
572
659
  const dotRN = vectorR.dotProduct(planeNormal);