@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"}
|
|
@@ -8,6 +8,7 @@ exports.ConsolidateAdjacentCurvePrimitivesOptions = exports.RegionOps = exports.
|
|
|
8
8
|
/** @packageDocumentation
|
|
9
9
|
* @module Curve
|
|
10
10
|
*/
|
|
11
|
+
const core_bentley_1 = require("@itwin/core-bentley");
|
|
11
12
|
const Geometry_1 = require("../Geometry");
|
|
12
13
|
const FrameBuilder_1 = require("../geometry3d/FrameBuilder");
|
|
13
14
|
const GrowableXYZArray_1 = require("../geometry3d/GrowableXYZArray");
|
|
@@ -34,6 +35,8 @@ const CurveWireMomentsXYZ_1 = require("./CurveWireMomentsXYZ");
|
|
|
34
35
|
const GeometryQuery_1 = require("./GeometryQuery");
|
|
35
36
|
const ChainCollectorContext_1 = require("./internalContexts/ChainCollectorContext");
|
|
36
37
|
const PolygonOffsetContext_1 = require("./internalContexts/PolygonOffsetContext");
|
|
38
|
+
const TransferWithSplitArcs_1 = require("./internalContexts/TransferWithSplitArcs");
|
|
39
|
+
const LineSegment3d_1 = require("./LineSegment3d");
|
|
37
40
|
const LineString3d_1 = require("./LineString3d");
|
|
38
41
|
const Loop_1 = require("./Loop");
|
|
39
42
|
const OffsetOptions_1 = require("./OffsetOptions");
|
|
@@ -60,13 +63,14 @@ var RegionBinaryOpType;
|
|
|
60
63
|
})(RegionBinaryOpType || (exports.RegionBinaryOpType = RegionBinaryOpType = {}));
|
|
61
64
|
/**
|
|
62
65
|
* Class `RegionOps` has static members for calculations on regions (areas).
|
|
63
|
-
* * Regions are represented by these
|
|
64
|
-
* *
|
|
65
|
-
* *
|
|
66
|
-
* The common "One outer loop and many
|
|
67
|
-
* *
|
|
68
|
-
* *
|
|
69
|
-
* been rotated parallel to the xy-plane.
|
|
66
|
+
* * Regions are represented by these [[CurveCollection]] subclasses:
|
|
67
|
+
* * [[Loop]] -- a single loop
|
|
68
|
+
* * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
|
|
69
|
+
* The common "One outer loop and many inner loops" is a parity region.
|
|
70
|
+
* * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
|
|
71
|
+
* * Most of the methods in this class:
|
|
72
|
+
* * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
|
|
73
|
+
* * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
|
|
70
74
|
* @public
|
|
71
75
|
*/
|
|
72
76
|
class RegionOps {
|
|
@@ -101,7 +105,8 @@ class RegionOps {
|
|
|
101
105
|
/**
|
|
102
106
|
* Return a (signed) xy area for a region.
|
|
103
107
|
* * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
|
|
104
|
-
* *
|
|
108
|
+
* * For a non-self-intersecting Loop, the returned area is negative if and only if the Loop is oriented clockwise
|
|
109
|
+
* with respect to the positive z-axis.
|
|
105
110
|
* @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
|
|
106
111
|
*/
|
|
107
112
|
static computeXYArea(region) {
|
|
@@ -281,26 +286,79 @@ class RegionOps {
|
|
|
281
286
|
const graph = RegionOpsClassificationSweeps_1.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
|
|
282
287
|
return this.finishGraphToPolyface(graph, triangulate);
|
|
283
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* Return the region's simplest representation by stripping redundant parent(s).
|
|
291
|
+
* * No Boolean operations are performed.
|
|
292
|
+
* @param region input region (unchanged). Assumed to have at least one child.
|
|
293
|
+
* @returns
|
|
294
|
+
* * For a [[UnionRegion]] with exactly one child, return the child if it is a [[Loop]],
|
|
295
|
+
* or if it is a [[ParityRegion]] with multiple children; otherwise return the `ParityRegion`'s `Loop`.
|
|
296
|
+
* * For a `ParityRegion` with exactly one child, return the `Loop`.
|
|
297
|
+
* * All other inputs returned unchanged.
|
|
298
|
+
* @see [[simplifyRegion]]
|
|
299
|
+
*/
|
|
300
|
+
static simplifyRegionType(region) {
|
|
301
|
+
if (region instanceof UnionRegion_1.UnionRegion) {
|
|
302
|
+
if (region.children.length === 1)
|
|
303
|
+
return this.simplifyRegionType(region.children[0]);
|
|
304
|
+
}
|
|
305
|
+
else if (region instanceof ParityRegion_1.ParityRegion) {
|
|
306
|
+
if (region.children.length === 1)
|
|
307
|
+
return region.children[0];
|
|
308
|
+
}
|
|
309
|
+
return region;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Simplify the region's parent/child hierarchy in place:
|
|
313
|
+
* * Regions with exactly one child are simplified as per [[simplifyRegionType]].
|
|
314
|
+
* * Regions without children are removed.
|
|
315
|
+
* * No Boolean operations are performed.
|
|
316
|
+
* @param region region to simplify in place
|
|
317
|
+
* @returns reference to the updated input region
|
|
318
|
+
* @see [[simplifyRegionType]]
|
|
319
|
+
*/
|
|
320
|
+
static simplifyRegion(region) {
|
|
321
|
+
if (region instanceof Loop_1.Loop)
|
|
322
|
+
return region.children.length > 0 ? region : undefined;
|
|
323
|
+
// remove childless Parity/UnionRegion
|
|
324
|
+
for (let i = 0; i < region.children.length; ++i) {
|
|
325
|
+
const child = region.children[i];
|
|
326
|
+
const newChild = this.simplifyRegion(child);
|
|
327
|
+
if (!newChild) {
|
|
328
|
+
region.children.splice(i--, 1);
|
|
329
|
+
}
|
|
330
|
+
else if (newChild !== child) {
|
|
331
|
+
(0, core_bentley_1.assert)(!(newChild instanceof UnionRegion_1.UnionRegion));
|
|
332
|
+
region.children.splice(i--, 1, newChild);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (region.children.length === 0)
|
|
336
|
+
return undefined;
|
|
337
|
+
// remove redundant Parity/UnionRegion parent
|
|
338
|
+
if (region.children.length === 1)
|
|
339
|
+
return region.children.splice(0, 1)[0];
|
|
340
|
+
return region;
|
|
341
|
+
}
|
|
284
342
|
/**
|
|
285
343
|
* Return areas defined by a boolean operation.
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* @param
|
|
344
|
+
* @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
|
|
345
|
+
* @note A common use case of this method is to convert a region with overlapping children into one with
|
|
346
|
+
* non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
|
|
347
|
+
* @param loopsA first set of loops (treated as a union)
|
|
348
|
+
* @param loopsB second set of loops (treated as a union)
|
|
290
349
|
* @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
|
|
291
350
|
* @param mergeTolerance absolute distance tolerance for merging loops
|
|
292
|
-
* @returns a region resulting from merging input loops and the boolean operation.
|
|
293
|
-
* to connect interior loops to exterior loops.
|
|
351
|
+
* @returns a region resulting from merging input loops and the boolean operation.
|
|
294
352
|
*/
|
|
295
353
|
static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
296
|
-
// Always return UnionRegion for now. But keep return type as AnyRegion:
|
|
297
|
-
// in the future, we might return the *simplest* region type.
|
|
298
354
|
const result = UnionRegion_1.UnionRegion.create();
|
|
299
355
|
const context = RegionOpsClassificationSweeps_1.RegionBooleanContext.create(RegionOpsClassificationSweeps_1.RegionGroupOpType.Union, RegionOpsClassificationSweeps_1.RegionGroupOpType.Union);
|
|
300
356
|
context.addMembers(loopsA, loopsB);
|
|
301
357
|
context.annotateAndMergeCurvesInGraph(mergeTolerance);
|
|
358
|
+
const visitMask = context.graph.grabMask(false);
|
|
302
359
|
const range = context.groupA.range().union(context.groupB.range());
|
|
303
360
|
const areaTol = this.computeXYAreaTolerance(range, mergeTolerance);
|
|
361
|
+
const bridgeMask = Graph_1.HalfEdgeMask.BRIDGE_EDGE;
|
|
304
362
|
context.runClassificationSweep(operation, (_graph, face, faceType, area) => {
|
|
305
363
|
// ignore danglers and null faces, but not 2-edge "banana" faces with nonzero area
|
|
306
364
|
if (face.countEdgesAroundFace() < 2)
|
|
@@ -308,12 +366,13 @@ class RegionOps {
|
|
|
308
366
|
if (Math.abs(area) < areaTol)
|
|
309
367
|
return;
|
|
310
368
|
if (faceType === 1) {
|
|
311
|
-
const
|
|
312
|
-
if (
|
|
313
|
-
result.tryAddChild(
|
|
369
|
+
const loopOrParityRegion = PlanarSubdivision_1.PlanarSubdivision.createLoopOrParityRegionInFace(face, bridgeMask, visitMask);
|
|
370
|
+
if (loopOrParityRegion)
|
|
371
|
+
result.tryAddChild(loopOrParityRegion);
|
|
314
372
|
}
|
|
315
373
|
});
|
|
316
|
-
|
|
374
|
+
context.graph.dropMask(visitMask);
|
|
375
|
+
return this.simplifyRegion(result);
|
|
317
376
|
}
|
|
318
377
|
/**
|
|
319
378
|
* Return a polyface whose facets are a boolean operation between the input regions.
|
|
@@ -604,14 +663,15 @@ class RegionOps {
|
|
|
604
663
|
curves.dispatchToGeometryHandler(context);
|
|
605
664
|
}
|
|
606
665
|
/**
|
|
607
|
-
* Reverse and reorder loops in the xy-plane for
|
|
608
|
-
* @param loops multiple loops in any order and orientation, z-coordinates ignored
|
|
666
|
+
* Reverse and reorder loops in the xy-plane for consistent orientation and containment.
|
|
667
|
+
* @param loops multiple loops in any order and orientation, z-coordinates ignored.
|
|
668
|
+
* * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
|
|
609
669
|
* @returns a region that captures the input pointers. This region is a:
|
|
610
|
-
* *
|
|
611
|
-
* *
|
|
670
|
+
* * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
|
|
671
|
+
* * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
|
|
612
672
|
* Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
|
|
613
673
|
* clockwise.
|
|
614
|
-
* *
|
|
674
|
+
* * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
|
|
615
675
|
* the above cases.
|
|
616
676
|
* @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
|
|
617
677
|
*/
|
|
@@ -627,19 +687,45 @@ class RegionOps {
|
|
|
627
687
|
}
|
|
628
688
|
return SortablePolygon_1.SortablePolygon.sortAsAnyRegion(loopAndArea);
|
|
629
689
|
}
|
|
690
|
+
/**
|
|
691
|
+
* Collect inputs that are nominally closed: regions, and physically closed curves.
|
|
692
|
+
* * Physically closed input curves are each returned wrapped in a Loop to facilitate xy-algorithms,
|
|
693
|
+
* but outside this limited context, these Loops only makes sense if they are planar.
|
|
694
|
+
*/
|
|
695
|
+
static collectRegionsAndClosedPrimitives(curves, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
696
|
+
const regions = [];
|
|
697
|
+
if (!Array.isArray(curves))
|
|
698
|
+
curves = [curves];
|
|
699
|
+
for (const curve of curves) {
|
|
700
|
+
if (curve instanceof Loop_1.Loop || curve instanceof ParityRegion_1.ParityRegion || curve instanceof UnionRegion_1.UnionRegion) {
|
|
701
|
+
regions.push(curve);
|
|
702
|
+
}
|
|
703
|
+
else if (curve instanceof Path_1.Path) {
|
|
704
|
+
if (curve.isPhysicallyClosedCurve(tolerance))
|
|
705
|
+
regions.push(Loop_1.Loop.create(...curve.children));
|
|
706
|
+
}
|
|
707
|
+
else if (curve instanceof CurvePrimitive_1.CurvePrimitive) {
|
|
708
|
+
if (curve.isPhysicallyClosedCurve(tolerance))
|
|
709
|
+
regions.push(Loop_1.Loop.create(curve));
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return regions;
|
|
713
|
+
}
|
|
630
714
|
/**
|
|
631
715
|
* Find all xy-areas bounded by the unstructured, possibly intersecting curves.
|
|
632
716
|
* * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
|
|
633
|
-
* *
|
|
634
|
-
*
|
|
635
|
-
* *
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
* @param curvesAndRegions Any collection of curves. Each
|
|
640
|
-
*
|
|
641
|
-
* @param tolerance optional distance tolerance for coincidence
|
|
642
|
-
* @
|
|
717
|
+
* * "Holes" implied/bounded by inputs are _not_ preserved/discovered in output; in particular [[ParityRegion]]
|
|
718
|
+
* hole loops are treated like any other positive area loops.
|
|
719
|
+
* * A common use case of this method is to assemble the bounding negative-area "exterior" loop for each connected
|
|
720
|
+
* component of input curves. Passing `addBridges = true` decreases the number of connected components for nested
|
|
721
|
+
* input [[Loop]]s, and thus increases the likelihood of returning exactly one exterior loop. (This is why the
|
|
722
|
+
* default value for `addBridges` is `true`.)
|
|
723
|
+
* @param curvesAndRegions Any collection of curves. Each [[AnyRegion]] contributes its children _stripped of
|
|
724
|
+
* parity context_.
|
|
725
|
+
* @param tolerance optional distance tolerance for coincidence.
|
|
726
|
+
* @param addBridges whether to add line segments to connect nested input [[Loop]]s (default is `true`). When `false`,
|
|
727
|
+
* no line segments are added to the input curves, but the number of output components may be greater than expected.
|
|
728
|
+
* @returns array of [[SignedLoops]], each entry of which describes the areas bounded by a single connected component:
|
|
643
729
|
* * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
|
|
644
730
|
* positive area and counterclockwise orientation.
|
|
645
731
|
* * `negativeAreaLoops` contains (probably just one) "exterior" loop which is ordered clockwise.
|
|
@@ -647,10 +733,22 @@ class RegionOps {
|
|
|
647
733
|
* * `edges` contains a [[LoopCurveLoopCurve]] object for each component edge, collecting both loops adjacent
|
|
648
734
|
* to the edge and a constituent curve in each.
|
|
649
735
|
*/
|
|
650
|
-
static constructAllXYRegionLoops(curvesAndRegions, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
651
|
-
|
|
736
|
+
static constructAllXYRegionLoops(curvesAndRegions, tolerance = Geometry_1.Geometry.smallMetricDistance, addBridges = true) {
|
|
737
|
+
let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
|
|
738
|
+
primitives = TransferWithSplitArcs_1.TransferWithSplitArcs.clone(CurveCollection_1.BagOfCurves.create(...primitives)).children;
|
|
652
739
|
const range = this.curveArrayRange(primitives);
|
|
653
740
|
const areaTol = this.computeXYAreaTolerance(range, tolerance);
|
|
741
|
+
if (addBridges) { // generate a temp graph to extract its bridge edges
|
|
742
|
+
const context = RegionOpsClassificationSweeps_1.RegionBooleanContext.create(RegionOpsClassificationSweeps_1.RegionGroupOpType.Union, RegionOpsClassificationSweeps_1.RegionGroupOpType.Union);
|
|
743
|
+
const regions = this.collectRegionsAndClosedPrimitives(curvesAndRegions, tolerance);
|
|
744
|
+
context.addMembers(regions, undefined);
|
|
745
|
+
context.annotateAndMergeCurvesInGraph(tolerance);
|
|
746
|
+
context.graph.announceEdges((_graph, edge) => {
|
|
747
|
+
if (edge.isMaskSet(Graph_1.HalfEdgeMask.BRIDGE_EDGE))
|
|
748
|
+
primitives.push(LineSegment3d_1.LineSegment3d.create(edge.getPoint3d(), edge.faceSuccessor.getPoint3d()));
|
|
749
|
+
return true;
|
|
750
|
+
});
|
|
751
|
+
}
|
|
654
752
|
const intersections = CurveCurve_1.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
|
|
655
753
|
const graph = PlanarSubdivision_1.PlanarSubdivision.assembleHalfEdgeGraph(primitives, intersections, tolerance);
|
|
656
754
|
return PlanarSubdivision_1.PlanarSubdivision.collectSignedLoopSetsInHalfEdgeGraph(graph, areaTol);
|
|
@@ -801,12 +899,10 @@ class RegionOps {
|
|
|
801
899
|
}
|
|
802
900
|
/**
|
|
803
901
|
* Facet the region according to stroke options.
|
|
902
|
+
* @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
|
|
903
|
+
* @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
|
|
804
904
|
* @param region a closed xy-planar region, possibly with holes.
|
|
805
905
|
* * 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.
|
|
806
|
-
* * For best results, `UnionRegion` input should consist of non-overlapping children.
|
|
807
|
-
* Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
|
|
808
|
-
* * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
|
|
809
|
-
* Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
|
|
810
906
|
* @param options primarily how to stroke the region boundary, but also how to facet the region interior.
|
|
811
907
|
* * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
|
|
812
908
|
* @returns facets for the region, or undefined if facetting failed
|
|
@@ -870,17 +966,21 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
|
|
|
870
966
|
array0.push(curve);
|
|
871
967
|
}
|
|
872
968
|
/**
|
|
873
|
-
* * Options to control method `RegionOps.consolidateAdjacentPrimitives
|
|
969
|
+
* * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
|
|
874
970
|
* @public
|
|
875
971
|
*/
|
|
876
972
|
class ConsolidateAdjacentCurvePrimitivesOptions {
|
|
877
|
-
/** True to consolidate adjacent linear geometry into a single LineString3d */
|
|
973
|
+
/** True to consolidate adjacent linear geometry into a single LineString3d. */
|
|
878
974
|
consolidateLinearGeometry = true;
|
|
879
|
-
/** True to consolidate contiguous compatible arcs into a single Arc3d */
|
|
975
|
+
/** True to consolidate contiguous compatible arcs into a single Arc3d. */
|
|
880
976
|
consolidateCompatibleArcs = true;
|
|
881
|
-
/**
|
|
977
|
+
/** True to consolidate the first and last primitives of a [[Loop]], allowing the start/end point to change. */
|
|
978
|
+
consolidateLoopSeam = false;
|
|
979
|
+
/** Disable LineSegment3d and LineString3d point compression. */
|
|
980
|
+
disableLinearCompression = false;
|
|
981
|
+
/** Tolerance for detecting identical points. */
|
|
882
982
|
duplicatePointTolerance = Geometry_1.Geometry.smallMetricDistance;
|
|
883
|
-
/** Tolerance for removing interior colinear points. */
|
|
983
|
+
/** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
|
|
884
984
|
colinearPointTolerance = Geometry_1.Geometry.smallMetricDistance;
|
|
885
985
|
}
|
|
886
986
|
exports.ConsolidateAdjacentCurvePrimitivesOptions = ConsolidateAdjacentCurvePrimitivesOptions;
|