@itwin/core-geometry 5.0.0-dev.4 → 5.0.0-dev.40
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 +29 -1
- package/lib/cjs/Constant.js +17 -17
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.js +35 -35
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js +18 -21
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js +2 -2
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +2 -2
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +3 -3
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +40 -8
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +80 -22
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +4 -4
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +16 -2
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +33 -2
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +87 -53
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +213 -135
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +12 -8
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +34 -13
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +12 -6
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +12 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.d.ts +8 -6
- package/lib/cjs/curve/Query/CylindricalRange.d.ts.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js +13 -9
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts +4 -4
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -5
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +13 -13
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +5 -5
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +29 -23
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +4 -4
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +2 -2
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +16 -16
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +14 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js +17 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +4 -4
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +2 -0
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +4 -0
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +32 -10
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +54 -16
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +13 -2
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +24 -10
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +11 -8
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +36 -34
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js +2 -2
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -6
- package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +5 -5
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +12 -6
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +117 -70
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +9 -5
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +9 -5
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js +4 -4
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.d.ts +72 -73
- package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js +62 -64
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js +13 -13
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +5 -5
- package/lib/cjs/numerics/Polynomials.js +32 -32
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js +20 -20
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/polyface/AuxData.d.ts +2 -2
- package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
- package/lib/cjs/polyface/AuxData.js +11 -3
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js +67 -67
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js +2 -2
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +27 -20
- package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +56 -30
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +2 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +3 -5
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +6 -13
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +14 -7
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +59 -64
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +13 -3
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +26 -9
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +2 -2
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +11 -10
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js +5 -5
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js +22 -22
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +5 -5
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +112 -112
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/solid/Box.d.ts +9 -3
- package/lib/cjs/solid/Box.d.ts.map +1 -1
- package/lib/cjs/solid/Box.js +10 -5
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.d.ts +3 -2
- package/lib/cjs/solid/Cone.d.ts.map +1 -1
- package/lib/cjs/solid/Cone.js +3 -3
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +9 -3
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js +9 -4
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +15 -4
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js +20 -7
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +35 -26
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js +41 -28
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.d.ts +12 -11
- package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js +8 -5
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts +17 -7
- package/lib/cjs/solid/Sphere.d.ts.map +1 -1
- package/lib/cjs/solid/Sphere.js +22 -16
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +25 -16
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +25 -16
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.d.ts +8 -2
- package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
- package/lib/cjs/solid/TorusPipe.js +9 -5
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js +4 -4
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js +5 -5
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +2 -2
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +11 -11
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Constant.js +17 -17
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.js +35 -35
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js +18 -21
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js +2 -2
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +2 -2
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +3 -3
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +40 -8
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +80 -22
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +4 -4
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +16 -2
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +33 -2
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +87 -53
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +213 -135
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +12 -8
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +34 -13
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +12 -6
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +12 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.d.ts +8 -6
- package/lib/esm/curve/Query/CylindricalRange.d.ts.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js +13 -9
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts +4 -4
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -5
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +13 -13
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +5 -5
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +29 -23
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +4 -4
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +2 -2
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/geometry3d/Angle.js +16 -16
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts +14 -8
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js +17 -8
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +4 -4
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +2 -0
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +4 -0
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +32 -10
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +54 -16
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +13 -2
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +24 -10
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +11 -8
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +36 -34
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js +2 -2
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -6
- package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +5 -5
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +12 -6
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +117 -70
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +3 -3
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +9 -5
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +9 -5
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js +4 -4
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.d.ts +72 -73
- package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
- package/lib/esm/geometry4d/MomentData.js +62 -64
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js +13 -13
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +5 -5
- package/lib/esm/numerics/Polynomials.js +32 -32
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js +20 -20
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/polyface/AuxData.d.ts +2 -2
- package/lib/esm/polyface/AuxData.d.ts.map +1 -1
- package/lib/esm/polyface/AuxData.js +11 -3
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js +67 -67
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js +2 -2
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +27 -20
- package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +56 -30
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +2 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +2 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +3 -5
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +6 -13
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +14 -7
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +60 -65
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +13 -3
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +26 -9
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +2 -2
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +11 -10
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js +5 -5
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js +22 -22
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +5 -5
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +112 -112
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/solid/Box.d.ts +9 -3
- package/lib/esm/solid/Box.d.ts.map +1 -1
- package/lib/esm/solid/Box.js +10 -5
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.d.ts +3 -2
- package/lib/esm/solid/Cone.d.ts.map +1 -1
- package/lib/esm/solid/Cone.js +3 -3
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +9 -3
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js +9 -4
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +15 -4
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js +20 -7
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +35 -26
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js +41 -28
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.d.ts +12 -11
- package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js +8 -5
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts +17 -7
- package/lib/esm/solid/Sphere.d.ts.map +1 -1
- package/lib/esm/solid/Sphere.js +22 -16
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +25 -16
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +25 -16
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.d.ts +8 -2
- package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
- package/lib/esm/solid/TorusPipe.js +9 -5
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js +4 -4
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js +5 -5
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js +2 -2
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +11 -11
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +5 -5
|
@@ -394,6 +394,25 @@ class PolygonOps {
|
|
|
394
394
|
s *= 0.5;
|
|
395
395
|
return s;
|
|
396
396
|
}
|
|
397
|
+
/** These values are the integrated area moment products [xx,xy,xz, x]
|
|
398
|
+
* for a right triangle in the first quadrant at the origin -- (0,0),(1,0),(0,1)
|
|
399
|
+
*/
|
|
400
|
+
static { this._triangleMomentWeights = Matrix4d_1.Matrix4d.createRowValues(2.0 / 24.0, 1.0 / 24.0, 0, 4.0 / 24.0, 1.0 / 24.0, 2.0 / 24.0, 0, 4.0 / 24.0, 0, 0, 0, 0, 4.0 / 24.0, 4.0 / 24.0, 0, 12.0 / 24.0); }
|
|
401
|
+
/** These values are the integrated volume moment products [xx,xy,xz, x, yx,yy,yz,y, zx,zy,zz,z,x,y,z,1]
|
|
402
|
+
* for a tetrahedron in the first quadrant at the origin -- (0,00),(1,0,0),(0,1,0),(0,0,1)
|
|
403
|
+
*/
|
|
404
|
+
static { this._tetrahedralMomentWeights = Matrix4d_1.Matrix4d.createRowValues(1.0 / 60.0, 1.0 / 120, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 60.0, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 120, 1.0 / 60.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 6.0); }
|
|
405
|
+
// statics for shared reuse.
|
|
406
|
+
// many methods use these.
|
|
407
|
+
// only use them in "leaf" methods that are certain not to call other users . . .
|
|
408
|
+
static { this._vector0 = Point3dVector3d_1.Vector3d.create(); }
|
|
409
|
+
static { this._vector1 = Point3dVector3d_1.Vector3d.create(); }
|
|
410
|
+
static { this._vector2 = Point3dVector3d_1.Vector3d.create(); }
|
|
411
|
+
static { this._vectorOrigin = Point3dVector3d_1.Vector3d.create(); }
|
|
412
|
+
static { this._normal = Point3dVector3d_1.Vector3d.create(); }
|
|
413
|
+
static { this._matrixA = Matrix4d_1.Matrix4d.createIdentity(); }
|
|
414
|
+
static { this._matrixB = Matrix4d_1.Matrix4d.createIdentity(); }
|
|
415
|
+
static { this._matrixC = Matrix4d_1.Matrix4d.createIdentity(); }
|
|
397
416
|
/** return a vector which is perpendicular to the polygon and has magnitude equal to the polygon area. */
|
|
398
417
|
static areaNormalGo(points, result) {
|
|
399
418
|
if (!result)
|
|
@@ -460,8 +479,8 @@ class PolygonOps {
|
|
|
460
479
|
}
|
|
461
480
|
/**
|
|
462
481
|
* Return a Ray3d with (assuming the polygon is planar and not self-intersecting):
|
|
463
|
-
* * `origin` at the centroid of the (3D) polygon
|
|
464
|
-
* * `direction` is the unit vector perpendicular to the plane
|
|
482
|
+
* * `origin` at the centroid of the (3D) polygon,
|
|
483
|
+
* * `direction` is the unit vector perpendicular to the plane,
|
|
465
484
|
* * `a` is the area.
|
|
466
485
|
* @param points
|
|
467
486
|
*/
|
|
@@ -846,7 +865,10 @@ class PolygonOps {
|
|
|
846
865
|
* * Compare to [[closestPoint]].
|
|
847
866
|
* @param polygon points of the polygon, closure point optional
|
|
848
867
|
* @param testPoint point p to project onto the polygon edges. Works best when p is in the plane of the polygon.
|
|
849
|
-
* @param tolerance optional
|
|
868
|
+
* @param tolerance optional tolerance(s) to determine point-vertex and point-edge coincidence. A single number
|
|
869
|
+
* is interpreted as distance tolerance. If an array is given, the first number is interpreted as distance tolerance;
|
|
870
|
+
* the second, as parametric tolerance. Default values are [[Geometry.smallMetricDistance]] for distance tolerance
|
|
871
|
+
* and 0.0 for parameter tolerance.
|
|
850
872
|
* @param result optional pre-allocated object to fill and return
|
|
851
873
|
* @returns details d of the closest point `d.point`:
|
|
852
874
|
* * `d.isValid()` returns true if and only if the polygon is nontrivial.
|
|
@@ -858,7 +880,9 @@ class PolygonOps {
|
|
|
858
880
|
static closestPointOnBoundary(polygon, testPoint, tolerance = Geometry_1.Geometry.smallMetricDistance, result) {
|
|
859
881
|
if (!(polygon instanceof IndexedXYZCollection_1.IndexedXYZCollection))
|
|
860
882
|
return this.closestPointOnBoundary(new Point3dArrayCarrier_1.Point3dArrayCarrier(polygon), testPoint, tolerance, result);
|
|
861
|
-
const
|
|
883
|
+
const distTol = Array.isArray(tolerance) ? tolerance[0] : tolerance;
|
|
884
|
+
const paramTol = Array.isArray(tolerance) ? Math.abs(tolerance[1]) : 0.0;
|
|
885
|
+
const distTol2 = distTol * distTol;
|
|
862
886
|
let numPoints = polygon.length;
|
|
863
887
|
while (numPoints > 1) {
|
|
864
888
|
if (polygon.distanceSquaredIndexIndex(0, numPoints - 1) > distTol2)
|
|
@@ -868,29 +892,59 @@ class PolygonOps {
|
|
|
868
892
|
result = PolygonLocationDetail.create(result);
|
|
869
893
|
if (0 === numPoints)
|
|
870
894
|
return result; // invalid
|
|
871
|
-
|
|
872
|
-
polygon.getPoint3dAtUncheckedPointIndex(
|
|
895
|
+
const constructSingletonPoint = (index) => {
|
|
896
|
+
polygon.getPoint3dAtUncheckedPointIndex(index, result.point);
|
|
873
897
|
result.a = result.point.distance(testPoint);
|
|
874
898
|
result.v.setZero();
|
|
875
899
|
result.code = Geometry_1.PolygonLocation.OnPolygonVertex;
|
|
876
|
-
result.closestEdgeIndex =
|
|
900
|
+
result.closestEdgeIndex = index;
|
|
877
901
|
result.closestEdgeParam = 0.0;
|
|
878
902
|
return result;
|
|
879
|
-
}
|
|
903
|
+
};
|
|
904
|
+
if (1 === numPoints)
|
|
905
|
+
return constructSingletonPoint(0);
|
|
906
|
+
// lambda for computing edge parameter at which testPoint projects onto the edge starting at iEdgeStart
|
|
907
|
+
const projectToEdge = (iEdgeStart) => {
|
|
908
|
+
let isValid = false;
|
|
909
|
+
let edgeParam = 0.0;
|
|
910
|
+
let uDotU = 0.0;
|
|
911
|
+
let vDotV = 0.0;
|
|
912
|
+
if (iEdgeStart >= 0 && iEdgeStart < numPoints) {
|
|
913
|
+
let iEdgeEnd = iEdgeStart + 1;
|
|
914
|
+
if (iEdgeEnd === numPoints)
|
|
915
|
+
iEdgeEnd = 0;
|
|
916
|
+
uDotU = polygon.distanceSquaredIndexIndex(iEdgeStart, iEdgeEnd);
|
|
917
|
+
if (uDotU > distTol2) { // nontrivial edge
|
|
918
|
+
vDotV = polygon.distanceSquaredIndexXYAndZ(iEdgeStart, testPoint);
|
|
919
|
+
const uDotV = polygon.dotProductIndexIndexXYAndZ(iEdgeStart, iEdgeEnd, testPoint);
|
|
920
|
+
edgeParam = uDotV / uDotU; // param of projection of testPoint onto edge [iEdgeStart, iEdgeEnd]
|
|
921
|
+
isValid = true;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
return { isValid, edgeParam, uDotU, vDotV };
|
|
925
|
+
};
|
|
926
|
+
// find the previous nontrivial edge's projection status before processing the first edge
|
|
927
|
+
let projBeyondPrevEdge = false;
|
|
880
928
|
let iPrev = numPoints - 1;
|
|
929
|
+
for (; iPrev > 0; --iPrev) {
|
|
930
|
+
const projData = projectToEdge(iPrev);
|
|
931
|
+
if (projData.isValid) {
|
|
932
|
+
projBeyondPrevEdge = projData.edgeParam > 1.0 + paramTol;
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
if (iPrev <= 0) // all segments trivial, so treat like single point case
|
|
937
|
+
return constructSingletonPoint(0);
|
|
881
938
|
let minDist2 = Geometry_1.Geometry.largeCoordinateResult;
|
|
882
939
|
for (let iBase = 0; iBase < numPoints; ++iBase) {
|
|
883
940
|
let iNext = iBase + 1;
|
|
884
941
|
if (iNext === numPoints)
|
|
885
942
|
iNext = 0;
|
|
886
|
-
const
|
|
887
|
-
if (
|
|
888
|
-
continue; // ignore trivial polygon edge (keep iPrev)
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
const edgeParam = uDotV / uDotU; // param of projection of testPoint onto this edge
|
|
892
|
-
if (edgeParam <= 0.0) { // testPoint projects to/before edge start
|
|
893
|
-
const distToStart2 = vDotV;
|
|
943
|
+
const projData = projectToEdge(iBase);
|
|
944
|
+
if (!projData.isValid)
|
|
945
|
+
continue; // ignore trivial polygon edge (keep iPrev, projBeyondPrevEdge)
|
|
946
|
+
if (projData.edgeParam <= paramTol) { // testPoint projects to/before edge start
|
|
947
|
+
const distToStart2 = projData.vDotV;
|
|
894
948
|
if (distToStart2 <= distTol2) {
|
|
895
949
|
// testPoint is at edge start; we are done
|
|
896
950
|
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
@@ -901,25 +955,25 @@ class PolygonOps {
|
|
|
901
955
|
result.closestEdgeParam = 0.0;
|
|
902
956
|
return result;
|
|
903
957
|
}
|
|
904
|
-
if (distToStart2 < minDist2) {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
minDist2 = distToStart2;
|
|
914
|
-
}
|
|
958
|
+
if (distToStart2 < minDist2 && projBeyondPrevEdge) {
|
|
959
|
+
// update candidate (to edge start) only if testPoint projected beyond previous edge end
|
|
960
|
+
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
961
|
+
result.a = Math.sqrt(distToStart2);
|
|
962
|
+
polygon.crossProductIndexIndexIndex(iBase, iPrev, iNext, result.v);
|
|
963
|
+
result.code = Geometry_1.PolygonLocation.OnPolygonVertex;
|
|
964
|
+
result.closestEdgeIndex = iBase;
|
|
965
|
+
result.closestEdgeParam = 0.0;
|
|
966
|
+
minDist2 = distToStart2;
|
|
915
967
|
}
|
|
968
|
+
projBeyondPrevEdge = false;
|
|
916
969
|
}
|
|
917
|
-
else if (edgeParam <= 1.0) { // testPoint projects inside edge, or to edge end
|
|
918
|
-
|
|
970
|
+
else if (projData.edgeParam <= 1.0 + paramTol) { // testPoint projects inside edge, or to edge end
|
|
971
|
+
projData.edgeParam = Geometry_1.Geometry.clamp(projData.edgeParam, 0.0, 1.0);
|
|
972
|
+
const projDist2 = projData.vDotV - projData.edgeParam * projData.edgeParam * projData.uDotU;
|
|
919
973
|
if (projDist2 <= distTol2) {
|
|
920
974
|
// testPoint is on edge; we are done
|
|
921
|
-
const distToStart2 = vDotV;
|
|
922
|
-
if (edgeParam <= 0.5 && distToStart2 <= distTol2) {
|
|
975
|
+
const distToStart2 = projData.vDotV;
|
|
976
|
+
if (projData.edgeParam <= 0.5 && distToStart2 <= distTol2) {
|
|
923
977
|
// testPoint is at edge start
|
|
924
978
|
polygon.getPoint3dAtUncheckedPointIndex(iBase, result.point);
|
|
925
979
|
result.a = Math.sqrt(distToStart2);
|
|
@@ -929,8 +983,8 @@ class PolygonOps {
|
|
|
929
983
|
result.closestEdgeParam = 0.0;
|
|
930
984
|
return result;
|
|
931
985
|
}
|
|
932
|
-
const distToEnd2 = projDist2 + (1.0 - edgeParam) * (1.0 - edgeParam) * uDotU;
|
|
933
|
-
if (edgeParam > 0.5 && distToEnd2 <= distTol2) {
|
|
986
|
+
const distToEnd2 = projDist2 + (1.0 - projData.edgeParam) * (1.0 - projData.edgeParam) * projData.uDotU;
|
|
987
|
+
if (projData.edgeParam > 0.5 && distToEnd2 <= distTol2) {
|
|
934
988
|
// testPoint is at edge end
|
|
935
989
|
polygon.getPoint3dAtUncheckedPointIndex(iNext, result.point);
|
|
936
990
|
result.a = Math.sqrt(distToEnd2);
|
|
@@ -941,27 +995,29 @@ class PolygonOps {
|
|
|
941
995
|
return result;
|
|
942
996
|
}
|
|
943
997
|
// testPoint is on edge interior
|
|
944
|
-
polygon.interpolateIndexIndex(iBase, edgeParam, iNext, result.point);
|
|
998
|
+
polygon.interpolateIndexIndex(iBase, projData.edgeParam, iNext, result.point);
|
|
945
999
|
result.a = Math.sqrt(projDist2);
|
|
946
1000
|
result.v.setZero();
|
|
947
1001
|
result.code = Geometry_1.PolygonLocation.OnPolygonEdgeInterior;
|
|
948
1002
|
result.closestEdgeIndex = iBase;
|
|
949
|
-
result.closestEdgeParam = edgeParam;
|
|
1003
|
+
result.closestEdgeParam = projData.edgeParam;
|
|
950
1004
|
return result;
|
|
951
1005
|
}
|
|
952
1006
|
if (projDist2 < minDist2) {
|
|
953
|
-
// update candidate
|
|
954
|
-
polygon.interpolateIndexIndex(iBase, edgeParam, iNext, result.point);
|
|
1007
|
+
// update candidate
|
|
1008
|
+
polygon.interpolateIndexIndex(iBase, projData.edgeParam, iNext, result.point);
|
|
955
1009
|
result.a = Math.sqrt(projDist2);
|
|
956
1010
|
polygon.crossProductIndexIndexXYAndZ(iBase, iNext, testPoint, result.v);
|
|
957
|
-
result.code = Geometry_1.PolygonLocation.OnPolygonEdgeInterior;
|
|
1011
|
+
result.code = projData.edgeParam < 1.0 ? Geometry_1.PolygonLocation.OnPolygonEdgeInterior : Geometry_1.PolygonLocation.OnPolygonVertex;
|
|
1012
|
+
;
|
|
958
1013
|
result.closestEdgeIndex = iBase;
|
|
959
|
-
result.closestEdgeParam = edgeParam;
|
|
1014
|
+
result.closestEdgeParam = projData.edgeParam;
|
|
960
1015
|
minDist2 = projDist2;
|
|
961
1016
|
}
|
|
1017
|
+
projBeyondPrevEdge = false;
|
|
962
1018
|
}
|
|
963
|
-
else {
|
|
964
|
-
|
|
1019
|
+
else {
|
|
1020
|
+
projBeyondPrevEdge = true; // to be handled by next edge
|
|
965
1021
|
}
|
|
966
1022
|
iPrev = iBase;
|
|
967
1023
|
}
|
|
@@ -1005,7 +1061,10 @@ class PolygonOps {
|
|
|
1005
1061
|
/** Compute the intersection of a line (parameterized as a ray) with the plane of this polygon.
|
|
1006
1062
|
* @param polygon points of the polygon, closure point optional
|
|
1007
1063
|
* @param ray infinite line to intersect, as a ray
|
|
1008
|
-
* @param tolerance optional
|
|
1064
|
+
* @param tolerance optional tolerance(s) to determine point-vertex and point-edge coincidence. A single number
|
|
1065
|
+
* is interpreted as distance tolerance. If an array is given, the first number is interpreted as distance tolerance;
|
|
1066
|
+
* the second, as parametric tolerance. Default values are [[Geometry.smallMetricDistance]] for distance tolerance
|
|
1067
|
+
* and 0.0 for parameter tolerance.
|
|
1009
1068
|
* @param result optional pre-allocated object to fill and return
|
|
1010
1069
|
* @returns details d of the line-plane intersection `d.point`:
|
|
1011
1070
|
* * `d.isValid()` returns true if and only if the line intersects the plane.
|
|
@@ -1032,11 +1091,18 @@ class PolygonOps {
|
|
|
1032
1091
|
// NOOP: intersectionPoint is on the polygon, so result.code already classifies it
|
|
1033
1092
|
}
|
|
1034
1093
|
else {
|
|
1035
|
-
// intersectionPoint is not on polygon, so result.code refers to the closest point
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1094
|
+
// intersectionPoint is not on the polygon, so result.code refers to the closest point;
|
|
1095
|
+
// update it to refer to intersectionPoint.
|
|
1096
|
+
if (Geometry_1.PolygonLocation.OnPolygonVertex === result.code) {
|
|
1097
|
+
result.code = (dot > 0.0)
|
|
1098
|
+
? Geometry_1.PolygonLocation.InsidePolygonProjectsToVertex
|
|
1099
|
+
: Geometry_1.PolygonLocation.OutsidePolygonProjectsToVertex;
|
|
1100
|
+
}
|
|
1101
|
+
else if (Geometry_1.PolygonLocation.OnPolygonEdgeInterior === result.code) {
|
|
1102
|
+
result.code = (dot > 0.0)
|
|
1103
|
+
? Geometry_1.PolygonLocation.InsidePolygonProjectsToEdgeInterior
|
|
1104
|
+
: Geometry_1.PolygonLocation.OutsidePolygonProjectsToEdgeInterior;
|
|
1105
|
+
}
|
|
1040
1106
|
}
|
|
1041
1107
|
}
|
|
1042
1108
|
return result;
|
|
@@ -1257,30 +1323,14 @@ class PolygonOps {
|
|
|
1257
1323
|
}
|
|
1258
1324
|
}
|
|
1259
1325
|
exports.PolygonOps = PolygonOps;
|
|
1260
|
-
/** These values are the integrated area moment products [xx,xy,xz, x]
|
|
1261
|
-
* for a right triangle in the first quadrant at the origin -- (0,0),(1,0),(0,1)
|
|
1262
|
-
*/
|
|
1263
|
-
PolygonOps._triangleMomentWeights = Matrix4d_1.Matrix4d.createRowValues(2.0 / 24.0, 1.0 / 24.0, 0, 4.0 / 24.0, 1.0 / 24.0, 2.0 / 24.0, 0, 4.0 / 24.0, 0, 0, 0, 0, 4.0 / 24.0, 4.0 / 24.0, 0, 12.0 / 24.0);
|
|
1264
|
-
/** These values are the integrated volume moment products [xx,xy,xz, x, yx,yy,yz,y, zx,zy,zz,z,x,y,z,1]
|
|
1265
|
-
* for a tetrahedron in the first quadrant at the origin -- (0,00),(1,0,0),(0,1,0),(0,0,1)
|
|
1266
|
-
*/
|
|
1267
|
-
PolygonOps._tetrahedralMomentWeights = Matrix4d_1.Matrix4d.createRowValues(1.0 / 60.0, 1.0 / 120, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 60.0, 1.0 / 120, 1.0 / 24.0, 1.0 / 120, 1.0 / 120, 1.0 / 60.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 24.0, 1.0 / 6.0);
|
|
1268
|
-
// statics for shared reuse.
|
|
1269
|
-
// many methods use these.
|
|
1270
|
-
// only use them in "leaf" methods that are certain not to call other users . . .
|
|
1271
|
-
PolygonOps._vector0 = Point3dVector3d_1.Vector3d.create();
|
|
1272
|
-
PolygonOps._vector1 = Point3dVector3d_1.Vector3d.create();
|
|
1273
|
-
PolygonOps._vector2 = Point3dVector3d_1.Vector3d.create();
|
|
1274
|
-
PolygonOps._vectorOrigin = Point3dVector3d_1.Vector3d.create();
|
|
1275
|
-
PolygonOps._normal = Point3dVector3d_1.Vector3d.create();
|
|
1276
|
-
PolygonOps._matrixA = Matrix4d_1.Matrix4d.createIdentity();
|
|
1277
|
-
PolygonOps._matrixB = Matrix4d_1.Matrix4d.createIdentity();
|
|
1278
|
-
PolygonOps._matrixC = Matrix4d_1.Matrix4d.createIdentity();
|
|
1279
1326
|
/**
|
|
1280
1327
|
* `IndexedXYZCollectionPolygonOps` class contains _static_ methods for typical operations on polygons carried as `IndexedXYZCollection`
|
|
1281
1328
|
* @public
|
|
1282
1329
|
*/
|
|
1283
1330
|
class IndexedXYZCollectionPolygonOps {
|
|
1331
|
+
static { this._xyz0Work = Point3dVector3d_1.Point3d.create(); }
|
|
1332
|
+
static { this._xyz1Work = Point3dVector3d_1.Point3d.create(); }
|
|
1333
|
+
static { this._xyz2Work = Point3dVector3d_1.Point3d.create(); }
|
|
1284
1334
|
/**
|
|
1285
1335
|
* Split a (convex) polygon into 2 parts based on altitude evaluations.
|
|
1286
1336
|
* * POSITIVE ALTITUDE IS IN
|
|
@@ -1538,14 +1588,12 @@ class IndexedXYZCollectionPolygonOps {
|
|
|
1538
1588
|
}
|
|
1539
1589
|
}
|
|
1540
1590
|
exports.IndexedXYZCollectionPolygonOps = IndexedXYZCollectionPolygonOps;
|
|
1541
|
-
IndexedXYZCollectionPolygonOps._xyz0Work = Point3dVector3d_1.Point3d.create();
|
|
1542
|
-
IndexedXYZCollectionPolygonOps._xyz1Work = Point3dVector3d_1.Point3d.create();
|
|
1543
|
-
IndexedXYZCollectionPolygonOps._xyz2Work = Point3dVector3d_1.Point3d.create();
|
|
1544
1591
|
/**
|
|
1545
1592
|
* `Point3dArrayPolygonOps` class contains _static_ methods for typical operations on polygons carried as `Point3d[]`
|
|
1546
1593
|
* @public
|
|
1547
1594
|
*/
|
|
1548
1595
|
class Point3dArrayPolygonOps {
|
|
1596
|
+
static { this._xyz0Work = Point3dVector3d_1.Point3d.create(); }
|
|
1549
1597
|
// private static _xyz1Work: Point3d = Point3d.create();
|
|
1550
1598
|
// private static _xyz2Work: Point3d = Point3d.create();
|
|
1551
1599
|
/**
|
|
@@ -1620,5 +1668,4 @@ class Point3dArrayPolygonOps {
|
|
|
1620
1668
|
}
|
|
1621
1669
|
}
|
|
1622
1670
|
exports.Point3dArrayPolygonOps = Point3dArrayPolygonOps;
|
|
1623
|
-
Point3dArrayPolygonOps._xyz0Work = Point3dVector3d_1.Point3d.create();
|
|
1624
1671
|
//# sourceMappingURL=PolygonOps.js.map
|