@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
|
@@ -2,60 +2,76 @@
|
|
|
2
2
|
* @module Polyface
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* *
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* * [2] is facet index (or another number to associate with this edge).
|
|
5
|
+
* Represent an [[IndexedPolyface]] edge as:
|
|
6
|
+
* * vertex start index and vertex end index (CCW order around its facet)
|
|
7
|
+
* * an additional number to associate with the edge (e.g., facet index)
|
|
8
|
+
* @public
|
|
10
9
|
*/
|
|
11
|
-
export declare class SortableEdge
|
|
10
|
+
export declare class SortableEdge {
|
|
11
|
+
private _v;
|
|
12
|
+
private _a;
|
|
13
|
+
/** Constructor. */
|
|
14
|
+
constructor(startVertex: number, endVertex: number, facetIndex: number);
|
|
15
|
+
/** Clone the edge. */
|
|
16
|
+
clone(): SortableEdge;
|
|
12
17
|
/** Return the vertex index that appears first in the order stored. */
|
|
13
|
-
get
|
|
18
|
+
get startVertex(): number;
|
|
14
19
|
/** Return the vertex index that appears second in the order stored. */
|
|
15
|
-
get
|
|
20
|
+
get endVertex(): number;
|
|
16
21
|
/**
|
|
17
22
|
* Return the facet index.
|
|
18
23
|
* * This value is carried along during matching. Typically it is a facet index, but it does not have to be.
|
|
19
24
|
*/
|
|
20
25
|
get facetIndex(): number;
|
|
21
|
-
/** return true if
|
|
26
|
+
/** return true if `startVertex` is less than `endVertex`. */
|
|
22
27
|
get isLowHigh(): boolean;
|
|
23
28
|
/** Return the vertex index with lower numeric value. */
|
|
24
|
-
get
|
|
29
|
+
get lowVertex(): number;
|
|
25
30
|
/** Return the vertex index with higher numeric value. */
|
|
26
|
-
get
|
|
27
|
-
/** Return true if
|
|
31
|
+
get highVertex(): number;
|
|
32
|
+
/** Return true if edgeA and edgeB traverse the same edge in the same direction. */
|
|
33
|
+
private static areSameEdge;
|
|
34
|
+
/** Return true if edgeA and edgeB traverse the same edge in opposite directions. */
|
|
28
35
|
static areDirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean;
|
|
29
|
-
/** Return true if
|
|
36
|
+
/** Return true if edgeA and edgeB traverse the same edge in the same or opposite directions. */
|
|
30
37
|
static areUndirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean;
|
|
31
38
|
/**
|
|
32
|
-
* Return numeric relationship
|
|
33
|
-
* * 1 if they share start and end in the same order.
|
|
34
|
-
* * -1 if they share start and end in reversed order.
|
|
39
|
+
* Return numeric identifier for the relationship between edgeA and edgeB:
|
|
40
|
+
* * 1 if they share start and end vertex indices in the same order.
|
|
41
|
+
* * -1 if they share start and end vertex indices in reversed order.
|
|
35
42
|
* * 0 otherwise.
|
|
36
43
|
*/
|
|
37
44
|
static relativeOrientation(edgeA: SortableEdge, edgeB: SortableEdge): number;
|
|
45
|
+
/** Whether the start and end vertex indices are equal. */
|
|
38
46
|
get isNullEdge(): boolean;
|
|
39
47
|
/**
|
|
40
48
|
* Lexical comparison of two edges.
|
|
41
|
-
* * If the edges have the same vertex pair (in same or opposite order) they will end up adjacent in a sort.
|
|
42
|
-
* * If the edges have 0 or 1 shared vertex indices, the one with lowest low comes first.
|
|
49
|
+
* * If the edges have the same vertex index pair (in same or opposite order) they will end up adjacent in a sort.
|
|
43
50
|
* @param edgeA first edge
|
|
44
51
|
* @param edgeB second edge
|
|
45
52
|
*/
|
|
46
53
|
static lessThan(edgeA: SortableEdge, edgeB: SortableEdge): number;
|
|
47
|
-
|
|
54
|
+
/** Return the edge data as a JSON array. */
|
|
48
55
|
toJSON(): any;
|
|
56
|
+
/** Return the edge cluster in JSON format. */
|
|
49
57
|
static clusterToJSON(data: SortableEdgeCluster): any;
|
|
58
|
+
/** Return the edge cluster array in JSON format. */
|
|
50
59
|
static clusterArrayToJSON(data: SortableEdgeCluster[]): any[];
|
|
51
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Union type for a single [[SortableEdge]] or a (matched) array of them.
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
52
65
|
export type SortableEdgeCluster = SortableEdge | SortableEdge[];
|
|
53
66
|
/**
|
|
54
|
-
* An IndexedEdgeMatcher carries an array of edge start
|
|
55
|
-
*
|
|
67
|
+
* An IndexedEdgeMatcher carries an array of edge start and end indices for sorting and subsequent analyses,
|
|
68
|
+
* such as testing for closed mesh.
|
|
69
|
+
* @public
|
|
56
70
|
*/
|
|
57
71
|
export declare class IndexedEdgeMatcher {
|
|
72
|
+
/** The array of edges to be sorted. */
|
|
58
73
|
edges: SortableEdge[];
|
|
74
|
+
/** Constructor. Call [[addEdge]] or [[addPath]] to populate `edges`. */
|
|
59
75
|
constructor();
|
|
60
76
|
/**
|
|
61
77
|
* Push a new edge.
|
|
@@ -66,32 +82,31 @@ export declare class IndexedEdgeMatcher {
|
|
|
66
82
|
*/
|
|
67
83
|
addEdge(vertexA: number, vertexB: number, facetIndex: number): SortableEdge;
|
|
68
84
|
/**
|
|
69
|
-
* Push edges
|
|
70
|
-
*
|
|
71
|
-
* @param
|
|
85
|
+
* Push edges along a path.
|
|
86
|
+
* * Typically used to add edges around a facet.
|
|
87
|
+
* @param vertexIndices array of vertex indices along an open or closed path.
|
|
88
|
+
* @param facetIndex value to set on each edge pushed.
|
|
72
89
|
* @param closeLoop true to add an edge from last to first vertex.
|
|
73
90
|
*/
|
|
74
|
-
addPath(
|
|
75
|
-
/** Sort the
|
|
91
|
+
addPath(vertexIndices: number[], facetIndex: number, closeLoop: boolean): void;
|
|
92
|
+
/** Sort the edges. */
|
|
76
93
|
sort(): void;
|
|
77
94
|
/** Create a single or compound SortableEdgeCluster in dest. */
|
|
78
95
|
private collectSortableEdgeCluster;
|
|
79
96
|
/**
|
|
80
|
-
* Sort the edges, and
|
|
81
|
-
*
|
|
82
|
-
* *
|
|
83
|
-
* * Any combination of the
|
|
97
|
+
* Sort the edges, and collect up to four categories of edges: manifold pairs, singletons, null edges,
|
|
98
|
+
* and everything else.
|
|
99
|
+
* * Caller should allocate arrays of interest.
|
|
100
|
+
* * Any combination of the arrays may be `undefined`, indicating that category is to be ignored.
|
|
101
|
+
* * Any combination of the arrays may be aliased as the same target, in which case the aliased categories are
|
|
84
102
|
* merged into the target.
|
|
85
|
-
* * For instance, to ignore manifold pairs and collect all
|
|
86
|
-
* `
|
|
87
|
-
*
|
|
88
|
-
* @param
|
|
89
|
-
*
|
|
90
|
-
* @param
|
|
91
|
-
* @param nullEdges optional array to receive arrays of null edges (same start and end vertex)
|
|
92
|
-
* @param allOtherClusters optional array to receive arrays in which all the edges are partners in an undirected sense
|
|
93
|
-
* but not a simple directed pair.
|
|
103
|
+
* * For instance, to ignore manifold pairs and collect all other edges in a single array:
|
|
104
|
+
* `const foo = []; matcher.sortAndCollectClusters(undefined, foo, foo, foo);`
|
|
105
|
+
* @param manifoldPairs array to receive pairs of properly mated edges, i.e. mesh interior edges.
|
|
106
|
+
* @param singletons array to receive edges that have no partner, i.e., mesh boundary edges.
|
|
107
|
+
* @param nullEdges array to receive arrays of matched null edges, for which start === end vertex index.
|
|
108
|
+
* @param allOtherClusters array to receive arrays of edges that are partners in an undirected, non-manifold sense.
|
|
94
109
|
*/
|
|
95
|
-
sortAndCollectClusters(manifoldPairs
|
|
110
|
+
sortAndCollectClusters(manifoldPairs?: SortableEdgeCluster[], singletons?: SortableEdgeCluster[], nullEdges?: SortableEdgeCluster[], allOtherClusters?: SortableEdgeCluster[]): void;
|
|
96
111
|
}
|
|
97
112
|
//# sourceMappingURL=IndexedEdgeMatcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedEdgeMatcher.d.ts","sourceRoot":"","sources":["../../../src/polyface/IndexedEdgeMatcher.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"IndexedEdgeMatcher.d.ts","sourceRoot":"","sources":["../../../src/polyface/IndexedEdgeMatcher.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,EAA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AAuC;IAChC,KAAK,EAAE,YAAY,EAAE,CAAC;IAC7B,wEAAwE;;IAIxE;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,YAAY;IAKlF;;;;;;OAMG;IACI,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO;IAS9E,sBAAsB;IACf,IAAI;IAGX,+DAA+D;IAC/D,OAAO,CAAC,0BAA0B;IAYlC;;;;;;;;;;;;;OAaG;IACI,sBAAsB,CAC3B,aAAa,CAAC,EAAE,mBAAmB,EAAE,EACrC,UAAU,CAAC,EAAE,mBAAmB,EAAE,EAClC,SAAS,CAAC,EAAE,mBAAmB,EAAE,EACjC,gBAAgB,CAAC,EAAE,mBAAmB,EAAE,GACvC,IAAI;CA6BR"}
|
|
@@ -9,97 +9,107 @@ exports.IndexedEdgeMatcher = exports.SortableEdge = void 0;
|
|
|
9
9
|
* @module Polyface
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* *
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* * [2] is facet index (or another number to associate with this edge).
|
|
12
|
+
* Represent an [[IndexedPolyface]] edge as:
|
|
13
|
+
* * vertex start index and vertex end index (CCW order around its facet)
|
|
14
|
+
* * an additional number to associate with the edge (e.g., facet index)
|
|
15
|
+
* @public
|
|
17
16
|
*/
|
|
18
|
-
class SortableEdge
|
|
17
|
+
class SortableEdge {
|
|
18
|
+
_v;
|
|
19
|
+
_a;
|
|
20
|
+
/** Constructor. */
|
|
21
|
+
constructor(startVertex, endVertex, facetIndex) {
|
|
22
|
+
this._v = [startVertex, endVertex];
|
|
23
|
+
this._a = facetIndex;
|
|
24
|
+
}
|
|
25
|
+
/** Clone the edge. */
|
|
26
|
+
clone() {
|
|
27
|
+
return new SortableEdge(this._v[0], this._v[1], this._a);
|
|
28
|
+
}
|
|
19
29
|
/** Return the vertex index that appears first in the order stored. */
|
|
20
|
-
get
|
|
21
|
-
return this[0];
|
|
30
|
+
get startVertex() {
|
|
31
|
+
return this._v[0];
|
|
22
32
|
}
|
|
23
33
|
/** Return the vertex index that appears second in the order stored. */
|
|
24
|
-
get
|
|
25
|
-
return this[1];
|
|
34
|
+
get endVertex() {
|
|
35
|
+
return this._v[1];
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
38
|
* Return the facet index.
|
|
29
39
|
* * This value is carried along during matching. Typically it is a facet index, but it does not have to be.
|
|
30
40
|
*/
|
|
31
41
|
get facetIndex() {
|
|
32
|
-
return this
|
|
42
|
+
return this._a;
|
|
33
43
|
}
|
|
34
|
-
/** return true if
|
|
44
|
+
/** return true if `startVertex` is less than `endVertex`. */
|
|
35
45
|
get isLowHigh() {
|
|
36
|
-
return this[0] < this[1];
|
|
46
|
+
return this._v[0] < this._v[1];
|
|
37
47
|
}
|
|
38
48
|
/** Return the vertex index with lower numeric value. */
|
|
39
|
-
get
|
|
40
|
-
return this
|
|
49
|
+
get lowVertex() {
|
|
50
|
+
return this.isLowHigh ? this._v[0] : this._v[1];
|
|
41
51
|
}
|
|
42
52
|
/** Return the vertex index with higher numeric value. */
|
|
43
|
-
get
|
|
44
|
-
return this
|
|
53
|
+
get highVertex() {
|
|
54
|
+
return this.isLowHigh ? this._v[1] : this._v[0];
|
|
55
|
+
}
|
|
56
|
+
/** Return true if edgeA and edgeB traverse the same edge in the same direction. */
|
|
57
|
+
static areSameEdge(edgeA, edgeB) {
|
|
58
|
+
return edgeA._v[0] === edgeB._v[0] && edgeA._v[1] === edgeB._v[1];
|
|
45
59
|
}
|
|
46
|
-
/** Return true if
|
|
60
|
+
/** Return true if edgeA and edgeB traverse the same edge in opposite directions. */
|
|
47
61
|
static areDirectedPartners(edgeA, edgeB) {
|
|
48
|
-
return edgeA[0] === edgeB[1] && edgeA[1] === edgeB[0];
|
|
62
|
+
return edgeA._v[0] === edgeB._v[1] && edgeA._v[1] === edgeB._v[0];
|
|
49
63
|
}
|
|
50
|
-
/** Return true if
|
|
64
|
+
/** Return true if edgeA and edgeB traverse the same edge in the same or opposite directions. */
|
|
51
65
|
static areUndirectedPartners(edgeA, edgeB) {
|
|
52
|
-
return (edgeA
|
|
66
|
+
return this.areSameEdge(edgeA, edgeB) || this.areDirectedPartners(edgeA, edgeB);
|
|
53
67
|
}
|
|
54
68
|
/**
|
|
55
|
-
* Return numeric relationship
|
|
56
|
-
* * 1 if they share start and end in the same order.
|
|
57
|
-
* * -1 if they share start and end in reversed order.
|
|
69
|
+
* Return numeric identifier for the relationship between edgeA and edgeB:
|
|
70
|
+
* * 1 if they share start and end vertex indices in the same order.
|
|
71
|
+
* * -1 if they share start and end vertex indices in reversed order.
|
|
58
72
|
* * 0 otherwise.
|
|
59
73
|
*/
|
|
60
74
|
static relativeOrientation(edgeA, edgeB) {
|
|
61
|
-
if (edgeA
|
|
75
|
+
if (this.areSameEdge(edgeA, edgeB))
|
|
62
76
|
return 1;
|
|
63
|
-
if (edgeA
|
|
77
|
+
if (this.areDirectedPartners(edgeA, edgeB))
|
|
64
78
|
return -1;
|
|
65
79
|
return 0;
|
|
66
80
|
}
|
|
81
|
+
/** Whether the start and end vertex indices are equal. */
|
|
67
82
|
get isNullEdge() {
|
|
68
|
-
return this[0] === this[1];
|
|
83
|
+
return this._v[0] === this._v[1];
|
|
69
84
|
}
|
|
70
85
|
/**
|
|
71
86
|
* Lexical comparison of two edges.
|
|
72
|
-
* * If the edges have the same vertex pair (in same or opposite order) they will end up adjacent in a sort.
|
|
73
|
-
* * If the edges have 0 or 1 shared vertex indices, the one with lowest low comes first.
|
|
87
|
+
* * If the edges have the same vertex index pair (in same or opposite order) they will end up adjacent in a sort.
|
|
74
88
|
* @param edgeA first edge
|
|
75
89
|
* @param edgeB second edge
|
|
76
90
|
*/
|
|
77
91
|
static lessThan(edgeA, edgeB) {
|
|
78
92
|
// primary compare is based on indirect indices
|
|
79
|
-
const lowA = edgeA.
|
|
80
|
-
const lowB = edgeB.
|
|
93
|
+
const lowA = edgeA.lowVertex;
|
|
94
|
+
const lowB = edgeB.lowVertex;
|
|
81
95
|
if (lowA < lowB)
|
|
82
96
|
return -1;
|
|
83
97
|
if (lowB < lowA)
|
|
84
98
|
return 1;
|
|
85
|
-
const highA = edgeA.
|
|
86
|
-
const highB = edgeB.
|
|
99
|
+
const highA = edgeA.highVertex;
|
|
100
|
+
const highB = edgeB.highVertex;
|
|
87
101
|
if (highA < highB)
|
|
88
102
|
return -1;
|
|
89
103
|
if (highB < highA)
|
|
90
104
|
return 1;
|
|
91
105
|
// undirected indices match ... use directed vertexIndexA
|
|
92
|
-
return edgeA.
|
|
93
|
-
}
|
|
94
|
-
constructor(vertexA, vertexB, facetIndex) {
|
|
95
|
-
super(3);
|
|
96
|
-
this[0] = vertexA;
|
|
97
|
-
this[1] = vertexB;
|
|
98
|
-
this[2] = facetIndex;
|
|
106
|
+
return edgeA.startVertex - edgeB.startVertex;
|
|
99
107
|
}
|
|
108
|
+
/** Return the edge data as a JSON array. */
|
|
100
109
|
toJSON() {
|
|
101
|
-
return [this[0], this[1], this
|
|
110
|
+
return [this._v[0], this._v[1], this._a];
|
|
102
111
|
}
|
|
112
|
+
/** Return the edge cluster in JSON format. */
|
|
103
113
|
static clusterToJSON(data) {
|
|
104
114
|
if (data instanceof SortableEdge)
|
|
105
115
|
return data.toJSON();
|
|
@@ -107,6 +117,7 @@ class SortableEdge extends Float64Array {
|
|
|
107
117
|
for (const edge of data)
|
|
108
118
|
result.push(edge.toJSON());
|
|
109
119
|
}
|
|
120
|
+
/** Return the edge cluster array in JSON format. */
|
|
110
121
|
static clusterArrayToJSON(data) {
|
|
111
122
|
const result = [];
|
|
112
123
|
for (const cluster of data)
|
|
@@ -116,11 +127,14 @@ class SortableEdge extends Float64Array {
|
|
|
116
127
|
}
|
|
117
128
|
exports.SortableEdge = SortableEdge;
|
|
118
129
|
/**
|
|
119
|
-
* An IndexedEdgeMatcher carries an array of edge start
|
|
120
|
-
*
|
|
130
|
+
* An IndexedEdgeMatcher carries an array of edge start and end indices for sorting and subsequent analyses,
|
|
131
|
+
* such as testing for closed mesh.
|
|
132
|
+
* @public
|
|
121
133
|
*/
|
|
122
134
|
class IndexedEdgeMatcher {
|
|
135
|
+
/** The array of edges to be sorted. */
|
|
123
136
|
edges;
|
|
137
|
+
/** Constructor. Call [[addEdge]] or [[addPath]] to populate `edges`. */
|
|
124
138
|
constructor() {
|
|
125
139
|
this.edges = [];
|
|
126
140
|
}
|
|
@@ -137,22 +151,22 @@ class IndexedEdgeMatcher {
|
|
|
137
151
|
return edge;
|
|
138
152
|
}
|
|
139
153
|
/**
|
|
140
|
-
* Push edges
|
|
141
|
-
*
|
|
142
|
-
* @param
|
|
154
|
+
* Push edges along a path.
|
|
155
|
+
* * Typically used to add edges around a facet.
|
|
156
|
+
* @param vertexIndices array of vertex indices along an open or closed path.
|
|
157
|
+
* @param facetIndex value to set on each edge pushed.
|
|
143
158
|
* @param closeLoop true to add an edge from last to first vertex.
|
|
144
159
|
*/
|
|
145
|
-
addPath(
|
|
146
|
-
if (
|
|
160
|
+
addPath(vertexIndices, facetIndex, closeLoop) {
|
|
161
|
+
if (vertexIndices.length === 0)
|
|
147
162
|
return;
|
|
148
|
-
const m =
|
|
149
|
-
for (let i = 0; i < m; i++)
|
|
150
|
-
this.addEdge(
|
|
151
|
-
}
|
|
163
|
+
const m = vertexIndices.length - 1;
|
|
164
|
+
for (let i = 0; i < m; i++)
|
|
165
|
+
this.addEdge(vertexIndices[i], vertexIndices[i + 1], facetIndex);
|
|
152
166
|
if (closeLoop)
|
|
153
|
-
this.addEdge(
|
|
167
|
+
this.addEdge(vertexIndices[m], vertexIndices[0], facetIndex);
|
|
154
168
|
}
|
|
155
|
-
/** Sort the
|
|
169
|
+
/** Sort the edges. */
|
|
156
170
|
sort() {
|
|
157
171
|
this.edges.sort((edgeA, edgeB) => SortableEdge.lessThan(edgeA, edgeB));
|
|
158
172
|
}
|
|
@@ -171,20 +185,18 @@ class IndexedEdgeMatcher {
|
|
|
171
185
|
}
|
|
172
186
|
}
|
|
173
187
|
/**
|
|
174
|
-
* Sort the edges, and
|
|
175
|
-
*
|
|
176
|
-
* *
|
|
177
|
-
* * Any combination of the
|
|
188
|
+
* Sort the edges, and collect up to four categories of edges: manifold pairs, singletons, null edges,
|
|
189
|
+
* and everything else.
|
|
190
|
+
* * Caller should allocate arrays of interest.
|
|
191
|
+
* * Any combination of the arrays may be `undefined`, indicating that category is to be ignored.
|
|
192
|
+
* * Any combination of the arrays may be aliased as the same target, in which case the aliased categories are
|
|
178
193
|
* merged into the target.
|
|
179
|
-
* * For instance, to ignore manifold pairs and collect all
|
|
180
|
-
* `
|
|
181
|
-
*
|
|
182
|
-
* @param
|
|
183
|
-
*
|
|
184
|
-
* @param
|
|
185
|
-
* @param nullEdges optional array to receive arrays of null edges (same start and end vertex)
|
|
186
|
-
* @param allOtherClusters optional array to receive arrays in which all the edges are partners in an undirected sense
|
|
187
|
-
* but not a simple directed pair.
|
|
194
|
+
* * For instance, to ignore manifold pairs and collect all other edges in a single array:
|
|
195
|
+
* `const foo = []; matcher.sortAndCollectClusters(undefined, foo, foo, foo);`
|
|
196
|
+
* @param manifoldPairs array to receive pairs of properly mated edges, i.e. mesh interior edges.
|
|
197
|
+
* @param singletons array to receive edges that have no partner, i.e., mesh boundary edges.
|
|
198
|
+
* @param nullEdges array to receive arrays of matched null edges, for which start === end vertex index.
|
|
199
|
+
* @param allOtherClusters array to receive arrays of edges that are partners in an undirected, non-manifold sense.
|
|
188
200
|
*/
|
|
189
201
|
sortAndCollectClusters(manifoldPairs, singletons, nullEdges, allOtherClusters) {
|
|
190
202
|
this.sort();
|
|
@@ -205,18 +217,14 @@ class IndexedEdgeMatcher {
|
|
|
205
217
|
SortableEdge.areUndirectedPartners(baseEdge, this.edges[index1]); index1++) {
|
|
206
218
|
clusterLength++;
|
|
207
219
|
}
|
|
208
|
-
if (this.edges[index0].isNullEdge)
|
|
220
|
+
if (this.edges[index0].isNullEdge)
|
|
209
221
|
this.collectSortableEdgeCluster(index0, index0 + clusterLength, nullEdges);
|
|
210
|
-
|
|
211
|
-
else if (clusterLength === 2 && SortableEdge.areDirectedPartners(baseEdge, this.edges[index0 + 1])) {
|
|
222
|
+
else if (clusterLength === 2 && SortableEdge.areDirectedPartners(baseEdge, this.edges[index0 + 1]))
|
|
212
223
|
this.collectSortableEdgeCluster(index0, index0 + clusterLength, manifoldPairs);
|
|
213
|
-
|
|
214
|
-
else if (clusterLength === 1) {
|
|
224
|
+
else if (clusterLength === 1)
|
|
215
225
|
this.collectSortableEdgeCluster(index0, index0 + 1, singletons);
|
|
216
|
-
|
|
217
|
-
else {
|
|
226
|
+
else
|
|
218
227
|
this.collectSortableEdgeCluster(index0, index0 + clusterLength, allOtherClusters);
|
|
219
|
-
}
|
|
220
228
|
}
|
|
221
229
|
}
|
|
222
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedEdgeMatcher.js","sourceRoot":"","sources":["../../../src/polyface/IndexedEdgeMatcher.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH;;;;;;GAMG;AACH,MAAa,YAAa,SAAQ,YAAY;IAC5C,uEAAuE;IACvE,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD,wEAAwE;IACxE,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD;;;OAGG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD,6DAA6D;IAC7D,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IACD,wDAAwD;IACxD,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,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AiGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Polyface\n */\n\n/**\n * * For boundary sorting, an edge is a (packed!) Float64Array.\n * * Fixed entry positions are:\n * * [0] is start vertex index (in CCW order around its facet)\n * * [1] is end vertex index (in CCW order around its facet)\n * * [2] is facet index (or another number to associate with this edge).\n */\nexport class SortableEdge extends Float64Array {\n /** Return the vertex index that appears first in the order stored. */\n public get vertexIndexA(): number {\n return this[0];\n }\n /** Return the vertex index that appears second in the order stored. */\n public get vertexIndexB(): number {\n return this[1];\n }\n /**\n * Return the facet index.\n * * This value is carried along during matching. Typically it is a facet index, but it does not have to be.\n */\n public get facetIndex(): number {\n return this[2];\n }\n /** return true if vertexIndexA is less than vertexIndexB. */\n public get isLowHigh(): boolean {\n return this[0] < this[1];\n }\n /** Return the vertex index with lower numeric value. */\n public get lowVertexIndex(): number {\n return this[0] < this[1] ? this[0] : this[1];\n }\n /** Return the vertex index with higher numeric value. */\n public get highVertexIndex(): number {\n return this[0] > this[1] ? this[0] : this[1];\n }\n /** Return true if the vertices edgeA and edgeB are the same vertex indices in opposite order. */\n public static areDirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean {\n return edgeA[0] === edgeB[1] && edgeA[1] === edgeB[0];\n }\n /** Return true if the vertices edgeA and edgeB are the same vertex indices with no consideration of order. */\n public static areUndirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean {\n return (edgeA[0] === edgeB[0] && edgeA[1] === edgeB[1]) || ((edgeA[0] === edgeB[1] && edgeA[1] === edgeB[0]));\n }\n /**\n * Return numeric relationship of edgeA and edgeB:\n * * 1 if they share start and end in the same order.\n * * -1 if they share start and end in reversed order.\n * * 0 otherwise.\n */\n public static relativeOrientation(edgeA: SortableEdge, edgeB: SortableEdge): number {\n if (edgeA[0] === edgeB[0] && edgeA[1] === edgeB[1]) return 1;\n if (edgeA[0] === edgeB[1] && edgeA[1] === edgeB[0]) return -1;\n return 0;\n }\n\n public get isNullEdge(): boolean {\n return this[0] === this[1];\n }\n /**\n * Lexical comparison of two edges.\n * * If the edges have the same vertex pair (in same or opposite order) they will end up adjacent in a sort.\n * * If the edges have 0 or 1 shared vertex indices, the one with lowest low comes first.\n * @param edgeA first edge\n * @param edgeB second edge\n */\n public static lessThan(edgeA: SortableEdge, edgeB: SortableEdge): number {\n // primary compare is based on indirect indices\n const lowA = edgeA.lowVertexIndex;\n const lowB = edgeB.lowVertexIndex;\n if (lowA < lowB)\n return -1;\n if (lowB < lowA)\n return 1;\n const highA = edgeA.highVertexIndex;\n const highB = edgeB.highVertexIndex;\n if (highA < highB)\n return -1;\n if (highB < highA)\n return 1;\n // undirected indices match ... use directed vertexIndexA\n return edgeA.vertexIndexA - edgeB.vertexIndexA;\n }\n public constructor(vertexA: number, vertexB: number, facetIndex: number) {\n super(3);\n this[0] = vertexA;\n this[1] = vertexB;\n this[2] = facetIndex;\n }\n public toJSON(): any {\n return [this[0], this[1], this[2]];\n }\n public static clusterToJSON(data: SortableEdgeCluster): any {\n if (data instanceof SortableEdge)\n return data.toJSON();\n const result = [];\n for (const edge of data) result.push(edge.toJSON());\n }\n public static clusterArrayToJSON(data: SortableEdgeCluster[]) {\n const result = [];\n for (const cluster of data)\n result.push(SortableEdge.clusterToJSON(cluster));\n return result;\n }\n}\nexport type SortableEdgeCluster = SortableEdge | SortableEdge[];\n/**\n * An IndexedEdgeMatcher carries an array of edge start & end indices for sorting and subsequent analyses\n * (such as testing for closed mesh).\n */\nexport class IndexedEdgeMatcher {\n public edges: SortableEdge[];\n\n constructor() {\n this.edges = [];\n }\n /**\n * Push a new edge.\n * @param vertexA start vertex\n * @param vertexB end vertex\n * @param facetIndex value to carry along during matching\n * @returns the edge pushed onto the `edges` array\n */\n public addEdge(vertexA: number, vertexB: number, facetIndex: number): SortableEdge {\n const edge = new SortableEdge(vertexA, vertexB, facetIndex);\n this.edges.push(edge);\n return edge;\n }\n /**\n * Push edges all around a facet, returning to vertexArray[0].\n * @param vertexArray array of vertex indices around facet\n * @param facetIndex value to carry along during matching\n * @param closeLoop true to add an edge from last to first vertex.\n */\n public addPath(vertexArray: number[], facetIndex: number, closeLoop: boolean = true) {\n if (vertexArray.length === 0) return;\n const m = vertexArray.length - 1;\n for (let i = 0; i < m; i++) {\n this.addEdge(vertexArray[i], vertexArray[i + 1], facetIndex);\n }\n if (closeLoop)\n this.addEdge(vertexArray[m], vertexArray[0], facetIndex);\n }\n /** Sort the edge index array. */\n public sort() {\n this.edges.sort((edgeA, edgeB) => SortableEdge.lessThan(edgeA, edgeB));\n }\n /** Create a single or compound SortableEdgeCluster in dest. */\n private collectSortableEdgeCluster(index0: number, index1: number, dest: SortableEdgeCluster[] | undefined) {\n if (dest !== undefined && index1 > index0) {\n if (index1 === index0 + 1) {\n dest.push(this.edges[index0]);\n } else {\n const cluster = [];\n for (let i = index0; i < index1; i++)\n cluster.push(this.edges[i]);\n dest.push(cluster);\n }\n }\n }\n /**\n * Sort the edges, and look for three categories of paired edges:\n * * caller must allocate all result arrays of interest.\n * * Any combination of the result arrays may be `undefined`, indicating that category is to be ignored.\n * * Any combination of the result arrays may be aliased as the same target, in which case those to categories are\n * merged into the target.\n * * For instance, to ignore manifold pairs and collect all others (singleton, null, and other) as a single array\n * `allOther`, create `const allOther = []` as an empty array and call\n * `sortAndCollectClusters (undefined, allOther, allOther, allOther);`\n * @param manifoldPairs optional array to receive pairs of properly mated SortableEdgePairs, i.e. simple interior\n * edges adjacent to two facets in opposing directions.\n * @param singletons optional array to receive edges that are simple boundary edges.\n * @param nullEdges optional array to receive arrays of null edges (same start and end vertex)\n * @param allOtherClusters optional array to receive arrays in which all the edges are partners in an undirected sense\n * but not a simple directed pair.\n */\n public sortAndCollectClusters(\n manifoldPairs: SortableEdgeCluster[] | undefined,\n singletons?: SortableEdgeCluster[],\n nullEdges?: SortableEdgeCluster[],\n allOtherClusters?: SortableEdgeCluster[],\n ): void {\n this.sort();\n if (manifoldPairs) manifoldPairs.length = 0;\n if (singletons) singletons.length = 0;\n if (nullEdges) nullEdges.length = 0;\n if (allOtherClusters) allOtherClusters.length = 0;\n const n = this.edges.length;\n let clusterLength;\n for (let index0 = 0; index0 < n; index0 += clusterLength) {\n const baseEdge = this.edges[index0];\n clusterLength = 1;\n for (let index1 = index0 + 1; index1 < n &&\n SortableEdge.areUndirectedPartners(baseEdge, this.edges[index1]); index1++) {\n clusterLength++;\n }\n if (this.edges[index0].isNullEdge) {\n this.collectSortableEdgeCluster(index0, index0 + clusterLength, nullEdges);\n } else if (clusterLength === 2 && SortableEdge.areDirectedPartners(baseEdge, this.edges[index0 + 1])) {\n this.collectSortableEdgeCluster(index0, index0 + clusterLength, manifoldPairs);\n } else if (clusterLength === 1) {\n this.collectSortableEdgeCluster(index0, index0 + 1, singletons);\n } else {\n this.collectSortableEdgeCluster(index0, index0 + clusterLength, allOtherClusters);\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IndexedEdgeMatcher.js","sourceRoot":"","sources":["../../../src/polyface/IndexedEdgeMatcher.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH;;;;;GAKG;AACH,MAAa,YAAY;IACf,EAAE,CAAW;IACb,EAAE,CAAS;IAEnB,mBAAmB;IACnB,YAAmB,WAAmB,EAAE,SAAiB,EAAE,UAAkB;QAC3E,IAAI,CAAC,EAAE,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC;IACvB,CAAC;IACD,sBAAsB;IACf,KAAK;QACV,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,uEAAuE;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1B,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;;gBAEhE,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,gBAAgB,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;CACF;AApGD,gDAoGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Polyface\n */\n\n/**\n * Represent an [[IndexedPolyface]] edge as:\n * * vertex start index and vertex end index (CCW order around its facet)\n * * an additional number to associate with the edge (e.g., facet index)\n * @public\n */\nexport class SortableEdge {\n private _v: number[];\n private _a: number;\n\n /** Constructor. */\n public constructor(startVertex: number, endVertex: number, facetIndex: number) {\n this._v = [startVertex, endVertex];\n this._a = facetIndex;\n }\n /** Clone the edge. */\n public clone(): SortableEdge {\n return new SortableEdge(this._v[0], this._v[1], this._a);\n }\n /** Return the vertex index that appears first in the order stored. */\n public get startVertex(): number {\n return this._v[0];\n }\n /** Return the vertex index that appears second in the order stored. */\n public get endVertex(): number {\n return this._v[1];\n }\n /**\n * Return the facet index.\n * * This value is carried along during matching. Typically it is a facet index, but it does not have to be.\n */\n public get facetIndex(): number {\n return this._a;\n }\n /** return true if `startVertex` is less than `endVertex`. */\n public get isLowHigh(): boolean {\n return this._v[0] < this._v[1];\n }\n /** Return the vertex index with lower numeric value. */\n public get lowVertex(): number {\n return this.isLowHigh ? this._v[0] : this._v[1];\n }\n /** Return the vertex index with higher numeric value. */\n public get highVertex(): number {\n return this.isLowHigh ? this._v[1] : this._v[0];\n }\n /** Return true if edgeA and edgeB traverse the same edge in the same direction. */\n private static areSameEdge(edgeA: SortableEdge, edgeB: SortableEdge): boolean {\n return edgeA._v[0] === edgeB._v[0] && edgeA._v[1] === edgeB._v[1];\n }\n /** Return true if edgeA and edgeB traverse the same edge in opposite directions. */\n public static areDirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean {\n return edgeA._v[0] === edgeB._v[1] && edgeA._v[1] === edgeB._v[0];\n }\n /** Return true if edgeA and edgeB traverse the same edge in the same or opposite directions. */\n public static areUndirectedPartners(edgeA: SortableEdge, edgeB: SortableEdge): boolean {\n return this.areSameEdge(edgeA, edgeB) || this.areDirectedPartners(edgeA, edgeB);\n }\n /**\n * Return numeric identifier for the relationship between edgeA and edgeB:\n * * 1 if they share start and end vertex indices in the same order.\n * * -1 if they share start and end vertex indices in reversed order.\n * * 0 otherwise.\n */\n public static relativeOrientation(edgeA: SortableEdge, edgeB: SortableEdge): number {\n if (this.areSameEdge(edgeA, edgeB))\n return 1;\n if (this.areDirectedPartners(edgeA, edgeB))\n return -1;\n return 0;\n }\n /** Whether the start and end vertex indices are equal. */\n public get isNullEdge(): boolean {\n return this._v[0] === this._v[1];\n }\n /**\n * Lexical comparison of two edges.\n * * If the edges have the same vertex index pair (in same or opposite order) they will end up adjacent in a sort.\n * @param edgeA first edge\n * @param edgeB second edge\n */\n public static lessThan(edgeA: SortableEdge, edgeB: SortableEdge): number {\n // primary compare is based on indirect indices\n const lowA = edgeA.lowVertex;\n const lowB = edgeB.lowVertex;\n if (lowA < lowB)\n return -1;\n if (lowB < lowA)\n return 1;\n const highA = edgeA.highVertex;\n const highB = edgeB.highVertex;\n if (highA < highB)\n return -1;\n if (highB < highA)\n return 1;\n // undirected indices match ... use directed vertexIndexA\n return edgeA.startVertex - edgeB.startVertex;\n }\n /** Return the edge data as a JSON array. */\n public toJSON(): any {\n return [this._v[0], this._v[1], this._a];\n }\n /** Return the edge cluster in JSON format. */\n public static clusterToJSON(data: SortableEdgeCluster): any {\n if (data instanceof SortableEdge)\n return data.toJSON();\n const result = [];\n for (const edge of data)\n result.push(edge.toJSON());\n }\n /** Return the edge cluster array in JSON format. */\n public static clusterArrayToJSON(data: SortableEdgeCluster[]) {\n const result = [];\n for (const cluster of data)\n result.push(SortableEdge.clusterToJSON(cluster));\n return result;\n }\n}\n\n/**\n * Union type for a single [[SortableEdge]] or a (matched) array of them.\n * @public\n */\nexport type SortableEdgeCluster = SortableEdge | SortableEdge[];\n\n/**\n * An IndexedEdgeMatcher carries an array of edge start and end indices for sorting and subsequent analyses,\n * such as testing for closed mesh.\n * @public\n */\nexport class IndexedEdgeMatcher {\n /** The array of edges to be sorted. */\n public edges: SortableEdge[];\n /** Constructor. Call [[addEdge]] or [[addPath]] to populate `edges`. */\n public constructor() {\n this.edges = [];\n }\n /**\n * Push a new edge.\n * @param vertexA start vertex\n * @param vertexB end vertex\n * @param facetIndex value to carry along during matching\n * @returns the edge pushed onto the `edges` array\n */\n public addEdge(vertexA: number, vertexB: number, facetIndex: number): SortableEdge {\n const edge = new SortableEdge(vertexA, vertexB, facetIndex);\n this.edges.push(edge);\n return edge;\n }\n /**\n * Push edges along a path.\n * * Typically used to add edges around a facet.\n * @param vertexIndices array of vertex indices along an open or closed path.\n * @param facetIndex value to set on each edge pushed.\n * @param closeLoop true to add an edge from last to first vertex.\n */\n public addPath(vertexIndices: number[], facetIndex: number, closeLoop: boolean) {\n if (vertexIndices.length === 0)\n return;\n const m = vertexIndices.length - 1;\n for (let i = 0; i < m; i++)\n this.addEdge(vertexIndices[i], vertexIndices[i + 1], facetIndex);\n if (closeLoop)\n this.addEdge(vertexIndices[m], vertexIndices[0], facetIndex);\n }\n /** Sort the edges. */\n public sort() {\n this.edges.sort((edgeA, edgeB) => SortableEdge.lessThan(edgeA, edgeB));\n }\n /** Create a single or compound SortableEdgeCluster in dest. */\n private collectSortableEdgeCluster(index0: number, index1: number, dest: SortableEdgeCluster[] | undefined) {\n if (dest !== undefined && index1 > index0) {\n if (index1 === index0 + 1) {\n dest.push(this.edges[index0]);\n } else {\n const cluster = [];\n for (let i = index0; i < index1; i++)\n cluster.push(this.edges[i]);\n dest.push(cluster);\n }\n }\n }\n /**\n * Sort the edges, and collect up to four categories of edges: manifold pairs, singletons, null edges,\n * and everything else.\n * * Caller should allocate arrays of interest.\n * * Any combination of the arrays may be `undefined`, indicating that category is to be ignored.\n * * Any combination of the arrays may be aliased as the same target, in which case the aliased categories are\n * merged into the target.\n * * For instance, to ignore manifold pairs and collect all other edges in a single array:\n * `const foo = []; matcher.sortAndCollectClusters(undefined, foo, foo, foo);`\n * @param manifoldPairs array to receive pairs of properly mated edges, i.e. mesh interior edges.\n * @param singletons array to receive edges that have no partner, i.e., mesh boundary edges.\n * @param nullEdges array to receive arrays of matched null edges, for which start === end vertex index.\n * @param allOtherClusters array to receive arrays of edges that are partners in an undirected, non-manifold sense.\n */\n public sortAndCollectClusters(\n manifoldPairs?: SortableEdgeCluster[],\n singletons?: SortableEdgeCluster[],\n nullEdges?: SortableEdgeCluster[],\n allOtherClusters?: SortableEdgeCluster[],\n ): void {\n this.sort();\n if (manifoldPairs)\n manifoldPairs.length = 0;\n if (singletons)\n singletons.length = 0;\n if (nullEdges)\n nullEdges.length = 0;\n if (allOtherClusters)\n allOtherClusters.length = 0;\n const n = this.edges.length;\n let clusterLength;\n for (let index0 = 0; index0 < n; index0 += clusterLength) {\n const baseEdge = this.edges[index0];\n clusterLength = 1;\n for (let index1 = index0 + 1; index1 < n &&\n SortableEdge.areUndirectedPartners(baseEdge, this.edges[index1]); index1++) {\n clusterLength++;\n }\n if (this.edges[index0].isNullEdge)\n this.collectSortableEdgeCluster(index0, index0 + clusterLength, nullEdges);\n else if (clusterLength === 2 && SortableEdge.areDirectedPartners(baseEdge, this.edges[index0 + 1]))\n this.collectSortableEdgeCluster(index0, index0 + clusterLength, manifoldPairs);\n else if (clusterLength === 1)\n this.collectSortableEdgeCluster(index0, index0 + 1, singletons);\n else\n this.collectSortableEdgeCluster(index0, index0 + clusterLength, allOtherClusters);\n }\n }\n}\n"]}
|
|
@@ -40,7 +40,7 @@ export declare class IndexedPolyfaceVisitor extends PolyfaceData implements Poly
|
|
|
40
40
|
moveToReadIndex(facetIndex: number): boolean;
|
|
41
41
|
/** Advance the iterator to a the 'next' facet in the client polyface. */
|
|
42
42
|
moveToNextFacet(): boolean;
|
|
43
|
-
/**
|
|
43
|
+
/** Restart the visitor at the first facet. */
|
|
44
44
|
reset(): void;
|
|
45
45
|
/**
|
|
46
46
|
* Attempts to extract the distance parameter for the given vertex `index` on the current facet.
|
|
@@ -73,6 +73,8 @@ export declare class IndexedPolyfaceVisitor extends PolyfaceData implements Poly
|
|
|
73
73
|
* * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.
|
|
74
74
|
*/
|
|
75
75
|
pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void;
|
|
76
|
+
/** Create a visitor for a subset of the facets visitable by the instance. */
|
|
77
|
+
createSubsetVisitor(facetIndices: number[], numWrap?: number): IndexedPolyfaceSubsetVisitor;
|
|
76
78
|
}
|
|
77
79
|
/**
|
|
78
80
|
* An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.
|
|
@@ -81,38 +83,37 @@ export declare class IndexedPolyfaceVisitor extends PolyfaceData implements Poly
|
|
|
81
83
|
* @public
|
|
82
84
|
*/
|
|
83
85
|
export declare class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {
|
|
84
|
-
private
|
|
85
|
-
private
|
|
86
|
-
private
|
|
86
|
+
private _facetIndices;
|
|
87
|
+
private _currentSubsetIndex;
|
|
88
|
+
private _nextSubsetIndex;
|
|
87
89
|
private constructor();
|
|
88
90
|
private isValidSubsetIndex;
|
|
89
91
|
/**
|
|
90
92
|
* Create a visitor for iterating a subset of the facets of `polyface`.
|
|
91
93
|
* @param polyface reference to the client polyface, supplying facets
|
|
92
|
-
* @param
|
|
94
|
+
* @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.
|
|
93
95
|
* @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.
|
|
94
96
|
*/
|
|
95
|
-
static createSubsetVisitor(polyface: IndexedPolyface,
|
|
97
|
+
static createSubsetVisitor(polyface: IndexedPolyface, facetIndices: number[], numWrap?: number): IndexedPolyfaceSubsetVisitor;
|
|
96
98
|
/**
|
|
97
99
|
* Advance the iterator to a particular facet in the subset of client polyface facets.
|
|
98
|
-
* @param
|
|
99
|
-
* the client polyface.
|
|
100
|
+
* @param subsetIndex index into the subset array, not to be confused with the client facet index.
|
|
100
101
|
* @return whether the iterator was successfully moved.
|
|
101
102
|
*/
|
|
102
|
-
moveToReadIndex(
|
|
103
|
+
moveToReadIndex(subsetIndex: number): boolean;
|
|
103
104
|
/**
|
|
104
105
|
* Advance the iterator to the next facet in the subset of client polyface facets.
|
|
105
106
|
* @return whether the iterator was successfully moved.
|
|
106
107
|
*/
|
|
107
108
|
moveToNextFacet(): boolean;
|
|
108
|
-
/**
|
|
109
|
+
/** Restart the visitor at the first facet. */
|
|
109
110
|
reset(): void;
|
|
110
111
|
/**
|
|
111
|
-
* Return the
|
|
112
|
-
* @param
|
|
113
|
-
* @return valid client polyface facet index, or `undefined` if invalid
|
|
112
|
+
* Return the client polyface facet index (aka "readIndex") for the given subset index.
|
|
113
|
+
* @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.
|
|
114
|
+
* @return valid client polyface facet index, or `undefined` if invalid subset index.
|
|
114
115
|
*/
|
|
115
|
-
parentFacetIndex(
|
|
116
|
+
parentFacetIndex(subsetIndex?: number): number | undefined;
|
|
116
117
|
/** Return the number of facets this visitor is able to visit. */
|
|
117
118
|
getVisitableFacetCount(): number;
|
|
118
119
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedPolyfaceVisitor.d.ts","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE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