@itwin/core-geometry 5.0.0-dev.4 → 5.0.0-dev.5

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 (579) hide show
  1. package/lib/cjs/Constant.js.map +1 -1
  2. package/lib/cjs/Geometry.js.map +1 -1
  3. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  4. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  5. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  6. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  7. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  8. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  9. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  10. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  11. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  12. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  13. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  14. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  15. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  16. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  17. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  18. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  19. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  20. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  21. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  22. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  23. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  24. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  25. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  26. package/lib/cjs/core-geometry.js.map +1 -1
  27. package/lib/cjs/curve/Arc3d.d.ts +25 -5
  28. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/Arc3d.js +44 -5
  30. package/lib/cjs/curve/Arc3d.js.map +1 -1
  31. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  32. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  33. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  34. package/lib/cjs/curve/CurveCollection.d.ts +6 -2
  35. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  36. package/lib/cjs/curve/CurveCollection.js +11 -2
  37. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  38. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  39. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  40. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  41. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  42. package/lib/cjs/curve/CurveOps.js.map +1 -1
  43. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  44. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  45. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  46. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  47. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  48. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  49. package/lib/cjs/curve/LineString3d.d.ts +12 -8
  50. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  51. package/lib/cjs/curve/LineString3d.js +29 -8
  52. package/lib/cjs/curve/LineString3d.js.map +1 -1
  53. package/lib/cjs/curve/Loop.d.ts +12 -6
  54. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  55. package/lib/cjs/curve/Loop.js +12 -6
  56. package/lib/cjs/curve/Loop.js.map +1 -1
  57. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  58. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  59. package/lib/cjs/curve/Path.js.map +1 -1
  60. package/lib/cjs/curve/PointString3d.js.map +1 -1
  61. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  62. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  63. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  64. package/lib/cjs/curve/Query/CylindricalRange.d.ts +8 -6
  65. package/lib/cjs/curve/Query/CylindricalRange.d.ts.map +1 -1
  66. package/lib/cjs/curve/Query/CylindricalRange.js +13 -9
  67. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  68. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  69. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  70. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  71. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  72. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  73. package/lib/cjs/curve/RegionOps.js.map +1 -1
  74. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  75. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  76. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  77. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  78. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  79. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  81. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  82. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  83. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  86. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  87. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  88. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
  89. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
  90. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  93. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  94. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  95. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  96. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  97. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  98. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  99. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  100. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  101. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  102. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  103. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  104. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  105. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  106. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  107. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  108. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  109. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  110. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  111. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  112. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  113. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +14 -8
  114. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  115. package/lib/cjs/geometry3d/BarycentricTriangle.js +17 -8
  116. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  117. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  118. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  119. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  120. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  121. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  122. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  123. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  124. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +2 -0
  125. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  126. package/lib/cjs/geometry3d/GrowableFloat64Array.js +4 -0
  127. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  128. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  129. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  130. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  131. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  132. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  133. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  134. package/lib/cjs/geometry3d/Matrix3d.d.ts +8 -4
  135. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  136. package/lib/cjs/geometry3d/Matrix3d.js +25 -22
  137. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  138. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  139. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  140. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  141. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  142. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  143. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  144. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  145. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  146. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  147. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  148. package/lib/cjs/geometry3d/PolygonOps.d.ts +10 -4
  149. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  150. package/lib/cjs/geometry3d/PolygonOps.js +92 -45
  151. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  152. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  153. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  154. package/lib/cjs/geometry3d/Range.js.map +1 -1
  155. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  156. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  157. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  158. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  159. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  160. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  161. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  162. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  163. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  164. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  165. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  166. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  167. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  168. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  169. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  170. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  171. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  172. package/lib/cjs/numerics/Complex.js.map +1 -1
  173. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  174. package/lib/cjs/numerics/Newton.js.map +1 -1
  175. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  176. package/lib/cjs/numerics/PolarData.js.map +1 -1
  177. package/lib/cjs/numerics/Polynomials.d.ts +5 -5
  178. package/lib/cjs/numerics/Polynomials.js +6 -6
  179. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  180. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  181. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  182. package/lib/cjs/numerics/SmallSystem.js.map +1 -1
  183. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  184. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  185. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  186. package/lib/cjs/polyface/AuxData.d.ts +2 -2
  187. package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
  188. package/lib/cjs/polyface/AuxData.js +11 -3
  189. package/lib/cjs/polyface/AuxData.js.map +1 -1
  190. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  191. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  192. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  193. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  194. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  195. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  196. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  197. package/lib/cjs/polyface/Polyface.d.ts +3 -5
  198. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  199. package/lib/cjs/polyface/Polyface.js +6 -13
  200. package/lib/cjs/polyface/Polyface.js.map +1 -1
  201. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  202. package/lib/cjs/polyface/PolyfaceBuilder.js +23 -13
  203. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  204. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  205. package/lib/cjs/polyface/PolyfaceData.d.ts +13 -3
  206. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  207. package/lib/cjs/polyface/PolyfaceData.js +21 -4
  208. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  209. package/lib/cjs/polyface/PolyfaceQuery.d.ts +2 -2
  210. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  211. package/lib/cjs/polyface/PolyfaceQuery.js +4 -3
  212. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  213. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  214. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  215. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  216. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  217. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  218. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  219. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  220. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  221. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  222. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  223. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  224. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  225. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  226. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  227. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  228. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  229. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  230. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  231. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  232. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  233. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  234. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  235. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  236. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  237. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  238. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  239. package/lib/cjs/solid/Box.d.ts +9 -3
  240. package/lib/cjs/solid/Box.d.ts.map +1 -1
  241. package/lib/cjs/solid/Box.js +10 -5
  242. package/lib/cjs/solid/Box.js.map +1 -1
  243. package/lib/cjs/solid/Cone.d.ts +3 -2
  244. package/lib/cjs/solid/Cone.d.ts.map +1 -1
  245. package/lib/cjs/solid/Cone.js +3 -3
  246. package/lib/cjs/solid/Cone.js.map +1 -1
  247. package/lib/cjs/solid/LinearSweep.d.ts +9 -3
  248. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  249. package/lib/cjs/solid/LinearSweep.js +9 -4
  250. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  251. package/lib/cjs/solid/RotationalSweep.d.ts +15 -4
  252. package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
  253. package/lib/cjs/solid/RotationalSweep.js +20 -7
  254. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  255. package/lib/cjs/solid/RuledSweep.d.ts +9 -3
  256. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  257. package/lib/cjs/solid/RuledSweep.js +11 -5
  258. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  259. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  260. package/lib/cjs/solid/Sphere.d.ts +17 -7
  261. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  262. package/lib/cjs/solid/Sphere.js +22 -16
  263. package/lib/cjs/solid/Sphere.js.map +1 -1
  264. package/lib/cjs/solid/SweepContour.d.ts +1 -1
  265. package/lib/cjs/solid/SweepContour.js +1 -1
  266. package/lib/cjs/solid/SweepContour.js.map +1 -1
  267. package/lib/cjs/solid/TorusPipe.d.ts +8 -2
  268. package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
  269. package/lib/cjs/solid/TorusPipe.js +9 -5
  270. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  271. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  272. package/lib/cjs/topology/Graph.js.map +1 -1
  273. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  274. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  275. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  276. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  277. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  278. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  279. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  280. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  281. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  282. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  283. package/lib/cjs/topology/MaskManager.js.map +1 -1
  284. package/lib/cjs/topology/Merging.js.map +1 -1
  285. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  286. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  287. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  288. package/lib/cjs/topology/Triangulation.js.map +1 -1
  289. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  290. package/lib/esm/Constant.js.map +1 -1
  291. package/lib/esm/Geometry.js.map +1 -1
  292. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  293. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  294. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  295. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  296. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  297. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  298. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  299. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  300. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  301. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  302. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  303. package/lib/esm/bspline/KnotVector.js.map +1 -1
  304. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  305. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  306. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  307. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  308. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  309. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  310. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  311. package/lib/esm/clipping/ClipVector.js.map +1 -1
  312. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  313. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  314. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  315. package/lib/esm/core-geometry.js.map +1 -1
  316. package/lib/esm/curve/Arc3d.d.ts +25 -5
  317. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  318. package/lib/esm/curve/Arc3d.js +44 -5
  319. package/lib/esm/curve/Arc3d.js.map +1 -1
  320. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  321. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  322. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  323. package/lib/esm/curve/CurveCollection.d.ts +6 -2
  324. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  325. package/lib/esm/curve/CurveCollection.js +11 -2
  326. package/lib/esm/curve/CurveCollection.js.map +1 -1
  327. package/lib/esm/curve/CurveCurve.js.map +1 -1
  328. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  329. package/lib/esm/curve/CurveFactory.js.map +1 -1
  330. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  331. package/lib/esm/curve/CurveOps.js.map +1 -1
  332. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  333. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  334. package/lib/esm/curve/CurveTypes.js.map +1 -1
  335. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  336. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  337. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  338. package/lib/esm/curve/LineString3d.d.ts +12 -8
  339. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  340. package/lib/esm/curve/LineString3d.js +29 -8
  341. package/lib/esm/curve/LineString3d.js.map +1 -1
  342. package/lib/esm/curve/Loop.d.ts +12 -6
  343. package/lib/esm/curve/Loop.d.ts.map +1 -1
  344. package/lib/esm/curve/Loop.js +12 -6
  345. package/lib/esm/curve/Loop.js.map +1 -1
  346. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  347. package/lib/esm/curve/ParityRegion.js.map +1 -1
  348. package/lib/esm/curve/Path.js.map +1 -1
  349. package/lib/esm/curve/PointString3d.js.map +1 -1
  350. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  351. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  352. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  353. package/lib/esm/curve/Query/CylindricalRange.d.ts +8 -6
  354. package/lib/esm/curve/Query/CylindricalRange.d.ts.map +1 -1
  355. package/lib/esm/curve/Query/CylindricalRange.js +13 -9
  356. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  357. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  358. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  359. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  360. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  361. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  362. package/lib/esm/curve/RegionOps.js.map +1 -1
  363. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  364. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  365. package/lib/esm/curve/UnionRegion.js.map +1 -1
  366. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  367. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  368. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  369. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  370. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  371. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  372. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  373. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  374. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  375. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  376. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  377. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
  378. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
  379. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  380. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  381. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  382. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  383. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  384. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  385. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  386. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  387. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  388. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  389. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  390. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  391. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  392. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  393. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  394. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  395. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  396. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  397. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  398. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  399. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  400. package/lib/esm/geometry3d/Angle.js.map +1 -1
  401. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  402. package/lib/esm/geometry3d/BarycentricTriangle.d.ts +14 -8
  403. package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  404. package/lib/esm/geometry3d/BarycentricTriangle.js +17 -8
  405. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  406. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  407. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  408. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  409. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  410. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  411. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  412. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  413. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +2 -0
  414. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  415. package/lib/esm/geometry3d/GrowableFloat64Array.js +4 -0
  416. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  417. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  418. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  419. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  420. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  421. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  422. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  423. package/lib/esm/geometry3d/Matrix3d.d.ts +8 -4
  424. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  425. package/lib/esm/geometry3d/Matrix3d.js +25 -22
  426. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  427. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  428. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  429. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  430. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  431. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  432. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  433. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  434. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  435. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  436. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  437. package/lib/esm/geometry3d/PolygonOps.d.ts +10 -4
  438. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  439. package/lib/esm/geometry3d/PolygonOps.js +92 -45
  440. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  441. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  442. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  443. package/lib/esm/geometry3d/Range.js.map +1 -1
  444. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  445. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  446. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  447. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  448. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  449. package/lib/esm/geometry3d/Transform.js.map +1 -1
  450. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  451. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  452. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  453. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  454. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  455. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  456. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  457. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  458. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  459. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  460. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  461. package/lib/esm/numerics/Complex.js.map +1 -1
  462. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  463. package/lib/esm/numerics/Newton.js.map +1 -1
  464. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  465. package/lib/esm/numerics/PolarData.js.map +1 -1
  466. package/lib/esm/numerics/Polynomials.d.ts +5 -5
  467. package/lib/esm/numerics/Polynomials.js +6 -6
  468. package/lib/esm/numerics/Polynomials.js.map +1 -1
  469. package/lib/esm/numerics/Quadrature.js.map +1 -1
  470. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  471. package/lib/esm/numerics/SmallSystem.js.map +1 -1
  472. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  473. package/lib/esm/numerics/UnionFind.js.map +1 -1
  474. package/lib/esm/numerics/UsageSums.js.map +1 -1
  475. package/lib/esm/polyface/AuxData.d.ts +2 -2
  476. package/lib/esm/polyface/AuxData.d.ts.map +1 -1
  477. package/lib/esm/polyface/AuxData.js +11 -3
  478. package/lib/esm/polyface/AuxData.js.map +1 -1
  479. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  480. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  481. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  482. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  483. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  484. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  485. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  486. package/lib/esm/polyface/Polyface.d.ts +3 -5
  487. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  488. package/lib/esm/polyface/Polyface.js +6 -13
  489. package/lib/esm/polyface/Polyface.js.map +1 -1
  490. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  491. package/lib/esm/polyface/PolyfaceBuilder.js +23 -13
  492. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  493. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  494. package/lib/esm/polyface/PolyfaceData.d.ts +13 -3
  495. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  496. package/lib/esm/polyface/PolyfaceData.js +21 -4
  497. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  498. package/lib/esm/polyface/PolyfaceQuery.d.ts +2 -2
  499. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  500. package/lib/esm/polyface/PolyfaceQuery.js +4 -3
  501. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  502. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  503. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  504. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  505. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  506. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  507. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  508. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  509. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  510. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  511. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  512. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  513. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  514. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  515. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  516. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  517. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  518. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  519. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  520. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  521. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  522. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  523. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  524. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  525. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  526. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  527. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  528. package/lib/esm/solid/Box.d.ts +9 -3
  529. package/lib/esm/solid/Box.d.ts.map +1 -1
  530. package/lib/esm/solid/Box.js +10 -5
  531. package/lib/esm/solid/Box.js.map +1 -1
  532. package/lib/esm/solid/Cone.d.ts +3 -2
  533. package/lib/esm/solid/Cone.d.ts.map +1 -1
  534. package/lib/esm/solid/Cone.js +3 -3
  535. package/lib/esm/solid/Cone.js.map +1 -1
  536. package/lib/esm/solid/LinearSweep.d.ts +9 -3
  537. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  538. package/lib/esm/solid/LinearSweep.js +9 -4
  539. package/lib/esm/solid/LinearSweep.js.map +1 -1
  540. package/lib/esm/solid/RotationalSweep.d.ts +15 -4
  541. package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
  542. package/lib/esm/solid/RotationalSweep.js +20 -7
  543. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  544. package/lib/esm/solid/RuledSweep.d.ts +9 -3
  545. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  546. package/lib/esm/solid/RuledSweep.js +11 -5
  547. package/lib/esm/solid/RuledSweep.js.map +1 -1
  548. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  549. package/lib/esm/solid/Sphere.d.ts +17 -7
  550. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  551. package/lib/esm/solid/Sphere.js +22 -16
  552. package/lib/esm/solid/Sphere.js.map +1 -1
  553. package/lib/esm/solid/SweepContour.d.ts +1 -1
  554. package/lib/esm/solid/SweepContour.js +1 -1
  555. package/lib/esm/solid/SweepContour.js.map +1 -1
  556. package/lib/esm/solid/TorusPipe.d.ts +8 -2
  557. package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
  558. package/lib/esm/solid/TorusPipe.js +9 -5
  559. package/lib/esm/solid/TorusPipe.js.map +1 -1
  560. package/lib/esm/topology/ChainMerge.js.map +1 -1
  561. package/lib/esm/topology/Graph.js.map +1 -1
  562. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  563. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  564. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  565. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  566. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  567. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  568. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  569. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  570. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  571. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  572. package/lib/esm/topology/MaskManager.js.map +1 -1
  573. package/lib/esm/topology/Merging.js.map +1 -1
  574. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  575. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  576. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  577. package/lib/esm/topology/Triangulation.js.map +1 -1
  578. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  579. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"Cone.js","sourceRoot":"","sources":["../../../src/solid/Cone.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AAGvC,wDAAqD;AACrD,wCAAqC;AAErC,0CAAuC;AAEvC,qDAAkD;AAClD,uFAAoF;AACpF,mEAAyD;AACzD,mEAAkE;AAElE,uDAAoD;AACpD,qDAAkD;AAElD;;;;;;;GAOG;AACH,MAAa,IAAK,SAAQ,+BAAc;IAQtC,YAAsB,GAAc,EAAE,OAA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M,aAAa,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;QAChD,OAAO,0BAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACzE,mBAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IACxF,CAAC;CACF;AAxPD,oBAwPC","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 { Arc3d } from \"../curve/Arc3d\";\nimport { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Loop } from \"../curve/Loop\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler, UVSurface, UVSurfaceIsoParametricDistance } from \"../geometry3d/GeometryHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\n\n/**\n * A cone with axis along the z axis of a (possibly skewed) local coordinate system.\n *\n * * In local coordinates, the sections at z=0 and z=1 are circles of radius r0 and r1.\n * * Either one individually may be zero, but they may not both be zero.\n * * The stored matrix has unit vectors in the xy columns, and full-length z column.\n * @public\n */\nexport class Cone extends SolidPrimitive implements UVSurface, UVSurfaceIsoParametricDistance {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"cone\";\n\n private _localToWorld: Transform; // Transform from local to global.\n private _radiusA: number; // nominal radius at z=0. skewed axes may make it an ellipse\n private _radiusB: number; // radius at z=1. skewed axes may make it an ellipse\n private _maxRadius: number; // maximum radius anywhere on the cone.\n protected constructor(map: Transform, radiusA: number, radiusB: number, capped: boolean) {\n super(capped);\n this._localToWorld = map;\n this._radiusA = radiusA;\n this._radiusB = radiusB;\n this._maxRadius = Math.max(this._radiusA, this._radiusB); // um... should resolve elliptical sections\n }\n /** Return a clone of this Cone. */\n public clone(): Cone {\n return new Cone(this._localToWorld.clone(), this._radiusA, this._radiusB, this.capped);\n }\n /** Return a coordinate frame (right handed unit vectors)\n * * origin at center of the base circle.\n * * base circle in the xy plane\n * * z axis by right hand rule.\n */\n public getConstructiveFrame(): Transform | undefined {\n return this._localToWorld.cloneRigid();\n }\n /** Apply the transform to this cone's locla to world coordinates.\n * * Note that the radii are not changed. Scaling is absorbed into the frame.\n * * This fails if the transformation is singular.\n */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);\n return true;\n }\n /**\n * Create a clone and immediately transform the clone.\n */\n public cloneTransformed(transform: Transform): Cone | undefined {\n const result = this.clone();\n transform.multiplyTransformTransform(result._localToWorld, result._localToWorld);\n return result;\n }\n /** create a cylinder or cone from two endpoints and their radii. The circular cross sections are perpendicular to the axis line\n * from start to end point.\n * * both radii must be of the same sign.\n * * negative radius is accepted to create interior surface. Downstream effects of that combined with capping may be a problem.\n */\n public static createAxisPoints(centerA: Point3d, centerB: Point3d, radiusA: number, radiusB: number, capped: boolean): Cone | undefined {\n const zDirection = centerA.vectorTo(centerB);\n const a = zDirection.magnitude();\n if (Geometry.isSmallMetricDistance(a)) return undefined;\n // force near-zero radii to true zero\n radiusA = Geometry.correctSmallMetricDistance(radiusA);\n radiusB = Geometry.correctSmallMetricDistance(radiusB);\n // cone tip may not be \"within\" the z range.\n if (radiusA * radiusB < 0.0) return undefined;\n // at least one must be nonzero.\n if (radiusA + radiusB === 0.0) return undefined;\n const matrix = Matrix3d.createRigidHeadsUp(zDirection);\n matrix.scaleColumns(1.0, 1.0, a, matrix);\n const localToWorld = Transform.createOriginAndMatrix(centerA, matrix);\n return new Cone(localToWorld, radiusA, radiusB, capped);\n }\n /** create a cylinder or cone from axis start and end with cross section defined by vectors that do not need to be perpendicular to each other or\n * to the axis.\n */\n public static createBaseAndTarget(centerA: Point3d, centerB: Point3d, vectorX: Vector3d, vectorY: Vector3d, radiusA: number, radiusB: number, capped: boolean) {\n radiusA = Math.abs(Geometry.correctSmallMetricDistance(radiusA));\n radiusB = Math.abs(Geometry.correctSmallMetricDistance(radiusB));\n const vectorZ = centerA.vectorTo(centerB);\n const localToWorld = Transform.createOriginAndMatrixColumns(centerA, vectorX, vectorY, vectorZ);\n return new Cone(localToWorld, radiusA, radiusB, capped);\n }\n /** (Property accessor) Return the center point at the base plane */\n public getCenterA(): Point3d { return this._localToWorld.multiplyXYZ(0, 0, 0); }\n /** (Property accessor) */\n public getCenterB(): Point3d { return this._localToWorld.multiplyXYZ(0, 0, 1); }\n /** (Property accessor) Return the x vector in the local frame */\n public getVectorX(): Vector3d { return this._localToWorld.matrix.columnX(); }\n /** (Property accessor) Return the y vector in the local frame */\n public getVectorY(): Vector3d { return this._localToWorld.matrix.columnY(); }\n /** (Property accessor) return the radius at the base plane */\n public getRadiusA(): number { return this._radiusA; }\n /** (Property accessor) return the radius at the top plane */\n public getRadiusB(): number { return this._radiusB; }\n /** (Property accessor) return the larger of the base and top plane radii */\n public getMaxRadius(): number { return this._maxRadius; }\n /** (Property accessor) return the radius at fraction `v` along the axis */\n public vFractionToRadius(v: number): number { return Geometry.interpolate(this._radiusA, v, this._radiusB); }\n /** (Property accessor) test if `other` is an instance of `Cone` */\n public isSameGeometryClass(other: any): boolean { return other instanceof Cone; }\n /** (Property accessor) Test for nearly equal coordinate data. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof Cone) {\n if (this.capped !== other.capped) return false;\n if (!this._localToWorld.isAlmostEqualAllowZRotation(other._localToWorld)) return false;\n return Geometry.isSameCoordinate(this._radiusA, other._radiusA)\n && Geometry.isSameCoordinate(this._radiusB, other._radiusB);\n }\n return false;\n }\n /** Second step of double dispatch: call `handler.handleCone(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleCone(this);\n }\n\n /**\n * return strokes for a cross-section (elliptic arc) at specified fraction v along the axis.\n * * fixedStrokeCount takes priority over stroke options.\n * * The linestring is created by LineString3d.createForStrokes (fixedStrokeCount, options), which sets up property according to the options:\n * * optional fractions member\n * * optional uvParams. uvParams are installed as full-scale distance parameters.\n * * optional derivatives.\n * @param v fractional position along the cone axis\n * @param fixedStrokeCount optional stroke count.\n * @param options optional stroke options.\n */\n public strokeConstantVSection(v: number, fixedStrokeCount: number | undefined, options: StrokeOptions | undefined): LineString3d {\n let strokeCount = 16;\n if (fixedStrokeCount !== undefined)\n strokeCount = fixedStrokeCount;\n else if (options !== undefined)\n strokeCount = options.defaultCircleStrokes; // NEEDS WORK -- get circle stroke count with this.maxRadius !!!\n else {\n // accept the local default\n }\n strokeCount = Geometry.clampToStartEnd(strokeCount, 4, 64);\n const r = this.vFractionToRadius(v);\n const result = LineString3d.createForStrokes(fixedStrokeCount, options);\n const twoPi = Math.PI * 2.0;\n const deltaRadians = twoPi / strokeCount;\n let radians = 0;\n const fractions = result.fractions; // possibly undefined !!!\n const derivatives = result.packedDerivatives; // possibly undefined !!!\n const uvParams = result.packedUVParams; // possibly undefined !!\n const surfaceNormals = result.packedSurfaceNormals;\n const xyz = Point3d.create();\n const dXdu = Vector3d.create();\n const dXdv = Vector3d.create();\n const normal = Vector3d.create();\n const transform = this._localToWorld;\n let rc, rs, cc, ss;\n for (let i = 0; i <= strokeCount; i++) {\n if (i * 2 <= strokeCount)\n radians = i * deltaRadians;\n else\n radians = (i - strokeCount) * deltaRadians;\n cc = Math.cos(radians);\n ss = Math.sin(radians);\n rc = r * cc;\n rs = r * ss;\n\n transform.multiplyXYZ(rc, rs, v, xyz);\n result.addPoint(xyz);\n if (fractions)\n fractions.push(i / strokeCount);\n if (derivatives) {\n transform.matrix.multiplyXYZ(-rs * twoPi, rc * twoPi, 0.0, dXdu);\n derivatives.push(dXdu);\n }\n if (surfaceNormals) {\n // the along-hoop vector does not need to be scaled by radius -- just need the direction for a cross product.\n transform.matrix.multiplyXYZ(-ss, cc, 0.0, dXdu);\n transform.matrix.multiplyXYZ(0, 0, 1, dXdv);\n dXdu.unitCrossProduct(dXdv, normal);\n surfaceNormals.push(normal);\n }\n if (uvParams) {\n uvParams.pushXY(i / strokeCount, v);\n }\n }\n return result;\n }\n /**\n * Return the Arc3d section at vFraction\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const r = this.vFractionToRadius(vFraction);\n const transform = this._localToWorld;\n const center = transform.multiplyXYZ(0, 0, vFraction);\n const vector0 = transform.matrix.multiplyXYZ(r, 0, 0);\n const vector90 = transform.matrix.multiplyXYZ(0, r, 0);\n return Loop.create(Arc3d.create(center, vector0, vector90));\n }\n /** Extend `rangeToExtend` so it includes this `Cone` instance. */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const arc0 = this.constantVSection(0.0)!;\n const arc1 = this.constantVSection(1.0)!;\n arc0.extendRange(rangeToExtend, transform);\n arc1.extendRange(rangeToExtend, transform);\n }\n /** Evaluate a point on the Cone surfaces, with\n * * v = 0 is the base plane.\n * * v = 1 is the top plane\n * * u = 0 to u = 1 wraps the angular range.\n */\n public uvFractionToPoint(uFraction: number, vFraction: number, result?: Point3d): Point3d {\n const theta = uFraction * Math.PI * 2.0;\n const r = Geometry.interpolate(this._radiusA, vFraction, this._radiusB);\n const cosTheta = Math.cos(theta);\n const sinTheta = Math.sin(theta);\n return this._localToWorld.multiplyXYZ(r * cosTheta, r * sinTheta, vFraction, result);\n }\n /** Evaluate a point tangent plane on the Cone surfaces, with\n * * v = 0 is the base plane.\n * * v = 1 is the top plane\n * * u = 0 to u = 1 wraps the angular range.\n */\n public uvFractionToPointAndTangents(uFraction: number, vFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n const theta = uFraction * Math.PI * 2.0;\n const r = Geometry.interpolate(this._radiusA, vFraction, this._radiusB);\n const drdv = this._radiusB - this._radiusA;\n const cosTheta = Math.cos(theta);\n const sinTheta = Math.sin(theta);\n const fTheta = 2.0 * Math.PI;\n return Plane3dByOriginAndVectors.createOriginAndVectors(\n this._localToWorld.multiplyXYZ(r * cosTheta, r * sinTheta, vFraction),\n this._localToWorld.multiplyVectorXYZ(-r * sinTheta * fTheta, r * cosTheta * fTheta, 0),\n this._localToWorld.multiplyVectorXYZ(drdv * cosTheta, drdv * sinTheta, 1.0),\n result);\n }\n /**\n * @return true if this is a closed volume.\n */\n public get isClosedVolume(): boolean {\n return this.capped;\n }\n /**\n * Directional distance query\n * * u direction is around longitude circle at maximum distance from axis.\n * * v direction is on a line of longitude between the latitude limits.\n */\n public maxIsoParametricDistance(): Vector2d {\n const vectorX = this._localToWorld.matrix.columnX();\n const vectorY = this._localToWorld.matrix.columnY();\n const columnZ = this._localToWorld.matrix.columnZ();\n\n const xyNormal = vectorX.unitCrossProduct(vectorY)!;\n const hZ = xyNormal.dotProduct(columnZ);\n const zSkewVector = columnZ.plusScaled(xyNormal, hZ);\n const zSkewDistance = zSkewVector.magnitudeXY();\n return Vector2d.create(Math.PI * 2 * Math.max(this._radiusA, this._radiusB),\n Geometry.hypotenuseXY(Math.abs(this._radiusB - this._radiusA) + zSkewDistance, hZ));\n }\n}\n"]}
1
+ {"version":3,"file":"Cone.js","sourceRoot":"","sources":["../../../src/solid/Cone.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;A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MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAE,CAAC;QACpD,MAAM,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACxC,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACrD,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;QAChD,OAAO,0BAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACzE,mBAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IACxF,CAAC;CACF;AAxPD,oBAwPC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Solid\r\n */\r\n\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { CurveCollection } from \"../curve/CurveCollection\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { Loop } from \"../curve/Loop\";\r\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GeometryHandler, UVSurface, UVSurfaceIsoParametricDistance } from \"../geometry3d/GeometryHandler\";\r\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\r\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\r\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { SolidPrimitive } from \"./SolidPrimitive\";\r\n\r\n/**\r\n * A cone with axis along the z axis of a (possibly skewed) local coordinate system.\r\n *\r\n * * In local coordinates, the sections at z=0 and z=1 are circles of radius r0 and r1.\r\n * * Either one individually may be zero, but they may not both be zero.\r\n * * The stored matrix has unit vectors in the xy columns, and full-length z column.\r\n * @public\r\n */\r\nexport class Cone extends SolidPrimitive implements UVSurface, UVSurfaceIsoParametricDistance {\r\n /** String name for schema properties */\r\n public readonly solidPrimitiveType = \"cone\";\r\n\r\n private _localToWorld: Transform; // Transform from local to global.\r\n private _radiusA: number; // nominal radius at z=0. skewed axes may make it an ellipse\r\n private _radiusB: number; // radius at z=1. skewed axes may make it an ellipse\r\n private _maxRadius: number; // maximum radius anywhere on the cone.\r\n protected constructor(map: Transform, radiusA: number, radiusB: number, capped: boolean) {\r\n super(capped);\r\n this._localToWorld = map;\r\n this._radiusA = radiusA;\r\n this._radiusB = radiusB;\r\n this._maxRadius = Math.max(this._radiusA, this._radiusB); // um... should resolve elliptical sections\r\n }\r\n /** Return a clone of this Cone. */\r\n public clone(): Cone {\r\n return new Cone(this._localToWorld.clone(), this._radiusA, this._radiusB, this.capped);\r\n }\r\n /** Return a coordinate frame (right handed unit vectors)\r\n * * origin at center of the base circle.\r\n * * base circle in the xy plane\r\n * * z axis by right hand rule.\r\n */\r\n public getConstructiveFrame(): Transform | undefined {\r\n return this._localToWorld.cloneRigid();\r\n }\r\n /** Apply the transform to this cone's local to world coordinates.\r\n * * Note that the radii are not changed. Scaling is absorbed into the frame.\r\n * * This fails if the transformation is singular.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n if (transform.matrix.isSingular())\r\n return false;\r\n transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);\r\n return true;\r\n }\r\n /**\r\n * Create a clone and immediately transform the clone.\r\n * * This fails if the transformation is singular.\r\n */\r\n public cloneTransformed(transform: Transform): Cone | undefined {\r\n const result = this.clone();\r\n return result.tryTransformInPlace(transform) ? result : undefined;\r\n }\r\n /** create a cylinder or cone from two endpoints and their radii. The circular cross sections are perpendicular to the axis line\r\n * from start to end point.\r\n * * both radii must be of the same sign.\r\n * * negative radius is accepted to create interior surface. Downstream effects of that combined with capping may be a problem.\r\n */\r\n public static createAxisPoints(centerA: Point3d, centerB: Point3d, radiusA: number, radiusB: number, capped: boolean): Cone | undefined {\r\n const zDirection = centerA.vectorTo(centerB);\r\n const a = zDirection.magnitude();\r\n if (Geometry.isSmallMetricDistance(a)) return undefined;\r\n // force near-zero radii to true zero\r\n radiusA = Geometry.correctSmallMetricDistance(radiusA);\r\n radiusB = Geometry.correctSmallMetricDistance(radiusB);\r\n // cone tip may not be \"within\" the z range.\r\n if (radiusA * radiusB < 0.0) return undefined;\r\n // at least one must be nonzero.\r\n if (radiusA + radiusB === 0.0) return undefined;\r\n const matrix = Matrix3d.createRigidHeadsUp(zDirection);\r\n matrix.scaleColumns(1.0, 1.0, a, matrix);\r\n const localToWorld = Transform.createOriginAndMatrix(centerA, matrix);\r\n return new Cone(localToWorld, radiusA, radiusB, capped);\r\n }\r\n /** create a cylinder or cone from axis start and end with cross section defined by vectors that do not need to be perpendicular to each other or\r\n * to the axis.\r\n */\r\n public static createBaseAndTarget(centerA: Point3d, centerB: Point3d, vectorX: Vector3d, vectorY: Vector3d, radiusA: number, radiusB: number, capped: boolean) {\r\n radiusA = Math.abs(Geometry.correctSmallMetricDistance(radiusA));\r\n radiusB = Math.abs(Geometry.correctSmallMetricDistance(radiusB));\r\n const vectorZ = centerA.vectorTo(centerB);\r\n const localToWorld = Transform.createOriginAndMatrixColumns(centerA, vectorX, vectorY, vectorZ);\r\n return new Cone(localToWorld, radiusA, radiusB, capped);\r\n }\r\n /** (Property accessor) Return the center point at the base plane */\r\n public getCenterA(): Point3d { return this._localToWorld.multiplyXYZ(0, 0, 0); }\r\n /** (Property accessor) */\r\n public getCenterB(): Point3d { return this._localToWorld.multiplyXYZ(0, 0, 1); }\r\n /** (Property accessor) Return the x vector in the local frame */\r\n public getVectorX(): Vector3d { return this._localToWorld.matrix.columnX(); }\r\n /** (Property accessor) Return the y vector in the local frame */\r\n public getVectorY(): Vector3d { return this._localToWorld.matrix.columnY(); }\r\n /** (Property accessor) return the radius at the base plane */\r\n public getRadiusA(): number { return this._radiusA; }\r\n /** (Property accessor) return the radius at the top plane */\r\n public getRadiusB(): number { return this._radiusB; }\r\n /** (Property accessor) return the larger of the base and top plane radii */\r\n public getMaxRadius(): number { return this._maxRadius; }\r\n /** (Property accessor) return the radius at fraction `v` along the axis */\r\n public vFractionToRadius(v: number): number { return Geometry.interpolate(this._radiusA, v, this._radiusB); }\r\n /** (Property accessor) test if `other` is an instance of `Cone` */\r\n public isSameGeometryClass(other: any): boolean { return other instanceof Cone; }\r\n /** (Property accessor) Test for nearly equal coordinate data. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (other instanceof Cone) {\r\n if (this.capped !== other.capped) return false;\r\n if (!this._localToWorld.isAlmostEqualAllowZRotation(other._localToWorld)) return false;\r\n return Geometry.isSameCoordinate(this._radiusA, other._radiusA)\r\n && Geometry.isSameCoordinate(this._radiusB, other._radiusB);\r\n }\r\n return false;\r\n }\r\n /** Second step of double dispatch: call `handler.handleCone(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleCone(this);\r\n }\r\n\r\n /**\r\n * return strokes for a cross-section (elliptic arc) at specified fraction v along the axis.\r\n * * fixedStrokeCount takes priority over stroke options.\r\n * * The linestring is created by LineString3d.createForStrokes (fixedStrokeCount, options), which sets up property according to the options:\r\n * * optional fractions member\r\n * * optional uvParams. uvParams are installed as full-scale distance parameters.\r\n * * optional derivatives.\r\n * @param v fractional position along the cone axis\r\n * @param fixedStrokeCount optional stroke count.\r\n * @param options optional stroke options.\r\n */\r\n public strokeConstantVSection(v: number, fixedStrokeCount?: number, options?: StrokeOptions): LineString3d {\r\n let strokeCount = 16;\r\n if (fixedStrokeCount !== undefined)\r\n strokeCount = fixedStrokeCount;\r\n else if (options !== undefined)\r\n strokeCount = options.defaultCircleStrokes; // NEEDS WORK -- get circle stroke count with this.maxRadius !!!\r\n else {\r\n // accept the local default\r\n }\r\n strokeCount = Geometry.clampToStartEnd(strokeCount, 4, 64);\r\n const r = this.vFractionToRadius(v);\r\n const result = LineString3d.createForStrokes(fixedStrokeCount, options);\r\n const twoPi = Math.PI * 2.0;\r\n const deltaRadians = twoPi / strokeCount;\r\n let radians = 0;\r\n const fractions = result.fractions; // possibly undefined !!!\r\n const derivatives = result.packedDerivatives; // possibly undefined !!!\r\n const uvParams = result.packedUVParams; // possibly undefined !!\r\n const surfaceNormals = result.packedSurfaceNormals;\r\n const xyz = Point3d.create();\r\n const dXdu = Vector3d.create();\r\n const dXdv = Vector3d.create();\r\n const normal = Vector3d.create();\r\n const transform = this._localToWorld;\r\n let rc, rs, cc, ss;\r\n for (let i = 0; i <= strokeCount; i++) {\r\n if (i * 2 <= strokeCount)\r\n radians = i * deltaRadians;\r\n else\r\n radians = (i - strokeCount) * deltaRadians;\r\n cc = Math.cos(radians);\r\n ss = Math.sin(radians);\r\n rc = r * cc;\r\n rs = r * ss;\r\n\r\n transform.multiplyXYZ(rc, rs, v, xyz);\r\n result.addPoint(xyz);\r\n if (fractions)\r\n fractions.push(i / strokeCount);\r\n if (derivatives) {\r\n transform.matrix.multiplyXYZ(-rs * twoPi, rc * twoPi, 0.0, dXdu);\r\n derivatives.push(dXdu);\r\n }\r\n if (surfaceNormals) {\r\n // the along-hoop vector does not need to be scaled by radius -- just need the direction for a cross product.\r\n transform.matrix.multiplyXYZ(-ss, cc, 0.0, dXdu);\r\n transform.matrix.multiplyXYZ(0, 0, 1, dXdv);\r\n dXdu.unitCrossProduct(dXdv, normal);\r\n surfaceNormals.push(normal);\r\n }\r\n if (uvParams) {\r\n uvParams.pushXY(i / strokeCount, v);\r\n }\r\n }\r\n return result;\r\n }\r\n /**\r\n * Return the Arc3d section at vFraction\r\n * @param vFraction fractional position along the sweep direction\r\n */\r\n public constantVSection(vFraction: number): CurveCollection | undefined {\r\n const r = this.vFractionToRadius(vFraction);\r\n const transform = this._localToWorld;\r\n const center = transform.multiplyXYZ(0, 0, vFraction);\r\n const vector0 = transform.matrix.multiplyXYZ(r, 0, 0);\r\n const vector90 = transform.matrix.multiplyXYZ(0, r, 0);\r\n return Loop.create(Arc3d.create(center, vector0, vector90));\r\n }\r\n /** Extend `rangeToExtend` so it includes this `Cone` instance. */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n const arc0 = this.constantVSection(0.0)!;\r\n const arc1 = this.constantVSection(1.0)!;\r\n arc0.extendRange(rangeToExtend, transform);\r\n arc1.extendRange(rangeToExtend, transform);\r\n }\r\n /** Evaluate a point on the Cone surfaces, with\r\n * * v = 0 is the base plane.\r\n * * v = 1 is the top plane\r\n * * u = 0 to u = 1 wraps the angular range.\r\n */\r\n public uvFractionToPoint(uFraction: number, vFraction: number, result?: Point3d): Point3d {\r\n const theta = uFraction * Math.PI * 2.0;\r\n const r = Geometry.interpolate(this._radiusA, vFraction, this._radiusB);\r\n const cosTheta = Math.cos(theta);\r\n const sinTheta = Math.sin(theta);\r\n return this._localToWorld.multiplyXYZ(r * cosTheta, r * sinTheta, vFraction, result);\r\n }\r\n /** Evaluate a point tangent plane on the Cone surfaces, with\r\n * * v = 0 is the base plane.\r\n * * v = 1 is the top plane\r\n * * u = 0 to u = 1 wraps the angular range.\r\n */\r\n public uvFractionToPointAndTangents(uFraction: number, vFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\r\n const theta = uFraction * Math.PI * 2.0;\r\n const r = Geometry.interpolate(this._radiusA, vFraction, this._radiusB);\r\n const drdv = this._radiusB - this._radiusA;\r\n const cosTheta = Math.cos(theta);\r\n const sinTheta = Math.sin(theta);\r\n const fTheta = 2.0 * Math.PI;\r\n return Plane3dByOriginAndVectors.createOriginAndVectors(\r\n this._localToWorld.multiplyXYZ(r * cosTheta, r * sinTheta, vFraction),\r\n this._localToWorld.multiplyVectorXYZ(-r * sinTheta * fTheta, r * cosTheta * fTheta, 0),\r\n this._localToWorld.multiplyVectorXYZ(drdv * cosTheta, drdv * sinTheta, 1.0),\r\n result);\r\n }\r\n /**\r\n * @return true if this is a closed volume.\r\n */\r\n public get isClosedVolume(): boolean {\r\n return this.capped;\r\n }\r\n /**\r\n * Directional distance query\r\n * * u direction is around longitude circle at maximum distance from axis.\r\n * * v direction is on a line of longitude between the latitude limits.\r\n */\r\n public maxIsoParametricDistance(): Vector2d {\r\n const vectorX = this._localToWorld.matrix.columnX();\r\n const vectorY = this._localToWorld.matrix.columnY();\r\n const columnZ = this._localToWorld.matrix.columnZ();\r\n\r\n const xyNormal = vectorX.unitCrossProduct(vectorY)!;\r\n const hZ = xyNormal.dotProduct(columnZ);\r\n const zSkewVector = columnZ.plusScaled(xyNormal, hZ);\r\n const zSkewDistance = zSkewVector.magnitudeXY();\r\n return Vector2d.create(Math.PI * 2 * Math.max(this._radiusA, this._radiusB),\r\n Geometry.hypotenuseXY(Math.abs(this._radiusB - this._radiusA) + zSkewDistance, hZ));\r\n }\r\n}\r\n"]}
@@ -53,7 +53,10 @@ export declare class LinearSweep extends SolidPrimitive {
53
53
  isSameGeometryClass(other: any): boolean;
54
54
  /** Return a deep clone */
55
55
  clone(): LinearSweep;
56
- /** apply a transform to the curves and sweep vector */
56
+ /**
57
+ * Apply a transform to the curves and sweep vector
58
+ * * This fails if the transformation is singular.
59
+ */
57
60
  tryTransformInPlace(transform: Transform): boolean;
58
61
  /** Return a coordinate frame (right handed unit vectors)
59
62
  * * origin on base contour
@@ -61,8 +64,11 @@ export declare class LinearSweep extends SolidPrimitive {
61
64
  * * z direction perpendicular
62
65
  */
63
66
  getConstructiveFrame(): Transform | undefined;
64
- /** Return a transformed clone */
65
- cloneTransformed(transform: Transform): LinearSweep;
67
+ /**
68
+ * Return a transformed clone.
69
+ * * This fails if the transformation is singular.
70
+ */
71
+ cloneTransformed(transform: Transform): LinearSweep | undefined;
66
72
  /** Test for near-equality of coordinates in `other` */
67
73
  isAlmostEqual(other: GeometryQuery): boolean;
68
74
  /** Invoke strongly typed `handler.handleLinearSweep(this)` */
@@ -1 +1 @@
1
- {"version":3,"file":"LinearSweep.d.ts","sourceRoot":"","sources":["../../../src/solid/LinearSweep.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,cAAc;IAC7C,wCAAwC;IACxC,SAAgB,kBAAkB,iBAAiB;IAEnD,OAAO,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,MA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AgB,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"}
@@ -74,7 +74,10 @@ class LinearSweep extends SolidPrimitive_1.SolidPrimitive {
74
74
  clone() {
75
75
  return new LinearSweep(this._contour.clone(), this._direction.clone(), this.capped);
76
76
  }
77
- /** apply a transform to the curves and sweep vector */
77
+ /**
78
+ * Apply a transform to the curves and sweep vector
79
+ * * This fails if the transformation is singular.
80
+ */
78
81
  tryTransformInPlace(transform) {
79
82
  if (transform.matrix.isSingular())
80
83
  return false;
@@ -92,11 +95,13 @@ class LinearSweep extends SolidPrimitive_1.SolidPrimitive {
92
95
  getConstructiveFrame() {
93
96
  return this._contour.localToWorld.cloneRigid();
94
97
  }
95
- /** Return a transformed clone */
98
+ /**
99
+ * Return a transformed clone.
100
+ * * This fails if the transformation is singular.
101
+ */
96
102
  cloneTransformed(transform) {
97
103
  const result = this.clone();
98
- result.tryTransformInPlace(transform);
99
- return result;
104
+ return result.tryTransformInPlace(transform) ? result : undefined;
100
105
  }
101
106
  /** Test for near-equality of coordinates in `other` */
102
107
  isAlmostEqual(other) {
@@ -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;IAO7C,YAAoB,OAAqB,EAAE,SAAmB,EAAE,MAAe;QAC7E,KAAK,CAAC,MAAM,CAAC,CAAC;QAPhB,wCAAwC;QACxB,uBAAkB,GAAG,aAAa,CAAC;Q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Y,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;AA9HD,kCA8HC","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 /** apply a transform to the curves and sweep vector */\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 /** Return a transformed clone */\n public cloneTransformed(transform: Transform): LinearSweep {\n const result = this.clone();\n result.tryTransformInPlace(transform);\n return result;\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;;;;;;GAMG;AACH,MAAa,WAAY,SAAQ,+BAAc;IAO7C,YAAoB,OAAqB,EAAE,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U,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":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Solid\r\n */\r\n\r\nimport { AnyCurve } from \"../curve/CurveTypes\";\r\nimport { CurveCollection } from \"../curve/CurveCollection\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { Loop } from \"../curve/Loop\";\r\nimport { Path } from \"../curve/Path\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { XAndY } from \"../geometry3d/XYZProps\";\r\nimport { SolidPrimitive } from \"./SolidPrimitive\";\r\nimport { SweepContour } from \"./SweepContour\";\r\n\r\n/**\r\n * A LinearSweep is a `SolidPrimitive` defined by\r\n * * A set of curves (any Loop, Path, or parityRegion)\r\n * * A sweep vector\r\n * If the object is \"capped\", the curves must be planar.\r\n * @public\r\n */\r\nexport class LinearSweep extends SolidPrimitive {\r\n /** String name for schema properties */\r\n public readonly solidPrimitiveType = \"linearSweep\";\r\n\r\n private _contour: SweepContour;\r\n private _direction: Vector3d;\r\n\r\n private constructor(contour: SweepContour, direction: Vector3d, capped: boolean) {\r\n super(capped);\r\n this._contour = contour;\r\n this._direction = direction;\r\n }\r\n /**\r\n * Create a sweep of a starting contour.\r\n * @param contour contour to be swept, CAPTURED\r\n * @param direction sweep vector. The contour is swept the full length of the vector.\r\n * @param capped true to include end caps\r\n */\r\n public static create(contour: AnyCurve, direction: Vector3d, capped: boolean): LinearSweep | undefined {\r\n const sweepable = SweepContour.createForLinearSweep(contour, direction);\r\n if (!sweepable)\r\n return undefined;\r\n return new LinearSweep(sweepable, direction, capped);\r\n }\r\n /** Create a z-direction sweep of the polyline or polygon given as xy linestring values.\r\n * * If not capped, the xyPoints array is always used unchanged.\r\n * * If capped but the xyPoints array does not close, exact closure will be enforced by one of these:\r\n * * * If the final point is almost equal to the first, it is replaced by the exact first point.\r\n * * * if the final point is not close to the first an extra point is added.\r\n * * If capped, the point order will be reversed if necessary to produce positive volume.\r\n * @param xyPoints array of xy coordinates\r\n * @param z z value to be used for all coordinates\r\n * @param zSweep the sweep distance in the z direction.\r\n * @param capped true if caps are to be added.\r\n */\r\n public static createZSweep(xyPoints: XAndY[], z: number, zSweep: number, capped: boolean): LinearSweep | undefined {\r\n const xyz = LineString3d.createXY(xyPoints, z, capped);\r\n if (capped) {\r\n xyz.addClosurePoint();\r\n const area = PolygonOps.areaXY(xyz.points);\r\n if (area * zSweep < 0.0)\r\n xyz.points.reverse();\r\n }\r\n const contour: CurveCollection = capped ? Loop.create(xyz) : Path.create(xyz);\r\n return LinearSweep.create(contour, Vector3d.create(0, 0, zSweep), capped);\r\n }\r\n /** get a reference to the swept curves */\r\n public getCurvesRef(): CurveCollection { return this._contour.curves; }\r\n /** Get a reference to the `SweepContour` carrying the plane of the curves */\r\n public getSweepContourRef(): SweepContour { return this._contour; }\r\n /** return a clone of the sweep vector */\r\n public cloneSweepVector(): Vector3d { return this._direction.clone(); }\r\n /** Test if `other` is also an instance of `LinearSweep` */\r\n public isSameGeometryClass(other: any): boolean { return other instanceof LinearSweep; }\r\n /** Return a deep clone */\r\n public clone(): LinearSweep {\r\n return new LinearSweep(this._contour.clone(), this._direction.clone(), this.capped);\r\n }\r\n /**\r\n * Apply a transform to the curves and sweep vector\r\n * * This fails if the transformation is singular.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n if (transform.matrix.isSingular())\r\n return false;\r\n if (this._contour.tryTransformInPlace(transform)) {\r\n transform.multiplyVector(this._direction, this._direction);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** Return a coordinate frame (right handed unit vectors)\r\n * * origin on base contour\r\n * * x, y directions from base contour.\r\n * * z direction perpendicular\r\n */\r\n public getConstructiveFrame(): Transform | undefined {\r\n return this._contour.localToWorld.cloneRigid();\r\n }\r\n /**\r\n * Return a transformed clone.\r\n * * This fails if the transformation is singular.\r\n */\r\n public cloneTransformed(transform: Transform): LinearSweep | undefined {\r\n const result = this.clone();\r\n return result.tryTransformInPlace(transform) ? result : undefined;\r\n }\r\n /** Test for near-equality of coordinates in `other` */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (other instanceof LinearSweep) {\r\n return this._contour.isAlmostEqual(other._contour)\r\n && this._direction.isAlmostEqual(other._direction)\r\n && this.capped === other.capped;\r\n }\r\n return false;\r\n }\r\n /** Invoke strongly typed `handler.handleLinearSweep(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleLinearSweep(this);\r\n }\r\n /**\r\n * Return the curves at a fraction along the sweep direction.\r\n * @param vFraction fractional position along the sweep direction\r\n */\r\n public constantVSection(vFraction: number): CurveCollection | undefined {\r\n const section = this._contour.curves.clone();\r\n if (section && vFraction !== 0.0)\r\n section.tryTransformInPlace(Transform.createTranslation(this._direction.scale(vFraction)));\r\n return section;\r\n }\r\n /** Extend `rangeToExtend` to include this geometry. */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform) {\r\n const contourRange = this._contour.curves.range(transform);\r\n rangeToExtend.extendRange(contourRange);\r\n if (transform) {\r\n const transformedDirection = transform.multiplyVector(this._direction);\r\n contourRange.low.addInPlace(transformedDirection);\r\n contourRange.high.addInPlace(transformedDirection);\r\n } else {\r\n contourRange.low.addInPlace(this._direction);\r\n contourRange.high.addInPlace(this._direction);\r\n }\r\n rangeToExtend.extendRange(contourRange);\r\n }\r\n /**\r\n * @return true if this is a closed volume.\r\n */\r\n public get isClosedVolume(): boolean {\r\n return this.capped && this._contour.curves.isAnyRegionType;\r\n }\r\n}\r\n"]}
@@ -27,7 +27,12 @@ export declare class RotationalSweep extends SolidPrimitive {
27
27
  private _normalizedAxis;
28
28
  private _sweepAngle;
29
29
  private constructor();
30
- /** Create a rotational sweep. */
30
+ /** Create a rotational sweep.
31
+ * @param contour profile to sweep, coplanar with axis. CAPTURED
32
+ * @param axis rotation axis
33
+ * @param sweepAngle signed angular sweep
34
+ * @param capped whether to cap the surface to make a solid
35
+ */
31
36
  static create(contour: AnyCurve, axis: Ray3d, sweepAngle: Angle, capped: boolean): RotationalSweep | undefined;
32
37
  /** Return a coordinate frame (right handed unit vectors)
33
38
  * * origin at origin of rotation ray
@@ -49,10 +54,16 @@ export declare class RotationalSweep extends SolidPrimitive {
49
54
  isAlmostEqual(other: GeometryQuery): boolean;
50
55
  /** return a deep clone */
51
56
  clone(): RotationalSweep;
52
- /** Transform the contour and axis */
57
+ /**
58
+ * Transform the contour and axis.
59
+ * * This fails if the transformation is singular.
60
+ */
53
61
  tryTransformInPlace(transform: Transform): boolean;
54
- /** return a cloned transform. */
55
- cloneTransformed(transform: Transform): RotationalSweep;
62
+ /**
63
+ * Return a transformed clone.
64
+ * * This fails if the transformation is singular.
65
+ */
66
+ cloneTransformed(transform: Transform): RotationalSweep | undefined;
56
67
  /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)` */
57
68
  dispatchToGeometryHandler(handler: GeometryHandler): any;
58
69
  /** Return a transform that rotates around the rotational axis by a fraction of the total sweep. */
@@ -1 +1 @@
1
- {"version":3,"file":"RotationalSweep.d.ts","sourceRoot":"","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;CACF"}
@@ -31,7 +31,12 @@ class RotationalSweep extends SolidPrimitive_1.SolidPrimitive {
31
31
  this.capped = capped;
32
32
  this._sweepAngle = sweepAngle;
33
33
  }
34
- /** Create a rotational sweep. */
34
+ /** Create a rotational sweep.
35
+ * @param contour profile to sweep, coplanar with axis. CAPTURED
36
+ * @param axis rotation axis
37
+ * @param sweepAngle signed angular sweep
38
+ * @param capped whether to cap the surface to make a solid
39
+ */
35
40
  static create(contour, axis, sweepAngle, capped) {
36
41
  if (!axis.direction.normalizeInPlace())
37
42
  return undefined;
@@ -76,20 +81,28 @@ class RotationalSweep extends SolidPrimitive_1.SolidPrimitive {
76
81
  clone() {
77
82
  return new RotationalSweep(this._contour.clone(), this._normalizedAxis.clone(), this._sweepAngle.clone(), this.capped);
78
83
  }
79
- /** Transform the contour and axis */
84
+ /**
85
+ * Transform the contour and axis.
86
+ * * This fails if the transformation is singular.
87
+ */
80
88
  tryTransformInPlace(transform) {
81
- if (!transform.matrix.isSingular()
82
- && this._contour.tryTransformInPlace(transform)) {
89
+ if (transform.matrix.isSingular())
90
+ return false;
91
+ if (this._contour.tryTransformInPlace(transform)) {
83
92
  this._normalizedAxis.transformInPlace(transform);
93
+ if (transform.matrix.determinant() < 0.0)
94
+ this._sweepAngle.setRadians(-this._sweepAngle.radians);
84
95
  return this._normalizedAxis.direction.normalizeInPlace();
85
96
  }
86
97
  return false;
87
98
  }
88
- /** return a cloned transform. */
99
+ /**
100
+ * Return a transformed clone.
101
+ * * This fails if the transformation is singular.
102
+ */
89
103
  cloneTransformed(transform) {
90
104
  const result = this.clone();
91
- result.tryTransformInPlace(transform);
92
- return result;
105
+ return result.tryTransformInPlace(transform) ? result : undefined;
93
106
  }
94
107
  /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)` */
95
108
  dispatchToGeometryHandler(handler) {
@@ -1 +1 @@
1
- {"version":3,"file":"RotationalSweep.js","sourceRoot":"","sources":["../../../src/solid/RotationalSweep.ts"],"names":[],"mappings":";AA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YAAY,CAAC;IACtD,CAAC;CACF;AA5HD,0CA4HC","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 LinearSweep 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.capped = capped;\n this._sweepAngle = sweepAngle;\n }\n /** Create a rotational sweep. */\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 { return this._normalizedAxis.clone(); }\n /** Return (REFERENCE TO) the swept curves. */\n public getCurves(): CurveCollection { return this._contour.curves; }\n /** Return (REFERENCE TO) the swept curves with containing plane markup. */\n public getSweepContourRef(): SweepContour { return this._contour; }\n /** Return the sweep angle. */\n public getSweep(): Angle { return this._sweepAngle.clone(); }\n /** Test if `other` is a `RotationalSweep` */\n public isSameGeometryClass(other: any): boolean { return other instanceof RotationalSweep; }\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.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 /** Transform the contour and axis */\n public tryTransformInPlace(transform: Transform): boolean {\n if (!transform.matrix.isSingular()\n && this._contour.tryTransformInPlace(transform)) {\n this._normalizedAxis.transformInPlace(transform);\n return this._normalizedAxis.direction.normalizeInPlace();\n }\n return false;\n }\n /** return a cloned transform. */\n public cloneTransformed(transform: Transform): RotationalSweep {\n const result = this.clone();\n result.tryTransformInPlace(transform);\n return result;\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(this.getFractionalRotationTransform(i / numStep, stepTransform), compositeTransform);\n strokes.extendRange(range, compositeTransform);\n }\n\n } else {\n for (let i = 0; i <= numStep; i++)\n strokes.extendRange(range, this.getFractionalRotationTransform(i / numStep, stepTransform));\n }\n }\n /**\n * @return true if this is a closed volume.\n */\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;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B,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;IACtD,CAAC;CACF;AAzID,0CAyIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Solid\r\n */\r\n\r\nimport { AnyCurve } from \"../curve/CurveTypes\";\r\nimport { CurveCollection } from \"../curve/CurveCollection\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\r\nimport { AxisOrder, Geometry } from \"../Geometry\";\r\nimport { Angle } from \"../geometry3d/Angle\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { SolidPrimitive } from \"./SolidPrimitive\";\r\nimport { SweepContour } from \"./SweepContour\";\r\n\r\n/**\r\n * A LinearSweep is\r\n * * A planar contour (any Loop, Path, or parityRegion)\r\n * * An axis vector.\r\n * * The planar contour is expected to be in the plane of the axis vector\r\n * * The contour may have points and/or lines that are on the axis, but otherwise is entirely on one side of the axis.\r\n * * A sweep angle.\r\n * @public\r\n */\r\nexport class RotationalSweep extends SolidPrimitive {\r\n /** String name for schema properties */\r\n public readonly solidPrimitiveType = \"rotationalSweep\";\r\n\r\n private _contour: SweepContour;\r\n private _normalizedAxis: Ray3d;\r\n private _sweepAngle: Angle;\r\n private constructor(contour: SweepContour, normalizedAxis: Ray3d, sweepAngle: Angle, capped: boolean) {\r\n super(capped);\r\n this._contour = contour;\r\n this._normalizedAxis = normalizedAxis;\r\n this.capped = capped;\r\n this._sweepAngle = sweepAngle;\r\n }\r\n /** Create a rotational sweep.\r\n * @param contour profile to sweep, coplanar with axis. CAPTURED\r\n * @param axis rotation axis\r\n * @param sweepAngle signed angular sweep\r\n * @param capped whether to cap the surface to make a solid\r\n */\r\n public static create(contour: AnyCurve, axis: Ray3d, sweepAngle: Angle, capped: boolean): RotationalSweep | undefined {\r\n if (!axis.direction.normalizeInPlace())\r\n return undefined;\r\n const sweepable = SweepContour.createForRotation(contour, axis);\r\n if (!sweepable)\r\n return undefined;\r\n return new RotationalSweep(sweepable, axis, sweepAngle.clone(), capped);\r\n }\r\n\r\n /** Return a coordinate frame (right handed unit vectors)\r\n * * origin at origin of rotation ray\r\n * * z direction along the rotation ray.\r\n * * y direction perpendicular to the base contour plane\r\n */\r\n public getConstructiveFrame(): Transform | undefined {\r\n const contourPerpendicular = this._contour.localToWorld.matrix.columnZ();\r\n const axes = Matrix3d.createRigidFromColumns(contourPerpendicular, this._normalizedAxis.direction, AxisOrder.YZX);\r\n if (axes) {\r\n return Transform.createOriginAndMatrix(this._normalizedAxis.origin, axes);\r\n }\r\n return undefined;\r\n }\r\n /** return clone of (not reference to) the axis vector. */\r\n public cloneAxisRay(): Ray3d { return this._normalizedAxis.clone(); }\r\n /** Return (REFERENCE TO) the swept curves. */\r\n public getCurves(): CurveCollection { return this._contour.curves; }\r\n /** Return (REFERENCE TO) the swept curves with containing plane markup. */\r\n public getSweepContourRef(): SweepContour { return this._contour; }\r\n /** Return the sweep angle. */\r\n public getSweep(): Angle { return this._sweepAngle.clone(); }\r\n /** Test if `other` is a `RotationalSweep` */\r\n public isSameGeometryClass(other: any): boolean { return other instanceof RotationalSweep; }\r\n /** Test for same axis, capping, and swept geometry. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (other instanceof RotationalSweep) {\r\n return this._contour.isAlmostEqual(other._contour)\r\n && this._normalizedAxis.isAlmostEqual(other._normalizedAxis)\r\n && this.capped === other.capped;\r\n }\r\n return false;\r\n }\r\n /** return a deep clone */\r\n public clone(): RotationalSweep {\r\n return new RotationalSweep(this._contour.clone(), this._normalizedAxis.clone(), this._sweepAngle.clone(), this.capped);\r\n }\r\n /**\r\n * Transform the contour and axis.\r\n * * This fails if the transformation is singular.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n if (transform.matrix.isSingular())\r\n return false;\r\n if (this._contour.tryTransformInPlace(transform)) {\r\n this._normalizedAxis.transformInPlace(transform);\r\n if (transform.matrix.determinant() < 0.0)\r\n this._sweepAngle.setRadians(-this._sweepAngle.radians);\r\n return this._normalizedAxis.direction.normalizeInPlace();\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return a transformed clone.\r\n * * This fails if the transformation is singular.\r\n */\r\n public cloneTransformed(transform: Transform): RotationalSweep | undefined {\r\n const result = this.clone();\r\n return result.tryTransformInPlace(transform) ? result : undefined;\r\n }\r\n /** Dispatch to strongly typed handler `handler.handleRotationalSweep(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleRotationalSweep(this);\r\n }\r\n /** Return a transform that rotates around the rotational axis by a fraction of the total sweep. */\r\n public getFractionalRotationTransform(vFraction: number, result?: Transform): Transform {\r\n const radians = this._sweepAngle.radians * vFraction;\r\n const rotation = Transform.createFixedPointAndMatrix(this._normalizedAxis.origin,\r\n Matrix3d.createRotationAroundVector(this._normalizedAxis.direction, Angle.createRadians(radians),\r\n result ? result.matrix : undefined) as Matrix3d);\r\n return rotation;\r\n }\r\n /**\r\n * Return the curves of a constant-v section of the solid.\r\n * @param vFraction fractional position along the sweep direction\r\n */\r\n public constantVSection(vFraction: number): CurveCollection | undefined {\r\n const section = this._contour.curves.clone();\r\n if (section) {\r\n section.tryTransformInPlace(this.getFractionalRotationTransform(vFraction));\r\n }\r\n return section;\r\n }\r\n /** Extend range using sampled points on the surface. */\r\n public extendRange(range: Range3d, transform?: Transform) {\r\n const degreeStep = 360 / 32;\r\n const options = StrokeOptions.createForCurves();\r\n options.angleTol = Angle.createDegrees(degreeStep);\r\n const strokes = this._contour.curves.cloneStroked(options);\r\n const numStep = Geometry.stepCount(degreeStep, this._sweepAngle.degrees, 4, 32);\r\n const stepTransform = Transform.createIdentity();\r\n if (transform) {\r\n const compositeTransform = Transform.createIdentity();\r\n for (let i = 0; i <= numStep; i++) {\r\n transform.multiplyTransformTransform(this.getFractionalRotationTransform(i / numStep, stepTransform), compositeTransform);\r\n strokes.extendRange(range, compositeTransform);\r\n }\r\n\r\n } else {\r\n for (let i = 0; i <= numStep; i++)\r\n strokes.extendRange(range, this.getFractionalRotationTransform(i / numStep, stepTransform));\r\n }\r\n }\r\n /**\r\n * @return true if this is a closed volume.\r\n */\r\n public get isClosedVolume(): boolean {\r\n return this.capped || this._sweepAngle.isFullCircle;\r\n }\r\n}\r\n"]}
@@ -40,10 +40,16 @@ export declare class RuledSweep extends SolidPrimitive {
40
40
  cloneContours(): CurveCollection[];
41
41
  /** Return a deep clone */
42
42
  clone(): RuledSweep;
43
- /** Transform all contours in place. */
43
+ /**
44
+ * Transform all contours in place.
45
+ * * This fails if the transformation is singular.
46
+ */
44
47
  tryTransformInPlace(transform: Transform): boolean;
45
- /** Return a cloned transform. */
46
- cloneTransformed(transform: Transform): RuledSweep;
48
+ /**
49
+ * Return a transformed clone.
50
+ * * This fails if the transformation is singular.
51
+ */
52
+ cloneTransformed(transform: Transform): RuledSweep | undefined;
47
53
  /** Return a coordinate frame (right handed unit vectors)
48
54
  * * origin on base contour
49
55
  * * x, y directions from base contour.
@@ -1 +1 @@
1
- {"version":3,"file":"RuledSweep.d.ts","sourceRoot":"","sources":["../../../src/solid/RuledSweep.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAc,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAA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EAAE;IACzC;;OAEG;IACI,kBAAkB,IAAI,YAAY,EAAE;IAO3C;;OAEG;IACI,aAAa,IAAI,eAAe,EAAE;IAOzC,0BAA0B;IACnB,KAAK,IAAI,UAAU;IAG1B;;;OAGG;IACI,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO;IASzD;;;OAGG;IACI,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS;IAIrE;;;;OAIG;IACI,oBAAoB,IAAI,SAAS,GAAG,SAAS;IAIpD,uDAAuD;IAChD,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAC/C,8CAA8C;IAC9B,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAY5D,kEAAkE;IAC3D,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;IAG/D;;;OAGG;IACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAqBvE,yCAAyC;IAClC,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI;IAKvE;;OAEG;WACW,cAAc,CAAC,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,GAAG,eAAe,GAAG,SAAS;IA6C9J;;;;OAIG;IACH,IAAW,cAAc,IAAI,OAAO,CAGnC;CAEF"}
@@ -66,20 +66,26 @@ class RuledSweep extends SolidPrimitive_1.SolidPrimitive {
66
66
  clone() {
67
67
  return new RuledSweep(this.cloneSweepContours(), this.capped);
68
68
  }
69
- /** Transform all contours in place. */
69
+ /**
70
+ * Transform all contours in place.
71
+ * * This fails if the transformation is singular.
72
+ */
70
73
  tryTransformInPlace(transform) {
71
74
  if (transform.matrix.isSingular())
72
75
  return false;
73
76
  for (const contour of this._contours) {
74
- contour.tryTransformInPlace(transform);
77
+ if (!contour.tryTransformInPlace(transform))
78
+ return false;
75
79
  }
76
80
  return true;
77
81
  }
78
- /** Return a cloned transform. */
82
+ /**
83
+ * Return a transformed clone.
84
+ * * This fails if the transformation is singular.
85
+ */
79
86
  cloneTransformed(transform) {
80
87
  const result = this.clone();
81
- result.tryTransformInPlace(transform);
82
- return result;
88
+ return result.tryTransformInPlace(transform) ? result : undefined;
83
89
  }
84
90
  /** Return a coordinate frame (right handed unit vectors)
85
91
  * * origin on base contour
@@ -1 +1 @@
1
- {"version":3,"file":"RuledSweep.js","sourceRoot":"","sources":["../../../src/solid/RuledSweep.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,sFAAmF;AAEnF,8DAAuE;AACvE,4DAAyD;AAEzD,0CAAuC;AAIvC,qDAAkD;AAClD,iDAA8C;AAQ9C;;;;GAIG;AACH,MAAa,UAAW,SAAQ,+BAAc;IAK5C,YAAoB,QAAwB,EAAE,MAAe;QAC3D,KAAK,CAAC,MAAM,CAAC,CAAC;QALhB,wCAAwC;QACxB,uBAAkB,GAAG,YAAY,CAAC;QAKhD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,MAAM,CAAC,QAAoB,EAAE,MAAe;QACxD,MAAM,aAAa,GAAG,EAAE,CAAC;QACzB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,SAAS,GAAG,2BAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,SAAS,KAAK,SAAS;gBAAE,OAAO,SAAS,CAAC;YAC9C,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,IAAI,UAAU,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IACD,uDAAuD;IAChD,gBAAgB,KAAqB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE;;OAEG;IACI,kBAAkB;QACvB,MAAM,MAAM,GAAG,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,CAAC,YAAY;wBACf,OAAO,SAAS,CAAC;oBACnB,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC/B,CAAC;qBAAM,IAAI,MAAM,YAAY,iCAAe,IAAI,MAAM,YAAY,iCAAe,EAAE,CAAC;oBAClF,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;oBACvE,IAAI,CAAC,QAAQ;wBACX,OAAO,SAAS,CAAC;oBACnB,IAAI,QAAQ,YAAY,iCAAe;wBACrC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;OAIG;IACH,IAAW,cAAc;QACvB,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1F,CAAC;CAEF;AApLD,gCAoLC","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 { ConstructCurveBetweenCurves } from \"../curve/ConstructCurveBetweenCurves\";\nimport { AnyCurve } from \"../curve/CurveTypes\";\nimport { CurveChain, CurveCollection } from \"../curve/CurveCollection\";\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SolidPrimitive } from \"./SolidPrimitive\";\nimport { SweepContour } from \"./SweepContour\";\n\n/**\n * * type for a function argument taking 2 curves and returning another curve or failing with undefined.\n * * This is used (for instance) by `RuleSweep.mutatePartners`\n * @public\n */\nexport type CurvePrimitiveMutator = (primitiveA: CurvePrimitive, primitiveB: CurvePrimitive) => CurvePrimitive | undefined;\n/**\n * A ruled sweep (surface) is a collection of 2 or more contours.\n * * All contours must have identical number and type of geometry. (paths, loops, parity regions, lines, arcs, other curves)\n * @public\n */\nexport class RuledSweep extends SolidPrimitive {\n /** String name for schema properties */\n public readonly solidPrimitiveType = \"ruledSweep\";\n\n private _contours: SweepContour[];\n private constructor(contours: SweepContour[], capped: boolean) {\n super(capped);\n this._contours = contours;\n }\n /**\n * Create a ruled sweep from an array of contours.\n * * the contours are CAPTURED (not cloned)\n */\n public static create(contours: AnyCurve[], capped: boolean): RuledSweep | undefined {\n const sweepContours = [];\n for (const contour of contours) {\n const sweepable = SweepContour.createForLinearSweep(contour);\n if (sweepable === undefined) return undefined;\n sweepContours.push(sweepable);\n }\n return new RuledSweep(sweepContours, capped);\n }\n /** Return a reference to the array of SweepContour. */\n public sweepContoursRef(): SweepContour[] { return this._contours; }\n /** Return clones of all the sweep contours\n * * See also cloneContours, which returns the spatial contours without their local coordinate system definitions)\n */\n public cloneSweepContours(): SweepContour[] {\n const result = [];\n for (const sweepable of this._contours) {\n result.push(sweepable.clone());\n }\n return result;\n }\n /** Return clones of all the contours\n * * See also cloneContours, which returns the contours in their local coordinate systems\n */\n public cloneContours(): CurveCollection[] {\n const result = [];\n for (const sweepable of this._contours) {\n result.push(sweepable.curves.clone());\n }\n return result;\n }\n /** Return a deep clone */\n public clone(): RuledSweep {\n return new RuledSweep(this.cloneSweepContours(), this.capped);\n }\n /** Transform all contours in place. */\n public tryTransformInPlace(transform: Transform): boolean {\n if (transform.matrix.isSingular())\n return false;\n for (const contour of this._contours) {\n contour.tryTransformInPlace(transform);\n }\n return true;\n }\n /** Return a cloned transform. */\n public cloneTransformed(transform: Transform): RuledSweep {\n const result = this.clone();\n result.tryTransformInPlace(transform);\n return result;\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 if (this._contours.length === 0) return undefined;\n return this._contours[0].localToWorld.cloneRigid();\n }\n /** Test if `other` is an instance of a `RuledSweep` */\n public isSameGeometryClass(other: any): boolean { return other instanceof RuledSweep; }\n /** test same contour geometry and capping. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof RuledSweep) {\n if (this.capped !== other.capped) return false;\n if (this._contours.length !== other._contours.length) return false;\n for (let i = 0; i < this._contours.length; i++) {\n if (!this._contours[i].isAlmostEqual(other._contours[i]))\n return false;\n }\n return true;\n }\n return false;\n }\n /** dispatch to strongly typed `handler.handleRuledSweep(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleRuledSweep(this);\n }\n /**\n * Return the section curves at a fraction of the sweep\n * @param vFraction fractional position along the sweep direction\n */\n public constantVSection(vFraction: number): CurveCollection | undefined {\n const numSection = this._contours.length;\n if (numSection < 2)\n return undefined;\n const q = vFraction * numSection;\n let section0 = 0;\n if (vFraction >= 1.0)\n section0 = numSection - 1;\n else\n section0 = Math.floor(q);\n if (section0 + 1 >= numSection)\n section0 = numSection - 2;\n const section1 = section0 + 1;\n const localFraction = Geometry.clampToStartEnd(q - section0, 0, 1);\n return RuledSweep.mutatePartners(this._contours[section0].curves, this._contours[section1].curves,\n (primitive0: CurvePrimitive, primitive1: CurvePrimitive): CurvePrimitive | undefined => {\n const newPrimitive = ConstructCurveBetweenCurves.interpolateBetween(primitive0, localFraction, primitive1);\n if (newPrimitive instanceof CurvePrimitive) return newPrimitive;\n return undefined;\n });\n }\n /** Pass each contour to `extendRange` */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n for (const contour of this._contours)\n contour.curves.extendRange(rangeToExtend, transform);\n }\n\n /** Construct a CurveCollection with the same structure as collectionA and collectionB, with primitives constructed by the caller-supplied primitiveMutator function.\n * @returns Returns undefined if there is any type mismatch between the two collections.\n */\n public static mutatePartners(collectionA: CurveCollection, collectionB: CurveCollection, primitiveMutator: CurvePrimitiveMutator): CurveCollection | undefined {\n if (!collectionA.isSameGeometryClass(collectionB))\n return undefined;\n if (collectionA instanceof CurveChain && collectionB instanceof CurveChain) {\n const chainA = collectionA;\n const chainB = collectionB;\n const chainC = chainA.cloneEmptyPeer() as CurveChain;\n const childrenA = chainA.children;\n const childrenB = chainB.children;\n if (childrenA.length !== childrenB.length)\n return undefined;\n for (let i = 0; i < childrenA.length; i++) {\n const newChild = primitiveMutator(childrenA[i], childrenB[i]);\n if (!newChild)\n return undefined;\n chainC.children.push(newChild);\n }\n return chainC;\n } else if (collectionA instanceof CurveCollection && collectionB instanceof CurveCollection) {\n const collectionC = collectionA.cloneEmptyPeer();\n const childrenA = collectionA.children;\n const childrenB = collectionB.children;\n const childrenC = collectionC.children;\n if (childrenA === undefined || childrenB === undefined || childrenC === undefined || childrenA.length !== childrenB.length)\n return undefined;\n for (let i = 0; i < childrenA.length; i++) {\n const childA = childrenA[i];\n const childB = childrenB[i];\n if (childA instanceof CurvePrimitive && childB instanceof CurvePrimitive) {\n const newPrimitive = primitiveMutator(childA, childB);\n if (!newPrimitive)\n return undefined;\n childrenC.push(newPrimitive);\n } else if (childA instanceof CurveCollection && childB instanceof CurveCollection) {\n const newChild = this.mutatePartners(childA, childB, primitiveMutator);\n if (!newChild)\n return undefined;\n if (newChild instanceof CurveCollection)\n childrenC.push(newChild);\n }\n }\n return collectionC;\n }\n return undefined;\n }\n /**\n * Return true if this is a closed volume, as observed by\n * * cap flag\n * identical first and last contours.\n */\n public get isClosedVolume(): boolean {\n const n = this._contours.length;\n return n > 1 && (this.capped || this._contours[0].isAlmostEqual(this._contours[n - 1]));\n }\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AAI,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;oBACvE,IAAI,CAAC,QAAQ;wBACX,OAAO,SAAS,CAAC;oBACnB,IAAI,QAAQ,YAAY,iCAAe;wBACrC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;OAIG;IACH,IAAW,cAAc;QACvB,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1F,CAAC;CAEF;AA1LD,gCA0LC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Solid\r\n */\r\n\r\nimport { ConstructCurveBetweenCurves } from \"../curve/ConstructCurveBetweenCurves\";\r\nimport { AnyCurve } from \"../curve/CurveTypes\";\r\nimport { CurveChain, CurveCollection } from \"../curve/CurveCollection\";\r\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { SolidPrimitive } from \"./SolidPrimitive\";\r\nimport { SweepContour } from \"./SweepContour\";\r\n\r\n/**\r\n * * type for a function argument taking 2 curves and returning another curve or failing with undefined.\r\n * * This is used (for instance) by `RuleSweep.mutatePartners`\r\n * @public\r\n */\r\nexport type CurvePrimitiveMutator = (primitiveA: CurvePrimitive, primitiveB: CurvePrimitive) => CurvePrimitive | undefined;\r\n/**\r\n * A ruled sweep (surface) is a collection of 2 or more contours.\r\n * * All contours must have identical number and type of geometry. (paths, loops, parity regions, lines, arcs, other curves)\r\n * @public\r\n */\r\nexport class RuledSweep extends SolidPrimitive {\r\n /** String name for schema properties */\r\n public readonly solidPrimitiveType = \"ruledSweep\";\r\n\r\n private _contours: SweepContour[];\r\n private constructor(contours: SweepContour[], capped: boolean) {\r\n super(capped);\r\n this._contours = contours;\r\n }\r\n /**\r\n * Create a ruled sweep from an array of contours.\r\n * * the contours are CAPTURED (not cloned)\r\n */\r\n public static create(contours: AnyCurve[], capped: boolean): RuledSweep | undefined {\r\n const sweepContours = [];\r\n for (const contour of contours) {\r\n const sweepable = SweepContour.createForLinearSweep(contour);\r\n if (sweepable === undefined) return undefined;\r\n sweepContours.push(sweepable);\r\n }\r\n return new RuledSweep(sweepContours, capped);\r\n }\r\n /** Return a reference to the array of SweepContour. */\r\n public sweepContoursRef(): SweepContour[] { return this._contours; }\r\n /** Return clones of all the sweep contours\r\n * * See also cloneContours, which returns the spatial contours without their local coordinate system definitions)\r\n */\r\n public cloneSweepContours(): SweepContour[] {\r\n const result = [];\r\n for (const sweepable of this._contours) {\r\n result.push(sweepable.clone());\r\n }\r\n return result;\r\n }\r\n /** Return clones of all the contours\r\n * * See also cloneContours, which returns the contours in their local coordinate systems\r\n */\r\n public cloneContours(): CurveCollection[] {\r\n const result = [];\r\n for (const sweepable of this._contours) {\r\n result.push(sweepable.curves.clone());\r\n }\r\n return result;\r\n }\r\n /** Return a deep clone */\r\n public clone(): RuledSweep {\r\n return new RuledSweep(this.cloneSweepContours(), this.capped);\r\n }\r\n /**\r\n * Transform all contours in place.\r\n * * This fails if the transformation is singular.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n if (transform.matrix.isSingular())\r\n return false;\r\n for (const contour of this._contours) {\r\n if (!contour.tryTransformInPlace(transform))\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Return a transformed clone.\r\n * * This fails if the transformation is singular.\r\n */\r\n public cloneTransformed(transform: Transform): RuledSweep | undefined {\r\n const result = this.clone();\r\n return result.tryTransformInPlace(transform) ? result : undefined;\r\n }\r\n /** Return a coordinate frame (right handed unit vectors)\r\n * * origin on base contour\r\n * * x, y directions from base contour.\r\n * * z direction perpendicular\r\n */\r\n public getConstructiveFrame(): Transform | undefined {\r\n if (this._contours.length === 0) return undefined;\r\n return this._contours[0].localToWorld.cloneRigid();\r\n }\r\n /** Test if `other` is an instance of a `RuledSweep` */\r\n public isSameGeometryClass(other: any): boolean { return other instanceof RuledSweep; }\r\n /** test same contour geometry and capping. */\r\n public override isAlmostEqual(other: GeometryQuery): boolean {\r\n if (other instanceof RuledSweep) {\r\n if (this.capped !== other.capped) return false;\r\n if (this._contours.length !== other._contours.length) return false;\r\n for (let i = 0; i < this._contours.length; i++) {\r\n if (!this._contours[i].isAlmostEqual(other._contours[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n /** dispatch to strongly typed `handler.handleRuledSweep(this)` */\r\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\r\n return handler.handleRuledSweep(this);\r\n }\r\n /**\r\n * Return the section curves at a fraction of the sweep\r\n * @param vFraction fractional position along the sweep direction\r\n */\r\n public constantVSection(vFraction: number): CurveCollection | undefined {\r\n const numSection = this._contours.length;\r\n if (numSection < 2)\r\n return undefined;\r\n const q = vFraction * numSection;\r\n let section0 = 0;\r\n if (vFraction >= 1.0)\r\n section0 = numSection - 1;\r\n else\r\n section0 = Math.floor(q);\r\n if (section0 + 1 >= numSection)\r\n section0 = numSection - 2;\r\n const section1 = section0 + 1;\r\n const localFraction = Geometry.clampToStartEnd(q - section0, 0, 1);\r\n return RuledSweep.mutatePartners(this._contours[section0].curves, this._contours[section1].curves,\r\n (primitive0: CurvePrimitive, primitive1: CurvePrimitive): CurvePrimitive | undefined => {\r\n const newPrimitive = ConstructCurveBetweenCurves.interpolateBetween(primitive0, localFraction, primitive1);\r\n if (newPrimitive instanceof CurvePrimitive) return newPrimitive;\r\n return undefined;\r\n });\r\n }\r\n /** Pass each contour to `extendRange` */\r\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\r\n for (const contour of this._contours)\r\n contour.curves.extendRange(rangeToExtend, transform);\r\n }\r\n\r\n /** Construct a CurveCollection with the same structure as collectionA and collectionB, with primitives constructed by the caller-supplied primitiveMutator function.\r\n * @returns Returns undefined if there is any type mismatch between the two collections.\r\n */\r\n public static mutatePartners(collectionA: CurveCollection, collectionB: CurveCollection, primitiveMutator: CurvePrimitiveMutator): CurveCollection | undefined {\r\n if (!collectionA.isSameGeometryClass(collectionB))\r\n return undefined;\r\n if (collectionA instanceof CurveChain && collectionB instanceof CurveChain) {\r\n const chainA = collectionA;\r\n const chainB = collectionB;\r\n const chainC = chainA.cloneEmptyPeer() as CurveChain;\r\n const childrenA = chainA.children;\r\n const childrenB = chainB.children;\r\n if (childrenA.length !== childrenB.length)\r\n return undefined;\r\n for (let i = 0; i < childrenA.length; i++) {\r\n const newChild = primitiveMutator(childrenA[i], childrenB[i]);\r\n if (!newChild)\r\n return undefined;\r\n chainC.children.push(newChild);\r\n }\r\n return chainC;\r\n } else if (collectionA instanceof CurveCollection && collectionB instanceof CurveCollection) {\r\n const collectionC = collectionA.cloneEmptyPeer();\r\n const childrenA = collectionA.children;\r\n const childrenB = collectionB.children;\r\n const childrenC = collectionC.children;\r\n if (childrenA === undefined || childrenB === undefined || childrenC === undefined || childrenA.length !== childrenB.length)\r\n return undefined;\r\n for (let i = 0; i < childrenA.length; i++) {\r\n const childA = childrenA[i];\r\n const childB = childrenB[i];\r\n if (childA instanceof CurvePrimitive && childB instanceof CurvePrimitive) {\r\n const newPrimitive = primitiveMutator(childA, childB);\r\n if (!newPrimitive)\r\n return undefined;\r\n childrenC.push(newPrimitive);\r\n } else if (childA instanceof CurveCollection && childB instanceof CurveCollection) {\r\n const newChild = this.mutatePartners(childA, childB, primitiveMutator);\r\n if (!newChild)\r\n return undefined;\r\n if (newChild instanceof CurveCollection)\r\n childrenC.push(newChild);\r\n }\r\n }\r\n return collectionC;\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return true if this is a closed volume, as observed by\r\n * * cap flag\r\n * identical first and last contours.\r\n */\r\n public get isClosedVolume(): boolean {\r\n const n = this._contours.length;\r\n return n > 1 && (this.capped || this._contours[0].isAlmostEqual(this._contours[n - 1]));\r\n }\r\n\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SolidPrimitive.js","sourceRoot":"","sources":["../../../src/solid/SolidPrimitive.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,0DAAuD;AA6BvD;;;;;GAKG;AACH,MAAsB,cAAe,SAAQ,6BAAa;IAQxD,YAAsB,MAAe;QAAI,KAAK,EAAE,CAAC;QAPjD,wCAAwC;QACxB,qBAAgB,GAAG,OAAO,CAAC;QAMO,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAAC,CAAC;IAC1E,qCAAqC;IACrC,IAAW,MAAM,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,IAAW,MAAM,CAAC,MAAe,IAAI,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;CAe9D;AA1BD,wCA0BC","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 { CurveCollection } from \"../curve/CurveCollection\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Box } from \"./Box\";\nimport { Cone } from \"./Cone\";\nimport { LinearSweep } from \"./LinearSweep\";\nimport { RotationalSweep } from \"./RotationalSweep\";\nimport { RuledSweep } from \"./RuledSweep\";\nimport { Sphere } from \"./Sphere\";\nimport { TorusPipe } from \"./TorusPipe\";\n\n/** Describes the concrete type of a [[SolidPrimitive]]. Each type name maps to a specific subclass and can be used for type-switching in conditional statements.\n *\n * - \"box\" => [[Box]]\n * - \"cone\" => [[Cone]]\n * - \"sphere\" => [[Sphere]]\n * - \"linearSweep\" => [[LinearSweep]]\n * - \"rotationalSweep\" => [[RotationalSweep]]\n * - \"ruledSweep\" => [[RuledSweep]]\n * - \"torusPipe\" => [[TorusPipe]]\n *\n * @public\n */\nexport type SolidPrimitiveType = \"box\" | \"cone\" | \"sphere\" | \"linearSweep\" | \"rotationalSweep\" | \"ruledSweep\" | \"torusPipe\";\n\n/** Union type of all subclasses of [[SolidPrimitive]].\n * @public\n */\nexport type AnySolidPrimitive = Box | Cone | Sphere | LinearSweep | RotationalSweep | RuledSweep | TorusPipe;\n\n/**\n * Base class for SolidPrimitive variants.\n *\n * * The base class holds capped flag for all derived classes.\n * @public\n */\nexport abstract class SolidPrimitive extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"solid\";\n /** String name for schema properties */\n public abstract readonly solidPrimitiveType: SolidPrimitiveType;\n\n /** flag indicating whether cap region is considered closed (i.e. a planar region, rather than just a wire in space) */\n protected _capped: boolean;\n protected constructor(capped: boolean) { super(); this._capped = capped; }\n /** Whether this is a capped solid */\n public get capped(): boolean { return this._capped; }\n public set capped(capped: boolean) { this._capped = capped; }\n /** Return a cross section at specified vFraction. */\n public abstract constantVSection(_vFraction: number): CurveCollection | undefined;\n /** Return a Transform from the local system of the solid to world.\n * * The particulars of origin and orientation are specific to each SolidPrimitive type.\n */\n public abstract getConstructiveFrame(): Transform | undefined;\n /**\n * @return true if this is a closed volume.\n * * LinearSweep, Box, Cone only depend on capped.\n * * Sphere affected by capped and latitude sweep\n * * TorusPipe and RotationalSweep affected by capped and sweep\n * * RuledSweep is affected by capped and match of first, last contour\n */\n public abstract get isClosedVolume(): boolean;\n}\n"]}
1
+ {"version":3,"file":"SolidPrimitive.js","sourceRoot":"","sources":["../../../src/solid/SolidPrimitive.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,0DAAuD;AA6BvD;;;;;GAKG;AACH,MAAsB,cAAe,SAAQ,6BAAa;IAQxD,YAAsB,MAAe;QAAI,KAAK,EAAE,CAAC;QAPjD,wCAAwC;QACxB,qBAAgB,GAAG,OAAO,CAAC;QAMO,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAAC,CAAC;IAC1E,qCAAqC;IACrC,IAAW,MAAM,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,IAAW,MAAM,CAAC,MAAe,IAAI,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;CAe9D;AA1BD,wCA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Solid\r\n */\r\n\r\nimport { CurveCollection } from \"../curve/CurveCollection\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Box } from \"./Box\";\r\nimport { Cone } from \"./Cone\";\r\nimport { LinearSweep } from \"./LinearSweep\";\r\nimport { RotationalSweep } from \"./RotationalSweep\";\r\nimport { RuledSweep } from \"./RuledSweep\";\r\nimport { Sphere } from \"./Sphere\";\r\nimport { TorusPipe } from \"./TorusPipe\";\r\n\r\n/** Describes the concrete type of a [[SolidPrimitive]]. Each type name maps to a specific subclass and can be used for type-switching in conditional statements.\r\n *\r\n * - \"box\" => [[Box]]\r\n * - \"cone\" => [[Cone]]\r\n * - \"sphere\" => [[Sphere]]\r\n * - \"linearSweep\" => [[LinearSweep]]\r\n * - \"rotationalSweep\" => [[RotationalSweep]]\r\n * - \"ruledSweep\" => [[RuledSweep]]\r\n * - \"torusPipe\" => [[TorusPipe]]\r\n *\r\n * @public\r\n */\r\nexport type SolidPrimitiveType = \"box\" | \"cone\" | \"sphere\" | \"linearSweep\" | \"rotationalSweep\" | \"ruledSweep\" | \"torusPipe\";\r\n\r\n/** Union type of all subclasses of [[SolidPrimitive]].\r\n * @public\r\n */\r\nexport type AnySolidPrimitive = Box | Cone | Sphere | LinearSweep | RotationalSweep | RuledSweep | TorusPipe;\r\n\r\n/**\r\n * Base class for SolidPrimitive variants.\r\n *\r\n * * The base class holds capped flag for all derived classes.\r\n * @public\r\n */\r\nexport abstract class SolidPrimitive extends GeometryQuery {\r\n /** String name for schema properties */\r\n public readonly geometryCategory = \"solid\";\r\n /** String name for schema properties */\r\n public abstract readonly solidPrimitiveType: SolidPrimitiveType;\r\n\r\n /** flag indicating whether cap region is considered closed (i.e. a planar region, rather than just a wire in space) */\r\n protected _capped: boolean;\r\n protected constructor(capped: boolean) { super(); this._capped = capped; }\r\n /** Whether this is a capped solid */\r\n public get capped(): boolean { return this._capped; }\r\n public set capped(capped: boolean) { this._capped = capped; }\r\n /** Return a cross section at specified vFraction. */\r\n public abstract constantVSection(_vFraction: number): CurveCollection | undefined;\r\n /** Return a Transform from the local system of the solid to world.\r\n * * The particulars of origin and orientation are specific to each SolidPrimitive type.\r\n */\r\n public abstract getConstructiveFrame(): Transform | undefined;\r\n /**\r\n * @return true if this is a closed volume.\r\n * * LinearSweep, Box, Cone only depend on capped.\r\n * * Sphere affected by capped and latitude sweep\r\n * * TorusPipe and RotationalSweep affected by capped and sweep\r\n * * RuledSweep is affected by capped and match of first, last contour\r\n */\r\n public abstract get isClosedVolume(): boolean;\r\n}\r\n"]}
@@ -32,11 +32,15 @@ export declare class Sphere extends SolidPrimitive implements UVSurface {
32
32
  private constructor();
33
33
  /** return a deep clone */
34
34
  clone(): Sphere;
35
- /** Transform the sphere in place.
35
+ /**
36
+ * Transform the sphere in place.
36
37
  * * Fails if the transform is singular.
37
38
  */
38
39
  tryTransformInPlace(transform: Transform): boolean;
39
- /** Return a transformed clone. */
40
+ /**
41
+ * Return a transformed clone.
42
+ * * Fails if the transform is singular.
43
+ */
40
44
  cloneTransformed(transform: Transform): Sphere | undefined;
41
45
  /** Return a coordinate frame (right handed, unit axes)
42
46
  * * origin at sphere center
@@ -79,12 +83,18 @@ export declare class Sphere extends SolidPrimitive implements UVSurface {
79
83
  /** Test for same geometry in `other` */
80
84
  isAlmostEqual(other: GeometryQuery): boolean;
81
85
  /**
82
- * return strokes for a cross-section (elliptic arc) at specified fraction v along the axis.
83
- * * if strokeOptions is supplied, it is applied to the equator radii.
84
- * @param v fractional position along the cone axis
85
- * @param strokes stroke count or options.
86
+ * Return strokes for the elliptical arc cross-section at latitude sweep fraction v.
87
+ * * Optional inputs control the number of strokes along the cross-section:
88
+ * * If `fixedStrokeCount` is supplied, it is taken as the cross-section stroke count.
89
+ * * If `fixedStrokeCount` is undefined, stroke count is computed by applying `options` to the cross-section.
90
+ * * If neither input is supplied, the stroke count default is 16.
91
+ * * In any case, stroke count is clamped to the interval [4,64].
92
+ * @param v fractional position along the sphere axis
93
+ * @param fixedStrokeCount optional stroke count in u-direction
94
+ * @param options optional stroke options in u-direction
95
+ * @return strokes as line string
86
96
  */
87
- strokeConstantVSection(v: number, fixedStrokeCount: number | undefined, options?: StrokeOptions): LineString3d;
97
+ strokeConstantVSection(v: number, fixedStrokeCount?: number, options?: StrokeOptions): LineString3d;
88
98
  /** Second step of double dispatch: call `handler.handleSphere(this)` */
89
99
  dispatchToGeometryHandler(handler: GeometryHandler): any;
90
100
  /**