@itwin/core-geometry 5.1.0-dev.9 → 5.2.0-dev.2
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.
- package/CHANGELOG.md +63 -1
- package/lib/cjs/Geometry.d.ts +18 -10
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +13 -3
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.d.ts +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +7 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts +4 -3
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +4 -5
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +9 -5
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +5 -3
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +1 -2
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +13 -25
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -2
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +2 -0
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +2 -0
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +54 -32
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +56 -37
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +40 -1
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +90 -0
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +3 -2
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +6 -5
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +27 -25
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +30 -25
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +9 -2
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +11 -0
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.d.ts +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +2 -0
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +4 -0
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +7 -0
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +15 -3
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +34 -8
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js +129 -33
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts +4 -3
- package/lib/cjs/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js +20 -9
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts +2 -1
- package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js +26 -41
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +74 -39
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +146 -46
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +36 -27
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +161 -55
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
- package/lib/cjs/curve/StrokeOptions.js +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +0 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
- package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/cjs/geometry3d/AngleSweep.d.ts +25 -18
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +32 -18
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +8 -7
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js +19 -25
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +8 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +21 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +11 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +21 -3
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
- package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js +6 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +0 -2
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +4 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +66 -26
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +49 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +38 -2
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +5 -4
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +18 -10
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +32 -10
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js +0 -1
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +7 -9
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +23 -45
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts +39 -29
- package/lib/cjs/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js +49 -35
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.d.ts +1 -4
- package/lib/cjs/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js +48 -43
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +21 -2
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +32 -13
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +27 -16
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.d.ts +2 -0
- package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js +11 -0
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +77 -36
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/cjs/numerics/SmallSystem.js +129 -73
- package/lib/cjs/numerics/SmallSystem.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
- package/lib/cjs/polyface/FacetOrientation.js +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
- package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js +51 -32
- package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +19 -5
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +18 -2
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +6 -6
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +39 -42
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js +2 -3
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js +2 -4
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +3 -3
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +5 -5
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js +7 -0
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +6 -0
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +2 -3
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +11 -7
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +2 -2
- package/lib/cjs/solid/RotationalSweep.js +2 -2
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js +5 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts.map +1 -1
- package/lib/cjs/solid/Sphere.js +6 -3
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +1 -1
- package/lib/cjs/solid/SweepContour.js +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +4 -0
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.d.ts +1 -1
- package/lib/cjs/topology/ChainMerge.js +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +64 -14
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +149 -32
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +3 -2
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +3 -2
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +0 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +49 -46
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js +2 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +9 -14
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +29 -22
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +18 -10
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +13 -3
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
- package/lib/esm/bspline/BSpline1dNd.js +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +7 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +4 -5
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +7 -5
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +9 -5
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +5 -3
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +1 -2
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +13 -25
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -2
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +2 -0
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +2 -0
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +54 -32
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +56 -37
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +40 -1
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +90 -0
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +3 -2
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +6 -5
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +27 -25
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +30 -25
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +9 -2
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +11 -0
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveTypes.d.ts +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +2 -0
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +4 -0
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +7 -0
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +15 -3
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts +34 -8
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js +131 -35
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.d.ts +4 -3
- package/lib/esm/curve/Query/StrokeCountChain.d.ts.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js +20 -9
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts +2 -1
- package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js +26 -41
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +74 -39
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +146 -46
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +36 -27
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +161 -56
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +1 -1
- package/lib/esm/curve/StrokeOptions.js +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +0 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
- package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
- package/lib/esm/geometry3d/AngleSweep.d.ts +25 -18
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +32 -18
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +8 -7
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js +19 -25
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +8 -3
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +21 -3
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +11 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +21 -3
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
- package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js +6 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +0 -2
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +4 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +66 -26
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +49 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +38 -2
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +5 -4
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +18 -10
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +32 -10
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js +0 -1
- package/lib/esm/geometry3d/Ray2d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +7 -9
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +23 -45
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts +39 -29
- package/lib/esm/geometry3d/ReusableObjectCache.d.ts.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js +47 -33
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.d.ts +1 -4
- package/lib/esm/geometry3d/SortablePolygon.d.ts.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js +48 -43
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +21 -2
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +32 -13
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts +8 -5
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +27 -16
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.d.ts +2 -0
- package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js +11 -0
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +77 -36
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -1
- package/lib/esm/numerics/SmallSystem.js +129 -73
- package/lib/esm/numerics/SmallSystem.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
- package/lib/esm/polyface/FacetOrientation.js +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
- package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceWalker.js +51 -32
- package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +19 -5
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +18 -2
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +6 -6
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +39 -42
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceData.js +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +316 -232
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBReader.js +2 -3
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js +2 -4
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +3 -3
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +5 -5
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js +7 -0
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +6 -0
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +2 -3
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +11 -7
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +2 -2
- package/lib/esm/solid/RotationalSweep.js +2 -2
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +1 -1
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js +5 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts.map +1 -1
- package/lib/esm/solid/Sphere.js +6 -3
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +1 -1
- package/lib/esm/solid/SweepContour.js +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +4 -0
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.d.ts +1 -1
- package/lib/esm/topology/ChainMerge.js +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +64 -14
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +149 -32
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +3 -2
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +3 -2
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +0 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +49 -46
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.d.ts.map +1 -1
- package/lib/esm/topology/RegularizeFace.js +2 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +9 -14
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +29 -22
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +7 -6
|
@@ -6,7 +6,7 @@ import { Ray3d } from "../geometry3d/Ray3d";
|
|
|
6
6
|
import { Transform } from "../geometry3d/Transform";
|
|
7
7
|
import { VariantCurveExtendParameter } from "./CurveExtendMode";
|
|
8
8
|
import { CurveLocationDetail } from "./CurveLocationDetail";
|
|
9
|
-
import { CurvePrimitive } from "./CurvePrimitive";
|
|
9
|
+
import { CurvePrimitive, TangentOptions } from "./CurvePrimitive";
|
|
10
10
|
import { RecursiveCurveProcessor } from "./CurveProcessor";
|
|
11
11
|
import { AnyCurve, type AnyRegion } from "./CurveTypes";
|
|
12
12
|
import { GeometryQuery } from "./GeometryQuery";
|
|
@@ -57,6 +57,36 @@ export declare abstract class CurveCollection extends GeometryQuery {
|
|
|
57
57
|
* @returns details of the closest point.
|
|
58
58
|
*/
|
|
59
59
|
closestPoint(spacePoint: Point3d, _extend?: VariantCurveExtendParameter, result?: CurveLocationDetail): CurveLocationDetail | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Announce all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to
|
|
62
|
+
* the contained curves in the view defined by `options.vectorToEye`.
|
|
63
|
+
* * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve
|
|
64
|
+
* tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to
|
|
65
|
+
* `options.vectorToEye`.
|
|
66
|
+
* @param spacePoint point in space.
|
|
67
|
+
* @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused
|
|
68
|
+
* internally, so it should be cloned in the callback if it needs to be saved.
|
|
69
|
+
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
70
|
+
*/
|
|
71
|
+
emitTangents(spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions): void;
|
|
72
|
+
/**
|
|
73
|
+
* Return all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the
|
|
74
|
+
* contained curves in the view defined by `options.vectorToEye`.
|
|
75
|
+
* * See [[emitTangents]] for the definition of tangency employed.
|
|
76
|
+
* @param spacePoint point in space.
|
|
77
|
+
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
78
|
+
* @returns an array of details of all tangent points or undefined if no tangent was found.
|
|
79
|
+
*/
|
|
80
|
+
allTangents(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail[] | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Return the point `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the
|
|
83
|
+
* contained curves in the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.
|
|
84
|
+
* * See [[emitTangents]] for the definition of tangency employed.
|
|
85
|
+
* @param spacePoint point in space.
|
|
86
|
+
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
87
|
+
* @returns the detail of the closest tangent point or undefined if no tangent was found.
|
|
88
|
+
*/
|
|
89
|
+
closestTangent(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail | undefined;
|
|
60
90
|
/** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */
|
|
61
91
|
reverseInPlace(): void;
|
|
62
92
|
/**
|
|
@@ -159,6 +189,8 @@ export declare abstract class CurveCollection extends GeometryQuery {
|
|
|
159
189
|
* end of the ray.
|
|
160
190
|
*/
|
|
161
191
|
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined;
|
|
192
|
+
/** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */
|
|
193
|
+
findParentOfDescendant(descendant: AnyCurve): CurveCollection | undefined;
|
|
162
194
|
}
|
|
163
195
|
/**
|
|
164
196
|
* Shared base class for use by both open and closed paths.
|
|
@@ -181,6 +213,13 @@ export declare abstract class CurveChain extends CurveCollection {
|
|
|
181
213
|
startPoint(result?: Point3d): Point3d | undefined;
|
|
182
214
|
/** Return the end point of the curve chain (end point of the last child). */
|
|
183
215
|
endPoint(result?: Point3d): Point3d | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* Whether the chain start and end points are defined and within tolerance.
|
|
218
|
+
* * Does not check for planarity or degeneracy.
|
|
219
|
+
* @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])
|
|
220
|
+
* @param xyOnly if true, ignore z coordinate (default is `false`)
|
|
221
|
+
*/
|
|
222
|
+
isPhysicallyClosedCurve(tolerance?: number, xyOnly?: boolean): boolean;
|
|
184
223
|
/**
|
|
185
224
|
* Return the start point and derivative of the first child of the curve chain.
|
|
186
225
|
* * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCollection.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"CurveCollection.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,M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aAAa,GAAG,OAAO;IAGzD;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC;IAChC,uCAAuC;;IAKvC,kDAAkD;IAClD,IAAoB,QAAQ,IAAI,QAAQ,EAAE,CAEzC;IACD,gCAAgC;WAClB,MAAM,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,WAAW;IAOtD,gFAAgF;IACzE,eAAe,IAAI,MAAM;IAGhC,mEAAmE;IAC5D,wBAAwB,CAAC,SAAS,EAAE,uBAAuB,EAAE,aAAa,GAAE,MAAW,GAAG,IAAI;IAGrG,0CAA0C;IACnC,YAAY,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW;IAiBzD;;;;;;OAMG;IACa,YAAY,CAC1B,UAAU,EAAE,OAAO,EAAE,MAAM,GAAE,2BAAmC,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAC7F,mBAAmB,GAAG,SAAS;IAWlC,oCAAoC;IAC7B,cAAc,IAAI,WAAW;IAGpC,mBAAmB;IACZ,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO;IAKxD,2BAA2B;IACpB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAKhD,8EAA8E;IACvE,yBAAyB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG;CAGhE"}
|
|
@@ -18,6 +18,8 @@ import { SumLengthsContext } from "./internalContexts/SumLengthsContext";
|
|
|
18
18
|
import { TransformInPlaceContext } from "./internalContexts/TransformInPlaceContext";
|
|
19
19
|
import { LineString3d } from "./LineString3d";
|
|
20
20
|
import { ProxyCurve } from "./ProxyCurve";
|
|
21
|
+
import { AnnounceTangentStrokeHandler } from "./internalContexts/AnnounceTangentStrokeHandler";
|
|
22
|
+
import { Matrix3d } from "../geometry3d/Matrix3d";
|
|
21
23
|
/**
|
|
22
24
|
* A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:
|
|
23
25
|
* - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.
|
|
@@ -58,6 +60,69 @@ export class CurveCollection extends GeometryQuery {
|
|
|
58
60
|
}
|
|
59
61
|
return detailA;
|
|
60
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Announce all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to
|
|
65
|
+
* the contained curves in the view defined by `options.vectorToEye`.
|
|
66
|
+
* * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve
|
|
67
|
+
* tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to
|
|
68
|
+
* `options.vectorToEye`.
|
|
69
|
+
* @param spacePoint point in space.
|
|
70
|
+
* @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused
|
|
71
|
+
* internally, so it should be cloned in the callback if it needs to be saved.
|
|
72
|
+
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
73
|
+
*/
|
|
74
|
+
emitTangents(spacePoint, announceTangent, options) {
|
|
75
|
+
const strokeHandler = new AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);
|
|
76
|
+
if (this.children !== undefined) {
|
|
77
|
+
for (const child of this.children) {
|
|
78
|
+
if (child instanceof CurvePrimitive)
|
|
79
|
+
child.emitStrokableParts(strokeHandler, options?.strokeOptions);
|
|
80
|
+
else if (child instanceof CurveCollection)
|
|
81
|
+
child.emitTangents(spacePoint, announceTangent, options);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Return all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the
|
|
87
|
+
* contained curves in the view defined by `options.vectorToEye`.
|
|
88
|
+
* * See [[emitTangents]] for the definition of tangency employed.
|
|
89
|
+
* @param spacePoint point in space.
|
|
90
|
+
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
91
|
+
* @returns an array of details of all tangent points or undefined if no tangent was found.
|
|
92
|
+
*/
|
|
93
|
+
allTangents(spacePoint, options) {
|
|
94
|
+
const tangents = [];
|
|
95
|
+
this.emitTangents(spacePoint, (t) => tangents.push(t.clone()), options);
|
|
96
|
+
return (tangents.length === 0) ? undefined : tangents;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Return the point `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the
|
|
100
|
+
* contained curves in the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.
|
|
101
|
+
* * See [[emitTangents]] for the definition of tangency employed.
|
|
102
|
+
* @param spacePoint point in space.
|
|
103
|
+
* @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.
|
|
104
|
+
* @returns the detail of the closest tangent point or undefined if no tangent was found.
|
|
105
|
+
*/
|
|
106
|
+
closestTangent(spacePoint, options) {
|
|
107
|
+
const hint = options?.hintPoint ?? spacePoint;
|
|
108
|
+
let toLocal;
|
|
109
|
+
if (options?.vectorToEye && !options.vectorToEye.isExactEqual({ x: 0, y: 0, z: 1 }))
|
|
110
|
+
toLocal = Matrix3d.createRigidViewAxesZTowardsEye(options.vectorToEye.x, options.vectorToEye.y, options.vectorToEye.z);
|
|
111
|
+
const measureHintDist2 = (pt) => {
|
|
112
|
+
return toLocal?.multiplyTransposeXYZ(hint.x - pt.x, hint.y - pt.y, hint.z - pt.z).magnitudeSquaredXY() ?? pt.distanceSquaredXY(hint);
|
|
113
|
+
};
|
|
114
|
+
let closestTangent;
|
|
115
|
+
let closestDist2 = Geometry.largeCoordinateResult;
|
|
116
|
+
const collectClosestTangent = (tangent) => {
|
|
117
|
+
const dist2 = measureHintDist2(tangent.point);
|
|
118
|
+
if (!closestTangent || dist2 < closestDist2) {
|
|
119
|
+
closestTangent = tangent.clone(closestTangent);
|
|
120
|
+
closestDist2 = dist2;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
this.emitTangents(spacePoint, collectClosestTangent, options);
|
|
124
|
+
return closestTangent;
|
|
125
|
+
}
|
|
61
126
|
/** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */
|
|
62
127
|
reverseInPlace() {
|
|
63
128
|
for (const curve of this.children)
|
|
@@ -203,6 +268,20 @@ export class CurveCollection extends GeometryQuery {
|
|
|
203
268
|
projectedParameterRange(ray, lowHigh) {
|
|
204
269
|
return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
|
|
205
270
|
}
|
|
271
|
+
/** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */
|
|
272
|
+
findParentOfDescendant(descendant) {
|
|
273
|
+
for (const child of this.children) {
|
|
274
|
+
if (child === descendant)
|
|
275
|
+
return this;
|
|
276
|
+
if (child instanceof CurveCollection) {
|
|
277
|
+
const parent = child.findParentOfDescendant(descendant);
|
|
278
|
+
if (parent)
|
|
279
|
+
return parent;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return undefined;
|
|
283
|
+
}
|
|
284
|
+
;
|
|
206
285
|
}
|
|
207
286
|
/**
|
|
208
287
|
* Shared base class for use by both open and closed paths.
|
|
@@ -242,6 +321,17 @@ export class CurveChain extends CurveCollection {
|
|
|
242
321
|
else
|
|
243
322
|
return undefined;
|
|
244
323
|
}
|
|
324
|
+
/**
|
|
325
|
+
* Whether the chain start and end points are defined and within tolerance.
|
|
326
|
+
* * Does not check for planarity or degeneracy.
|
|
327
|
+
* @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])
|
|
328
|
+
* @param xyOnly if true, ignore z coordinate (default is `false`)
|
|
329
|
+
*/
|
|
330
|
+
isPhysicallyClosedCurve(tolerance = Geometry.smallMetricDistance, xyOnly = false) {
|
|
331
|
+
const p0 = this.startPoint();
|
|
332
|
+
const p1 = this.endPoint();
|
|
333
|
+
return p0 !== undefined && p1 !== undefined && (xyOnly ? p0.isAlmostEqualXY(p1, tolerance) : p0.isAlmostEqual(p1, tolerance));
|
|
334
|
+
}
|
|
245
335
|
/**
|
|
246
336
|
* Return the start point and derivative of the first child of the curve chain.
|
|
247
337
|
* * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,eAAgB,SAAQ,aAAa;IACzD,wCAAwC;IACxB,gBAAgB,GAAG,iBAAiB,CAAC;IAGrD,uDAAuD;IAChD,OAAO,GAAY,KAAK,CAAC;IAGhC,6DAA6D;IACtD,UAAU;QACf,OAAO,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD;;;;;;OAMG;IACI,YAAY,CACjB,UAAmB,EAAE,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,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,2BAA2B;IACpB,QAAQ,CAAC,CAAS;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8EAA8E;IACvE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF","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 Curve\n */\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\nimport { AnyCurve, type AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { ProxyCurve } from \"./ProxyCurve\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\nimport type { Path } from \"./Path\";\nimport type { Loop } from \"./Loop\";\n\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\n\n/**\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\n * used in conditional statements for type-switching.\n * - \"loop\" => [[Loop]]\n * - \"path\" => [[Path]]\n * - \"unionRegion\" => [[UnionRegion]]\n * - \"parityRegion\" => [[ParityRegion]]\n * - \"bagOfCurves\" => [[BagOfCurves]]\n * @public\n */\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\n\n/**\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\n * - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.\n * The two instantiable forms of `CurveChain` are:\n * - [[Path]] - a chain of curves. Does not have to be closed or planar. A closed `Path` is not treated as bounding a surface.\n * - [[Loop]] - a closed and planar chain of curves. A `Loop` is treated as bounding a planar area.\n * - [[ParityRegion]] - a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\n * - [[UnionRegion]] - a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\n * - [[BagOfCurves]] - a collection of [[AnyCurve]] with no implied structure.\n *\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveCollection extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curveCollection\";\n /** Type discriminator. */\n public abstract readonly curveCollectionType: CurveCollectionType;\n /** Flag for inner loop status. Only used by `Loop`. */\n public isInner: boolean = false;\n /** Return the curve children. */\n public abstract override get children(): AnyCurve[];\n /** Return the sum of the lengths of all contained curves. */\n public sumLengths(): number {\n return SumLengthsContext.sumLengths(this);\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param _extend unused here (pass false), but applicable to overrides in [[Path]] and [[BagOfCurves]].\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, false, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */\n public reverseInPlace(): void {\n for (const curve of this.children)\n curve.reverseInPlace();\n }\n /**\n * Return the max gap between adjacent primitives in Path and Loop collections.\n * * In a Path, gaps are computed between consecutive primitives.\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\n * \"unstructured\" so gaps should not be semantically meaningful.\n */\n public maxGap(): number {\n return GapSearchContext.maxGap(this);\n }\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\n public checkForNonLinearPrimitives(): boolean {\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\n }\n /** Apply transform recursively to children */\n public tryTransformInPlace(transform: Transform): boolean {\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\n }\n /** Return a deep copy. */\n public override clone(): CurveCollection {\n return CloneCurvesContext.clone(this) as CurveCollection;\n }\n /** Create a deep copy of transformed curves. */\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\n return CloneCurvesContext.clone(this, transform);\n }\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\n public cloneWithExpandedLineStrings(): CurveCollection {\n return CloneWithExpandedLineStrings.clone(this);\n }\n /**\n * Push all CurvePrimitives contained in the instance onto the `results` array.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\n * of the Loop are pushed onto `results`.\n */\n private collectCurvePrimitivesGo(\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\n ): void {\n if (this.children) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n else if (child instanceof CurveCollection)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n }\n }\n }\n /**\n * Return an array containing all CurvePrimitives in the instance.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\n * the Loop are pushed onto the returned array.\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\n * clearing the array).\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\n * it recurses to its (otherwise hidden) children.\n */\n public collectCurvePrimitives(\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\n ): CurvePrimitive[] {\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\n return results;\n }\n /**\n * Return true for planar region types:\n * * `Loop`\n * * `ParityRegion`\n * * `UnionRegion`\n * @see isAnyRegion\n */\n public get isAnyRegionType(): boolean {\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\n }\n /** Type guard for AnyRegion */\n public isAnyRegion(): this is AnyRegion {\n return this.isAnyRegionType;\n }\n /**\n * Return true for a `Path`, i.e. a chain of curves joined head-to-tail\n * @see isPath\n */\n public get isOpenPath(): boolean {\n return this.dgnBoundaryType() === 1;\n }\n /** Type guard for Path */\n public isPath(): this is Path {\n return this.isOpenPath;\n }\n /**\n * Return true for a single-loop planar region type, i.e. `Loop`.\n * * This is NOT a test for physical closure of a `Path`.\n * @see isLoop\n */\n public get isClosedPath(): boolean {\n return this.dgnBoundaryType() === 2;\n }\n /** Type guard for Loop */\n public isLoop(): this is Loop {\n return this.isClosedPath;\n }\n\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\n public abstract cloneStroked(options?: StrokeOptions): CurveCollection;\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\n /** Clone an empty collection. */\n public abstract cloneEmptyPeer(): CurveCollection;\n /**\n * Return the boundary type of a corresponding MicroStation CurveVector.\n * * Derived class must implement.\n */\n public abstract dgnBoundaryType(): number;\n /**\n * Try to add a child.\n * @param child child to add.\n * @return true if child is an acceptable type for this collection.\n */\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\n /** Return a child identified by by index */\n public abstract getChild(i: number): AnyCurve | undefined;\n /**\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\n * @param rangeToExtend the given range.\n * @param transform if supplied, the range is extended with transformed curves.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const children = this.children;\n if (children) {\n for (const c of children) {\n c.extendRange(rangeToExtend, transform);\n }\n }\n }\n /**\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\n * @param source containing `CurvePrimitive` or `CurveCollection`\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\n */\n public static createCurveLocationDetailOnAnyCurvePrimitive(\n source: GeometryQuery | undefined, fraction: number = 0.5,\n ): CurveLocationDetail | undefined {\n if (!source)\n return undefined;\n if (source instanceof CurvePrimitive) {\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\n } else if (source instanceof CurveCollection && source.children !== undefined)\n for (const child of source.children) {\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\n if (detail)\n return detail;\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n\n/**\n * Shared base class for use by both open and closed paths.\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\n * * The specific derived classes are `Path` and `Loop`.\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveChain extends CurveCollection {\n /** The curve primitives in the chain. */\n protected _curves: CurvePrimitive[];\n /** Constructor */\n protected constructor() {\n super();\n this._curves = [];\n }\n /** Return the array of `CurvePrimitive` */\n public override get children(): CurvePrimitive[] {\n return this._curves;\n }\n /** Return the start point of the curve chain (start point of the first child). */\n public startPoint(result?: Point3d): Point3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPoint(0.0, result);\n else\n return undefined;\n }\n /** Return the end point of the curve chain (end point of the last child). */\n public endPoint(result?: Point3d): Point3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPoint(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the start point and derivative of the first child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public startPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPointAndDerivative(0.0, result);\n else\n return undefined;\n }\n /**\n * Return the end point and derivative of the last child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public endPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPointAndDerivative(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\n * * In particular, `-1` is the final curve.\n * @param index cyclic index\n */\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\n const n = this.children.length;\n if (n === 0)\n return undefined;\n if (index >= 0 && index < n) // try simplest non-cyclic access first\n return this.children[index];\n if (cyclic) {\n const index2 = Geometry.modulo(index, n);\n return this.children[index2];\n }\n return undefined;\n }\n /**\n * Stroke the chain into a simple xyz array.\n * @param options tolerance parameters controlling the stroking.\n */\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\n /**\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\n * the points of that LineString3d using \"packedPoints\".\n */\n const tree = this.cloneStroked(options);\n if (tree instanceof CurveChain) {\n const children = tree.children;\n if (children.length === 1) {\n const ls = children[0];\n if (ls instanceof LineString3d)\n return ls.packedPoints;\n }\n }\n return undefined;\n }\n /** Return a structural clone, with CurvePrimitive objects stroked. */\n public abstract override cloneStroked(options?: StrokeOptions): CurveChain;\n /**\n * Add a child curve.\n * @param child curve to add to the chain. The curve is captured by this instance.\n * @return whether the child was added\n */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child && child instanceof CurvePrimitive) {\n this._curves.push(child);\n return true;\n }\n return false;\n }\n /** Return a child by index */\n public getChild(i: number): CurvePrimitive | undefined {\n if (i < this._curves.length) return this._curves[i];\n return undefined;\n }\n /** Invoke `curve.extendRange(range, transform)` for each child */\n public override extendRange(range: Range3d, transform?: Transform): void {\n for (const curve of this._curves)\n curve.extendRange(range, transform);\n }\n /**\n * Reverse each child curve (in place).\n * Reverse the order of the children array.\n */\n public reverseChildrenInPlace(): void {\n for (const curve of this._curves)\n curve.reverseInPlace();\n this._curves.reverse();\n }\n /** Same as [[reverseChildrenInPlace]]. */\n public override reverseInPlace(): void {\n this.reverseChildrenInPlace();\n }\n /**\n * Return the index where target is found in the array of children.\n * @param alsoSearchProxies whether to also check proxy curves of the children\n */\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\n for (let i = 0; i < this._curves.length; i++) {\n if (this._curves[i] === target)\n return i;\n }\n if (alsoSearchProxies ?? false) {\n for (let i = 0; i < this._curves.length; i++) {\n const childCurve = this._curves[i];\n if (childCurve instanceof ProxyCurve) {\n if (childCurve.proxyCurve === target)\n return i;\n }\n }\n }\n return undefined;\n }\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\n if (primitive) {\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\n }\n return undefined;\n }\n}\n\n/**\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\n * * A `BagOfCurves` has no implied properties such as being planar.\n * @public\n */\nexport class BagOfCurves extends CurveCollection {\n /** String name for schema properties */\n public readonly curveCollectionType = \"bagOfCurves\";\n /** Test if `other` is an instance of `BagOfCurves` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof BagOfCurves;\n }\n /**\n * Array of children.\n * * No restrictions on type.\n */\n protected _children: AnyCurve[];\n /** Construct an empty `BagOfCurves` */\n public constructor() {\n super();\n this._children = [];\n }\n /** Return the (reference to) array of children */\n public override get children(): AnyCurve[] {\n return this._children;\n }\n /** Create with given curves. */\n public static create(...data: AnyCurve[]): BagOfCurves {\n const result = new BagOfCurves();\n for (const child of data) {\n result.tryAddChild(child);\n }\n return result;\n }\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\n public dgnBoundaryType(): number {\n return 0;\n }\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\n return processor.announceBagOfCurves(this, indexInParent);\n }\n /** Clone all children in stroked form. */\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\n const clone = new BagOfCurves();\n let child;\n for (child of this.children) {\n if (child instanceof CurvePrimitive) {\n const ls = LineString3d.create();\n child.emitStrokes(ls, options);\n if (ls)\n clone.children.push(ls);\n } else if (child instanceof CurveCollection) {\n const childStrokes = child.cloneStroked(options);\n if (childStrokes)\n clone.children.push(childStrokes);\n }\n }\n return clone;\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param extend applicable only to children of type [[CurvePrimitive]], [[Path]], or [[BagOfCurves]]\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, extend, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Return an empty `BagOfCurves` */\n public cloneEmptyPeer(): BagOfCurves {\n return new BagOfCurves();\n }\n /** Add a child */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child)\n this._children.push(child);\n return true;\n }\n /** Get a child by index */\n public getChild(i: number): AnyCurve | undefined {\n if (i < this._children.length)\n return this._children[i];\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBagOfCurves(this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAkB,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAgBlD;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,eAAgB,SAAQ,aAAa;IACzD,wCAAwC;IACxB,gBAAgB,GAAG,iBAAiB,CAAC;IAGrD,uDAAuD;IAChD,OAAO,GAAY,KAAK,CAAC;IAGhC,6DAA6D;IACtD,UAAU;QACf,OAAO,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD;;;;;;OAMG;IACI,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mB,EAAE,CAAC;QAC1C,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClC,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;oBACjD,OAAO,GAAG,MAAM,GAAG,mBAAmB,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC3F,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,oCAAoC;IAC7B,cAAc;QACnB,OAAO,IAAI,WAAW,EAAE,CAAC;IAC3B,CAAC;IACD,mBAAmB;IACZ,WAAW,CAAC,KAA2B;QAC5C,IAAI,KAAK;YACP,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,2BAA2B;IACpB,QAAQ,CAAC,CAAS;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8EAA8E;IACvE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF","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 Curve\n */\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { CurvePrimitive, TangentOptions } from \"./CurvePrimitive\";\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\nimport { AnyCurve, type AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { ProxyCurve } from \"./ProxyCurve\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\nimport type { Path } from \"./Path\";\nimport type { Loop } from \"./Loop\";\nimport { AnnounceTangentStrokeHandler } from \"./internalContexts/AnnounceTangentStrokeHandler\";\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\n\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\n\n/**\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\n * used in conditional statements for type-switching.\n * - \"loop\" => [[Loop]]\n * - \"path\" => [[Path]]\n * - \"unionRegion\" => [[UnionRegion]]\n * - \"parityRegion\" => [[ParityRegion]]\n * - \"bagOfCurves\" => [[BagOfCurves]]\n * @public\n */\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\n\n/**\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\n * - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.\n * The two instantiable forms of `CurveChain` are:\n * - [[Path]] - a chain of curves. Does not have to be closed or planar. A closed `Path` is not treated as bounding a surface.\n * - [[Loop]] - a closed and planar chain of curves. A `Loop` is treated as bounding a planar area.\n * - [[ParityRegion]] - a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\n * - [[UnionRegion]] - a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\n * - [[BagOfCurves]] - a collection of [[AnyCurve]] with no implied structure.\n *\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveCollection extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curveCollection\";\n /** Type discriminator. */\n public abstract readonly curveCollectionType: CurveCollectionType;\n /** Flag for inner loop status. Only used by `Loop`. */\n public isInner: boolean = false;\n /** Return the curve children. */\n public abstract override get children(): AnyCurve[];\n /** Return the sum of the lengths of all contained curves. */\n public sumLengths(): number {\n return SumLengthsContext.sumLengths(this);\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param _extend unused here (pass false), but applicable to overrides in [[Path]] and [[BagOfCurves]].\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, false, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /**\n * Announce all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to\n * the contained curves in the view defined by `options.vectorToEye`.\n * * Strictly speaking, each tangent line lies in the plane through `P` whose normal is the cross product of the curve\n * tangent at `P` and `options.vectorToEye`. This is equivalent to tangency as seen in a view plane perpendicular to\n * `options.vectorToEye`.\n * @param spacePoint point in space.\n * @param announceTangent callback to announce each computed tangent. The received [[CurveLocationDetail]] is reused\n * internally, so it should be cloned in the callback if it needs to be saved.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n */\n public emitTangents(\n spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions,\n ): void {\n const strokeHandler = new AnnounceTangentStrokeHandler(spacePoint, announceTangent, options);\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.emitStrokableParts(strokeHandler, options?.strokeOptions);\n else if (child instanceof CurveCollection)\n child.emitTangents(spacePoint, announceTangent, options);\n }\n }\n }\n /**\n * Return all points `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the\n * contained curves in the view defined by `options.vectorToEye`.\n * * See [[emitTangents]] for the definition of tangency employed.\n * @param spacePoint point in space.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n * @returns an array of details of all tangent points or undefined if no tangent was found.\n */\n public allTangents(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail[] | undefined {\n const tangents: CurveLocationDetail[] = [];\n this.emitTangents(spacePoint, (t: CurveLocationDetail) => tangents.push(t.clone()), options);\n return (tangents.length === 0) ? undefined : tangents;\n }\n /**\n * Return the point `P` on the contained curves such that the line containing `spacePoint` and `P` is tangent to the\n * contained curves in the view defined by `options.vectorToEye`, and `P` is closest to `options.hintPoint` in this view.\n * * See [[emitTangents]] for the definition of tangency employed.\n * @param spacePoint point in space.\n * @param options (optional) options for computing tangents. See [[TangentOptions]] for defaults.\n * @returns the detail of the closest tangent point or undefined if no tangent was found.\n */\n public closestTangent(spacePoint: Point3d, options?: TangentOptions): CurveLocationDetail | undefined {\n const hint = options?.hintPoint ?? spacePoint;\n let toLocal: Matrix3d | undefined;\n if (options?.vectorToEye && !options.vectorToEye.isExactEqual({ x: 0, y: 0, z: 1 }))\n toLocal = Matrix3d.createRigidViewAxesZTowardsEye(options.vectorToEye.x, options.vectorToEye.y, options.vectorToEye.z);\n const measureHintDist2 = (pt: Point3d): number => { // measure distance to hint in view plane coordinates\n return toLocal?.multiplyTransposeXYZ(hint.x - pt.x, hint.y - pt.y, hint.z - pt.z).magnitudeSquaredXY() ?? pt.distanceSquaredXY(hint);\n };\n let closestTangent: CurveLocationDetail | undefined;\n let closestDist2 = Geometry.largeCoordinateResult;\n const collectClosestTangent = (tangent: CurveLocationDetail) => {\n const dist2 = measureHintDist2(tangent.point);\n if (!closestTangent || dist2 < closestDist2) {\n closestTangent = tangent.clone(closestTangent);\n closestDist2 = dist2;\n }\n };\n this.emitTangents(spacePoint, collectClosestTangent, options);\n return closestTangent;\n }\n /** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */\n public reverseInPlace(): void {\n for (const curve of this.children)\n curve.reverseInPlace();\n }\n /**\n * Return the max gap between adjacent primitives in Path and Loop collections.\n * * In a Path, gaps are computed between consecutive primitives.\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\n * \"unstructured\" so gaps should not be semantically meaningful.\n */\n public maxGap(): number {\n return GapSearchContext.maxGap(this);\n }\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\n public checkForNonLinearPrimitives(): boolean {\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\n }\n /** Apply transform recursively to children */\n public tryTransformInPlace(transform: Transform): boolean {\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\n }\n /** Return a deep copy. */\n public override clone(): CurveCollection {\n return CloneCurvesContext.clone(this) as CurveCollection;\n }\n /** Create a deep copy of transformed curves. */\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\n return CloneCurvesContext.clone(this, transform);\n }\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\n public cloneWithExpandedLineStrings(): CurveCollection {\n return CloneWithExpandedLineStrings.clone(this);\n }\n /**\n * Push all CurvePrimitives contained in the instance onto the `results` array.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\n * of the Loop are pushed onto `results`.\n */\n private collectCurvePrimitivesGo(\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\n ): void {\n if (this.children) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n else if (child instanceof CurveCollection)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n }\n }\n }\n /**\n * Return an array containing all CurvePrimitives in the instance.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\n * the Loop are pushed onto the returned array.\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\n * clearing the array).\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\n * it recurses to its (otherwise hidden) children.\n */\n public collectCurvePrimitives(\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\n ): CurvePrimitive[] {\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\n return results;\n }\n /**\n * Return true for planar region types:\n * * `Loop`\n * * `ParityRegion`\n * * `UnionRegion`\n * @see isAnyRegion\n */\n public get isAnyRegionType(): boolean {\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\n }\n /** Type guard for AnyRegion */\n public isAnyRegion(): this is AnyRegion {\n return this.isAnyRegionType;\n }\n /**\n * Return true for a `Path`, i.e. a chain of curves joined head-to-tail\n * @see isPath\n */\n public get isOpenPath(): boolean {\n return this.dgnBoundaryType() === 1;\n }\n /** Type guard for Path */\n public isPath(): this is Path {\n return this.isOpenPath;\n }\n /**\n * Return true for a single-loop planar region type, i.e. `Loop`.\n * * This is NOT a test for physical closure of a `Path`.\n * @see isLoop\n */\n public get isClosedPath(): boolean {\n return this.dgnBoundaryType() === 2;\n }\n /** Type guard for Loop */\n public isLoop(): this is Loop {\n return this.isClosedPath;\n }\n\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\n public abstract cloneStroked(options?: StrokeOptions): CurveCollection;\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\n /** Clone an empty collection. */\n public abstract cloneEmptyPeer(): CurveCollection;\n /**\n * Return the boundary type of a corresponding MicroStation CurveVector.\n * * Derived class must implement.\n */\n public abstract dgnBoundaryType(): number;\n /**\n * Try to add a child.\n * @param child child to add.\n * @return true if child is an acceptable type for this collection.\n */\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\n /** Return a child identified by by index */\n public abstract getChild(i: number): AnyCurve | undefined;\n /**\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\n * @param rangeToExtend the given range.\n * @param transform if supplied, the range is extended with transformed curves.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const children = this.children;\n if (children) {\n for (const c of children) {\n c.extendRange(rangeToExtend, transform);\n }\n }\n }\n /**\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\n * @param source containing `CurvePrimitive` or `CurveCollection`\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\n */\n public static createCurveLocationDetailOnAnyCurvePrimitive(\n source: GeometryQuery | undefined, fraction: number = 0.5,\n ): CurveLocationDetail | undefined {\n if (!source)\n return undefined;\n if (source instanceof CurvePrimitive) {\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\n } else if (source instanceof CurveCollection && source.children !== undefined)\n for (const child of source.children) {\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\n if (detail)\n return detail;\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n /** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */\n public findParentOfDescendant(descendant: AnyCurve): CurveCollection | undefined {\n for (const child of this.children) {\n if (child === descendant)\n return this;\n if (child instanceof CurveCollection) {\n const parent = child.findParentOfDescendant(descendant);\n if (parent)\n return parent;\n }\n }\n return undefined;\n };\n}\n\n/**\n * Shared base class for use by both open and closed paths.\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\n * * The specific derived classes are `Path` and `Loop`.\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveChain extends CurveCollection {\n /** The curve primitives in the chain. */\n protected _curves: CurvePrimitive[];\n /** Constructor */\n protected constructor() {\n super();\n this._curves = [];\n }\n /** Return the array of `CurvePrimitive` */\n public override get children(): CurvePrimitive[] {\n return this._curves;\n }\n /** Return the start point of the curve chain (start point of the first child). */\n public startPoint(result?: Point3d): Point3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPoint(0.0, result);\n else\n return undefined;\n }\n /** Return the end point of the curve chain (end point of the last child). */\n public endPoint(result?: Point3d): Point3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPoint(1.0, result);\n else\n return undefined;\n }\n /**\n * Whether the chain start and end points are defined and within tolerance.\n * * Does not check for planarity or degeneracy.\n * @param tolerance optional distance tolerance (default is [[Geometry.smallMetricDistance]])\n * @param xyOnly if true, ignore z coordinate (default is `false`)\n */\n public isPhysicallyClosedCurve(tolerance: number = Geometry.smallMetricDistance, xyOnly: boolean = false): boolean {\n const p0 = this.startPoint();\n const p1 = this.endPoint();\n return p0 !== undefined && p1 !== undefined && (xyOnly ? p0.isAlmostEqualXY(p1, tolerance) : p0.isAlmostEqual(p1, tolerance));\n }\n /**\n * Return the start point and derivative of the first child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public startPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPointAndDerivative(0.0, result);\n else\n return undefined;\n }\n /**\n * Return the end point and derivative of the last child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public endPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPointAndDerivative(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\n * * In particular, `-1` is the final curve.\n * @param index cyclic index\n */\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\n const n = this.children.length;\n if (n === 0)\n return undefined;\n if (index >= 0 && index < n) // try simplest non-cyclic access first\n return this.children[index];\n if (cyclic) {\n const index2 = Geometry.modulo(index, n);\n return this.children[index2];\n }\n return undefined;\n }\n /**\n * Stroke the chain into a simple xyz array.\n * @param options tolerance parameters controlling the stroking.\n */\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\n /**\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\n * the points of that LineString3d using \"packedPoints\".\n */\n const tree = this.cloneStroked(options);\n if (tree instanceof CurveChain) {\n const children = tree.children;\n if (children.length === 1) {\n const ls = children[0];\n if (ls instanceof LineString3d)\n return ls.packedPoints;\n }\n }\n return undefined;\n }\n /** Return a structural clone, with CurvePrimitive objects stroked. */\n public abstract override cloneStroked(options?: StrokeOptions): CurveChain;\n /**\n * Add a child curve.\n * @param child curve to add to the chain. The curve is captured by this instance.\n * @return whether the child was added\n */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child && child instanceof CurvePrimitive) {\n this._curves.push(child);\n return true;\n }\n return false;\n }\n /** Return a child by index */\n public getChild(i: number): CurvePrimitive | undefined {\n if (i < this._curves.length) return this._curves[i];\n return undefined;\n }\n /** Invoke `curve.extendRange(range, transform)` for each child */\n public override extendRange(range: Range3d, transform?: Transform): void {\n for (const curve of this._curves)\n curve.extendRange(range, transform);\n }\n /**\n * Reverse each child curve (in place).\n * Reverse the order of the children array.\n */\n public reverseChildrenInPlace(): void {\n for (const curve of this._curves)\n curve.reverseInPlace();\n this._curves.reverse();\n }\n /** Same as [[reverseChildrenInPlace]]. */\n public override reverseInPlace(): void {\n this.reverseChildrenInPlace();\n }\n /**\n * Return the index where target is found in the array of children.\n * @param alsoSearchProxies whether to also check proxy curves of the children\n */\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\n for (let i = 0; i < this._curves.length; i++) {\n if (this._curves[i] === target)\n return i;\n }\n if (alsoSearchProxies ?? false) {\n for (let i = 0; i < this._curves.length; i++) {\n const childCurve = this._curves[i];\n if (childCurve instanceof ProxyCurve) {\n if (childCurve.proxyCurve === target)\n return i;\n }\n }\n }\n return undefined;\n }\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\n if (primitive) {\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\n }\n return undefined;\n }\n}\n\n/**\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\n * * A `BagOfCurves` has no implied properties such as being planar.\n * @public\n */\nexport class BagOfCurves extends CurveCollection {\n /** String name for schema properties */\n public readonly curveCollectionType = \"bagOfCurves\";\n /** Test if `other` is an instance of `BagOfCurves` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof BagOfCurves;\n }\n /**\n * Array of children.\n * * No restrictions on type.\n */\n protected _children: AnyCurve[];\n /** Construct an empty `BagOfCurves` */\n public constructor() {\n super();\n this._children = [];\n }\n /** Return the (reference to) array of children */\n public override get children(): AnyCurve[] {\n return this._children;\n }\n /** Create with given curves. */\n public static create(...data: AnyCurve[]): BagOfCurves {\n const result = new BagOfCurves();\n for (const child of data) {\n result.tryAddChild(child);\n }\n return result;\n }\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\n public dgnBoundaryType(): number {\n return 0;\n }\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\n return processor.announceBagOfCurves(this, indexInParent);\n }\n /** Clone all children in stroked form. */\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\n const clone = new BagOfCurves();\n let child;\n for (child of this.children) {\n if (child instanceof CurvePrimitive) {\n const ls = LineString3d.create();\n child.emitStrokes(ls, options);\n if (ls)\n clone.children.push(ls);\n } else if (child instanceof CurveCollection) {\n const childStrokes = child.cloneStroked(options);\n if (childStrokes)\n clone.children.push(childStrokes);\n }\n }\n return clone;\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param extend applicable only to children of type [[CurvePrimitive]], [[Path]], or [[BagOfCurves]]\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, extend, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Return an empty `BagOfCurves` */\n public cloneEmptyPeer(): BagOfCurves {\n return new BagOfCurves();\n }\n /** Add a child */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child)\n this._children.push(child);\n return true;\n }\n /** Get a child by index */\n public getChild(i: number): AnyCurve | undefined {\n if (i < this._children.length)\n return this._children[i];\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBagOfCurves(this);\n }\n}\n"]}
|
|
@@ -105,10 +105,11 @@ export declare class CurveFactory {
|
|
|
105
105
|
* * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.
|
|
106
106
|
* @param arcA first arc, modified in place.
|
|
107
107
|
* @param arcB second arc, unmodified.
|
|
108
|
-
* @param allowReversed whether to consolidate even when second arc is reversed.
|
|
108
|
+
* @param allowReversed whether to consolidate even when second arc is reversed (default is `false`).
|
|
109
|
+
* @param tolerance optional coordinate tolerance for point equality (default is `Geometry.smallMetricDistance`).
|
|
109
110
|
* @returns whether `arcA` was modified.
|
|
110
111
|
*/
|
|
111
|
-
static appendToArcInPlace(arcA: Arc3d, arcB: Arc3d, allowReverse?: boolean): boolean;
|
|
112
|
+
static appendToArcInPlace(arcA: Arc3d, arcB: Arc3d, allowReverse?: boolean, tolerance?: number): boolean;
|
|
112
113
|
/**
|
|
113
114
|
* Return a `Path` containing arcs are on the surface of an ellipsoid and pass through a sequence of points.
|
|
114
115
|
* * Each arc passes through the two given endpoints and in the plane containing the true surface normal at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurveFactory.d.ts","sourceRoot":"","sources":["../../../src/curve/CurveFactory.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAkC,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAG1F,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAa,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,M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E,GAAG,cAAc,GAAG,UAAU,EAC1E,cAAc,EAAE,QAAQ,EACxB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,yBAAyB,GAAG,SAAS;IAiCxC;;;;;;;;OAQG;WACW,2BAA2B,CACvC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,GACxG,KAAK,GAAG,SAAS;IAGpB;;;;;;;;;OASG;WACW,0BAA0B,CACtC,UAAU,EAAE,wBAAwB,EACpC,UAAU,EAAE,OAAO,EACnB,aAAa,EAAE,OAAO,EACtB,WAAW,EAAE,OAAO,GACnB,aAAa,EAAE,GAAG,SAAS;IAkC9B;;;;;;;;;OASG;WACW,0CAA0C,CACtD,UAAU,EAAE,wBAAwB,EACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,GACnB,aAAa,EAAE,GAAG,SAAS;IA4C9B;;;;;;;;;OASG;WACW,6BAA6B,CACzC,UAAU,EAAE,wBAAwB,EACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,aAAa,EAAE,GAAG,SAAS;IAkD9B,iDAAiD;WACnC,yBAAyB,CACrC,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,sBAAsB,GAAG,KAAK,GAAG,SAAS;CAsBrF"}
|
|
@@ -201,11 +201,12 @@ export class CurveFactory {
|
|
|
201
201
|
* * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`.
|
|
202
202
|
* @param arcA first arc, modified in place.
|
|
203
203
|
* @param arcB second arc, unmodified.
|
|
204
|
-
* @param allowReversed whether to consolidate even when second arc is reversed.
|
|
204
|
+
* @param allowReversed whether to consolidate even when second arc is reversed (default is `false`).
|
|
205
|
+
* @param tolerance optional coordinate tolerance for point equality (default is `Geometry.smallMetricDistance`).
|
|
205
206
|
* @returns whether `arcA` was modified.
|
|
206
207
|
*/
|
|
207
|
-
static appendToArcInPlace(arcA, arcB, allowReverse = false) {
|
|
208
|
-
if (arcA.center.isAlmostEqual(arcB.center)) {
|
|
208
|
+
static appendToArcInPlace(arcA, arcB, allowReverse = false, tolerance = Geometry.smallMetricDistance) {
|
|
209
|
+
if (arcA.center.isAlmostEqual(arcB.center, tolerance)) {
|
|
209
210
|
const sweepSign = Geometry.split3WaySign(arcA.sweep.sweepRadians * arcB.sweep.sweepRadians, -1, 0, 1);
|
|
210
211
|
// evaluate derivatives wrt radians (not fraction!), but adjust direction for sweep signs
|
|
211
212
|
const endA = arcA.angleToPointAndDerivative(arcA.sweep.fractionToAngle(1.0));
|
|
@@ -214,14 +215,14 @@ export class CurveFactory {
|
|
|
214
215
|
const startB = arcB.angleToPointAndDerivative(arcB.sweep.fractionToAngle(0.0));
|
|
215
216
|
if (arcB.sweep.sweepRadians < 0)
|
|
216
217
|
startB.direction.scaleInPlace(-1.0);
|
|
217
|
-
if (endA.isAlmostEqual(startB)) {
|
|
218
|
+
if (endA.isAlmostEqual(startB, tolerance)) {
|
|
218
219
|
arcA.sweep.setStartEndRadians(arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians + sweepSign * arcB.sweep.sweepRadians);
|
|
219
220
|
return true;
|
|
220
221
|
}
|
|
221
222
|
// Also ok if negated tangent
|
|
222
223
|
if (allowReverse) {
|
|
223
224
|
startB.direction.scaleInPlace(-1.0);
|
|
224
|
-
if (endA.isAlmostEqual(startB)) {
|
|
225
|
+
if (endA.isAlmostEqual(startB, tolerance)) {
|
|
225
226
|
arcA.sweep.setStartEndRadians(arcA.sweep.startRadians, arcA.sweep.startRadians + arcA.sweep.sweepRadians - sweepSign * arcB.sweep.sweepRadians);
|
|
226
227
|
return true;
|
|
227
228
|
}
|