@itwin/core-geometry 3.5.0-dev.7 → 3.5.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 +78 -1
- package/lib/cjs/Geometry.d.ts +21 -5
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +17 -8
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +11 -5
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +47 -18
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts +10 -3
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js +12 -4
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.d.ts.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js +4 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
- package/lib/cjs/bspline/KnotVector.js +3 -0
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +8 -2
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +15 -3
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +15 -7
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +46 -29
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +13 -4
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +23 -2
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +4 -3
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js +8 -6
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +20 -18
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +58 -339
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +8 -2
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +9 -0
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +18 -2
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +39 -23
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.d.ts +9 -7
- package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js +4 -0
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +2 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js +5 -4
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +5 -0
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +17 -3
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +9 -6
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +55 -47
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts +55 -0
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +143 -0
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -0
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts +43 -0
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +146 -0
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -0
- package/lib/cjs/curve/internalContexts/CurveLengthContext.d.ts +33 -0
- package/lib/cjs/curve/internalContexts/CurveLengthContext.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js +91 -0
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -0
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +21 -0
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -0
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js +34 -0
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -0
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +31 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +77 -12
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts +2 -2
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +15 -8
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +12 -7
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +12 -3
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +20 -10
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +30 -15
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +25 -8
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +67 -15
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +1 -0
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js +2 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +86 -25
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +230 -81
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +14 -4
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +15 -5
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +121 -67
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +318 -137
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +1 -2
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +1 -2
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.d.ts +5 -5
- package/lib/cjs/geometry3d/Ray3d.js +5 -5
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +0 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +4 -4
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +3 -3
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +7 -2
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +8 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +36 -8
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +112 -31
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +4 -3
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts +1 -1
- package/lib/cjs/solid/Sphere.js +3 -3
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts +17 -13
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +67 -38
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +1 -1
- package/lib/cjs/topology/Graph.js +1 -1
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +9 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +1 -1
- package/lib/cjs/topology/Triangulation.js +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +21 -5
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +17 -8
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +11 -5
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +47 -18
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts +10 -3
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js +12 -4
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.d.ts.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js +4 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
- package/lib/esm/bspline/KnotVector.js +3 -0
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +8 -2
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +15 -3
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +15 -7
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +46 -29
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +13 -4
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +23 -2
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +4 -3
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js +8 -6
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +20 -18
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +52 -333
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +8 -2
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +9 -0
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +18 -2
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +39 -23
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.d.ts +9 -7
- package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/esm/curve/ProxyCurve.js +4 -0
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts +2 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js +5 -4
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +5 -0
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +17 -3
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +9 -6
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +56 -48
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts +55 -0
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +139 -0
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -0
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts +43 -0
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +142 -0
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -0
- package/lib/esm/curve/internalContexts/CurveLengthContext.d.ts +33 -0
- package/lib/esm/curve/internalContexts/CurveLengthContext.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/CurveLengthContext.js +87 -0
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -0
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +21 -0
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -0
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js +30 -0
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -0
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +31 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +77 -12
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts +2 -2
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +15 -8
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +12 -7
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +12 -3
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +20 -10
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +30 -15
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +25 -8
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +67 -15
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +1 -0
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js +2 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +86 -25
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +230 -81
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +14 -4
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +15 -5
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +121 -67
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +318 -137
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +1 -2
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +1 -2
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.d.ts +5 -5
- package/lib/esm/geometry3d/Ray3d.js +5 -5
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +0 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +4 -4
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +3 -3
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +7 -2
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +8 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +36 -8
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +113 -32
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +4 -3
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts +1 -1
- package/lib/esm/solid/Sphere.js +3 -3
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts +17 -13
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +67 -38
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +1 -1
- package/lib/esm/topology/Graph.js +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +9 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +1 -1
- package/lib/esm/topology/Triangulation.js +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +5 -5
|
@@ -8,7 +8,7 @@ import { Plane3dByOriginAndUnitNormal } from "../geometry3d/Plane3dByOriginAndUn
|
|
|
8
8
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
9
9
|
import { Matrix4d } from "../geometry4d/Matrix4d";
|
|
10
10
|
import { MomentData } from "../geometry4d/MomentData";
|
|
11
|
-
import { IndexedEdgeMatcher } from "./IndexedEdgeMatcher";
|
|
11
|
+
import { IndexedEdgeMatcher, SortableEdgeCluster } from "./IndexedEdgeMatcher";
|
|
12
12
|
import { IndexedPolyface, Polyface, PolyfaceVisitor } from "./Polyface";
|
|
13
13
|
import { RangeLengthData } from "./RangeLengthData";
|
|
14
14
|
/**
|
|
@@ -192,10 +192,10 @@ export declare class PolyfaceQuery {
|
|
|
192
192
|
* Return a mesh with
|
|
193
193
|
* * clusters of adjacent, coplanar facets merged into larger facets.
|
|
194
194
|
* * other facets included unchanged.
|
|
195
|
-
* @param mesh existing mesh
|
|
195
|
+
* @param mesh existing mesh or visitor
|
|
196
196
|
* @returns
|
|
197
197
|
*/
|
|
198
|
-
static cloneWithMaximalPlanarFacets(mesh:
|
|
198
|
+
static cloneWithMaximalPlanarFacets(mesh: Polyface | PolyfaceVisitor): IndexedPolyface | undefined;
|
|
199
199
|
/**
|
|
200
200
|
* Return a mesh with "some" holes filled in with new facets.
|
|
201
201
|
* * The candidates to be filled are all loops returned by boundaryChainsAsLineString3d
|
|
@@ -211,7 +211,7 @@ export declare class PolyfaceQuery {
|
|
|
211
211
|
* @param unfilledChains optional array to receive the points around holes that were not filled.
|
|
212
212
|
* @returns
|
|
213
213
|
*/
|
|
214
|
-
static fillSimpleHoles(mesh:
|
|
214
|
+
static fillSimpleHoles(mesh: Polyface | PolyfaceVisitor, options: HoleFillOptions, unfilledChains?: LineString3d[]): IndexedPolyface | undefined;
|
|
215
215
|
/** Clone the facets in each partition to a separate polyface.
|
|
216
216
|
*
|
|
217
217
|
*/
|
|
@@ -222,9 +222,21 @@ export declare class PolyfaceQuery {
|
|
|
222
222
|
/** If the visitor's client is a polyface, simply return its point array length.
|
|
223
223
|
* If not a polyface, visit all facets to find the largest index.
|
|
224
224
|
*/
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
*
|
|
225
|
+
static visitorClientPointCount(visitor: PolyfaceVisitor): number;
|
|
226
|
+
/** If the visitor's client is a polyface, simply return its facet count.
|
|
227
|
+
* If not a polyface, visit all facets to accumulate a count.
|
|
228
|
+
*/
|
|
229
|
+
static visitorClientFacetCount(visitor: PolyfaceVisitor): number;
|
|
230
|
+
/** Partition the facet set into connected components such that two adjacent facets are in the same component if and only if they are adjacent across a clustered edge.
|
|
231
|
+
* @param edgeClusters sorted and clustered edges (cf. `IndexedEdgeMatcher.sortAndCollectClusters`).
|
|
232
|
+
* @param numFacets facet count in the parent mesh. In particular, `edge.facetIndex < numFacets` for every input edge.
|
|
233
|
+
* @return collection of facet index arrays, one array per connected component
|
|
234
|
+
*/
|
|
235
|
+
private static partitionFacetIndicesBySortableEdgeClusters;
|
|
236
|
+
/** Partition the facet set into connected components. Each facet in a given component shares an edge only with other facets in the component (or is a boundary edge).
|
|
237
|
+
* @param polyface facets to partition
|
|
238
|
+
* @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface
|
|
239
|
+
* @return collection of facet index arrays, one per connected component
|
|
228
240
|
*/
|
|
229
241
|
static partitionFacetIndicesByEdgeConnectedComponent(polyface: Polyface | PolyfaceVisitor, stopAtVisibleEdges?: boolean): number[][];
|
|
230
242
|
/** Find segments (within the linestring) which project to facets.
|
|
@@ -299,14 +311,30 @@ export declare class PolyfaceQuery {
|
|
|
299
311
|
* Set the visibility of a particular edge of a particular facet.
|
|
300
312
|
* @param polyface containing polyface
|
|
301
313
|
* @param facetIndex facet index
|
|
302
|
-
* @param vertexIndex vertex index (in vertex array)
|
|
314
|
+
* @param vertexIndex vertex index (in vertex array) at which the edge starts
|
|
303
315
|
* @param value visibility value.
|
|
304
316
|
*/
|
|
305
317
|
static setSingleEdgeVisibility(polyface: IndexedPolyface, facetIndex: number, vertexIndex: number, value: boolean): void;
|
|
318
|
+
/**
|
|
319
|
+
* Get the visibility of a particular edge of a particular facet.
|
|
320
|
+
* @param polyface containing polyface
|
|
321
|
+
* @param facetIndex facet index
|
|
322
|
+
* @param vertexIndex vertex index (in vertex array) at which the edge starts
|
|
323
|
+
*/
|
|
324
|
+
static getSingleEdgeVisibility(polyface: IndexedPolyface, facetIndex: number, vertexIndex: number): boolean | undefined;
|
|
306
325
|
/** Load all half edges from a mesh to an IndexedEdgeMatcher.
|
|
307
326
|
* @param polyface a mesh, or a visitor assumed to have numWrap === 1
|
|
308
327
|
*/
|
|
309
328
|
static createIndexedEdges(polyface: Polyface | PolyfaceVisitor): IndexedEdgeMatcher;
|
|
329
|
+
/**
|
|
330
|
+
* Return manifold edge pairs whose dihedral angle is bounded by the given angle.
|
|
331
|
+
* * The dihedral angle of a manifold edge is measured between the normals of its two adjacent faces.
|
|
332
|
+
* * Boundary edges are not returned as they are not manifold.
|
|
333
|
+
* @param mesh existing polyface or visitor
|
|
334
|
+
* @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If undefined, uses `Geometry.smallAngleRadians`.
|
|
335
|
+
* @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default)
|
|
336
|
+
*/
|
|
337
|
+
static collectEdgesByDihedralAngle(mesh: Polyface | PolyfaceVisitor, maxSmoothEdgeAngle?: Angle, sharpEdges?: boolean): SortableEdgeCluster[];
|
|
310
338
|
/**
|
|
311
339
|
* * Find mated pairs among facet edges.
|
|
312
340
|
* * Mated pairs have the same vertex indices appearing in opposite order.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PolyfaceQuery.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceQuery.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC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,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,GAAG,CAAC"}
|
|
@@ -488,14 +488,17 @@ class PolyfaceQuery {
|
|
|
488
488
|
* Return a mesh with
|
|
489
489
|
* * clusters of adjacent, coplanar facets merged into larger facets.
|
|
490
490
|
* * other facets included unchanged.
|
|
491
|
-
* @param mesh existing mesh
|
|
491
|
+
* @param mesh existing mesh or visitor
|
|
492
492
|
* @returns
|
|
493
493
|
*/
|
|
494
494
|
static cloneWithMaximalPlanarFacets(mesh) {
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
if (mesh instanceof Polyface_1.Polyface)
|
|
496
|
+
return this.cloneWithMaximalPlanarFacets(mesh.createVisitor(0));
|
|
497
|
+
const numFacets = PolyfaceQuery.visitorClientFacetCount(mesh);
|
|
498
|
+
const smoothEdges = PolyfaceQuery.collectEdgesByDihedralAngle(mesh);
|
|
499
|
+
const partitions = PolyfaceQuery.partitionFacetIndicesBySortableEdgeClusters(smoothEdges, numFacets);
|
|
497
500
|
const builder = PolyfaceBuilder_1.PolyfaceBuilder.create();
|
|
498
|
-
const visitor = mesh
|
|
501
|
+
const visitor = mesh;
|
|
499
502
|
const planarPartitions = [];
|
|
500
503
|
for (const partition of partitions) {
|
|
501
504
|
if (partition.length === 1) {
|
|
@@ -555,7 +558,7 @@ class PolyfaceQuery {
|
|
|
555
558
|
* @returns
|
|
556
559
|
*/
|
|
557
560
|
static fillSimpleHoles(mesh, options, unfilledChains) {
|
|
558
|
-
if (mesh instanceof Polyface_1.
|
|
561
|
+
if (mesh instanceof Polyface_1.Polyface)
|
|
559
562
|
return this.fillSimpleHoles(mesh.createVisitor(0), options, unfilledChains);
|
|
560
563
|
const builder = PolyfaceBuilder_1.PolyfaceBuilder.create();
|
|
561
564
|
const chains = [];
|
|
@@ -649,32 +652,27 @@ class PolyfaceQuery {
|
|
|
649
652
|
}
|
|
650
653
|
return maxIndex + 1;
|
|
651
654
|
}
|
|
652
|
-
/**
|
|
653
|
-
*
|
|
655
|
+
/** If the visitor's client is a polyface, simply return its facet count.
|
|
656
|
+
* If not a polyface, visit all facets to accumulate a count.
|
|
654
657
|
*/
|
|
655
|
-
static
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
const allEdges = [];
|
|
675
|
-
matcher.sortAndCollectClusters(allEdges, allEdges, allEdges, allEdges);
|
|
658
|
+
static visitorClientFacetCount(visitor) {
|
|
659
|
+
const polyface = visitor.clientPolyface();
|
|
660
|
+
if (polyface !== undefined && polyface.facetCount !== undefined)
|
|
661
|
+
return polyface.facetCount;
|
|
662
|
+
let facetCount = 0;
|
|
663
|
+
visitor.reset();
|
|
664
|
+
while (visitor.moveToNextFacet())
|
|
665
|
+
++facetCount;
|
|
666
|
+
return facetCount;
|
|
667
|
+
}
|
|
668
|
+
/** Partition the facet set into connected components such that two adjacent facets are in the same component if and only if they are adjacent across a clustered edge.
|
|
669
|
+
* @param edgeClusters sorted and clustered edges (cf. `IndexedEdgeMatcher.sortAndCollectClusters`).
|
|
670
|
+
* @param numFacets facet count in the parent mesh. In particular, `edge.facetIndex < numFacets` for every input edge.
|
|
671
|
+
* @return collection of facet index arrays, one array per connected component
|
|
672
|
+
*/
|
|
673
|
+
static partitionFacetIndicesBySortableEdgeClusters(edgeClusters, numFacets) {
|
|
676
674
|
const context = new UnionFind_1.UnionFindContext(numFacets);
|
|
677
|
-
for (const cluster of
|
|
675
|
+
for (const cluster of edgeClusters) {
|
|
678
676
|
if (cluster instanceof IndexedEdgeMatcher_1.SortableEdge) {
|
|
679
677
|
// this edge does not connect anywhere. Ignore it!!
|
|
680
678
|
}
|
|
@@ -701,6 +699,34 @@ class PolyfaceQuery {
|
|
|
701
699
|
}
|
|
702
700
|
return facetsInComponent;
|
|
703
701
|
}
|
|
702
|
+
/** Partition the facet set into connected components. Each facet in a given component shares an edge only with other facets in the component (or is a boundary edge).
|
|
703
|
+
* @param polyface facets to partition
|
|
704
|
+
* @param stopAtVisibleEdges whether to further split connected components by visible edges of the polyface
|
|
705
|
+
* @return collection of facet index arrays, one per connected component
|
|
706
|
+
*/
|
|
707
|
+
static partitionFacetIndicesByEdgeConnectedComponent(polyface, stopAtVisibleEdges = false) {
|
|
708
|
+
if (polyface instanceof Polyface_1.Polyface) {
|
|
709
|
+
return this.partitionFacetIndicesByEdgeConnectedComponent(polyface.createVisitor(0), stopAtVisibleEdges);
|
|
710
|
+
}
|
|
711
|
+
polyface.setNumWrap(1);
|
|
712
|
+
const matcher = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
|
|
713
|
+
polyface.reset();
|
|
714
|
+
let numFacets = 0;
|
|
715
|
+
while (polyface.moveToNextFacet()) {
|
|
716
|
+
const numEdges = polyface.pointCount - 1;
|
|
717
|
+
numFacets++;
|
|
718
|
+
for (let i = 0; i < numEdges; i++) {
|
|
719
|
+
if (stopAtVisibleEdges && polyface.edgeVisible[i]) {
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
matcher.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
const allEdges = [];
|
|
727
|
+
matcher.sortAndCollectClusters(allEdges, allEdges, allEdges, allEdges);
|
|
728
|
+
return this.partitionFacetIndicesBySortableEdgeClusters(allEdges, numFacets);
|
|
729
|
+
}
|
|
704
730
|
/** Find segments (within the linestring) which project to facets.
|
|
705
731
|
* * Assemble each segment pair as a facet in a new polyface
|
|
706
732
|
* * Facets are ASSUMED to be convex and planar.
|
|
@@ -992,7 +1018,7 @@ class PolyfaceQuery {
|
|
|
992
1018
|
* Set the visibility of a particular edge of a particular facet.
|
|
993
1019
|
* @param polyface containing polyface
|
|
994
1020
|
* @param facetIndex facet index
|
|
995
|
-
* @param vertexIndex vertex index (in vertex array)
|
|
1021
|
+
* @param vertexIndex vertex index (in vertex array) at which the edge starts
|
|
996
1022
|
* @param value visibility value.
|
|
997
1023
|
*/
|
|
998
1024
|
static setSingleEdgeVisibility(polyface, facetIndex, vertexIndex, value) {
|
|
@@ -1001,7 +1027,22 @@ class PolyfaceQuery {
|
|
|
1001
1027
|
const index1 = polyface.facetIndex1(facetIndex);
|
|
1002
1028
|
for (let i = index0; i < index1; i++)
|
|
1003
1029
|
if (data.pointIndex[i] === vertexIndex)
|
|
1004
|
-
data.edgeVisible[i] = value;
|
|
1030
|
+
data.edgeVisible[i] = value; // actually sets visibility on all edges in the face that start at this vertex
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Get the visibility of a particular edge of a particular facet.
|
|
1034
|
+
* @param polyface containing polyface
|
|
1035
|
+
* @param facetIndex facet index
|
|
1036
|
+
* @param vertexIndex vertex index (in vertex array) at which the edge starts
|
|
1037
|
+
*/
|
|
1038
|
+
static getSingleEdgeVisibility(polyface, facetIndex, vertexIndex) {
|
|
1039
|
+
const data = polyface.data;
|
|
1040
|
+
const index0 = polyface.facetIndex0(facetIndex);
|
|
1041
|
+
const index1 = polyface.facetIndex1(facetIndex);
|
|
1042
|
+
for (let i = index0; i < index1; i++)
|
|
1043
|
+
if (data.pointIndex[i] === vertexIndex)
|
|
1044
|
+
return data.edgeVisible[i]; // return visibility of first edge in the face that starts at this vertex
|
|
1045
|
+
return undefined;
|
|
1005
1046
|
}
|
|
1006
1047
|
/** Load all half edges from a mesh to an IndexedEdgeMatcher.
|
|
1007
1048
|
* @param polyface a mesh, or a visitor assumed to have numWrap === 1
|
|
@@ -1019,6 +1060,46 @@ class PolyfaceQuery {
|
|
|
1019
1060
|
}
|
|
1020
1061
|
return edges;
|
|
1021
1062
|
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Return manifold edge pairs whose dihedral angle is bounded by the given angle.
|
|
1065
|
+
* * The dihedral angle of a manifold edge is measured between the normals of its two adjacent faces.
|
|
1066
|
+
* * Boundary edges are not returned as they are not manifold.
|
|
1067
|
+
* @param mesh existing polyface or visitor
|
|
1068
|
+
* @param maxSmoothEdgeAngle maximum dihedral angle of a smooth edge. If undefined, uses `Geometry.smallAngleRadians`.
|
|
1069
|
+
* @param sharpEdges true to reverse the angle threshold test and return sharp edges; otherwise return smooth edges (default)
|
|
1070
|
+
*/
|
|
1071
|
+
static collectEdgesByDihedralAngle(mesh, maxSmoothEdgeAngle, sharpEdges = false) {
|
|
1072
|
+
if (mesh instanceof Polyface_1.Polyface)
|
|
1073
|
+
return this.collectEdgesByDihedralAngle(mesh.createVisitor(1), maxSmoothEdgeAngle, sharpEdges);
|
|
1074
|
+
mesh.setNumWrap(1);
|
|
1075
|
+
const allEdges = this.createIndexedEdges(mesh);
|
|
1076
|
+
const manifoldEdges = [];
|
|
1077
|
+
allEdges.sortAndCollectClusters(manifoldEdges);
|
|
1078
|
+
if (undefined === maxSmoothEdgeAngle || maxSmoothEdgeAngle.radians < 0)
|
|
1079
|
+
maxSmoothEdgeAngle = Angle_1.Angle.createRadians(Geometry_1.Geometry.smallAngleRadians);
|
|
1080
|
+
const outEdges = [];
|
|
1081
|
+
const normal0 = Point3dVector3d_1.Vector3d.create();
|
|
1082
|
+
const normal1 = Point3dVector3d_1.Vector3d.create();
|
|
1083
|
+
for (const pair of manifoldEdges) {
|
|
1084
|
+
if (Array.isArray(pair) && pair.length === 2) {
|
|
1085
|
+
const e0 = pair[0];
|
|
1086
|
+
const e1 = pair[1];
|
|
1087
|
+
if (undefined !== PolyfaceQuery.computeFacetUnitNormal(mesh, e0.facetIndex, normal0)
|
|
1088
|
+
&& undefined !== PolyfaceQuery.computeFacetUnitNormal(mesh, e1.facetIndex, normal1)) {
|
|
1089
|
+
const edgeAngle = normal0.smallerUnorientedAngleTo(normal1);
|
|
1090
|
+
if (sharpEdges) {
|
|
1091
|
+
if (edgeAngle.radians > maxSmoothEdgeAngle.radians)
|
|
1092
|
+
outEdges.push(pair);
|
|
1093
|
+
}
|
|
1094
|
+
else {
|
|
1095
|
+
if (edgeAngle.radians <= maxSmoothEdgeAngle.radians)
|
|
1096
|
+
outEdges.push(pair);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
return outEdges;
|
|
1102
|
+
}
|
|
1022
1103
|
/**
|
|
1023
1104
|
* * Find mated pairs among facet edges.
|
|
1024
1105
|
* * Mated pairs have the same vertex indices appearing in opposite order.
|