@itwin/core-geometry 4.9.0-dev.9 → 4.9.0
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 +36 -1
- package/lib/cjs/Geometry.d.ts +57 -46
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +73 -53
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +141 -38
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +219 -31
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +11 -6
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +12 -10
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +2 -1
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +2 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +11 -9
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +11 -9
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +4 -3
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +4 -3
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +19 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +39 -0
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.d.ts +4 -4
- package/lib/cjs/curve/CurveOps.d.ts.map +1 -1
- package/lib/cjs/curve/CurveOps.js +6 -6
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +1 -1
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +7 -5
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +8 -6
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +6 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.d.ts +1 -1
- package/lib/cjs/curve/OffsetOptions.js +1 -1
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +5 -6
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -4
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +4 -3
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +4 -3
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +23 -7
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +43 -35
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +22 -8
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +127 -52
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts +211 -0
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +1000 -0
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -0
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +11 -8
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js +7 -4
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +18 -5
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +23 -7
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +14 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +47 -12
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts +2 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +12 -10
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js +1 -7
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +6 -4
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +6 -4
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +5 -5
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +5 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts +6 -5
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +11 -10
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +4 -4
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +7 -11
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +6 -1
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +9 -3
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +1 -1
- package/lib/cjs/geometry3d/Transform.js +1 -1
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/numerics/Newton.d.ts +3 -3
- package/lib/cjs/numerics/Newton.d.ts.map +1 -1
- package/lib/cjs/numerics/Newton.js +14 -16
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +2 -2
- package/lib/cjs/numerics/Polynomials.js +2 -2
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +7 -4
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +11 -6
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +13 -10
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +17 -14
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +11 -14
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +59 -52
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js +2 -2
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +0 -4
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +1 -1
- package/lib/cjs/topology/Graph.js +2 -2
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.d.ts +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.d.ts +57 -15
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js +168 -127
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.d.ts +35 -35
- package/lib/cjs/topology/HalfEdgePositionDetail.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js +63 -41
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.d.ts +64 -12
- package/lib/cjs/topology/InsertAndRetriangulateContext.d.ts.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js +174 -75
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +2 -2
- package/lib/cjs/topology/Merging.js +2 -2
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +16 -10
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +23 -30
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +57 -46
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +73 -53
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +141 -38
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +217 -30
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +11 -6
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +12 -10
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +2 -1
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +2 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +11 -9
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +11 -9
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +4 -3
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +4 -3
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +19 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +39 -0
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.d.ts +4 -4
- package/lib/esm/curve/CurveOps.d.ts.map +1 -1
- package/lib/esm/curve/CurveOps.js +6 -6
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +1 -1
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +7 -5
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +8 -6
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +6 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.d.ts +1 -1
- package/lib/esm/curve/OffsetOptions.js +1 -1
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +5 -6
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +3 -4
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +4 -3
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +4 -3
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +23 -7
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +43 -35
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +22 -8
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +127 -52
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts +211 -0
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +995 -0
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -0
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +11 -8
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js +7 -4
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +18 -5
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +23 -7
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +14 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +47 -12
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts +2 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +12 -10
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js +1 -7
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +6 -4
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +6 -4
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +5 -5
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +5 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts +6 -5
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +11 -10
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +4 -4
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +7 -11
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +6 -1
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +9 -3
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +1 -1
- package/lib/esm/geometry3d/Transform.js +1 -1
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/numerics/Newton.d.ts +3 -3
- package/lib/esm/numerics/Newton.d.ts.map +1 -1
- package/lib/esm/numerics/Newton.js +14 -16
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +2 -2
- package/lib/esm/numerics/Polynomials.js +2 -2
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +7 -4
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +11 -6
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +13 -10
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +17 -14
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +11 -14
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +59 -52
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js +2 -2
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +0 -4
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +1 -1
- package/lib/esm/topology/Graph.js +2 -2
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.d.ts +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.d.ts +57 -15
- package/lib/esm/topology/HalfEdgePointInGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js +168 -127
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.d.ts +35 -35
- package/lib/esm/topology/HalfEdgePositionDetail.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js +63 -41
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.d.ts +64 -12
- package/lib/esm/topology/InsertAndRetriangulateContext.d.ts.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js +173 -74
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +2 -2
- package/lib/esm/topology/Merging.js +2 -2
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +16 -10
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +24 -31
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,94 +4,94 @@
|
|
|
4
4
|
import { Point3d } from "../geometry3d/Point3dVector3d";
|
|
5
5
|
import { XYAndZ } from "../geometry3d/XYZProps";
|
|
6
6
|
import { HalfEdge } from "./Graph";
|
|
7
|
-
/**
|
|
8
|
-
* Enumeration of categorization of "where" a HalfEdgePositionDetail is sitting in the graph.
|
|
9
|
-
*/
|
|
7
|
+
/** Enumeration of categorization of "where" a HalfEdgePositionDetail is sitting in the graph. */
|
|
10
8
|
export declare enum HalfEdgeTopo {
|
|
11
|
-
/** No known position */
|
|
9
|
+
/** No known position. */
|
|
12
10
|
None = 0,
|
|
13
|
-
/**
|
|
11
|
+
/** Sitting at a vertex, reached by a ray in this sector. */
|
|
14
12
|
Vertex = 1,
|
|
15
|
-
/** Sitting on an edge */
|
|
13
|
+
/** Sitting on an edge. */
|
|
16
14
|
Edge = 2,
|
|
17
|
-
/** Face point (before hitting barrier edge) */
|
|
15
|
+
/** Face point (before hitting barrier edge). */
|
|
18
16
|
Face = 3,
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
17
|
+
/**
|
|
18
|
+
* Exterior point (after hitting barrier edge at fraction).
|
|
19
|
+
* Fraction is 0 if exterior point "in sweep around exterior corner".
|
|
21
20
|
*/
|
|
22
21
|
ExteriorFace = 4
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
24
|
* Description of a generalized position within a graph, categorized as:
|
|
26
25
|
* * "at a certain node around a vertex"
|
|
27
|
-
* * "at a fractional position along an edge
|
|
26
|
+
* * "at a fractional position along an edge"
|
|
28
27
|
* * "within a face"
|
|
29
28
|
*/
|
|
30
29
|
export declare class HalfEdgePositionDetail {
|
|
31
|
-
/**
|
|
30
|
+
/** The relevant node. */
|
|
32
31
|
private _node?;
|
|
33
|
-
/** The current coordinates */
|
|
32
|
+
/** The current coordinates. */
|
|
34
33
|
x: number;
|
|
35
34
|
y: number;
|
|
36
35
|
z: number;
|
|
37
|
-
/**
|
|
36
|
+
/** Fractional position along edge. Only defined if the topo tag is `HalfEdgeTopo.Edge`. */
|
|
38
37
|
private _edgeFraction?;
|
|
39
38
|
/** Enumeration of status vertex, edge, or face status. */
|
|
40
39
|
private _topo;
|
|
41
|
-
/**
|
|
40
|
+
/** First data tag. */
|
|
42
41
|
private _iTag?;
|
|
43
|
-
/**
|
|
42
|
+
/** Second data tag. */
|
|
44
43
|
private _dTag?;
|
|
45
44
|
/** Special case for point on edge or vertex but target beyond and exterior. */
|
|
46
45
|
private _isExteriorTarget?;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
46
|
+
/**
|
|
47
|
+
* Constructor.
|
|
48
|
+
* * The point is CAPTURED (static `create` methods normally clone their inputs).
|
|
49
49
|
*/
|
|
50
50
|
private constructor();
|
|
51
|
-
/** Copy (clones of) all data from other */
|
|
51
|
+
/** Copy (clones of) all data from other. */
|
|
52
52
|
setFrom(other: HalfEdgePositionDetail): void;
|
|
53
|
-
/**
|
|
53
|
+
/** Reset to null topo state. */
|
|
54
54
|
resetAsUnknown(): void;
|
|
55
|
-
/**
|
|
55
|
+
/** Create with null data. */
|
|
56
56
|
static create(): HalfEdgePositionDetail;
|
|
57
57
|
getITag(): number | undefined;
|
|
58
58
|
setITag(value: number): void;
|
|
59
59
|
getDTag(): number | undefined;
|
|
60
60
|
setDTag(value: number): void;
|
|
61
61
|
getTopo(): HalfEdgeTopo;
|
|
62
|
-
/** Create with node, fraction along edge, marked as "HalfEdgeTopo.Edge". Compute interpolated xyz on the edge */
|
|
62
|
+
/** Create with node, fraction along edge, marked as "HalfEdgeTopo.Edge". Compute interpolated xyz on the edge. */
|
|
63
63
|
static createEdgeAtFraction(node: HalfEdge, edgeFraction: number): HalfEdgePositionDetail;
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Reassign contents so this instance becomes a face hit.
|
|
65
66
|
* @param node new node value. If missing, current node is left unchanged.
|
|
66
67
|
* @param xyz new coordinates. if missing, current coordinates are left unchanged.
|
|
67
68
|
*/
|
|
68
69
|
resetAsFace(node?: HalfEdge, xyz?: XYAndZ): HalfEdgePositionDetail;
|
|
69
|
-
/**
|
|
70
|
-
*/
|
|
70
|
+
/** Reassign contents so this instance has dTag but no node or HalfEdgeTopo. */
|
|
71
71
|
resetAsUndefinedWithTag(dTag: number): HalfEdgePositionDetail;
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Reassign contents so this instance becomes an edge hit.
|
|
73
74
|
* @param node new node value.
|
|
74
|
-
* @param edgeFraction new edge fraction.
|
|
75
|
+
* @param edgeFraction new edge fraction. xyz is recomputed from this edge and its face successor.
|
|
75
76
|
*/
|
|
76
77
|
resetAtEdgeAndFraction(node: HalfEdge, edgeFraction: number): HalfEdgePositionDetail;
|
|
77
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Create at a node.
|
|
78
80
|
* * Take xyz from the node.
|
|
79
81
|
*/
|
|
80
82
|
static createVertex(node: HalfEdge): HalfEdgePositionDetail;
|
|
81
|
-
/** Mark as "HalfEdgeTopo.Vertex"
|
|
82
|
-
*/
|
|
83
|
+
/** Mark as "HalfEdgeTopo.Vertex". */
|
|
83
84
|
resetAsVertex(node: HalfEdge): HalfEdgePositionDetail;
|
|
84
|
-
/**
|
|
85
|
+
/** Set the flag for an exterior relationship to target. */
|
|
85
86
|
setIsExteriorTarget(isExterior: boolean | undefined): void;
|
|
86
87
|
/** Copy x,y,z from the node to this instance local values. */
|
|
87
88
|
setXYZFromNode(node: HalfEdge): void;
|
|
88
|
-
/**
|
|
89
|
-
* Return the (possibly undefined) edge fraction.
|
|
90
|
-
*/
|
|
89
|
+
/** Return the (possibly undefined) edge fraction. */
|
|
91
90
|
get edgeFraction(): number | undefined;
|
|
92
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Property access for the flag for an exterior relationship to target.
|
|
93
93
|
* * undefined flag is returned as false.
|
|
94
|
-
|
|
94
|
+
*/
|
|
95
95
|
get isExteriorTarget(): boolean;
|
|
96
96
|
/** Return true if this detail is marked as being within a face. */
|
|
97
97
|
get isFace(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HalfEdgePositionDetail.d.ts","sourceRoot":"","sources":["../../../src/topology/HalfEdgePositionDetail.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC
|
|
1
|
+
{"version":3,"file":"HalfEdgePositionDetail.d.ts","sourceRoot":"","sources":["../../../src/topology/HalfEdgePositionDetail.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB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AG,sBAAsB;IAYzE,+EAA+E;IACxE,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB;IASpE;;;;OAIG;IACI,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,sBAAsB;IAW3F;;;OAGG;WACW,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,sBAAsB;IAGlE,qCAAqC;IAC9B,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,sBAAsB;IAQ5D,2DAA2D;IACpD,mBAAmB,CAAC,UAAU,EAAE,OAAO,GAAG,SAAS;IAG1D,8DAA8D;IACvD,cAAc,CAAC,IAAI,EAAE,QAAQ;IAKpC,qDAAqD;IACrD,IAAW,YAAY,IAAI,MAAM,GAAG,SAAS,CAE5C;IACD;;;OAGG;IACH,IAAW,gBAAgB,IAAI,OAAO,CAErC;IACD,mEAAmE;IACnE,IAAW,MAAM,IAAI,OAAO,CAE3B;IACD,oEAAoE;IACpE,IAAW,MAAM,IAAI,OAAO,CAE3B;IACD,iEAAiE;IACjE,IAAW,QAAQ,IAAI,OAAO,CAE7B;IACD,yEAAyE;IACzE,IAAW,cAAc,IAAI,OAAO,CAEnC;IACD,iDAAiD;IACjD,IAAW,IAAI,IAAI,QAAQ,GAAG,SAAS,CAEtC;IACD,wFAAwF;IACjF,UAAU,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;IAkBrC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;CAG7C"}
|
|
@@ -7,33 +7,33 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Geometry } from "../Geometry";
|
|
9
9
|
import { Point3d } from "../geometry3d/Point3dVector3d";
|
|
10
|
-
/**
|
|
11
|
-
* Enumeration of categorization of "where" a HalfEdgePositionDetail is sitting in the graph.
|
|
12
|
-
*/
|
|
10
|
+
/** Enumeration of categorization of "where" a HalfEdgePositionDetail is sitting in the graph. */
|
|
13
11
|
export var HalfEdgeTopo;
|
|
14
12
|
(function (HalfEdgeTopo) {
|
|
15
|
-
/** No known position */
|
|
13
|
+
/** No known position. */
|
|
16
14
|
HalfEdgeTopo[HalfEdgeTopo["None"] = 0] = "None";
|
|
17
|
-
/**
|
|
15
|
+
/** Sitting at a vertex, reached by a ray in this sector. */
|
|
18
16
|
HalfEdgeTopo[HalfEdgeTopo["Vertex"] = 1] = "Vertex";
|
|
19
|
-
/** Sitting on an edge */
|
|
17
|
+
/** Sitting on an edge. */
|
|
20
18
|
HalfEdgeTopo[HalfEdgeTopo["Edge"] = 2] = "Edge";
|
|
21
|
-
/** Face point (before hitting barrier edge) */
|
|
19
|
+
/** Face point (before hitting barrier edge). */
|
|
22
20
|
HalfEdgeTopo[HalfEdgeTopo["Face"] = 3] = "Face";
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
21
|
+
/**
|
|
22
|
+
* Exterior point (after hitting barrier edge at fraction).
|
|
23
|
+
* Fraction is 0 if exterior point "in sweep around exterior corner".
|
|
25
24
|
*/
|
|
26
25
|
HalfEdgeTopo[HalfEdgeTopo["ExteriorFace"] = 4] = "ExteriorFace";
|
|
27
26
|
})(HalfEdgeTopo || (HalfEdgeTopo = {}));
|
|
28
27
|
/**
|
|
29
28
|
* Description of a generalized position within a graph, categorized as:
|
|
30
29
|
* * "at a certain node around a vertex"
|
|
31
|
-
* * "at a fractional position along an edge
|
|
30
|
+
* * "at a fractional position along an edge"
|
|
32
31
|
* * "within a face"
|
|
33
32
|
*/
|
|
34
33
|
export class HalfEdgePositionDetail {
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
34
|
+
/**
|
|
35
|
+
* Constructor.
|
|
36
|
+
* * The point is CAPTURED (static `create` methods normally clone their inputs).
|
|
37
37
|
*/
|
|
38
38
|
constructor(node, x, y, z, topo, edgeFraction, iTag, dTag, isExteriorTarget) {
|
|
39
39
|
this._node = node;
|
|
@@ -46,7 +46,7 @@ export class HalfEdgePositionDetail {
|
|
|
46
46
|
this._dTag = dTag;
|
|
47
47
|
this._isExteriorTarget = isExteriorTarget;
|
|
48
48
|
}
|
|
49
|
-
/** Copy (clones of) all data from other */
|
|
49
|
+
/** Copy (clones of) all data from other. */
|
|
50
50
|
setFrom(other) {
|
|
51
51
|
this._node = other._node;
|
|
52
52
|
this.x = other.x;
|
|
@@ -57,22 +57,32 @@ export class HalfEdgePositionDetail {
|
|
|
57
57
|
this._iTag = other._iTag;
|
|
58
58
|
this._dTag = other._dTag;
|
|
59
59
|
}
|
|
60
|
-
/**
|
|
60
|
+
/** Reset to null topo state. */
|
|
61
61
|
resetAsUnknown() {
|
|
62
62
|
this._node = undefined;
|
|
63
63
|
this._topo = HalfEdgeTopo.None;
|
|
64
64
|
}
|
|
65
|
-
/**
|
|
65
|
+
/** Create with null data. */
|
|
66
66
|
static create() {
|
|
67
67
|
const detail = new HalfEdgePositionDetail(undefined, 0, 0, 0, HalfEdgeTopo.None);
|
|
68
68
|
return detail;
|
|
69
69
|
}
|
|
70
|
-
getITag() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
getITag() {
|
|
71
|
+
return this._iTag;
|
|
72
|
+
}
|
|
73
|
+
setITag(value) {
|
|
74
|
+
this._iTag = value;
|
|
75
|
+
}
|
|
76
|
+
getDTag() {
|
|
77
|
+
return this._dTag;
|
|
78
|
+
}
|
|
79
|
+
setDTag(value) {
|
|
80
|
+
this._dTag = value;
|
|
81
|
+
}
|
|
82
|
+
getTopo() {
|
|
83
|
+
return this._topo;
|
|
84
|
+
}
|
|
85
|
+
/** Create with node, fraction along edge, marked as "HalfEdgeTopo.Edge". Compute interpolated xyz on the edge. */
|
|
76
86
|
static createEdgeAtFraction(node, edgeFraction) {
|
|
77
87
|
const node1 = node.faceSuccessor;
|
|
78
88
|
const x = Geometry.interpolate(node.x, edgeFraction, node1.x);
|
|
@@ -80,7 +90,8 @@ export class HalfEdgePositionDetail {
|
|
|
80
90
|
const z = Geometry.interpolate(node.z, edgeFraction, node1.z);
|
|
81
91
|
return new HalfEdgePositionDetail(node, x, y, z, HalfEdgeTopo.Edge, edgeFraction);
|
|
82
92
|
}
|
|
83
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Reassign contents so this instance becomes a face hit.
|
|
84
95
|
* @param node new node value. If missing, current node is left unchanged.
|
|
85
96
|
* @param xyz new coordinates. if missing, current coordinates are left unchanged.
|
|
86
97
|
*/
|
|
@@ -96,8 +107,7 @@ export class HalfEdgePositionDetail {
|
|
|
96
107
|
this._isExteriorTarget = undefined;
|
|
97
108
|
return this;
|
|
98
109
|
}
|
|
99
|
-
/**
|
|
100
|
-
*/
|
|
110
|
+
/** Reassign contents so this instance has dTag but no node or HalfEdgeTopo. */
|
|
101
111
|
resetAsUndefinedWithTag(dTag) {
|
|
102
112
|
this._topo = HalfEdgeTopo.None;
|
|
103
113
|
this._dTag = 0;
|
|
@@ -107,9 +117,10 @@ export class HalfEdgePositionDetail {
|
|
|
107
117
|
this._isExteriorTarget = undefined;
|
|
108
118
|
return this;
|
|
109
119
|
}
|
|
110
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Reassign contents so this instance becomes an edge hit.
|
|
111
122
|
* @param node new node value.
|
|
112
|
-
* @param edgeFraction new edge fraction.
|
|
123
|
+
* @param edgeFraction new edge fraction. xyz is recomputed from this edge and its face successor.
|
|
113
124
|
*/
|
|
114
125
|
resetAtEdgeAndFraction(node, edgeFraction) {
|
|
115
126
|
this._topo = HalfEdgeTopo.Edge;
|
|
@@ -122,14 +133,14 @@ export class HalfEdgePositionDetail {
|
|
|
122
133
|
this._isExteriorTarget = undefined;
|
|
123
134
|
return this;
|
|
124
135
|
}
|
|
125
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Create at a node.
|
|
126
138
|
* * Take xyz from the node.
|
|
127
139
|
*/
|
|
128
140
|
static createVertex(node) {
|
|
129
141
|
return new HalfEdgePositionDetail(node, node.x, node.y, node.z, HalfEdgeTopo.Vertex);
|
|
130
142
|
}
|
|
131
|
-
/** Mark as "HalfEdgeTopo.Vertex"
|
|
132
|
-
*/
|
|
143
|
+
/** Mark as "HalfEdgeTopo.Vertex". */
|
|
133
144
|
resetAsVertex(node) {
|
|
134
145
|
this._topo = HalfEdgeTopo.Vertex;
|
|
135
146
|
this._node = node;
|
|
@@ -138,7 +149,7 @@ export class HalfEdgePositionDetail {
|
|
|
138
149
|
this._isExteriorTarget = undefined;
|
|
139
150
|
return this;
|
|
140
151
|
}
|
|
141
|
-
/**
|
|
152
|
+
/** Set the flag for an exterior relationship to target. */
|
|
142
153
|
setIsExteriorTarget(isExterior) {
|
|
143
154
|
this._isExteriorTarget = isExterior;
|
|
144
155
|
}
|
|
@@ -148,30 +159,41 @@ export class HalfEdgePositionDetail {
|
|
|
148
159
|
this.y = node.y;
|
|
149
160
|
this.z = node.z;
|
|
150
161
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Return the (possibly undefined) edge fraction.
|
|
153
|
-
*/
|
|
162
|
+
/** Return the (possibly undefined) edge fraction. */
|
|
154
163
|
get edgeFraction() {
|
|
155
164
|
return this._edgeFraction;
|
|
156
165
|
}
|
|
157
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Property access for the flag for an exterior relationship to target.
|
|
158
168
|
* * undefined flag is returned as false.
|
|
159
|
-
|
|
169
|
+
*/
|
|
160
170
|
get isExteriorTarget() {
|
|
161
171
|
return this._isExteriorTarget !== undefined ? this._isExteriorTarget : false;
|
|
162
172
|
}
|
|
163
173
|
/** Return true if this detail is marked as being within a face. */
|
|
164
|
-
get isFace() {
|
|
174
|
+
get isFace() {
|
|
175
|
+
return this._topo === HalfEdgeTopo.Face;
|
|
176
|
+
}
|
|
165
177
|
/** Return true if this detail is marked as being within an edge. */
|
|
166
|
-
get isEdge() {
|
|
178
|
+
get isEdge() {
|
|
179
|
+
return this._topo === HalfEdgeTopo.Edge;
|
|
180
|
+
}
|
|
167
181
|
/** Return true if this detail is marked as being at a vertex. */
|
|
168
|
-
get isVertex() {
|
|
182
|
+
get isVertex() {
|
|
183
|
+
return this._topo === HalfEdgeTopo.Vertex;
|
|
184
|
+
}
|
|
169
185
|
/** Return true if this detail has no vertex, edge, or face qualifier. */
|
|
170
|
-
get isUnclassified() {
|
|
186
|
+
get isUnclassified() {
|
|
187
|
+
return this._topo === HalfEdgeTopo.None;
|
|
188
|
+
}
|
|
171
189
|
/** Return the node reference from this detail */
|
|
172
|
-
get node() {
|
|
190
|
+
get node() {
|
|
191
|
+
return this._node;
|
|
192
|
+
}
|
|
173
193
|
/** Return the (clone of, or optional filled in result) coordinates from this detail. */
|
|
174
|
-
clonePoint(result) {
|
|
194
|
+
clonePoint(result) {
|
|
195
|
+
return Point3d.create(this.x, this.y, this.z, result);
|
|
196
|
+
}
|
|
175
197
|
/*
|
|
176
198
|
// If candidateKey is less than resultKey, replace resultPos and resultKey
|
|
177
199
|
// by the candidate data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HalfEdgePositionDetail.js","sourceRoot":"","sources":["../../../src/topology/HalfEdgePositionDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAIxD;;GAEG;AACH,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,wBAAwB;IACxB,+CAAQ,CAAA;IACR,4DAA4D;IAC5D,mDAAU,CAAA;IACV,yBAAyB;IACzB,+CAAQ,CAAA;IACR,+CAA+C;IAC/C,+CAAQ,CAAA;IACR;;MAEE;IACF,+DAAY,CAAA;AACd,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB;AACD;;;;;GAKG;AACH,MAAM,OAAO,sBAAsB;IAiBjC;;OAEG;IACH,YAAoB,IAA0B,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,IAAkB,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;IACzE,iEAAiE;IACjE,IAAW,QAAQ,KAAc,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7E,yEAAyE;IACzE,IAAW,cAAc,KAAc,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAEjF,iDAAiD;IACjD,IAAW,IAAI,KAA2B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,wFAAwF;IACjF,UAAU,CAAC,MAAgB,IAAa,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAEvG;;;;;;;;;;;;;;MAcE;IAEK,MAAM,CAAC,CAAS,EAAE,CAAS;QAChC,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAE1H,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Topology\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { XYAndZ } from \"../geometry3d/XYZProps\";\r\nimport { HalfEdge } from \"./Graph\";\r\n\r\n/**\r\n * Enumeration of categorization of \"where\" a HalfEdgePositionDetail is sitting in the graph.\r\n */\r\nexport enum HalfEdgeTopo {\r\n /** No known position */\r\n None = 0,\r\n /** Sitting at a vertex, reached by a ray in this sector */\r\n Vertex = 1,\r\n /** Sitting on an edge */\r\n Edge = 2,\r\n /** Face point (before hitting barrier edge) */\r\n Face = 3,\r\n /** Exterior point (after hitting barrier edge at fraction)\r\n * Fraction is 0 if exterior point \"in sweep around exterior corner\"\r\n */\r\n ExteriorFace\r\n}\r\n/**\r\n * Description of a generalized position within a graph, categorized as:\r\n * * \"at a certain node around a vertex\"\r\n * * \"at a fractional position along an edge\r\n * * \"within a face\"\r\n */\r\nexport class HalfEdgePositionDetail {\r\n /** the relevant node */\r\n private _node?: HalfEdge;\r\n /** The current coordinates */\r\n public x: number;\r\n public y: number;\r\n public z: number;\r\n /** fractional position along edge. Only defined if the topo tag is `HalfEdgeTopo.Edge` */\r\n private _edgeFraction?: number;\r\n /** Enumeration of status vertex, edge, or face status. */\r\n private _topo: HalfEdgeTopo;\r\n /** first data tag */\r\n private _iTag?: number;\r\n /** second data tag */\r\n private _dTag?: number;\r\n /** Special case for point on edge or vertex but target beyond and exterior. */\r\n private _isExteriorTarget?: boolean;\r\n /** Constructor.\r\n * * The point is CAPTURED. (static `create` methods normally clone their inputs.)\r\n */\r\n private constructor(node: HalfEdge | undefined, x: number, y: number, z: number, topo: HalfEdgeTopo, edgeFraction?: number, iTag?: number, dTag?: number, isExteriorTarget?: boolean) {\r\n this._node = node;\r\n this.x = x; this.y = y; this.z = z;\r\n this._topo = topo;\r\n this._edgeFraction = edgeFraction;\r\n this._iTag = iTag;\r\n this._dTag = dTag;\r\n this._isExteriorTarget = isExteriorTarget;\r\n }\r\n\r\n /** Copy (clones of) all data from other */\r\n public setFrom(other: HalfEdgePositionDetail) {\r\n this._node = other._node;\r\n this.x = other.x;\r\n this.y = other.y;\r\n this.z = other.z;\r\n this._topo = other._topo;\r\n this._edgeFraction = other._edgeFraction;\r\n this._iTag = other._iTag;\r\n this._dTag = other._dTag;\r\n }\r\n /** reset to null topo state. */\r\n public resetAsUnknown() {\r\n this._node = undefined;\r\n this._topo = HalfEdgeTopo.None;\r\n }\r\n /** Create with null data. */\r\n public static create(): HalfEdgePositionDetail {\r\n const detail = new HalfEdgePositionDetail(undefined, 0, 0, 0, HalfEdgeTopo.None);\r\n return detail;\r\n }\r\n public getITag(): number | undefined { return this._iTag; }\r\n public setITag(value: number): void { this._iTag = value; }\r\n\r\n public getDTag(): number | undefined { return this._dTag; }\r\n public setDTag(value: number): void { this._dTag = value; }\r\n public getTopo(): HalfEdgeTopo { return this._topo; }\r\n\r\n /** Create with node, fraction along edge, marked as \"HalfEdgeTopo.Edge\". Compute interpolated xyz on the edge */\r\n public static createEdgeAtFraction(node: HalfEdge, edgeFraction: number): HalfEdgePositionDetail {\r\n const node1 = node.faceSuccessor;\r\n const x = Geometry.interpolate(node.x, edgeFraction, node1.x);\r\n const y = Geometry.interpolate(node.y, edgeFraction, node1.y);\r\n const z = Geometry.interpolate(node.z, edgeFraction, node1.z);\r\n return new HalfEdgePositionDetail(node, x, y, z, HalfEdgeTopo.Edge, edgeFraction);\r\n }\r\n\r\n /** reassign contents so this instance becomes a face hit.\r\n * @param node new node value. If missing, current node is left unchanged.\r\n * @param xyz new coordinates. if missing, current coordinates are left unchanged.\r\n */\r\n public resetAsFace(node?: HalfEdge, xyz?: XYAndZ): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.Face;\r\n if (node)\r\n this._node = node;\r\n if (xyz) {\r\n this.x = xyz.x;\r\n this.y = xyz.y;\r\n this.z = xyz.z;\r\n }\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n\r\n /** reassign contents so this instance has dTag but no node or HalfEdgeTopo\r\n */\r\n public resetAsUndefinedWithTag(dTag: number): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.None;\r\n this._dTag = 0;\r\n this._iTag = 0;\r\n this._dTag = dTag;\r\n this._node = undefined;\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n\r\n /** reassign contents so this instance becomes an edge hit\r\n * @param node new node value.\r\n * @param edgeFraction new edge fraction. xyz is recomputed from this edge and its face successor.\r\n */\r\n public resetAtEdgeAndFraction(node: HalfEdge, edgeFraction: number): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.Edge;\r\n this._node = node;\r\n const nodeB = node.faceSuccessor;\r\n this._edgeFraction = edgeFraction;\r\n this.x = Geometry.interpolate(node.x, edgeFraction, nodeB.x);\r\n this.y = Geometry.interpolate(node.y, edgeFraction, nodeB.y);\r\n this.z = Geometry.interpolate(node.z, edgeFraction, nodeB.z);\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n\r\n /** Create at a node.\r\n * * Take xyz from the node.\r\n */\r\n public static createVertex(node: HalfEdge): HalfEdgePositionDetail {\r\n return new HalfEdgePositionDetail(node, node.x, node.y, node.z, HalfEdgeTopo.Vertex);\r\n }\r\n\r\n /** Mark as \"HalfEdgeTopo.Vertex\"\r\n */\r\n public resetAsVertex(node: HalfEdge): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.Vertex;\r\n this._node = node;\r\n this._edgeFraction = 0.0;\r\n this.setXYZFromNode(node);\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n /** Set the flag for an exterior relationship to target. */\r\n public setIsExteriorTarget(isExterior: boolean | undefined) {\r\n this._isExteriorTarget = isExterior;\r\n }\r\n /** Copy x,y,z from the node to this instance local values. */\r\n public setXYZFromNode(node: HalfEdge) {\r\n this.x = node.x;\r\n this.y = node.y;\r\n this.z = node.z;\r\n }\r\n /**\r\n * Return the (possibly undefined) edge fraction.\r\n */\r\n public get edgeFraction(): number | undefined {\r\n return this._edgeFraction;\r\n }\r\n /** property access for the flag for an exterior relationship to target.\r\n * * undefined flag is returned as false.\r\n */\r\n public get isExteriorTarget(): boolean {\r\n return this._isExteriorTarget !== undefined ? this._isExteriorTarget : false;\r\n }\r\n\r\n /** Return true if this detail is marked as being within a face. */\r\n public get isFace(): boolean { return this._topo === HalfEdgeTopo.Face; }\r\n /** Return true if this detail is marked as being within an edge. */\r\n public get isEdge(): boolean { return this._topo === HalfEdgeTopo.Edge; }\r\n /** Return true if this detail is marked as being at a vertex. */\r\n public get isVertex(): boolean { return this._topo === HalfEdgeTopo.Vertex; }\r\n /** Return true if this detail has no vertex, edge, or face qualifier. */\r\n public get isUnclassified(): boolean { return this._topo === HalfEdgeTopo.None; }\r\n\r\n /** Return the node reference from this detail */\r\n public get node(): HalfEdge | undefined { return this._node; }\r\n /** Return the (clone of, or optional filled in result) coordinates from this detail. */\r\n public clonePoint(result?: Point3d): Point3d { return Point3d.create(this.x, this.y, this.z, result); }\r\n\r\n /*\r\n // If candidateKey is less than resultKey, replace resultPos and resultKey\r\n // by the candidate data.\r\n public updateMinimizer(\r\n HalfEdgePositionDetail & resultPos, number & resultKey,\r\n : HalfEdgePositionDetail & candidatePos, candidateKey: number\r\n ): boolean {\r\n if (candidateKey < resultKey) {\r\n resultKey = candidateKey;\r\n resultPos = candidatePos;\r\n return true;\r\n }\r\n return false;\r\n }\r\n */\r\n\r\n public isAtXY(x: number, y: number): boolean {\r\n return this._topo !== HalfEdgeTopo.None && Geometry.isSameCoordinate(this.x, x) && Geometry.isSameCoordinate(this.y, y);\r\n\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"HalfEdgePositionDetail.js","sourceRoot":"","sources":["../../../src/topology/HalfEdgePositionDetail.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAIxD,iGAAiG;AACjG,MAAM,CAAN,IAAY,YAcX;AAdD,WAAY,YAAY;IACtB,yBAAyB;IACzB,+CAAQ,CAAA;IACR,4DAA4D;IAC5D,mDAAU,CAAA;IACV,0BAA0B;IAC1B,+CAAQ,CAAA;IACR,gDAAgD;IAChD,+CAAQ,CAAA;IACR;;;MAGE;IACF,+DAAgB,CAAA;AAClB,CAAC,EAdW,YAAY,KAAZ,YAAY,QAcvB;AACD;;;;;GAKG;AACH,MAAM,O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AC;IACD,oEAAoE;IACpE,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,IAAI,CAAC;IAC1C,CAAC;IACD,iEAAiE;IACjE,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,MAAM,CAAC;IAC5C,CAAC;IACD,yEAAyE;IACzE,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,IAAI,CAAC;IAC1C,CAAC;IACD,iDAAiD;IACjD,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,wFAAwF;IACjF,UAAU,CAAC,MAAgB;QAChC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IACD;;;;;;;;;;;;;;MAcE;IACK,MAAM,CAAC,CAAS,EAAE,CAAS;QAChC,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,CAAC,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1H,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Topology\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { XYAndZ } from \"../geometry3d/XYZProps\";\r\nimport { HalfEdge } from \"./Graph\";\r\n\r\n/** Enumeration of categorization of \"where\" a HalfEdgePositionDetail is sitting in the graph. */\r\nexport enum HalfEdgeTopo {\r\n /** No known position. */\r\n None = 0,\r\n /** Sitting at a vertex, reached by a ray in this sector. */\r\n Vertex = 1,\r\n /** Sitting on an edge. */\r\n Edge = 2,\r\n /** Face point (before hitting barrier edge). */\r\n Face = 3,\r\n /**\r\n * Exterior point (after hitting barrier edge at fraction).\r\n * Fraction is 0 if exterior point \"in sweep around exterior corner\".\r\n */\r\n ExteriorFace = 4\r\n}\r\n/**\r\n * Description of a generalized position within a graph, categorized as:\r\n * * \"at a certain node around a vertex\"\r\n * * \"at a fractional position along an edge\"\r\n * * \"within a face\"\r\n */\r\nexport class HalfEdgePositionDetail {\r\n /** The relevant node. */\r\n private _node?: HalfEdge;\r\n /** The current coordinates. */\r\n public x: number;\r\n public y: number;\r\n public z: number;\r\n /** Fractional position along edge. Only defined if the topo tag is `HalfEdgeTopo.Edge`. */\r\n private _edgeFraction?: number;\r\n /** Enumeration of status vertex, edge, or face status. */\r\n private _topo: HalfEdgeTopo;\r\n /** First data tag. */\r\n private _iTag?: number;\r\n /** Second data tag. */\r\n private _dTag?: number;\r\n /** Special case for point on edge or vertex but target beyond and exterior. */\r\n private _isExteriorTarget?: boolean;\r\n /**\r\n * Constructor.\r\n * * The point is CAPTURED (static `create` methods normally clone their inputs).\r\n */\r\n private constructor(\r\n node: HalfEdge | undefined,\r\n x: number, y: number, z: number,\r\n topo: HalfEdgeTopo,\r\n edgeFraction?: number,\r\n iTag?: number,\r\n dTag?: number,\r\n isExteriorTarget?: boolean,\r\n ) {\r\n this._node = node;\r\n this.x = x; this.y = y; this.z = z;\r\n this._topo = topo;\r\n this._edgeFraction = edgeFraction;\r\n this._iTag = iTag;\r\n this._dTag = dTag;\r\n this._isExteriorTarget = isExteriorTarget;\r\n }\r\n /** Copy (clones of) all data from other. */\r\n public setFrom(other: HalfEdgePositionDetail) {\r\n this._node = other._node;\r\n this.x = other.x;\r\n this.y = other.y;\r\n this.z = other.z;\r\n this._topo = other._topo;\r\n this._edgeFraction = other._edgeFraction;\r\n this._iTag = other._iTag;\r\n this._dTag = other._dTag;\r\n }\r\n /** Reset to null topo state. */\r\n public resetAsUnknown() {\r\n this._node = undefined;\r\n this._topo = HalfEdgeTopo.None;\r\n }\r\n /** Create with null data. */\r\n public static create(): HalfEdgePositionDetail {\r\n const detail = new HalfEdgePositionDetail(undefined, 0, 0, 0, HalfEdgeTopo.None);\r\n return detail;\r\n }\r\n public getITag(): number | undefined {\r\n return this._iTag;\r\n }\r\n public setITag(value: number): void {\r\n this._iTag = value;\r\n }\r\n public getDTag(): number | undefined {\r\n return this._dTag;\r\n }\r\n public setDTag(value: number): void {\r\n this._dTag = value;\r\n }\r\n public getTopo(): HalfEdgeTopo {\r\n return this._topo;\r\n }\r\n /** Create with node, fraction along edge, marked as \"HalfEdgeTopo.Edge\". Compute interpolated xyz on the edge. */\r\n public static createEdgeAtFraction(node: HalfEdge, edgeFraction: number): HalfEdgePositionDetail {\r\n const node1 = node.faceSuccessor;\r\n const x = Geometry.interpolate(node.x, edgeFraction, node1.x);\r\n const y = Geometry.interpolate(node.y, edgeFraction, node1.y);\r\n const z = Geometry.interpolate(node.z, edgeFraction, node1.z);\r\n return new HalfEdgePositionDetail(node, x, y, z, HalfEdgeTopo.Edge, edgeFraction);\r\n }\r\n /**\r\n * Reassign contents so this instance becomes a face hit.\r\n * @param node new node value. If missing, current node is left unchanged.\r\n * @param xyz new coordinates. if missing, current coordinates are left unchanged.\r\n */\r\n public resetAsFace(node?: HalfEdge, xyz?: XYAndZ): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.Face;\r\n if (node)\r\n this._node = node;\r\n if (xyz) {\r\n this.x = xyz.x;\r\n this.y = xyz.y;\r\n this.z = xyz.z;\r\n }\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n /** Reassign contents so this instance has dTag but no node or HalfEdgeTopo. */\r\n public resetAsUndefinedWithTag(dTag: number): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.None;\r\n this._dTag = 0;\r\n this._iTag = 0;\r\n this._dTag = dTag;\r\n this._node = undefined;\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n /**\r\n * Reassign contents so this instance becomes an edge hit.\r\n * @param node new node value.\r\n * @param edgeFraction new edge fraction. xyz is recomputed from this edge and its face successor.\r\n */\r\n public resetAtEdgeAndFraction(node: HalfEdge, edgeFraction: number): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.Edge;\r\n this._node = node;\r\n const nodeB = node.faceSuccessor;\r\n this._edgeFraction = edgeFraction;\r\n this.x = Geometry.interpolate(node.x, edgeFraction, nodeB.x);\r\n this.y = Geometry.interpolate(node.y, edgeFraction, nodeB.y);\r\n this.z = Geometry.interpolate(node.z, edgeFraction, nodeB.z);\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n /**\r\n * Create at a node.\r\n * * Take xyz from the node.\r\n */\r\n public static createVertex(node: HalfEdge): HalfEdgePositionDetail {\r\n return new HalfEdgePositionDetail(node, node.x, node.y, node.z, HalfEdgeTopo.Vertex);\r\n }\r\n /** Mark as \"HalfEdgeTopo.Vertex\". */\r\n public resetAsVertex(node: HalfEdge): HalfEdgePositionDetail {\r\n this._topo = HalfEdgeTopo.Vertex;\r\n this._node = node;\r\n this._edgeFraction = 0.0;\r\n this.setXYZFromNode(node);\r\n this._isExteriorTarget = undefined;\r\n return this;\r\n }\r\n /** Set the flag for an exterior relationship to target. */\r\n public setIsExteriorTarget(isExterior: boolean | undefined) {\r\n this._isExteriorTarget = isExterior;\r\n }\r\n /** Copy x,y,z from the node to this instance local values. */\r\n public setXYZFromNode(node: HalfEdge) {\r\n this.x = node.x;\r\n this.y = node.y;\r\n this.z = node.z;\r\n }\r\n /** Return the (possibly undefined) edge fraction. */\r\n public get edgeFraction(): number | undefined {\r\n return this._edgeFraction;\r\n }\r\n /**\r\n * Property access for the flag for an exterior relationship to target.\r\n * * undefined flag is returned as false.\r\n */\r\n public get isExteriorTarget(): boolean {\r\n return this._isExteriorTarget !== undefined ? this._isExteriorTarget : false;\r\n }\r\n /** Return true if this detail is marked as being within a face. */\r\n public get isFace(): boolean {\r\n return this._topo === HalfEdgeTopo.Face;\r\n }\r\n /** Return true if this detail is marked as being within an edge. */\r\n public get isEdge(): boolean {\r\n return this._topo === HalfEdgeTopo.Edge;\r\n }\r\n /** Return true if this detail is marked as being at a vertex. */\r\n public get isVertex(): boolean {\r\n return this._topo === HalfEdgeTopo.Vertex;\r\n }\r\n /** Return true if this detail has no vertex, edge, or face qualifier. */\r\n public get isUnclassified(): boolean {\r\n return this._topo === HalfEdgeTopo.None;\r\n }\r\n /** Return the node reference from this detail */\r\n public get node(): HalfEdge | undefined {\r\n return this._node;\r\n }\r\n /** Return the (clone of, or optional filled in result) coordinates from this detail. */\r\n public clonePoint(result?: Point3d): Point3d {\r\n return Point3d.create(this.x, this.y, this.z, result);\r\n }\r\n /*\r\n // If candidateKey is less than resultKey, replace resultPos and resultKey\r\n // by the candidate data.\r\n public updateMinimizer(\r\n HalfEdgePositionDetail & resultPos, number & resultKey,\r\n : HalfEdgePositionDetail & candidatePos, candidateKey: number\r\n ): boolean {\r\n if (candidateKey < resultKey) {\r\n resultKey = candidateKey;\r\n resultPos = candidatePos;\r\n return true;\r\n }\r\n return false;\r\n }\r\n */\r\n public isAtXY(x: number, y: number): boolean {\r\n return this._topo !== HalfEdgeTopo.None && Geometry.isSameCoordinate(this.x, x) && Geometry.isSameCoordinate(this.y, y);\r\n }\r\n}\r\n"]}
|
|
@@ -4,35 +4,87 @@
|
|
|
4
4
|
import { Point3d } from "../geometry3d/Point3dVector3d";
|
|
5
5
|
import { HalfEdgeGraph } from "./Graph";
|
|
6
6
|
import { HalfEdgePositionDetail } from "./HalfEdgePositionDetail";
|
|
7
|
+
/**
|
|
8
|
+
* Options for setting the z-coordinate of a vertex in the triangulation when a point with the same xy is inserted.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare enum InsertedVertexZOptions {
|
|
12
|
+
/** The point's z-coordinate is ignored, and the existing vertex's z-coordinate is unchanged. */
|
|
13
|
+
Ignore = 0,
|
|
14
|
+
/** The point's z-coordinate replaces the existing vertex's z-coordinate. */
|
|
15
|
+
Replace = 1,
|
|
16
|
+
/**
|
|
17
|
+
* Like [[InsertedVertexZOptions.Replace]], but the existing vertex's z-coordinate is updated only if the
|
|
18
|
+
* point's z-coordinate is larger.
|
|
19
|
+
*/
|
|
20
|
+
ReplaceIfLarger = 2,
|
|
21
|
+
/**
|
|
22
|
+
* Like [[InsertedVertexZOptions.Replace]], but the existing vertex's z-coordinate is updated only if the
|
|
23
|
+
* point's z-coordinate is smaller.
|
|
24
|
+
*/
|
|
25
|
+
ReplaceIfSmaller = 3
|
|
26
|
+
}
|
|
7
27
|
/**
|
|
8
28
|
* Context for repeated insertion of new points in a graph.
|
|
9
|
-
* * Initial graph should have clean outer boundary
|
|
29
|
+
* * Initial graph should have clean outer boundary (e.g., as typically marked with `HalfEdgeMask.EXTERIOR` and
|
|
30
|
+
* `HalfEdgeMask.BOUNDARY_EDGE`).
|
|
10
31
|
* * After each insertion, the current "position" within the graph is remembered so that each subsequent insertion
|
|
11
|
-
*
|
|
32
|
+
* can reuse that position as start for walking to the new point.
|
|
33
|
+
* @internal
|
|
12
34
|
*/
|
|
13
35
|
export declare class InsertAndRetriangulateContext {
|
|
14
36
|
private _graph;
|
|
15
37
|
private _edgeSet;
|
|
16
38
|
private _searcher;
|
|
39
|
+
private _tolerance;
|
|
17
40
|
private constructor();
|
|
18
41
|
/** Create a new context referencing the graph. */
|
|
19
|
-
static create(graph: HalfEdgeGraph): InsertAndRetriangulateContext;
|
|
42
|
+
static create(graph: HalfEdgeGraph, tolerance?: number): InsertAndRetriangulateContext;
|
|
20
43
|
/** Query the (pointer to) the graph in the context. */
|
|
21
44
|
get graph(): HalfEdgeGraph;
|
|
45
|
+
/**
|
|
46
|
+
* Walk face from edgeNode. Insert new edges back to start node from all except immediate successor and predecessor.
|
|
47
|
+
* Insert all new nodes and nodes of the existing face in edgeSet.
|
|
48
|
+
*/
|
|
22
49
|
private retriangulateFromBaseVertex;
|
|
23
50
|
/** Reset the "current" position to unknown state. */
|
|
24
51
|
reset(): void;
|
|
25
|
-
/** Return a (reference to!) the current position in the graph */
|
|
52
|
+
/** Return a (reference to!) the current position in the graph. */
|
|
26
53
|
get currentPosition(): HalfEdgePositionDetail;
|
|
27
|
-
/**
|
|
28
|
-
* Linear search through the graph
|
|
29
|
-
* * Returns a HalfEdgePositionDetail for the nearest edge or vertex.
|
|
30
|
-
* @param xyz
|
|
31
|
-
*/
|
|
54
|
+
/** Linear search for the nearest graph edge or vertex. */
|
|
32
55
|
searchForNearestEdgeOrVertex(xyz: Point3d): HalfEdgePositionDetail;
|
|
56
|
+
/** Linear search for the nearest graph vertex. */
|
|
33
57
|
searchForNearestVertex(xyz: Point3d): HalfEdgePositionDetail;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Reset the "current" position to a vertex nearest the target point.
|
|
60
|
+
* @param xyz target point
|
|
61
|
+
* @param searchEdgesToo reset to nearest vertex or edge
|
|
62
|
+
*/
|
|
63
|
+
resetSearch(xyz: Point3d, searchEdgesToo: boolean): void;
|
|
64
|
+
/** Reclassify the current interior face hit if it is too close to an edge of the face. */
|
|
65
|
+
private reclassifyFaceHit;
|
|
66
|
+
/** Reclassify the current interior edge hit if it is too close to an edge of either adjacent face. */
|
|
67
|
+
private reclassifyEdgeHit;
|
|
68
|
+
/**
|
|
69
|
+
* Given a point that was just inserted into the graph at the given node, apply the z-coordinate rule around
|
|
70
|
+
* the vertex loop.
|
|
71
|
+
*/
|
|
72
|
+
private updateZAroundVertex;
|
|
73
|
+
/**
|
|
74
|
+
* Insert a new point into the graph and retriangulate.
|
|
75
|
+
* @param point the coordinates of the node to be inserted.
|
|
76
|
+
* @param newZWins rule governing when `point.z` should override the z-coordinate of an existing vertex with the
|
|
77
|
+
* same x and y.
|
|
78
|
+
* @returns true if and only if the point didn't need to be inserted or was successfully inserted.
|
|
79
|
+
*/
|
|
80
|
+
insertAndRetriangulate(point: Point3d, newZWins: InsertedVertexZOptions): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Advance movingPosition to a face, edge, or vertex position detail that contains `target`.
|
|
83
|
+
* @param movingPosition input seed for search, updated on return.
|
|
84
|
+
* @param target point to search for containing topology in the graph.
|
|
85
|
+
* @param announcer optional callback invoked during search loop; return false to end search.
|
|
86
|
+
* @returns true if search was successful.
|
|
87
|
+
*/
|
|
88
|
+
moveToPoint(movingPosition: HalfEdgePositionDetail, target: Point3d, announcer?: (position: HalfEdgePositionDetail) => boolean): boolean;
|
|
37
89
|
}
|
|
38
90
|
//# sourceMappingURL=InsertAndRetriangulateContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsertAndRetriangulateContext.d.ts","sourceRoot":"","sources":["../../../src/topology/InsertAndRetriangulateContext.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"InsertAndRetriangulateContext.d.ts","sourceRoot":"","sources":["../../../src/topology/InsertAndRetriangulateContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAIxD,OAAO,EAAY,aAAa,EAAgB,MAAM,SAAS,CAAC;AAGhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,gGAAgG;IAChG,MAAM,IAAA;IACN,4EAA4E;IAC5E,OAAO,IAAA;IACP;;;OAGG;IACH,eAAe,IAAA;IACf;;;OAGG;IACH,gBAAgB,IAAA;CACjB;AAED;;;;;;;GAOG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO;IA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