@itwin/core-geometry 4.10.0-dev.8 → 5.0.0-dev.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 +21 -1
- package/lib/cjs/Geometry.js +2 -2
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.d.ts.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js +0 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +5 -3
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +5 -4
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +1 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +136 -128
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +177 -152
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +7 -5
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +9 -7
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +21 -2
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +45 -10
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.d.ts +18 -15
- package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js +18 -17
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +11 -13
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +19 -46
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.d.ts +9 -5
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +9 -5
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.d.ts.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js +0 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +2 -3
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/OffsetOptions.d.ts.map +1 -1
- package/lib/cjs/curve/OffsetOptions.js +4 -4
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +14 -0
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +27 -0
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.d.ts.map +1 -1
- package/lib/cjs/curve/PointString3d.js +0 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +0 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +5 -6
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +10 -10
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +4 -4
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts +18 -18
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +46 -42
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +5 -4
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +10 -6
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +15 -12
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js +4 -4
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +0 -1
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +28 -17
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +36 -17
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js +2 -3
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -5
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +6 -5
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +0 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +2 -4
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +2 -2
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.d.ts +5 -5
- package/lib/cjs/geometry4d/Map4d.js +5 -5
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.d.ts +4 -7
- package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js +4 -7
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js +2 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js +0 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/Newton.d.ts +3 -0
- package/lib/cjs/numerics/Newton.d.ts.map +1 -1
- package/lib/cjs/numerics/Newton.js +2 -5
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +46 -201
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +132 -445
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js +2 -2
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/SmallSystem.d.ts +164 -0
- package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -0
- package/lib/cjs/numerics/SmallSystem.js +321 -0
- package/lib/cjs/numerics/SmallSystem.js.map +1 -0
- package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +0 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +2 -2
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +0 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.d.ts +3 -3
- package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +1 -2
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +0 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +7 -7
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.d.ts.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js +0 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +2 -2
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js +2 -2
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +1 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js +2 -2
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/esm/Geometry.js +2 -2
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.d.ts.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.js +0 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +5 -3
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +5 -4
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +1 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +136 -128
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +177 -152
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +7 -5
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +9 -7
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +21 -2
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +45 -10
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.d.ts +18 -15
- package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js +18 -17
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +11 -13
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +17 -44
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.d.ts +9 -5
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +9 -5
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.d.ts.map +1 -1
- package/lib/esm/curve/CurveProcessor.js +0 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +1 -2
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/OffsetOptions.d.ts.map +1 -1
- package/lib/esm/curve/OffsetOptions.js +4 -4
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +14 -0
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +27 -0
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.d.ts.map +1 -1
- package/lib/esm/curve/PointString3d.js +0 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +0 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +4 -5
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +5 -5
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +3 -3
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts +18 -18
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +46 -42
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +5 -4
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +10 -6
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +15 -12
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +0 -1
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +28 -17
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +36 -17
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js +0 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -5
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +6 -5
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +0 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +2 -4
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.d.ts +5 -5
- package/lib/esm/geometry4d/Map4d.js +5 -5
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.d.ts +4 -7
- package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js +4 -7
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
- package/lib/esm/geometry4d/Point4d.js +2 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js +0 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/Newton.d.ts +3 -0
- package/lib/esm/numerics/Newton.d.ts.map +1 -1
- package/lib/esm/numerics/Newton.js +1 -4
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +46 -201
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +132 -444
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/SmallSystem.d.ts +164 -0
- package/lib/esm/numerics/SmallSystem.d.ts.map +1 -0
- package/lib/esm/numerics/SmallSystem.js +317 -0
- package/lib/esm/numerics/SmallSystem.js.map +1 -0
- package/lib/esm/polyface/AuxData.d.ts.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +0 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +2 -2
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +0 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.d.ts +3 -3
- package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +1 -2
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +0 -1
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js +4 -4
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.d.ts.map +1 -1
- package/lib/esm/serialization/DeepCompare.js +0 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +1 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/package.json +11 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmallSystem.js","sourceRoot":"","sources":["../../../src/numerics/SmallSystem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AACvC,mEAAkE;AAClE,mEAAkE;AAGlE,+CAAmD;AAEnD,mBAAmB;AAEnB;;;GAGG;AACH,MAAa,WAAW;IACtB;;;;;;;;OAQG;IACI,MAAM,CAAC,8CAA8C,CAAC,EAAW,EAAE,EAAW,EAAE,EAAW,EAAE,EAAW,EAC7G,MAAgB;QAChB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACvB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAEvB,MAAM,EAAE,GAAG,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AC,EAAE,MAAM,CAAC,CAAC;IAChG,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,kBAAkB,CAAC,IAAkB,EAAE,UAAkB,EAAE,IAAkB,EAAE,CAAS;QACpG,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,GAAG,mBAAQ,CAAC,yBAAyB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/E,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAClC,CAAC,IAAI,CAAC,CAAC;QACP,KAAK,IAAI,CAAC,GAAG,UAAU,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACrC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IACD;;;;OAIG;IACI,MAAM,CAAC,iBAAiB,CAC7B,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAC9C,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;QAE9C,OAAO,gCAAkB,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA3WD,kCA2WC","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\r\n/** @packageDocumentation\r\n * @module Numerics\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Point2d, Vector2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { XAndY } from \"../geometry3d/XYZProps\";\r\nimport { Point4d } from \"../geometry4d/Point4d\";\r\nimport { BilinearPolynomial } from \"./Polynomials\";\r\n\r\n// cspell:word XYUV\r\n\r\n/**\r\n * static methods for commonly appearing sets of equations in 2 or 3 variables\r\n * @public\r\n */\r\nexport class SmallSystem {\r\n /**\r\n * Return true if lines (a0,a1) to (b0, b1) have a simple intersection.\r\n * Return the fractional (not xy) coordinates in result.x, result.y\r\n * @param a0 start point of line a\r\n * @param a1 end point of line a\r\n * @param b0 start point of line b\r\n * @param b1 end point of line b\r\n * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.\r\n */\r\n public static lineSegment2dXYTransverseIntersectionUnbounded(a0: Point2d, a1: Point2d, b0: Point2d, b1: Point2d,\r\n result: Vector2d): boolean {\r\n const ux = a1.x - a0.x;\r\n const uy = a1.y - a0.y;\r\n\r\n const vx = b1.x - b0.x;\r\n const vy = b1.y - b0.y;\r\n\r\n const cx = b0.x - a0.x;\r\n const cy = b0.y - a0.y;\r\n\r\n const uv = Geometry.crossProductXYXY(ux, uy, vx, vy);\r\n const cv = Geometry.crossProductXYXY(cx, cy, vx, vy);\r\n const cu = Geometry.crossProductXYXY(ux, uy, cx, cy);\r\n const s = Geometry.conditionalDivideFraction(cv, uv);\r\n const t = Geometry.conditionalDivideFraction(cu, uv);\r\n if (s !== undefined && t !== undefined) {\r\n result.set(s, -t);\r\n return true;\r\n }\r\n result.set(0, 0);\r\n return false;\r\n }\r\n /**\r\n * * (ax0,ay0) to (ax0+ux,ay0+uy) are line A.\r\n * * (bx0,by0) to (bx0+vx,by0+vy) are lineB.\r\n * * Return true if the lines have a simple intersection.\r\n * * Return the fractional (not xy) coordinates in result.x, result.y\r\n * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.\r\n */\r\n public static lineSegmentXYUVTransverseIntersectionUnbounded(\r\n ax0: number, ay0: number, ux: number, uy: number,\r\n bx0: number, by0: number, vx: number, vy: number,\r\n result: Vector2d): boolean {\r\n\r\n const cx = bx0 - ax0;\r\n const cy = by0 - ay0;\r\n\r\n const uv = Geometry.crossProductXYXY(ux, uy, vx, vy);\r\n const cv = Geometry.crossProductXYXY(cx, cy, vx, vy);\r\n const cu = Geometry.crossProductXYXY(ux, uy, cx, cy);\r\n const s = Geometry.conditionalDivideFraction(cv, uv);\r\n const t = Geometry.conditionalDivideFraction(cu, uv);\r\n if (s !== undefined && t !== undefined) {\r\n result.set(s, -t);\r\n return true;\r\n }\r\n result.set(0, 0);\r\n return false;\r\n }\r\n\r\n /**\r\n * Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts\r\n * Return the fractional (not xy) coordinates in result.x, result.y\r\n * @param a0 start point of line a\r\n * @param a1 end point of line a\r\n * @param b0 start point of line b\r\n * @param b1 end point of line b\r\n * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.\r\n */\r\n public static lineSegment3dXYTransverseIntersectionUnbounded(a0: Point3d, a1: Point3d, b0: Point3d, b1: Point3d,\r\n result: Vector2d): boolean {\r\n const ux = a1.x - a0.x;\r\n const uy = a1.y - a0.y;\r\n\r\n const vx = b1.x - b0.x;\r\n const vy = b1.y - b0.y;\r\n\r\n const cx = b0.x - a0.x;\r\n const cy = b0.y - a0.y;\r\n\r\n const uv = Geometry.crossProductXYXY(ux, uy, vx, vy);\r\n const cv = Geometry.crossProductXYXY(cx, cy, vx, vy);\r\n const cu = Geometry.crossProductXYXY(ux, uy, cx, cy);\r\n const s = Geometry.conditionalDivideFraction(cv, uv);\r\n const t = Geometry.conditionalDivideFraction(cu, uv);\r\n if (s !== undefined && t !== undefined) {\r\n result.set(s, -t);\r\n return true;\r\n }\r\n result.set(0, 0);\r\n return false;\r\n }\r\n\r\n /**\r\n * Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts of WEIGHTED 4D Points\r\n * Return the fractional (not xy) coordinates in result.x, result.y\r\n * @param hA0 homogeneous start point of line a\r\n * @param hA1 homogeneous end point of line a\r\n * @param hB0 homogeneous start point of line b\r\n * @param hB1 homogeneous end point of line b\r\n * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.\r\n */\r\n public static lineSegment3dHXYTransverseIntersectionUnbounded(hA0: Point4d, hA1: Point4d, hB0: Point4d, hB1: Point4d, result?: Vector2d): Vector2d | undefined {\r\n // Considering only x,y,w parts....\r\n // Point Q along B is (in full homogeneous) `(1-lambda) B0 + lambda 1`\r\n // PointQ is colinear with A0,A1 when the determinant det (A0,A1,Q) is zero. (Each column takes xyw parts)\r\n const alpha0 = Geometry.tripleProduct(\r\n hA0.x, hA1.x, hB0.x,\r\n hA0.y, hA1.y, hB0.y,\r\n hA0.w, hA1.w, hB0.w);\r\n const alpha1 = Geometry.tripleProduct(\r\n hA0.x, hA1.x, hB1.x,\r\n hA0.y, hA1.y, hB1.y,\r\n hA0.w, hA1.w, hB1.w);\r\n const fractionB = Geometry.conditionalDivideFraction(-alpha0, alpha1 - alpha0);\r\n if (fractionB !== undefined) {\r\n const beta0 = Geometry.tripleProduct(\r\n hB0.x, hB1.x, hA0.x,\r\n hB0.y, hB1.y, hA0.y,\r\n hB0.w, hB1.w, hA0.w);\r\n const beta1 = Geometry.tripleProduct(\r\n hB0.x, hB1.x, hA1.x,\r\n hB0.y, hB1.y, hA1.y,\r\n hB0.w, hB1.w, hA1.w);\r\n const fractionA = Geometry.conditionalDivideFraction(-beta0, beta1 - beta0);\r\n if (fractionA !== undefined)\r\n return Vector2d.create(fractionA, fractionB, result);\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Return the line fraction at which the (homogeneous) line is closest to a space point as viewed in xy only.\r\n * @param hA0 homogeneous start point of line a\r\n * @param hA1 homogeneous end point of line a\r\n * @param spacePoint homogeneous point in space\r\n */\r\n public static lineSegment3dHXYClosestPointUnbounded(hA0: Point4d, hA1: Point4d, spacePoint: Point4d): number | undefined {\r\n // Considering only x,y,w parts....\r\n // weighted difference of (A1 w0 - A0 w1) is (cartesian) tangent vector along the line as viewed.\r\n // The perpendicular (pure vector) W = (-y,x) flip is the direction of projection\r\n // Point Q along A is (in full homogeneous) `(1-lambda) A0 + lambda 1 A1`\r\n // PointQ is colinear with spacePoint and and W when the xyw homogeneous determinant | Q W spacePoint | is zero.\r\n const tx = hA1.x * hA0.w - hA0.x * hA1.w;\r\n const ty = hA1.y * hA0.w - hA0.y * hA1.w;\r\n const det0 = Geometry.tripleProduct(\r\n hA0.x, -ty, spacePoint.x,\r\n hA0.y, tx, spacePoint.y,\r\n hA0.w, 0, spacePoint.w);\r\n const det1 = Geometry.tripleProduct(\r\n hA1.x, -ty, spacePoint.x,\r\n hA1.y, tx, spacePoint.y,\r\n hA1.w, 0, spacePoint.w);\r\n return Geometry.conditionalDivideFraction(-det0, det1 - det0);\r\n }\r\n\r\n /**\r\n * Return the line fraction at which the line is closest to a space point as viewed in xy only.\r\n * @param pointA0 start point\r\n * @param pointA1 end point\r\n * @param spacePoint point in space\r\n */\r\n public static lineSegment3dXYClosestPointUnbounded(pointA0: XAndY, pointA1: XAndY, spacePoint: XAndY): number | undefined {\r\n // Considering only x,y parts....\r\n const ux = pointA1.x - pointA0.x;\r\n const uy = pointA1.y - pointA0.y;\r\n const uu = ux * ux + uy * uy;\r\n const vx = spacePoint.x - pointA0.x;\r\n const vy = spacePoint.y - pointA0.y;\r\n const uv = ux * vx + uy * vy;\r\n return Geometry.conditionalDivideFraction(uv, uu);\r\n }\r\n\r\n /**\r\n * Return the line fraction at which the line is closest to a space point\r\n * @param pointA0 start point\r\n * @param pointA1 end point\r\n * @param spacePoint point in space\r\n */\r\n public static lineSegment3dClosestPointUnbounded(pointA0: Point3d, pointA1: Point3d, spacePoint: Point3d): number | undefined {\r\n const ux = pointA1.x - pointA0.x;\r\n const uy = pointA1.y - pointA0.y;\r\n const uz = pointA1.z - pointA0.z;\r\n const uu = ux * ux + uy * uy + uz * uz;\r\n const vx = spacePoint.x - pointA0.x;\r\n const vy = spacePoint.y - pointA0.y;\r\n const vz = spacePoint.z - pointA0.z;\r\n const uv = ux * vx + uy * vy + uz * vz;\r\n return Geometry.conditionalDivideFraction(uv, uu);\r\n }\r\n\r\n /**\r\n * Return true if lines (a0,a1) to (b0, b1) have closest approach (go by each other) in 3d\r\n * Return the fractional (not xy) coordinates in result.x, result.y\r\n * @param a0 start point of line a\r\n * @param a1 end point of line a\r\n * @param b0 start point of line b\r\n * @param b1 end point of line b\r\n * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.\r\n */\r\n public static lineSegment3dClosestApproachUnbounded(a0: Point3d, a1: Point3d, b0: Point3d, b1: Point3d,\r\n result: Vector2d): boolean {\r\n return this.ray3dXYZUVWClosestApproachUnbounded(\r\n a0.x, a0.y, a0.z,\r\n a1.x - a0.x, a1.y - a0.y, a1.z - a0.z,\r\n b0.x, b0.y, b0.z,\r\n b1.x - b0.x, b1.y - b0.y, b1.z - b0.z,\r\n result);\r\n }\r\n /**\r\n * Return true if the given rays have closest approach (go by each other) in 3d\r\n * Return the fractional (not xy) coordinates as x and y parts of a Point2d.\r\n * @param ax x-coordinate of the origin of the first ray\r\n * @param ay y-coordinate of the origin of the first ray\r\n * @param az z-coordinate of the origin of the first ray\r\n * @param au x-coordinate of the direction vector of the first ray\r\n * @param av y-coordinate of the direction vector of the first ray\r\n * @param aw z-coordinate of the direction vector of the first ray\r\n * @param bx x-coordinate of the origin of the second ray\r\n * @param by y-coordinate of the origin of the second ray\r\n * @param bz z-coordinate of the origin of the second ray\r\n * @param bu x-coordinate of the direction vector of the second ray\r\n * @param bv y-coordinate of the direction vector of the second ray\r\n * @param bw z-coordinate of the direction vector of the second ray\r\n * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.\r\n */\r\n public static ray3dXYZUVWClosestApproachUnbounded(\r\n ax: number, ay: number, az: number, au: number, av: number, aw: number,\r\n bx: number, by: number, bz: number, bu: number, bv: number, bw: number,\r\n result: Vector2d): boolean {\r\n\r\n const cx = bx - ax;\r\n const cy = by - ay;\r\n const cz = bz - az;\r\n\r\n const uu = Geometry.hypotenuseSquaredXYZ(au, av, aw);\r\n const vv = Geometry.hypotenuseSquaredXYZ(bu, bv, bw);\r\n const uv = Geometry.dotProductXYZXYZ(au, av, aw, bu, bv, bw);\r\n const cu = Geometry.dotProductXYZXYZ(cx, cy, cz, au, av, aw);\r\n const cv = Geometry.dotProductXYZXYZ(cx, cy, cz, bu, bv, bw);\r\n return SmallSystem.linearSystem2d(uu, -uv, uv, -vv, cu, cv, result);\r\n }\r\n /**\r\n * Solve the pair of linear equations\r\n * * `ux * x + vx * y = cx`\r\n * * `uy * x + vy * y = cy`\r\n * @param ux xx coefficient\r\n * @param vx xy coefficient\r\n * @param uy yx coefficient\r\n * @param vy yy coefficient\r\n * @param cx x right hand side\r\n * @param cy y right hand side\r\n * @param result (x,y) solution (MUST be preallocated by caller)\r\n */\r\n public static linearSystem2d(\r\n ux: number, vx: number, // first row of matrix\r\n uy: number, vy: number, // second row of matrix\r\n cx: number, cy: number, // right side\r\n result: Vector2d,\r\n ): boolean {\r\n const uv = Geometry.crossProductXYXY(ux, uy, vx, vy);\r\n const cv = Geometry.crossProductXYXY(cx, cy, vx, vy);\r\n const cu = Geometry.crossProductXYXY(ux, uy, cx, cy);\r\n const s = Geometry.conditionalDivideFraction(cv, uv);\r\n const t = Geometry.conditionalDivideFraction(cu, uv);\r\n if (s !== undefined && t !== undefined) {\r\n result.set(s, t);\r\n return true;\r\n }\r\n result.set(0, 0);\r\n return false;\r\n }\r\n /**\r\n * Solve a linear system:\r\n * * x equation: `axx * u + axy * v + axz * w = cx`\r\n * * y equation: `ayx * u + ayy * v + ayz * w = cy`\r\n * * z equation: `azx * u + azy * v + azz * w = cz`\r\n * @param axx row 0, column 0 coefficient\r\n * @param axy row 0, column 1 coefficient\r\n * @param axz row 0, column 1 coefficient\r\n * @param ayx row 1, column 0 coefficient\r\n * @param ayy row 1, column 1 coefficient\r\n * @param ayz row 1, column 2 coefficient\r\n * @param azx row 2, column 0 coefficient\r\n * @param azy row 2, column 1 coefficient\r\n * @param azz row 2, column 2 coefficient\r\n * @param cx right hand side row 0 coefficient\r\n * @param cy right hand side row 1 coefficient\r\n * @param cz right hand side row 2 coefficient\r\n * @param result optional result.\r\n * @returns solution vector (u,v,w) or `undefined` if system is singular.\r\n */\r\n public static linearSystem3d(\r\n axx: number, axy: number, axz: number, // first row of matrix\r\n ayx: number, ayy: number, ayz: number, // second row of matrix\r\n azx: number, azy: number, azz: number, // second row of matrix\r\n cx: number, cy: number, cz: number, // right side\r\n result?: Vector3d,\r\n ): Vector3d | undefined {\r\n // determinants of various combinations of columns ...\r\n const detXYZ = Geometry.tripleProduct(axx, ayx, azx, axy, ayy, azy, axz, ayz, azz);\r\n const detCYZ = Geometry.tripleProduct(cx, cy, cz, axy, ayy, azy, axz, ayz, azz);\r\n const detXCZ = Geometry.tripleProduct(axx, ayx, azx, cx, cy, cz, axz, ayz, azz);\r\n const detXYC = Geometry.tripleProduct(axx, ayx, azx, axy, ayy, azy, cx, cy, cz);\r\n const s = Geometry.conditionalDivideFraction(detCYZ, detXYZ);\r\n const t = Geometry.conditionalDivideFraction(detXCZ, detXYZ);\r\n const u = Geometry.conditionalDivideFraction(detXYC, detXYZ);\r\n if (s !== undefined && t !== undefined && u !== undefined) {\r\n return Vector3d.create(s, t, u, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Compute the intersection of three planes.\r\n * @param xyzA point on the first plane\r\n * @param normalA normal of the first plane\r\n * @param xyzB point on the second plane\r\n * @param normalB normal of the second plane\r\n * @param xyzC point on the third plane\r\n * @param normalC normal of the third plane\r\n * @param result optional result\r\n * @returns intersection point of the three planes (as a Vector3d), or undefined if at least two planes are parallel.\r\n */\r\n public static intersect3Planes(\r\n xyzA: Point3d, normalA: Vector3d,\r\n xyzB: Point3d, normalB: Vector3d,\r\n xyzC: Point3d, normalC: Vector3d, result?: Vector3d): Vector3d | undefined {\r\n return this.linearSystem3d(\r\n normalA.x, normalA.y, normalA.z,\r\n normalB.x, normalB.y, normalB.z,\r\n normalC.x, normalC.y, normalC.z,\r\n Geometry.dotProductXYZXYZ(xyzA.x, xyzA.y, xyzA.z, normalA.x, normalA.y, normalA.z),\r\n Geometry.dotProductXYZXYZ(xyzB.x, xyzB.y, xyzB.z, normalB.x, normalB.y, normalB.z),\r\n Geometry.dotProductXYZXYZ(xyzC.x, xyzC.y, xyzC.z, normalC.x, normalC.y, normalC.z), result);\r\n }\r\n\r\n /**\r\n * * in rowB, replace `rowB[j] += a * rowB[pivot] * rowA[j] / rowA[pivot]` for `j>pivot`\r\n * @param rowA row that does not change\r\n * @param pivotIndex index of pivot (divisor) in rowA.\r\n * @param rowB row where elimination occurs.\r\n */\r\n public static eliminateFromPivot(rowA: Float64Array, pivotIndex: number, rowB: Float64Array, a: number): boolean {\r\n const n = rowA.length;\r\n let q = Geometry.conditionalDivideFraction(rowB[pivotIndex], rowA[pivotIndex]);\r\n if (q === undefined) return false;\r\n q *= a;\r\n for (let j = pivotIndex + 1; j < n; j++)\r\n rowB[j] += q * rowA[j];\r\n return true;\r\n }\r\n /**\r\n * Solve a pair of bilinear equations\r\n * * First equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`\r\n * * Second equation: `a1 + b1 * u + c1 * v + d1 * u * v = 0`\r\n */\r\n public static solveBilinearPair(\r\n a0: number, b0: number, c0: number, d0: number,\r\n a1: number, b1: number, c1: number, d1: number,\r\n ): Point2d[] | undefined {\r\n return BilinearPolynomial.solveBilinearPair(a0, b0, c0, d0, a1, b1, c1, d1);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuxData.d.ts","sourceRoot":"","sources":["../../../src/polyface/AuxData.ts"],"names":[],"mappings":"AAKA;;GAEG;
|
|
1
|
+
{"version":3,"file":"AuxData.d.ts","sourceRoot":"","sources":["../../../src/polyface/AuxData.ts"],"names":[],"mappings":"AAKA;;GAEG;AAGH,OAAO,EAA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AC/B,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;wBAC1E,MAAM;oBACR,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhGD,0CAgGC;AAED,SAAS,eAAe,CAAC,MAAgB,EAAE,SAAmC;IAC5E,MAAM,KAAK,GAAG,IAAI,yBAAO,EAAE,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC","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\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\n// import { Point2d } from \"./Geometry2d\";\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { NumberArray } from \"../geometry3d/PointHelpers\";\r\n// import { Geometry } from \"./Geometry\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\n\r\n/** The types of data that can be represented by an [[AuxChannelData]]. Each type of data contributes differently to the\r\n * animation applied by an [AnalysisStyle]($common) and responds differently when the host [[PolyfaceAuxData]] is transformed.\r\n * @public\r\n */\r\nexport enum AuxChannelDataType {\r\n /** General-purpose scalar values like stress, temperature, etc., used to recolor the [[Polyface]]'s vertices.\r\n * When the host Polyface is transformed, scalar values remain unmodified.\r\n */\r\n Scalar = 0,\r\n /** Distances in meters used to recolor the [[Polyface]]'s vertices.\r\n * When the host [[Polyface]] is transformed the [[Transform]]'s scale is applied to the distances.\r\n */\r\n Distance = 1,\r\n /** (X, Y, Z) displacement vectors added to the [[Polyface]]'s vertex positions resulting in deformation of the mesh.\r\n * When the host Polyface is transformed the displacements are rotated and scaled accordingly.\r\n */\r\n Vector = 2,\r\n /** (X, Y, Z) normal vectors that replace the host [[Polyface]]'s own normals.\r\n * When the Polyface is transformed the normals are rotated accordingly.\r\n */\r\n Normal = 3,\r\n}\r\n\r\n/** Represents the [[AuxChannel]] data at a single input value.\r\n * @public\r\n*/\r\nexport class AuxChannelData {\r\n /** The input value for this data. */\r\n public input: number;\r\n /** The vertex values for this data. A single value per vertex for scalar and distance types and 3 values (x,y,z) for normal or vector channels. */\r\n public values: number[];\r\n\r\n /** Constructor. If `values` is a number array, it is captured. */\r\n constructor(input: number, values: number[] | Float64Array) {\r\n this.input = input;\r\n if (values instanceof Float64Array) {\r\n this.values = [];\r\n for (const v of values) this.values.push(v);\r\n } else\r\n this.values = values;\r\n }\r\n\r\n /** Copy blocks of size `blockSize` from (blocked index) `thisIndex` in this AuxChannelData to (blockIndex) `otherIndex` of `other` */\r\n public copyValues(other: AuxChannelData, thisIndex: number, otherIndex: number, blockSize: number): void {\r\n for (let i = 0; i < blockSize; i++)\r\n this.values[thisIndex * blockSize + i] = other.values[otherIndex * blockSize + i];\r\n }\r\n\r\n /** return a deep copy */\r\n public clone(): AuxChannelData {\r\n return new AuxChannelData(this.input, this.values.slice());\r\n }\r\n\r\n /** toleranced comparison of the `input` and `value` fields.\r\n * * Default tolerance is 1.0e-8\r\n */\r\n public isAlmostEqual(other: AuxChannelData, tol?: number): boolean {\r\n const tolerance = tol ? tol : 1.0E-8;\r\n return Math.abs(this.input - other.input) < tolerance && NumberArray.isAlmostEqual(this.values, other.values, tolerance);\r\n }\r\n}\r\n\r\n/** Represents a single [[PolyfaceAuxData]] channel.\r\n * @public\r\n*/\r\nexport class AuxChannel {\r\n /** An array of [[AuxChannelData]] that represents the vertex data at one or more input values. */\r\n public data: AuxChannelData[];\r\n /** The type of data stored in this channel. */\r\n public dataType: AuxChannelDataType;\r\n /** The channel name. This is used to present the [[AuxChannel]] to the user and also to select the [[AuxChannel]] for display from AnalysisStyle */\r\n public name?: string;\r\n /** The input name. */\r\n public inputName?: string;\r\n\r\n /** Constructor with CAPTURED inputs. */\r\n public constructor(data: AuxChannelData[], dataType: AuxChannelDataType, name?: string, inputName?: string) {\r\n this.data = data;\r\n this.dataType = dataType;\r\n this.name = name;\r\n this.inputName = inputName;\r\n }\r\n\r\n /** Return a deep copy. */\r\n public clone(): AuxChannel {\r\n const clonedData = [];\r\n for (const data of this.data) clonedData.push(data.clone());\r\n return new AuxChannel(clonedData, this.dataType, this.name, this.inputName);\r\n }\r\n\r\n /** Toleranced comparison of contents. */\r\n public isAlmostEqual(other: AuxChannel, tol?: number): boolean {\r\n if (this.dataType !== other.dataType ||\r\n this.name !== other.name ||\r\n this.inputName !== other.inputName ||\r\n this.data.length !== other.data.length)\r\n return false;\r\n\r\n for (let i = 0; i < this.data.length; i++)\r\n if (!this.data[i].isAlmostEqual(other.data[i], tol))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** True if the data type is 1-dimensional. */\r\n public static isScalar(dataType: AuxChannelDataType): boolean {\r\n return dataType === AuxChannelDataType.Distance || dataType === AuxChannelDataType.Scalar;\r\n }\r\n\r\n /** True if the data stored in this AuxChannel is 1-dimensional. */\r\n public get isScalar(): boolean {\r\n return AuxChannel.isScalar(this.dataType);\r\n }\r\n\r\n /** The dimension (1D or 3D) of each datum of an AuxChannel of the given type. */\r\n public static entriesPerValue(dataType: AuxChannelDataType): number {\r\n return this.isScalar(dataType) ? 1 : 3;\r\n }\r\n\r\n /** The dimension (1D or 3D) of each datum in the data arrays of this AuxChannel. */\r\n public get entriesPerValue(): number {\r\n return AuxChannel.entriesPerValue(this.dataType);\r\n }\r\n\r\n /** The number of data stored in each data array of this AuxChannel, equal to the length of the array divided by `entriesPerValue`. */\r\n public get valueCount(): number {\r\n return 0 === this.data.length ? 0 : this.data[0].values.length / this.entriesPerValue;\r\n }\r\n\r\n /** The minimum and maximum values in `data.values`, or `undefined` if [[isScalar]] is false. */\r\n public get scalarRange(): Range1d | undefined {\r\n if (!this.isScalar)\r\n return undefined;\r\n\r\n const range = Range1d.createNull();\r\n for (const data of this.data)\r\n range.extendArray(data.values);\r\n\r\n return range;\r\n }\r\n\r\n /** Compute the range of this channel's displacement values, if [[dataType]] is [[AuxChannelDataType.Vector]].\r\n * @param scale Scale by which to multiply each displacement.\r\n * @param result Preallocated object in which to store result.\r\n * @returns The range encompassing all this channel's displacements scaled by `scale`; or a null range if this channel does not contain displacements.\r\n */\r\n public computeDisplacementRange(scale = 1, result?: Range3d): Range3d {\r\n result = Range3d.createNull(result);\r\n\r\n if (AuxChannelDataType.Vector === this.dataType) {\r\n for (const data of this.data) {\r\n const v = data.values;\r\n for (let i = 0; i < v.length; i += 3)\r\n result.extendXYZ(v[i] * scale, v[i + 1] * scale, v[i + 2] * scale);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/**\r\n * The `PolyfaceAuxData` structure contains one or more analytical data channels for each vertex of a [[Polyface]], allowing the polyface to be styled\r\n * using an [AnalysisStyle]($common).\r\n * Typically a polyface will contain only vertex data required for its basic display: vertex position, normal, texture parameter, color.\r\n * `PolyfaceAuxData` provides supplemental per-vertex data that is generally computed in an analysis program or other external data source.\r\n * This supplemental data can be either 1D (e.g., height, override color) or 3D (e.g., displacement vector, override normal); see [[AuxChannel.entriesPerValue]], [[AuxChannel.dataType]].\r\n * All data channels are indexed by the same indices, which must have the same length and structure as the other Polyface indices.\r\n * This means that if a facet's face loop is found at index range [i0,i1] in the Polyface vertex index array, then the same index range [i0,i1]\r\n * locates the data for this facet in all the other Polyface index arrays, including the `PolyfaceAuxData` indices.\r\n * @see [[PolyfaceData.auxData]] to associate auxiliary data with a polyface.\r\n * @public\r\n */\r\nexport class PolyfaceAuxData {\r\n /** Array with one or more channels of auxiliary data for the associated polyface. */\r\n public channels: AuxChannel[];\r\n /** The indices (shared by all data in all channels) mapping the data to the mesh facets. */\r\n public indices: number[];\r\n\r\n /** Constructor with CAPTURED inputs. */\r\n public constructor(channels: AuxChannel[], indices: number[]) {\r\n this.channels = channels;\r\n this.indices = indices;\r\n }\r\n\r\n /** Return a deep copy. */\r\n public clone(): PolyfaceAuxData {\r\n const clonedChannels = this.channels.map((x) => x.clone());\r\n return new PolyfaceAuxData(clonedChannels, this.indices.slice());\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other` within `tolerance`.\r\n * The indices are compared for exact equality. The data in the channels are compared using `tolerance`, which defaults to 1.0e-8.\r\n */\r\n public isAlmostEqual(other: PolyfaceAuxData, tolerance?: number): boolean {\r\n if (!NumberArray.isExactEqual(this.indices, other.indices) || this.channels.length !== other.channels.length)\r\n return false;\r\n\r\n for (let i = 0; i < this.channels.length; i++)\r\n if (!this.channels[i].isAlmostEqual(other.channels[i], tolerance))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** Returns true if both `left` and `right` are undefined, or both are defined and equivalent within `tolerance` (default: 1.0e-8). */\r\n public static isAlmostEqual(left: PolyfaceAuxData | undefined, right: PolyfaceAuxData | undefined, tol?: number): boolean {\r\n if (left === right) // This catches double undefined !!!\r\n return true;\r\n if (left && right)\r\n return left.isAlmostEqual(right, tol);\r\n return false;\r\n }\r\n\r\n /** Create a PolyfaceAuxData for use by a [[PolyfaceVisitor]]. */\r\n public createForVisitor(): PolyfaceAuxData {\r\n const visitorChannels: AuxChannel[] = [];\r\n\r\n for (const parentChannel of this.channels) {\r\n const visitorChannelData: AuxChannelData[] = [];\r\n for (const parentChannelData of parentChannel.data)\r\n visitorChannelData.push(new AuxChannelData(parentChannelData.input, []));\r\n\r\n visitorChannels.push(new AuxChannel(visitorChannelData, parentChannel.dataType, parentChannel.name, parentChannel.inputName));\r\n }\r\n\r\n return new PolyfaceAuxData(visitorChannels, []);\r\n }\r\n\r\n /** Apply `transform` to the data in each channel.\r\n * @see [[AuxChannelDataType]] for details regarding how each data type is affected by the transform.\r\n * @note This method may fail if a channel of [[AuxChannelDataType.Normal]] exists and `transform.matrix` is non-invertible.\r\n * @returns true if the channels were all successfully transformed.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n let inverseRot: Matrix3d | undefined;\r\n const rot = transform.matrix;\r\n const det = rot.determinant();\r\n const scale = Math.pow(Math.abs(det), 1 / 3) * (det >= 0 ? 1 : -1);\r\n\r\n for (const channel of this.channels) {\r\n for (const data of channel.data) {\r\n switch (channel.dataType) {\r\n case AuxChannelDataType.Scalar:\r\n continue;\r\n case AuxChannelDataType.Distance: {\r\n for (let i = 0; i < data.values.length; i++)\r\n data.values[i] *= scale;\r\n\r\n break;\r\n }\r\n case AuxChannelDataType.Normal: {\r\n inverseRot = inverseRot ?? rot.inverse();\r\n if (!inverseRot)\r\n return false;\r\n\r\n transformPoints(data.values, (point) => inverseRot!.multiplyTransposeVectorInPlace(point));\r\n break;\r\n }\r\n case AuxChannelDataType.Vector: {\r\n transformPoints(data.values, (point) => rot.multiplyVectorInPlace(point));\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n\r\nfunction transformPoints(coords: number[], transform: (point: Point3d) => void): void {\r\n const point = new Point3d();\r\n for (let i = 0; i < coords.length; i += 3) {\r\n point.set(coords[i], coords[i + 1], coords[i + 2]);\r\n transform(point);\r\n coords[i] = point.x;\r\n coords[i + 1] = point.y;\r\n coords[i + 2] = point.z;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AuxData.js","sourceRoot":"","sources":["../../../src/polyface/AuxData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F,mEAAwD;AACxD,6DAAyD;AACzD,yCAAyC;AACzC,+CAAuD;AAEvD;;;GAGG;AACH,IAAY,kBAiBX;AAjBD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,+DAAU,CAAA;IACV;;OAEG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,+DAAU,CAAA;IACV;;OAEG;IACH,+DAAU,CAAA;AACZ,CAAC,EAjBW,kBAAkB,kCAAlB,kBAAkB,QAiB7B;AAED;;EAEE;AACF,MAAa,cAAc;IAMzB,mEAAmE;IACnE,YAAY,KAAa,EAAE,MAA+B;QACxD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,MAAM,YAAY,YAAY,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,KAAK,MAAM,CAAC,IAAI,MAAM;gBAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC;;YACC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,sIAAsI;IAC/H,UAAU,CAAC,KAAqB,EAAE,SAAiB,EAAE,UAAkB,EAAE,SAAiB;QAC/F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE;YAChC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,yBAAyB;IAClB,KAAK;QACV,OA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CAAC;wBACzC,IAAI,CAAC,UAAU;4BACX,OAAO,KAAK,CAAC;wBAEjB,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,UAAW,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAC;wBAC3F,MAAM;oBACR,CAAC;oBACD,KAAK,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;wBAC/B,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;wBAC1E,MAAM;oBACR,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhGD,0CAgGC;AAED,SAAS,eAAe,CAAC,MAAgB,EAAE,SAAmC;IAC5E,MAAM,KAAK,GAAG,IAAI,yBAAO,EAAE,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC","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\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\n// import { Point2d } from \"./Geometry2d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix3d } from \"../geometry3d/Matrix3d\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { NumberArray } from \"../geometry3d/PointHelpers\";\r\n// import { Geometry } from \"./Geometry\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\n\r\n/** The types of data that can be represented by an [[AuxChannelData]]. Each type of data contributes differently to the\r\n * animation applied by an [AnalysisStyle]($common) and responds differently when the host [[PolyfaceAuxData]] is transformed.\r\n * @public\r\n */\r\nexport enum AuxChannelDataType {\r\n /** General-purpose scalar values like stress, temperature, etc., used to recolor the [[Polyface]]'s vertices.\r\n * When the host Polyface is transformed, scalar values remain unmodified.\r\n */\r\n Scalar = 0,\r\n /** Distances in meters used to recolor the [[Polyface]]'s vertices.\r\n * When the host [[Polyface]] is transformed the [[Transform]]'s scale is applied to the distances.\r\n */\r\n Distance = 1,\r\n /** (X, Y, Z) displacement vectors added to the [[Polyface]]'s vertex positions resulting in deformation of the mesh.\r\n * When the host Polyface is transformed the displacements are rotated and scaled accordingly.\r\n */\r\n Vector = 2,\r\n /** (X, Y, Z) normal vectors that replace the host [[Polyface]]'s own normals.\r\n * When the Polyface is transformed the normals are rotated accordingly.\r\n */\r\n Normal = 3,\r\n}\r\n\r\n/** Represents the [[AuxChannel]] data at a single input value.\r\n * @public\r\n*/\r\nexport class AuxChannelData {\r\n /** The input value for this data. */\r\n public input: number;\r\n /** The vertex values for this data. A single value per vertex for scalar and distance types and 3 values (x,y,z) for normal or vector channels. */\r\n public values: number[];\r\n\r\n /** Constructor. If `values` is a number array, it is captured. */\r\n constructor(input: number, values: number[] | Float64Array) {\r\n this.input = input;\r\n if (values instanceof Float64Array) {\r\n this.values = [];\r\n for (const v of values) this.values.push(v);\r\n } else\r\n this.values = values;\r\n }\r\n\r\n /** Copy blocks of size `blockSize` from (blocked index) `thisIndex` in this AuxChannelData to (blockIndex) `otherIndex` of `other` */\r\n public copyValues(other: AuxChannelData, thisIndex: number, otherIndex: number, blockSize: number): void {\r\n for (let i = 0; i < blockSize; i++)\r\n this.values[thisIndex * blockSize + i] = other.values[otherIndex * blockSize + i];\r\n }\r\n\r\n /** return a deep copy */\r\n public clone(): AuxChannelData {\r\n return new AuxChannelData(this.input, this.values.slice());\r\n }\r\n\r\n /** toleranced comparison of the `input` and `value` fields.\r\n * * Default tolerance is 1.0e-8\r\n */\r\n public isAlmostEqual(other: AuxChannelData, tol?: number): boolean {\r\n const tolerance = tol ? tol : 1.0E-8;\r\n return Math.abs(this.input - other.input) < tolerance && NumberArray.isAlmostEqual(this.values, other.values, tolerance);\r\n }\r\n}\r\n\r\n/** Represents a single [[PolyfaceAuxData]] channel.\r\n * @public\r\n*/\r\nexport class AuxChannel {\r\n /** An array of [[AuxChannelData]] that represents the vertex data at one or more input values. */\r\n public data: AuxChannelData[];\r\n /** The type of data stored in this channel. */\r\n public dataType: AuxChannelDataType;\r\n /** The channel name. This is used to present the [[AuxChannel]] to the user and also to select the [[AuxChannel]] for display from AnalysisStyle */\r\n public name?: string;\r\n /** The input name. */\r\n public inputName?: string;\r\n\r\n /** Constructor with CAPTURED inputs. */\r\n public constructor(data: AuxChannelData[], dataType: AuxChannelDataType, name?: string, inputName?: string) {\r\n this.data = data;\r\n this.dataType = dataType;\r\n this.name = name;\r\n this.inputName = inputName;\r\n }\r\n\r\n /** Return a deep copy. */\r\n public clone(): AuxChannel {\r\n const clonedData = [];\r\n for (const data of this.data) clonedData.push(data.clone());\r\n return new AuxChannel(clonedData, this.dataType, this.name, this.inputName);\r\n }\r\n\r\n /** Toleranced comparison of contents. */\r\n public isAlmostEqual(other: AuxChannel, tol?: number): boolean {\r\n if (this.dataType !== other.dataType ||\r\n this.name !== other.name ||\r\n this.inputName !== other.inputName ||\r\n this.data.length !== other.data.length)\r\n return false;\r\n\r\n for (let i = 0; i < this.data.length; i++)\r\n if (!this.data[i].isAlmostEqual(other.data[i], tol))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** True if the data type is 1-dimensional. */\r\n public static isScalar(dataType: AuxChannelDataType): boolean {\r\n return dataType === AuxChannelDataType.Distance || dataType === AuxChannelDataType.Scalar;\r\n }\r\n\r\n /** True if the data stored in this AuxChannel is 1-dimensional. */\r\n public get isScalar(): boolean {\r\n return AuxChannel.isScalar(this.dataType);\r\n }\r\n\r\n /** The dimension (1D or 3D) of each datum of an AuxChannel of the given type. */\r\n public static entriesPerValue(dataType: AuxChannelDataType): number {\r\n return this.isScalar(dataType) ? 1 : 3;\r\n }\r\n\r\n /** The dimension (1D or 3D) of each datum in the data arrays of this AuxChannel. */\r\n public get entriesPerValue(): number {\r\n return AuxChannel.entriesPerValue(this.dataType);\r\n }\r\n\r\n /** The number of data stored in each data array of this AuxChannel, equal to the length of the array divided by `entriesPerValue`. */\r\n public get valueCount(): number {\r\n return 0 === this.data.length ? 0 : this.data[0].values.length / this.entriesPerValue;\r\n }\r\n\r\n /** The minimum and maximum values in `data.values`, or `undefined` if [[isScalar]] is false. */\r\n public get scalarRange(): Range1d | undefined {\r\n if (!this.isScalar)\r\n return undefined;\r\n\r\n const range = Range1d.createNull();\r\n for (const data of this.data)\r\n range.extendArray(data.values);\r\n\r\n return range;\r\n }\r\n\r\n /** Compute the range of this channel's displacement values, if [[dataType]] is [[AuxChannelDataType.Vector]].\r\n * @param scale Scale by which to multiply each displacement.\r\n * @param result Preallocated object in which to store result.\r\n * @returns The range encompassing all this channel's displacements scaled by `scale`; or a null range if this channel does not contain displacements.\r\n */\r\n public computeDisplacementRange(scale = 1, result?: Range3d): Range3d {\r\n result = Range3d.createNull(result);\r\n\r\n if (AuxChannelDataType.Vector === this.dataType) {\r\n for (const data of this.data) {\r\n const v = data.values;\r\n for (let i = 0; i < v.length; i += 3)\r\n result.extendXYZ(v[i] * scale, v[i + 1] * scale, v[i + 2] * scale);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/**\r\n * The `PolyfaceAuxData` structure contains one or more analytical data channels for each vertex of a [[Polyface]], allowing the polyface to be styled\r\n * using an [AnalysisStyle]($common).\r\n * Typically a polyface will contain only vertex data required for its basic display: vertex position, normal, texture parameter, color.\r\n * `PolyfaceAuxData` provides supplemental per-vertex data that is generally computed in an analysis program or other external data source.\r\n * This supplemental data can be either 1D (e.g., height, override color) or 3D (e.g., displacement vector, override normal); see [[AuxChannel.entriesPerValue]], [[AuxChannel.dataType]].\r\n * All data channels are indexed by the same indices, which must have the same length and structure as the other Polyface indices.\r\n * This means that if a facet's face loop is found at index range [i0,i1] in the Polyface vertex index array, then the same index range [i0,i1]\r\n * locates the data for this facet in all the other Polyface index arrays, including the `PolyfaceAuxData` indices.\r\n * @see [[PolyfaceData.auxData]] to associate auxiliary data with a polyface.\r\n * @public\r\n */\r\nexport class PolyfaceAuxData {\r\n /** Array with one or more channels of auxiliary data for the associated polyface. */\r\n public channels: AuxChannel[];\r\n /** The indices (shared by all data in all channels) mapping the data to the mesh facets. */\r\n public indices: number[];\r\n\r\n /** Constructor with CAPTURED inputs. */\r\n public constructor(channels: AuxChannel[], indices: number[]) {\r\n this.channels = channels;\r\n this.indices = indices;\r\n }\r\n\r\n /** Return a deep copy. */\r\n public clone(): PolyfaceAuxData {\r\n const clonedChannels = this.channels.map((x) => x.clone());\r\n return new PolyfaceAuxData(clonedChannels, this.indices.slice());\r\n }\r\n\r\n /** Returns true if `this` is equivalent to `other` within `tolerance`.\r\n * The indices are compared for exact equality. The data in the channels are compared using `tolerance`, which defaults to 1.0e-8.\r\n */\r\n public isAlmostEqual(other: PolyfaceAuxData, tolerance?: number): boolean {\r\n if (!NumberArray.isExactEqual(this.indices, other.indices) || this.channels.length !== other.channels.length)\r\n return false;\r\n\r\n for (let i = 0; i < this.channels.length; i++)\r\n if (!this.channels[i].isAlmostEqual(other.channels[i], tolerance))\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /** Returns true if both `left` and `right` are undefined, or both are defined and equivalent within `tolerance` (default: 1.0e-8). */\r\n public static isAlmostEqual(left: PolyfaceAuxData | undefined, right: PolyfaceAuxData | undefined, tol?: number): boolean {\r\n if (left === right) // This catches double undefined !!!\r\n return true;\r\n if (left && right)\r\n return left.isAlmostEqual(right, tol);\r\n return false;\r\n }\r\n\r\n /** Create a PolyfaceAuxData for use by a [[PolyfaceVisitor]]. */\r\n public createForVisitor(): PolyfaceAuxData {\r\n const visitorChannels: AuxChannel[] = [];\r\n\r\n for (const parentChannel of this.channels) {\r\n const visitorChannelData: AuxChannelData[] = [];\r\n for (const parentChannelData of parentChannel.data)\r\n visitorChannelData.push(new AuxChannelData(parentChannelData.input, []));\r\n\r\n visitorChannels.push(new AuxChannel(visitorChannelData, parentChannel.dataType, parentChannel.name, parentChannel.inputName));\r\n }\r\n\r\n return new PolyfaceAuxData(visitorChannels, []);\r\n }\r\n\r\n /** Apply `transform` to the data in each channel.\r\n * @see [[AuxChannelDataType]] for details regarding how each data type is affected by the transform.\r\n * @note This method may fail if a channel of [[AuxChannelDataType.Normal]] exists and `transform.matrix` is non-invertible.\r\n * @returns true if the channels were all successfully transformed.\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n let inverseRot: Matrix3d | undefined;\r\n const rot = transform.matrix;\r\n const det = rot.determinant();\r\n const scale = Math.pow(Math.abs(det), 1 / 3) * (det >= 0 ? 1 : -1);\r\n\r\n for (const channel of this.channels) {\r\n for (const data of channel.data) {\r\n switch (channel.dataType) {\r\n case AuxChannelDataType.Scalar:\r\n continue;\r\n case AuxChannelDataType.Distance: {\r\n for (let i = 0; i < data.values.length; i++)\r\n data.values[i] *= scale;\r\n\r\n break;\r\n }\r\n case AuxChannelDataType.Normal: {\r\n inverseRot = inverseRot ?? rot.inverse();\r\n if (!inverseRot)\r\n return false;\r\n\r\n transformPoints(data.values, (point) => inverseRot!.multiplyTransposeVectorInPlace(point));\r\n break;\r\n }\r\n case AuxChannelDataType.Vector: {\r\n transformPoints(data.values, (point) => rot.multiplyVectorInPlace(point));\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n\r\nfunction transformPoints(coords: number[], transform: (point: Point3d) => void): void {\r\n const point = new Point3d();\r\n for (let i = 0; i < coords.length; i += 3) {\r\n point.set(coords[i], coords[i + 1], coords[i + 2]);\r\n transform(point);\r\n coords[i] = point.x;\r\n coords[i + 1] = point.y;\r\n coords[i + 2] = point.z;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedPolyfaceVisitor.d.ts","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"IndexedPolyfaceVisitor.d.ts","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,YAAa,YAAW,eAAe;IACjF,OAAO,CAAC,kBAAkB,CAAS;IACnC,OA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B,iGAAiG;IAC1F,YAAY,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAWhE;;;OAGG;IACI,wBAAwB,CAAC,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAchH;AACD;;;;;GAKG;AACH,qBAAa,4BAA6B,SAAQ,sBAAsB;IACtE,OAAO,CAAC,mBAAmB,CAAC,CAAW;IACvC,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO;IAMP,OAAO,CAAC,kBAAkB;IAG1B;;;;;OAKG;WACW,mBAAmB,CAAC,QAAQ,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,MAAU,GAAG,4BAA4B;IAG7I;;;;OAIG;IACa,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAQ7D;;;OAGG;IACa,eAAe,IAAI,OAAO;IAM1C,qGAAqG;IACrF,KAAK,IAAI,IAAI;IAI7B;;;;OAIG;IACI,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAKjE,iEAAiE;IACjD,sBAAsB,IAAI,MAAM;IAGhD;;;;;;;;;;;;MAYE;WACY,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,sBAAsB,EAAE,aAAa,GAAE,QAA2B,EAAE,SAAS,GAAE,KAAgC,EAAE,OAAO,GAAE,MAAU,GAAG,4BAA4B;CAiBjO"}
|
|
@@ -14,7 +14,6 @@ const Point3dVector3d_1 = require("../geometry3d/Point3dVector3d");
|
|
|
14
14
|
const PolygonOps_1 = require("../geometry3d/PolygonOps");
|
|
15
15
|
const Polyface_1 = require("./Polyface");
|
|
16
16
|
const PolyfaceData_1 = require("./PolyfaceData");
|
|
17
|
-
/* eslint-disable @itwin/prefer-get */
|
|
18
17
|
/**
|
|
19
18
|
* An `IndexedPolyfaceVisitor` is an iterator-like object that "visits" facets of a mesh.
|
|
20
19
|
* * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedPolyfaceVisitor.js","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AACvC,+CAA4C;AAE5C,mEAAyD;AACzD,yDAAsD;AACtD,yCAA8D;AAC9D,iDAA8C;AAE9C,sCAAsC;AAEtC;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAMtD,sEAAsE;IACtE,YAAsB,QAAyB,EAAE,OAAe;QAC9D,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO;YACvB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC1D,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC;IAE/B,CAAC;IACD,yCAAyC;IAClC,cAAc;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,iEAAiE;IAC1D,sBAAsB;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU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AC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;gBACpD,SAAS,CAAC,mBAAmB;YAC/B,IAAI,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,GAAG;gBAC7C,SAAS,CAAC,uCAAuC;YACnD,IAAI,WAAW,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC;gBACzF,SAAS,CAAC,oBAAoB;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrG,CAAC;CACF;AA/FD,oEA+FC","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\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Angle } from \"../geometry3d/Angle\";\r\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\r\nimport { IndexedPolyface, PolyfaceVisitor } from \"./Polyface\";\r\nimport { PolyfaceData } from \"./PolyfaceData\";\r\n\r\n/* eslint-disable @itwin/prefer-get */\r\n\r\n/**\r\n * An `IndexedPolyfaceVisitor` is an iterator-like object that \"visits\" facets of a mesh.\r\n * * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceVisitor extends PolyfaceData implements PolyfaceVisitor {\r\n private _currentFacetIndex: number;\r\n private _nextFacetIndex: number;\r\n private _numWrap: number;\r\n private _numEdges: number;\r\n private _polyface: IndexedPolyface;\r\n // to be called from static factory method that validates the polyface\r\n protected constructor(polyface: IndexedPolyface, numWrap: number) {\r\n super(polyface.data.normalCount > 0, polyface.data.paramCount > 0, polyface.data.colorCount > 0, polyface.twoSided);\r\n this._polyface = polyface;\r\n this._numWrap = numWrap;\r\n if (polyface.data.auxData)\r\n this.auxData = polyface.data.auxData.createForVisitor();\r\n this.reset();\r\n this._numEdges = 0;\r\n this._nextFacetIndex = 0;\r\n this._currentFacetIndex = -1;\r\n\r\n }\r\n /** Return the client polyface object. */\r\n public clientPolyface(): IndexedPolyface {\r\n return this._polyface;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public getVisitableFacetCount(): number {\r\n return this._polyface.facetCount;\r\n }\r\n /**\r\n * Set the number of vertices replicated in visitor arrays (both data and index arrays).\r\n * * 0,1,2 are the most common as numWrap.\r\n * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second\r\n * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.\r\n * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.\r\n * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next\r\n * two points, e.g., to form two adjacent vectors for a cross product.\r\n */\r\n public setNumWrap(numWrap: number) {\r\n this._numWrap = numWrap;\r\n }\r\n /**\r\n * Return the number of edges in the current facet.\r\n * * If `numWrap > 0` for this visitor, the number of edges is smaller than the number of points.\r\n */\r\n public get numEdgesThisFacet(): number {\r\n return this._numEdges;\r\n }\r\n /** Create a visitor for iterating the facets of `polyface`. */\r\n public static create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor {\r\n return new IndexedPolyfaceVisitor(polyface, numWrap);\r\n }\r\n /** Advance the iterator to a particular facet in the client polyface. */\r\n public moveToReadIndex(facetIndex: number): boolean {\r\n if (!this._polyface.isValidFacetIndex(facetIndex))\r\n return false;\r\n this._currentFacetIndex = facetIndex;\r\n this._nextFacetIndex = facetIndex + 1;\r\n this._numEdges = this._polyface.numEdgeInFacet(facetIndex);\r\n this.resizeAllArrays(this._numEdges + this._numWrap);\r\n this.gatherIndexedData(\r\n this._polyface.data,\r\n this._polyface.facetIndex0(this._currentFacetIndex),\r\n this._polyface.facetIndex1(this._currentFacetIndex),\r\n this._numWrap,\r\n );\r\n return true;\r\n }\r\n /** Advance the iterator to a the 'next' facet in the client polyface. */\r\n public moveToNextFacet(): boolean {\r\n if (this._nextFacetIndex !== this._currentFacetIndex)\r\n return this.moveToReadIndex(this._nextFacetIndex);\r\n this._nextFacetIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first facet of the polyface. */\r\n public reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Attempts to extract the distance parameter for the given vertex `index` on the current facet.\r\n * Returns the distance parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetDistanceParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToDistance(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /**\r\n * Attempts to extract the normalized parameter (0,1) for the given vertex `index` on the current facet.\r\n * Returns the normalized parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetNormalizedParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToNormalized(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /** Return the index (in the client polyface) of the current facet. */\r\n public currentReadIndex(): number {\r\n return this._currentFacetIndex;\r\n }\r\n /** Return the point index of vertex `i` within the currently loaded facet. */\r\n public clientPointIndex(i: number): number {\r\n return this.pointIndex[i];\r\n }\r\n /** Return the param index of vertex `i` within the currently loaded facet. */\r\n public clientParamIndex(i: number): number {\r\n return this.paramIndex ? this.paramIndex[i] : -1;\r\n }\r\n /** Return the normal index of vertex `i` within the currently loaded facet. */\r\n public clientNormalIndex(i: number): number {\r\n return this.normalIndex ? this.normalIndex[i] : -1;\r\n }\r\n /** Return the color index of vertex `i` within the currently loaded facet. */\r\n public clientColorIndex(i: number): number {\r\n return this.colorIndex ? this.colorIndex[i] : -1;\r\n }\r\n /** Return the aux data index of vertex `i` within the currently loaded facet. */\r\n public clientAuxIndex(i: number): number {\r\n return this.auxData ? this.auxData.indices[i] : -1;\r\n }\r\n /** Clear the contents of all arrays. */\r\n public clearArrays(): void {\r\n this.point.length = 0;\r\n this.edgeVisible.length = 0;\r\n if (this.param !== undefined)\r\n this.param.length = 0;\r\n if (this.normal !== undefined)\r\n this.normal.length = 0;\r\n if (this.color !== undefined)\r\n this.color.length = 0;\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /** Transfer data from a specified `index` of the `other` visitor as new data in this visitor. */\r\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\r\n this.point.pushFromGrowableXYZArray(other.point, index);\r\n this.edgeVisible.push(other.edgeVisible[index]);\r\n if (this.param && other.param && index < other.param.length)\r\n this.param.pushFromGrowableXYArray(other.param, index);\r\n if (this.normal && other.normal && index < other.normal.length)\r\n this.normal.pushFromGrowableXYZArray(other.normal, index);\r\n if (this.color && other.color && index < other.color.length)\r\n this.color.push(other.color[index]);\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /**\r\n * Transfer interpolated data from the other visitor.\r\n * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.\r\n */\r\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\r\n if (index0 > index1)\r\n this.pushInterpolatedDataFrom(other, index1, 1.0 - fraction, index0);\r\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\r\n const newVisibility = (((index0 + 1) % other.edgeVisible.length) === index1) ? other.edgeVisible[index0] : false;\r\n this.edgeVisible.push(newVisibility); // interpolation along an edge preserves visibility of original edge\r\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\r\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\r\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\r\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\r\n if (this.color && other.color && index0 < other.color.length && index1 < other.color.length)\r\n this.color.push(Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));\r\n // TODO: auxData? taggedNumericData?\r\n }\r\n}\r\n/**\r\n * An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.\r\n * * The subset is defined by an array of facet indices provided when this visitor is created.\r\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {\r\n private _parentFacetIndices?: number[]; // only undefined during super constructor!\r\n private _currentActiveIndex: number; // index within _parentFacetIndices, or -1 after construction\r\n private _nextActiveIndex: number; // index within _parentFacetIndices\r\n\r\n private constructor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number) {\r\n super(polyface, numWrap);\r\n this._parentFacetIndices = activeFacetIndices.slice();\r\n this._currentActiveIndex = -1;\r\n this._nextActiveIndex = 0;\r\n }\r\n private isValidSubsetIndex(index: number): boolean {\r\n return (undefined !== this._parentFacetIndices) && index >= 0 && index < this._parentFacetIndices.length;\r\n }\r\n /**\r\n * Create a visitor for iterating a subset of the facets of `polyface`.\r\n * @param polyface reference to the client polyface, supplying facets\r\n * @param activeFacetIndices array of indices of facets in the client polyface to visit. This array is cloned.\r\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\r\n */\r\n public static createSubsetVisitor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\r\n return new IndexedPolyfaceSubsetVisitor(polyface, activeFacetIndices, numWrap);\r\n }\r\n /**\r\n * Advance the iterator to a particular facet in the subset of client polyface facets.\r\n * @param activeIndex the index of the facet within the subset, not to be confused with the index of the facet within the client polyface.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToReadIndex(activeIndex: number): boolean {\r\n if (this.isValidSubsetIndex(activeIndex)) {\r\n this._currentActiveIndex = activeIndex;\r\n this._nextActiveIndex = activeIndex + 1;\r\n return super.moveToReadIndex(this._parentFacetIndices![activeIndex]);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Advance the iterator to the next facet in the subset of client polyface facets.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToNextFacet(): boolean {\r\n if (this._nextActiveIndex !== this._currentActiveIndex)\r\n return this.moveToReadIndex(this._nextActiveIndex);\r\n this._nextActiveIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first active facet in the subset of client polyface facets. */\r\n public override reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextActiveIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Return the parent facet index of the indicated index within the subset of client polyface facets.\r\n * @param activeIndex index of the facet within the subset. Default is the active facet.\r\n * @return valid client polyface facet index, or `undefined` if invalid input index.\r\n */\r\n public parentFacetIndex(activeIndex?: number): number | undefined {\r\n if (undefined === activeIndex)\r\n activeIndex = this._currentActiveIndex;\r\n return this.isValidSubsetIndex(activeIndex) ? this._parentFacetIndices![activeIndex] : undefined;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public override getVisitableFacetCount(): number {\r\n return this._parentFacetIndices ? this._parentFacetIndices.length : 0;\r\n }\r\n /**\r\n * Create a visitor for those mesh facets with normal in the same half-space as the given vector.\r\n * * For example, to visit the top facets of a tiled terrain mesh but skip the \"skirt\" facets, pass\r\n * `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also\r\n * filter out *interior* facets that are nearly vertical, not just the \"skirt\" facets on the boundary.\r\n * @param mesh the mesh from which to select facets\r\n * @param compareVector vector to which to compare facet normals. The visitor will visit only those facets\r\n * with normals in the same half-space as this vector. Default is 001.\r\n * @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.\r\n * The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.\r\n * Default is [[Geometry.smallAngleRadians]].\r\n * @param numWrap optional number of entries replicated in visitor arrays. Default is 0.\r\n */\r\n public static createNormalComparison(mesh: IndexedPolyface | IndexedPolyfaceVisitor, compareVector: Vector3d = Vector3d.unitZ(), sideAngle: Angle = Angle.createSmallAngle(), numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\r\n if (mesh instanceof IndexedPolyface)\r\n return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);\r\n const visitor = mesh;\r\n const facets: number[] = [];\r\n const facetNormal = Vector3d.createZero();\r\n for (visitor.reset(); visitor.moveToNextFacet(); ) {\r\n if (!PolygonOps.unitNormal(visitor.point, facetNormal))\r\n continue; // degenerate facet\r\n if (facetNormal.dotProduct(compareVector) < 0.0)\r\n continue; // ignore facet facing other half-space\r\n if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))\r\n continue; // ignore side facet\r\n facets.push(visitor.currentReadIndex());\r\n }\r\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"IndexedPolyfaceVisitor.js","sourceRoot":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AAa,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC;gBACzF,SAAS,CAAC,oBAAoB;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrG,CAAC;CACF;AA/FD,oEA+FC","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\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Angle } from \"../geometry3d/Angle\";\r\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\r\nimport { IndexedPolyface, PolyfaceVisitor } from \"./Polyface\";\r\nimport { PolyfaceData } from \"./PolyfaceData\";\r\n\r\n/**\r\n * An `IndexedPolyfaceVisitor` is an iterator-like object that \"visits\" facets of a mesh.\r\n * * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceVisitor extends PolyfaceData implements PolyfaceVisitor {\r\n private _currentFacetIndex: number;\r\n private _nextFacetIndex: number;\r\n private _numWrap: number;\r\n private _numEdges: number;\r\n private _polyface: IndexedPolyface;\r\n // to be called from static factory method that validates the polyface\r\n protected constructor(polyface: IndexedPolyface, numWrap: number) {\r\n super(polyface.data.normalCount > 0, polyface.data.paramCount > 0, polyface.data.colorCount > 0, polyface.twoSided);\r\n this._polyface = polyface;\r\n this._numWrap = numWrap;\r\n if (polyface.data.auxData)\r\n this.auxData = polyface.data.auxData.createForVisitor();\r\n this.reset();\r\n this._numEdges = 0;\r\n this._nextFacetIndex = 0;\r\n this._currentFacetIndex = -1;\r\n\r\n }\r\n /** Return the client polyface object. */\r\n public clientPolyface(): IndexedPolyface {\r\n return this._polyface;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public getVisitableFacetCount(): number {\r\n return this._polyface.facetCount;\r\n }\r\n /**\r\n * Set the number of vertices replicated in visitor arrays (both data and index arrays).\r\n * * 0,1,2 are the most common as numWrap.\r\n * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second\r\n * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.\r\n * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.\r\n * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next\r\n * two points, e.g., to form two adjacent vectors for a cross product.\r\n */\r\n public setNumWrap(numWrap: number) {\r\n this._numWrap = numWrap;\r\n }\r\n /**\r\n * Return the number of edges in the current facet.\r\n * * If `numWrap > 0` for this visitor, the number of edges is smaller than the number of points.\r\n */\r\n public get numEdgesThisFacet(): number {\r\n return this._numEdges;\r\n }\r\n /** Create a visitor for iterating the facets of `polyface`. */\r\n public static create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor {\r\n return new IndexedPolyfaceVisitor(polyface, numWrap);\r\n }\r\n /** Advance the iterator to a particular facet in the client polyface. */\r\n public moveToReadIndex(facetIndex: number): boolean {\r\n if (!this._polyface.isValidFacetIndex(facetIndex))\r\n return false;\r\n this._currentFacetIndex = facetIndex;\r\n this._nextFacetIndex = facetIndex + 1;\r\n this._numEdges = this._polyface.numEdgeInFacet(facetIndex);\r\n this.resizeAllArrays(this._numEdges + this._numWrap);\r\n this.gatherIndexedData(\r\n this._polyface.data,\r\n this._polyface.facetIndex0(this._currentFacetIndex),\r\n this._polyface.facetIndex1(this._currentFacetIndex),\r\n this._numWrap,\r\n );\r\n return true;\r\n }\r\n /** Advance the iterator to a the 'next' facet in the client polyface. */\r\n public moveToNextFacet(): boolean {\r\n if (this._nextFacetIndex !== this._currentFacetIndex)\r\n return this.moveToReadIndex(this._nextFacetIndex);\r\n this._nextFacetIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first facet of the polyface. */\r\n public reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Attempts to extract the distance parameter for the given vertex `index` on the current facet.\r\n * Returns the distance parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetDistanceParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToDistance(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /**\r\n * Attempts to extract the normalized parameter (0,1) for the given vertex `index` on the current facet.\r\n * Returns the normalized parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetNormalizedParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToNormalized(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /** Return the index (in the client polyface) of the current facet. */\r\n public currentReadIndex(): number {\r\n return this._currentFacetIndex;\r\n }\r\n /** Return the point index of vertex `i` within the currently loaded facet. */\r\n public clientPointIndex(i: number): number {\r\n return this.pointIndex[i];\r\n }\r\n /** Return the param index of vertex `i` within the currently loaded facet. */\r\n public clientParamIndex(i: number): number {\r\n return this.paramIndex ? this.paramIndex[i] : -1;\r\n }\r\n /** Return the normal index of vertex `i` within the currently loaded facet. */\r\n public clientNormalIndex(i: number): number {\r\n return this.normalIndex ? this.normalIndex[i] : -1;\r\n }\r\n /** Return the color index of vertex `i` within the currently loaded facet. */\r\n public clientColorIndex(i: number): number {\r\n return this.colorIndex ? this.colorIndex[i] : -1;\r\n }\r\n /** Return the aux data index of vertex `i` within the currently loaded facet. */\r\n public clientAuxIndex(i: number): number {\r\n return this.auxData ? this.auxData.indices[i] : -1;\r\n }\r\n /** Clear the contents of all arrays. */\r\n public clearArrays(): void {\r\n this.point.length = 0;\r\n this.edgeVisible.length = 0;\r\n if (this.param !== undefined)\r\n this.param.length = 0;\r\n if (this.normal !== undefined)\r\n this.normal.length = 0;\r\n if (this.color !== undefined)\r\n this.color.length = 0;\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /** Transfer data from a specified `index` of the `other` visitor as new data in this visitor. */\r\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\r\n this.point.pushFromGrowableXYZArray(other.point, index);\r\n this.edgeVisible.push(other.edgeVisible[index]);\r\n if (this.param && other.param && index < other.param.length)\r\n this.param.pushFromGrowableXYArray(other.param, index);\r\n if (this.normal && other.normal && index < other.normal.length)\r\n this.normal.pushFromGrowableXYZArray(other.normal, index);\r\n if (this.color && other.color && index < other.color.length)\r\n this.color.push(other.color[index]);\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /**\r\n * Transfer interpolated data from the other visitor.\r\n * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.\r\n */\r\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\r\n if (index0 > index1)\r\n this.pushInterpolatedDataFrom(other, index1, 1.0 - fraction, index0);\r\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\r\n const newVisibility = (((index0 + 1) % other.edgeVisible.length) === index1) ? other.edgeVisible[index0] : false;\r\n this.edgeVisible.push(newVisibility); // interpolation along an edge preserves visibility of original edge\r\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\r\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\r\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\r\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\r\n if (this.color && other.color && index0 < other.color.length && index1 < other.color.length)\r\n this.color.push(Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));\r\n // TODO: auxData? taggedNumericData?\r\n }\r\n}\r\n/**\r\n * An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.\r\n * * The subset is defined by an array of facet indices provided when this visitor is created.\r\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {\r\n private _parentFacetIndices?: number[]; // only undefined during super constructor!\r\n private _currentActiveIndex: number; // index within _parentFacetIndices, or -1 after construction\r\n private _nextActiveIndex: number; // index within _parentFacetIndices\r\n\r\n private constructor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number) {\r\n super(polyface, numWrap);\r\n this._parentFacetIndices = activeFacetIndices.slice();\r\n this._currentActiveIndex = -1;\r\n this._nextActiveIndex = 0;\r\n }\r\n private isValidSubsetIndex(index: number): boolean {\r\n return (undefined !== this._parentFacetIndices) && index >= 0 && index < this._parentFacetIndices.length;\r\n }\r\n /**\r\n * Create a visitor for iterating a subset of the facets of `polyface`.\r\n * @param polyface reference to the client polyface, supplying facets\r\n * @param activeFacetIndices array of indices of facets in the client polyface to visit. This array is cloned.\r\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\r\n */\r\n public static createSubsetVisitor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\r\n return new IndexedPolyfaceSubsetVisitor(polyface, activeFacetIndices, numWrap);\r\n }\r\n /**\r\n * Advance the iterator to a particular facet in the subset of client polyface facets.\r\n * @param activeIndex the index of the facet within the subset, not to be confused with the index of the facet within the client polyface.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToReadIndex(activeIndex: number): boolean {\r\n if (this.isValidSubsetIndex(activeIndex)) {\r\n this._currentActiveIndex = activeIndex;\r\n this._nextActiveIndex = activeIndex + 1;\r\n return super.moveToReadIndex(this._parentFacetIndices![activeIndex]);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Advance the iterator to the next facet in the subset of client polyface facets.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToNextFacet(): boolean {\r\n if (this._nextActiveIndex !== this._currentActiveIndex)\r\n return this.moveToReadIndex(this._nextActiveIndex);\r\n this._nextActiveIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first active facet in the subset of client polyface facets. */\r\n public override reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextActiveIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Return the parent facet index of the indicated index within the subset of client polyface facets.\r\n * @param activeIndex index of the facet within the subset. Default is the active facet.\r\n * @return valid client polyface facet index, or `undefined` if invalid input index.\r\n */\r\n public parentFacetIndex(activeIndex?: number): number | undefined {\r\n if (undefined === activeIndex)\r\n activeIndex = this._currentActiveIndex;\r\n return this.isValidSubsetIndex(activeIndex) ? this._parentFacetIndices![activeIndex] : undefined;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public override getVisitableFacetCount(): number {\r\n return this._parentFacetIndices ? this._parentFacetIndices.length : 0;\r\n }\r\n /**\r\n * Create a visitor for those mesh facets with normal in the same half-space as the given vector.\r\n * * For example, to visit the top facets of a tiled terrain mesh but skip the \"skirt\" facets, pass\r\n * `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also\r\n * filter out *interior* facets that are nearly vertical, not just the \"skirt\" facets on the boundary.\r\n * @param mesh the mesh from which to select facets\r\n * @param compareVector vector to which to compare facet normals. The visitor will visit only those facets\r\n * with normals in the same half-space as this vector. Default is 001.\r\n * @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.\r\n * The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.\r\n * Default is [[Geometry.smallAngleRadians]].\r\n * @param numWrap optional number of entries replicated in visitor arrays. Default is 0.\r\n */\r\n public static createNormalComparison(mesh: IndexedPolyface | IndexedPolyfaceVisitor, compareVector: Vector3d = Vector3d.unitZ(), sideAngle: Angle = Angle.createSmallAngle(), numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\r\n if (mesh instanceof IndexedPolyface)\r\n return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);\r\n const visitor = mesh;\r\n const facets: number[] = [];\r\n const facetNormal = Vector3d.createZero();\r\n for (visitor.reset(); visitor.moveToNextFacet(); ) {\r\n if (!PolygonOps.unitNormal(visitor.point, facetNormal))\r\n continue; // degenerate facet\r\n if (facetNormal.dotProduct(compareVector) < 0.0)\r\n continue; // ignore facet facing other half-space\r\n if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))\r\n continue; // ignore side facet\r\n facets.push(visitor.currentReadIndex());\r\n }\r\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);\r\n }\r\n}\r\n"]}
|
|
@@ -211,7 +211,7 @@ export declare class IndexedPolyface extends Polyface {
|
|
|
211
211
|
* @param errors optional array appended with error message(s) if invalid indices are encountered
|
|
212
212
|
* @return whether the indices are valid
|
|
213
213
|
*/
|
|
214
|
-
validateAllIndices(index0?: number, errors?:
|
|
214
|
+
validateAllIndices(index0?: number, errors?: string[]): boolean;
|
|
215
215
|
/**
|
|
216
216
|
* Announce the end of construction of a facet.
|
|
217
217
|
* * Optionally check for:
|
|
@@ -220,7 +220,7 @@ export declare class IndexedPolyface extends Polyface {
|
|
|
220
220
|
* * In error cases, all index arrays are trimmed back to the size when previous facet was terminated.
|
|
221
221
|
* * A return value of `undefined` is normal. Otherwise, a string array of error messages is returned.
|
|
222
222
|
*/
|
|
223
|
-
terminateFacet(validateAllIndices?: boolean):
|
|
223
|
+
terminateFacet(validateAllIndices?: boolean): string[] | undefined;
|
|
224
224
|
/** Number of facets (read-only property). */
|
|
225
225
|
get facetCount(): number;
|
|
226
226
|
/** Number of faces (read-only property). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Polyface.d.ts","sourceRoot":"","sources":["../../../src/polyface/Polyface.ts"],"names":[],"mappings":"AAKA;;GAEG;
|
|
1
|
+
{"version":3,"file":"Polyface.d.ts","sourceRoot":"","sources":["../../../src/polyface/Polyface.ts"],"names":[],"mappings":"AAKA;;GAEG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,8BAAsB,QAAS,SAAQ,aAAa;IAClD,wCAAwC;IACxC,SAAgB,gBAAgB,cAAc;IAC9C,gCAAgC;IACzB,IAAI,EAAE,YAAY,CAAC;IAC1B,kBAAkB;IAClB,SAAS,aAAa,IAAI,EAAE,YAAY;IAIxC;;;OAGG;aAC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,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACzG;;;OAGG;IACH,sBAAsB,CAAC,IAAI,MAAM,CAAC;CACnC"}
|
|
@@ -8,7 +8,6 @@ exports.IndexedPolyface = exports.Polyface = void 0;
|
|
|
8
8
|
/** @packageDocumentation
|
|
9
9
|
* @module Polyface
|
|
10
10
|
*/
|
|
11
|
-
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
12
11
|
// cspell:word internaldocs
|
|
13
12
|
const GeometryQuery_1 = require("../curve/GeometryQuery");
|
|
14
13
|
const Geometry_1 = require("../Geometry");
|