@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
|
@@ -36,13 +36,14 @@ export declare enum RegionBinaryOpType {
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Class `RegionOps` has static members for calculations on regions (areas).
|
|
39
|
-
* * Regions are represented by these
|
|
40
|
-
* *
|
|
41
|
-
* *
|
|
42
|
-
* The common "One outer loop and many
|
|
43
|
-
* *
|
|
44
|
-
* *
|
|
45
|
-
* been rotated parallel to the xy-plane.
|
|
39
|
+
* * Regions are represented by these [[CurveCollection]] subclasses:
|
|
40
|
+
* * [[Loop]] -- a single loop
|
|
41
|
+
* * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
|
|
42
|
+
* The common "One outer loop and many inner loops" is a parity region.
|
|
43
|
+
* * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
|
|
44
|
+
* * Most of the methods in this class:
|
|
45
|
+
* * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
|
|
46
|
+
* * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
|
|
46
47
|
* @public
|
|
47
48
|
*/
|
|
48
49
|
export declare class RegionOps {
|
|
@@ -65,7 +66,8 @@ export declare class RegionOps {
|
|
|
65
66
|
/**
|
|
66
67
|
* Return a (signed) xy area for a region.
|
|
67
68
|
* * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
68
|
-
* *
|
|
69
|
+
* * For a non-self-intersecting Loop, the returned area is negative if and only if the Loop is oriented clockwise
|
|
70
|
+
* with respect to the positive z-axis.
|
|
69
71
|
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
70
72
|
*/
|
|
71
73
|
static computeXYArea(region: AnyRegion): number | undefined;
|
|
@@ -136,16 +138,38 @@ export declare class RegionOps {
|
|
|
136
138
|
* @param triangulate whether to triangulate the result
|
|
137
139
|
*/
|
|
138
140
|
static polygonXYAreaDifferenceLoopsToPolyface(loopsA: MultiLineStringDataVariant, loopsB: MultiLineStringDataVariant, triangulate?: boolean): Polyface | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* Return the region's simplest representation by stripping redundant parent(s).
|
|
143
|
+
* * No Boolean operations are performed.
|
|
144
|
+
* @param region input region (unchanged). Assumed to have at least one child.
|
|
145
|
+
* @returns
|
|
146
|
+
* * For a [[UnionRegion]] with exactly one child, return the child if it is a [[Loop]],
|
|
147
|
+
* or if it is a [[ParityRegion]] with multiple children; otherwise return the `ParityRegion`'s `Loop`.
|
|
148
|
+
* * For a `ParityRegion` with exactly one child, return the `Loop`.
|
|
149
|
+
* * All other inputs returned unchanged.
|
|
150
|
+
* @see [[simplifyRegion]]
|
|
151
|
+
*/
|
|
152
|
+
static simplifyRegionType(region: AnyRegion): AnyRegion;
|
|
153
|
+
/**
|
|
154
|
+
* Simplify the region's parent/child hierarchy in place:
|
|
155
|
+
* * Regions with exactly one child are simplified as per [[simplifyRegionType]].
|
|
156
|
+
* * Regions without children are removed.
|
|
157
|
+
* * No Boolean operations are performed.
|
|
158
|
+
* @param region region to simplify in place
|
|
159
|
+
* @returns reference to the updated input region
|
|
160
|
+
* @see [[simplifyRegionType]]
|
|
161
|
+
*/
|
|
162
|
+
static simplifyRegion(region: AnyRegion): AnyRegion | undefined;
|
|
139
163
|
/**
|
|
140
164
|
* Return areas defined by a boolean operation.
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* @param
|
|
165
|
+
* @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
|
|
166
|
+
* @note A common use case of this method is to convert a region with overlapping children into one with
|
|
167
|
+
* non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
|
|
168
|
+
* @param loopsA first set of loops (treated as a union)
|
|
169
|
+
* @param loopsB second set of loops (treated as a union)
|
|
145
170
|
* @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
|
|
146
171
|
* @param mergeTolerance absolute distance tolerance for merging loops
|
|
147
|
-
* @returns a region resulting from merging input loops and the boolean operation.
|
|
148
|
-
* to connect interior loops to exterior loops.
|
|
172
|
+
* @returns a region resulting from merging input loops and the boolean operation.
|
|
149
173
|
*/
|
|
150
174
|
static regionBooleanXY(loopsA: AnyRegion | AnyRegion[] | undefined, loopsB: AnyRegion | AnyRegion[] | undefined, operation: RegionBinaryOpType, mergeTolerance?: number): AnyRegion | undefined;
|
|
151
175
|
/**
|
|
@@ -299,31 +323,40 @@ export declare class RegionOps {
|
|
|
299
323
|
*/
|
|
300
324
|
static consolidateAdjacentPrimitives(curves: CurveCollection, options?: ConsolidateAdjacentCurvePrimitivesOptions): void;
|
|
301
325
|
/**
|
|
302
|
-
* Reverse and reorder loops in the xy-plane for
|
|
303
|
-
* @param loops multiple loops in any order and orientation, z-coordinates ignored
|
|
326
|
+
* Reverse and reorder loops in the xy-plane for consistent orientation and containment.
|
|
327
|
+
* @param loops multiple loops in any order and orientation, z-coordinates ignored.
|
|
328
|
+
* * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
|
|
304
329
|
* @returns a region that captures the input pointers. This region is a:
|
|
305
|
-
* *
|
|
306
|
-
* *
|
|
330
|
+
* * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
|
|
331
|
+
* * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
|
|
307
332
|
* Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
|
|
308
333
|
* clockwise.
|
|
309
|
-
* *
|
|
334
|
+
* * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
|
|
310
335
|
* the above cases.
|
|
311
336
|
* @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
|
|
312
337
|
*/
|
|
313
338
|
static sortOuterAndHoleLoopsXY(loops: Array<Loop | IndexedXYZCollection>): AnyRegion;
|
|
339
|
+
/**
|
|
340
|
+
* Collect inputs that are nominally closed: regions, and physically closed curves.
|
|
341
|
+
* * Physically closed input curves are each returned wrapped in a Loop to facilitate xy-algorithms,
|
|
342
|
+
* but outside this limited context, these Loops only makes sense if they are planar.
|
|
343
|
+
*/
|
|
344
|
+
private static collectRegionsAndClosedPrimitives;
|
|
314
345
|
/**
|
|
315
346
|
* Find all xy-areas bounded by the unstructured, possibly intersecting curves.
|
|
316
347
|
* * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
|
|
317
|
-
* *
|
|
318
|
-
*
|
|
319
|
-
* *
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
* @param curvesAndRegions Any collection of curves. Each
|
|
324
|
-
*
|
|
325
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
326
|
-
* @
|
|
348
|
+
* * "Holes" implied/bounded by inputs are _not_ preserved/discovered in output; in particular [[ParityRegion]]
|
|
349
|
+
* hole loops are treated like any other positive area loops.
|
|
350
|
+
* * A common use case of this method is to assemble the bounding negative-area "exterior" loop for each connected
|
|
351
|
+
* component of input curves. Passing `addBridges = true` decreases the number of connected components for nested
|
|
352
|
+
* input [[Loop]]s, and thus increases the likelihood of returning exactly one exterior loop. (This is why the
|
|
353
|
+
* default value for `addBridges` is `true`.)
|
|
354
|
+
* @param curvesAndRegions Any collection of curves. Each [[AnyRegion]] contributes its children _stripped of
|
|
355
|
+
* parity context_.
|
|
356
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
357
|
+
* @param addBridges whether to add line segments to connect nested input [[Loop]]s (default is `true`). When `false`,
|
|
358
|
+
* no line segments are added to the input curves, but the number of output components may be greater than expected.
|
|
359
|
+
* @returns array of [[SignedLoops]], each entry of which describes the areas bounded by a single connected component:
|
|
327
360
|
* * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
|
|
328
361
|
* positive area and counterclockwise orientation.
|
|
329
362
|
* * `negativeAreaLoops` contains (probably just one) "exterior" loop which is ordered clockwise.
|
|
@@ -331,7 +364,7 @@ export declare class RegionOps {
|
|
|
331
364
|
* * `edges` contains a [[LoopCurveLoopCurve]] object for each component edge, collecting both loops adjacent
|
|
332
365
|
* to the edge and a constituent curve in each.
|
|
333
366
|
*/
|
|
334
|
-
static constructAllXYRegionLoops(curvesAndRegions: AnyCurve | AnyCurve[], tolerance?: number): SignedLoops[];
|
|
367
|
+
static constructAllXYRegionLoops(curvesAndRegions: AnyCurve | AnyCurve[], tolerance?: number, addBridges?: boolean): SignedLoops[];
|
|
335
368
|
/**
|
|
336
369
|
* Collect all `CurvePrimitives` in loosely typed input.
|
|
337
370
|
* * Always recurses into primitives within explicit collections (Path, Loop, ParityRegion, UnionRegion).
|
|
@@ -374,12 +407,10 @@ export declare class RegionOps {
|
|
|
374
407
|
private static triangulateRegionComponent;
|
|
375
408
|
/**
|
|
376
409
|
* Facet the region according to stroke options.
|
|
410
|
+
* @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
|
|
411
|
+
* @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
|
|
377
412
|
* @param region a closed xy-planar region, possibly with holes.
|
|
378
413
|
* * The z-coordinates of the region are ignored. Caller is responsible for rotating the region into plane local coordinates beforehand, and reversing the rotation afterwards.
|
|
379
|
-
* * For best results, `UnionRegion` input should consist of non-overlapping children.
|
|
380
|
-
* Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
|
|
381
|
-
* * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
|
|
382
|
-
* Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
|
|
383
414
|
* @param options primarily how to stroke the region boundary, but also how to facet the region interior.
|
|
384
415
|
* * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
|
|
385
416
|
* @returns facets for the region, or undefined if facetting failed
|
|
@@ -394,17 +425,21 @@ export declare class RegionOps {
|
|
|
394
425
|
static convexDecomposePolygonXY(polygon: MultiLineStringDataVariant, maximize?: boolean): GrowableXYZArray[] | undefined;
|
|
395
426
|
}
|
|
396
427
|
/**
|
|
397
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives
|
|
428
|
+
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
|
|
398
429
|
* @public
|
|
399
430
|
*/
|
|
400
431
|
export declare class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
401
|
-
/** True to consolidate adjacent linear geometry into a single LineString3d */
|
|
432
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d. */
|
|
402
433
|
consolidateLinearGeometry: boolean;
|
|
403
|
-
/** True to consolidate contiguous compatible arcs into a single Arc3d */
|
|
434
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d. */
|
|
404
435
|
consolidateCompatibleArcs: boolean;
|
|
405
|
-
/**
|
|
436
|
+
/** True to consolidate the first and last primitives of a [[Loop]], allowing the start/end point to change. */
|
|
437
|
+
consolidateLoopSeam?: boolean;
|
|
438
|
+
/** Disable LineSegment3d and LineString3d point compression. */
|
|
439
|
+
disableLinearCompression?: boolean;
|
|
440
|
+
/** Tolerance for detecting identical points. */
|
|
406
441
|
duplicatePointTolerance: number;
|
|
407
|
-
/** Tolerance for removing interior colinear points. */
|
|
442
|
+
/** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
|
|
408
443
|
colinearPointTolerance: number;
|
|
409
444
|
}
|
|
410
445
|
//# sourceMappingURL=RegionOps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionOps.d.ts","sourceRoot":"","sources":["../../../src/curve/RegionOps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RegionOps.d.ts","sourceRoot":"","sources":["../../../src/curve/RegionOps.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAC0B,oBAAoB,EAAyB,0BAA0B,EACvG,MAAM,oCAAoC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IACzD,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAClD,gDAAgD;IACzC,uBAAuB,EAAE,MAAM,CAAgC;IACtE,wFAAwF;IACjF,sBAAsB,EAAE,MAAM,CAAgC;CACtE"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Curve
|
|
7
7
|
*/
|
|
8
|
+
import { assert } from "@itwin/core-bentley";
|
|
8
9
|
import { Geometry } from "../Geometry";
|
|
9
10
|
import { FrameBuilder } from "../geometry3d/FrameBuilder";
|
|
10
11
|
import { GrowableXYZArray } from "../geometry3d/GrowableXYZArray";
|
|
@@ -31,6 +32,8 @@ import { CurveWireMomentsXYZ } from "./CurveWireMomentsXYZ";
|
|
|
31
32
|
import { GeometryQuery } from "./GeometryQuery";
|
|
32
33
|
import { ChainCollectorContext } from "./internalContexts/ChainCollectorContext";
|
|
33
34
|
import { PolygonWireOffsetContext } from "./internalContexts/PolygonOffsetContext";
|
|
35
|
+
import { TransferWithSplitArcs } from "./internalContexts/TransferWithSplitArcs";
|
|
36
|
+
import { LineSegment3d } from "./LineSegment3d";
|
|
34
37
|
import { LineString3d } from "./LineString3d";
|
|
35
38
|
import { Loop } from "./Loop";
|
|
36
39
|
import { OffsetOptions } from "./OffsetOptions";
|
|
@@ -57,13 +60,14 @@ export var RegionBinaryOpType;
|
|
|
57
60
|
})(RegionBinaryOpType || (RegionBinaryOpType = {}));
|
|
58
61
|
/**
|
|
59
62
|
* Class `RegionOps` has static members for calculations on regions (areas).
|
|
60
|
-
* * Regions are represented by these
|
|
61
|
-
* *
|
|
62
|
-
* *
|
|
63
|
-
* The common "One outer loop and many
|
|
64
|
-
* *
|
|
65
|
-
* *
|
|
66
|
-
* been rotated parallel to the xy-plane.
|
|
63
|
+
* * Regions are represented by these [[CurveCollection]] subclasses:
|
|
64
|
+
* * [[Loop]] -- a single loop
|
|
65
|
+
* * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
|
|
66
|
+
* The common "One outer loop and many inner loops" is a parity region.
|
|
67
|
+
* * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
|
|
68
|
+
* * Most of the methods in this class:
|
|
69
|
+
* * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
|
|
70
|
+
* * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
|
|
67
71
|
* @public
|
|
68
72
|
*/
|
|
69
73
|
export class RegionOps {
|
|
@@ -98,7 +102,8 @@ export class RegionOps {
|
|
|
98
102
|
/**
|
|
99
103
|
* Return a (signed) xy area for a region.
|
|
100
104
|
* * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
101
|
-
* *
|
|
105
|
+
* * For a non-self-intersecting Loop, the returned area is negative if and only if the Loop is oriented clockwise
|
|
106
|
+
* with respect to the positive z-axis.
|
|
102
107
|
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
103
108
|
*/
|
|
104
109
|
static computeXYArea(region) {
|
|
@@ -278,26 +283,79 @@ export class RegionOps {
|
|
|
278
283
|
const graph = RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
|
|
279
284
|
return this.finishGraphToPolyface(graph, triangulate);
|
|
280
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Return the region's simplest representation by stripping redundant parent(s).
|
|
288
|
+
* * No Boolean operations are performed.
|
|
289
|
+
* @param region input region (unchanged). Assumed to have at least one child.
|
|
290
|
+
* @returns
|
|
291
|
+
* * For a [[UnionRegion]] with exactly one child, return the child if it is a [[Loop]],
|
|
292
|
+
* or if it is a [[ParityRegion]] with multiple children; otherwise return the `ParityRegion`'s `Loop`.
|
|
293
|
+
* * For a `ParityRegion` with exactly one child, return the `Loop`.
|
|
294
|
+
* * All other inputs returned unchanged.
|
|
295
|
+
* @see [[simplifyRegion]]
|
|
296
|
+
*/
|
|
297
|
+
static simplifyRegionType(region) {
|
|
298
|
+
if (region instanceof UnionRegion) {
|
|
299
|
+
if (region.children.length === 1)
|
|
300
|
+
return this.simplifyRegionType(region.children[0]);
|
|
301
|
+
}
|
|
302
|
+
else if (region instanceof ParityRegion) {
|
|
303
|
+
if (region.children.length === 1)
|
|
304
|
+
return region.children[0];
|
|
305
|
+
}
|
|
306
|
+
return region;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Simplify the region's parent/child hierarchy in place:
|
|
310
|
+
* * Regions with exactly one child are simplified as per [[simplifyRegionType]].
|
|
311
|
+
* * Regions without children are removed.
|
|
312
|
+
* * No Boolean operations are performed.
|
|
313
|
+
* @param region region to simplify in place
|
|
314
|
+
* @returns reference to the updated input region
|
|
315
|
+
* @see [[simplifyRegionType]]
|
|
316
|
+
*/
|
|
317
|
+
static simplifyRegion(region) {
|
|
318
|
+
if (region instanceof Loop)
|
|
319
|
+
return region.children.length > 0 ? region : undefined;
|
|
320
|
+
// remove childless Parity/UnionRegion
|
|
321
|
+
for (let i = 0; i < region.children.length; ++i) {
|
|
322
|
+
const child = region.children[i];
|
|
323
|
+
const newChild = this.simplifyRegion(child);
|
|
324
|
+
if (!newChild) {
|
|
325
|
+
region.children.splice(i--, 1);
|
|
326
|
+
}
|
|
327
|
+
else if (newChild !== child) {
|
|
328
|
+
assert(!(newChild instanceof UnionRegion));
|
|
329
|
+
region.children.splice(i--, 1, newChild);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if (region.children.length === 0)
|
|
333
|
+
return undefined;
|
|
334
|
+
// remove redundant Parity/UnionRegion parent
|
|
335
|
+
if (region.children.length === 1)
|
|
336
|
+
return region.children.splice(0, 1)[0];
|
|
337
|
+
return region;
|
|
338
|
+
}
|
|
281
339
|
/**
|
|
282
340
|
* Return areas defined by a boolean operation.
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* @param
|
|
341
|
+
* @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
|
|
342
|
+
* @note A common use case of this method is to convert a region with overlapping children into one with
|
|
343
|
+
* non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
|
|
344
|
+
* @param loopsA first set of loops (treated as a union)
|
|
345
|
+
* @param loopsB second set of loops (treated as a union)
|
|
287
346
|
* @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
|
|
288
347
|
* @param mergeTolerance absolute distance tolerance for merging loops
|
|
289
|
-
* @returns a region resulting from merging input loops and the boolean operation.
|
|
290
|
-
* to connect interior loops to exterior loops.
|
|
348
|
+
* @returns a region resulting from merging input loops and the boolean operation.
|
|
291
349
|
*/
|
|
292
350
|
static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = Geometry.smallMetricDistance) {
|
|
293
|
-
// Always return UnionRegion for now. But keep return type as AnyRegion:
|
|
294
|
-
// in the future, we might return the *simplest* region type.
|
|
295
351
|
const result = UnionRegion.create();
|
|
296
352
|
const context = RegionBooleanContext.create(RegionGroupOpType.Union, RegionGroupOpType.Union);
|
|
297
353
|
context.addMembers(loopsA, loopsB);
|
|
298
354
|
context.annotateAndMergeCurvesInGraph(mergeTolerance);
|
|
355
|
+
const visitMask = context.graph.grabMask(false);
|
|
299
356
|
const range = context.groupA.range().union(context.groupB.range());
|
|
300
357
|
const areaTol = this.computeXYAreaTolerance(range, mergeTolerance);
|
|
358
|
+
const bridgeMask = HalfEdgeMask.BRIDGE_EDGE;
|
|
301
359
|
context.runClassificationSweep(operation, (_graph, face, faceType, area) => {
|
|
302
360
|
// ignore danglers and null faces, but not 2-edge "banana" faces with nonzero area
|
|
303
361
|
if (face.countEdgesAroundFace() < 2)
|
|
@@ -305,12 +363,13 @@ export class RegionOps {
|
|
|
305
363
|
if (Math.abs(area) < areaTol)
|
|
306
364
|
return;
|
|
307
365
|
if (faceType === 1) {
|
|
308
|
-
const
|
|
309
|
-
if (
|
|
310
|
-
result.tryAddChild(
|
|
366
|
+
const loopOrParityRegion = PlanarSubdivision.createLoopOrParityRegionInFace(face, bridgeMask, visitMask);
|
|
367
|
+
if (loopOrParityRegion)
|
|
368
|
+
result.tryAddChild(loopOrParityRegion);
|
|
311
369
|
}
|
|
312
370
|
});
|
|
313
|
-
|
|
371
|
+
context.graph.dropMask(visitMask);
|
|
372
|
+
return this.simplifyRegion(result);
|
|
314
373
|
}
|
|
315
374
|
/**
|
|
316
375
|
* Return a polyface whose facets are a boolean operation between the input regions.
|
|
@@ -601,14 +660,15 @@ export class RegionOps {
|
|
|
601
660
|
curves.dispatchToGeometryHandler(context);
|
|
602
661
|
}
|
|
603
662
|
/**
|
|
604
|
-
* Reverse and reorder loops in the xy-plane for
|
|
605
|
-
* @param loops multiple loops in any order and orientation, z-coordinates ignored
|
|
663
|
+
* Reverse and reorder loops in the xy-plane for consistent orientation and containment.
|
|
664
|
+
* @param loops multiple loops in any order and orientation, z-coordinates ignored.
|
|
665
|
+
* * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
|
|
606
666
|
* @returns a region that captures the input pointers. This region is a:
|
|
607
|
-
* *
|
|
608
|
-
* *
|
|
667
|
+
* * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
|
|
668
|
+
* * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
|
|
609
669
|
* Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
|
|
610
670
|
* clockwise.
|
|
611
|
-
* *
|
|
671
|
+
* * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
|
|
612
672
|
* the above cases.
|
|
613
673
|
* @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
|
|
614
674
|
*/
|
|
@@ -624,19 +684,45 @@ export class RegionOps {
|
|
|
624
684
|
}
|
|
625
685
|
return SortablePolygon.sortAsAnyRegion(loopAndArea);
|
|
626
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Collect inputs that are nominally closed: regions, and physically closed curves.
|
|
689
|
+
* * Physically closed input curves are each returned wrapped in a Loop to facilitate xy-algorithms,
|
|
690
|
+
* but outside this limited context, these Loops only makes sense if they are planar.
|
|
691
|
+
*/
|
|
692
|
+
static collectRegionsAndClosedPrimitives(curves, tolerance = Geometry.smallMetricDistance) {
|
|
693
|
+
const regions = [];
|
|
694
|
+
if (!Array.isArray(curves))
|
|
695
|
+
curves = [curves];
|
|
696
|
+
for (const curve of curves) {
|
|
697
|
+
if (curve instanceof Loop || curve instanceof ParityRegion || curve instanceof UnionRegion) {
|
|
698
|
+
regions.push(curve);
|
|
699
|
+
}
|
|
700
|
+
else if (curve instanceof Path) {
|
|
701
|
+
if (curve.isPhysicallyClosedCurve(tolerance))
|
|
702
|
+
regions.push(Loop.create(...curve.children));
|
|
703
|
+
}
|
|
704
|
+
else if (curve instanceof CurvePrimitive) {
|
|
705
|
+
if (curve.isPhysicallyClosedCurve(tolerance))
|
|
706
|
+
regions.push(Loop.create(curve));
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return regions;
|
|
710
|
+
}
|
|
627
711
|
/**
|
|
628
712
|
* Find all xy-areas bounded by the unstructured, possibly intersecting curves.
|
|
629
713
|
* * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
|
|
630
|
-
* *
|
|
631
|
-
*
|
|
632
|
-
* *
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
* @param curvesAndRegions Any collection of curves. Each
|
|
637
|
-
*
|
|
638
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
639
|
-
* @
|
|
714
|
+
* * "Holes" implied/bounded by inputs are _not_ preserved/discovered in output; in particular [[ParityRegion]]
|
|
715
|
+
* hole loops are treated like any other positive area loops.
|
|
716
|
+
* * A common use case of this method is to assemble the bounding negative-area "exterior" loop for each connected
|
|
717
|
+
* component of input curves. Passing `addBridges = true` decreases the number of connected components for nested
|
|
718
|
+
* input [[Loop]]s, and thus increases the likelihood of returning exactly one exterior loop. (This is why the
|
|
719
|
+
* default value for `addBridges` is `true`.)
|
|
720
|
+
* @param curvesAndRegions Any collection of curves. Each [[AnyRegion]] contributes its children _stripped of
|
|
721
|
+
* parity context_.
|
|
722
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
723
|
+
* @param addBridges whether to add line segments to connect nested input [[Loop]]s (default is `true`). When `false`,
|
|
724
|
+
* no line segments are added to the input curves, but the number of output components may be greater than expected.
|
|
725
|
+
* @returns array of [[SignedLoops]], each entry of which describes the areas bounded by a single connected component:
|
|
640
726
|
* * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
|
|
641
727
|
* positive area and counterclockwise orientation.
|
|
642
728
|
* * `negativeAreaLoops` contains (probably just one) "exterior" loop which is ordered clockwise.
|
|
@@ -644,10 +730,22 @@ export class RegionOps {
|
|
|
644
730
|
* * `edges` contains a [[LoopCurveLoopCurve]] object for each component edge, collecting both loops adjacent
|
|
645
731
|
* to the edge and a constituent curve in each.
|
|
646
732
|
*/
|
|
647
|
-
static constructAllXYRegionLoops(curvesAndRegions, tolerance = Geometry.smallMetricDistance) {
|
|
648
|
-
|
|
733
|
+
static constructAllXYRegionLoops(curvesAndRegions, tolerance = Geometry.smallMetricDistance, addBridges = true) {
|
|
734
|
+
let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
|
|
735
|
+
primitives = TransferWithSplitArcs.clone(BagOfCurves.create(...primitives)).children;
|
|
649
736
|
const range = this.curveArrayRange(primitives);
|
|
650
737
|
const areaTol = this.computeXYAreaTolerance(range, tolerance);
|
|
738
|
+
if (addBridges) { // generate a temp graph to extract its bridge edges
|
|
739
|
+
const context = RegionBooleanContext.create(RegionGroupOpType.Union, RegionGroupOpType.Union);
|
|
740
|
+
const regions = this.collectRegionsAndClosedPrimitives(curvesAndRegions, tolerance);
|
|
741
|
+
context.addMembers(regions, undefined);
|
|
742
|
+
context.annotateAndMergeCurvesInGraph(tolerance);
|
|
743
|
+
context.graph.announceEdges((_graph, edge) => {
|
|
744
|
+
if (edge.isMaskSet(HalfEdgeMask.BRIDGE_EDGE))
|
|
745
|
+
primitives.push(LineSegment3d.create(edge.getPoint3d(), edge.faceSuccessor.getPoint3d()));
|
|
746
|
+
return true;
|
|
747
|
+
});
|
|
748
|
+
}
|
|
651
749
|
const intersections = CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
|
|
652
750
|
const graph = PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
|
|
653
751
|
return PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
|
|
@@ -798,12 +896,10 @@ export class RegionOps {
|
|
|
798
896
|
}
|
|
799
897
|
/**
|
|
800
898
|
* Facet the region according to stroke options.
|
|
899
|
+
* @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
|
|
900
|
+
* @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
|
|
801
901
|
* @param region a closed xy-planar region, possibly with holes.
|
|
802
902
|
* * The z-coordinates of the region are ignored. Caller is responsible for rotating the region into plane local coordinates beforehand, and reversing the rotation afterwards.
|
|
803
|
-
* * For best results, `UnionRegion` input should consist of non-overlapping children.
|
|
804
|
-
* Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
|
|
805
|
-
* * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
|
|
806
|
-
* Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
|
|
807
903
|
* @param options primarily how to stroke the region boundary, but also how to facet the region interior.
|
|
808
904
|
* * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
|
|
809
905
|
* @returns facets for the region, or undefined if facetting failed
|
|
@@ -866,17 +962,21 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
|
|
|
866
962
|
array0.push(curve);
|
|
867
963
|
}
|
|
868
964
|
/**
|
|
869
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives
|
|
965
|
+
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
|
|
870
966
|
* @public
|
|
871
967
|
*/
|
|
872
968
|
export class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
873
|
-
/** True to consolidate adjacent linear geometry into a single LineString3d */
|
|
969
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d. */
|
|
874
970
|
consolidateLinearGeometry = true;
|
|
875
|
-
/** True to consolidate contiguous compatible arcs into a single Arc3d */
|
|
971
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d. */
|
|
876
972
|
consolidateCompatibleArcs = true;
|
|
877
|
-
/**
|
|
973
|
+
/** True to consolidate the first and last primitives of a [[Loop]], allowing the start/end point to change. */
|
|
974
|
+
consolidateLoopSeam = false;
|
|
975
|
+
/** Disable LineSegment3d and LineString3d point compression. */
|
|
976
|
+
disableLinearCompression = false;
|
|
977
|
+
/** Tolerance for detecting identical points. */
|
|
878
978
|
duplicatePointTolerance = Geometry.smallMetricDistance;
|
|
879
|
-
/** Tolerance for removing interior colinear points. */
|
|
979
|
+
/** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
|
|
880
980
|
colinearPointTolerance = Geometry.smallMetricDistance;
|
|
881
981
|
}
|
|
882
982
|
//# sourceMappingURL=RegionOps.js.map
|