@itwin/core-geometry 4.1.0-dev.7 → 4.1.0-dev.71
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 +87 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts +1 -1
- package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js +2 -2
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts +1 -1
- package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js +2 -2
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts +15 -17
- package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js +24 -20
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.d.ts +28 -28
- package/lib/cjs/clipping/BooleanClipFactory.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js +28 -28
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.d.ts +11 -11
- package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js +11 -11
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.d.ts +73 -76
- package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js +105 -86
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +78 -47
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +112 -54
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.d.ts +54 -44
- package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +33 -29
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.d.ts +39 -25
- package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipVector.js +35 -23
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +61 -38
- package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js +64 -41
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +50 -30
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +3 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +3 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +2 -1
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +3 -2
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +62 -42
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +71 -48
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.d.ts +36 -26
- package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +46 -39
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +67 -3
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +75 -7
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts +6 -6
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +9 -7
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.d.ts +77 -0
- package/lib/cjs/curve/CurveOps.d.ts.map +1 -0
- package/lib/cjs/curve/CurveOps.js +160 -0
- package/lib/cjs/curve/CurveOps.js.map +1 -0
- package/lib/cjs/curve/CurvePrimitive.d.ts +21 -18
- package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js +4 -3
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.d.ts +2 -2
- package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js +2 -2
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +7 -5
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +6 -6
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +2 -2
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +3 -3
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +7 -5
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +18 -6
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.d.ts +97 -0
- package/lib/cjs/curve/OffsetOptions.d.ts.map +1 -0
- package/lib/cjs/curve/OffsetOptions.js +166 -0
- package/lib/cjs/curve/OffsetOptions.js.map +1 -0
- package/lib/cjs/curve/ParityRegion.d.ts +7 -7
- package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
- package/lib/cjs/curve/ParityRegion.js +19 -11
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.d.ts +6 -6
- package/lib/cjs/curve/Path.d.ts.map +1 -1
- package/lib/cjs/curve/Path.js +15 -9
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.d.ts +5 -7
- package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js +7 -7
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +76 -56
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +83 -60
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +2 -2
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +6 -2
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.d.ts +6 -5
- package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
- package/lib/cjs/curve/UnionRegion.js +17 -8
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
- package/lib/cjs/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -0
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +59 -70
- package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js +130 -220
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +89 -178
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +2 -2
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +9 -0
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +13 -0
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.d.ts +43 -48
- package/lib/cjs/geometry3d/BilinearPatch.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js +51 -55
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.d.ts +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js +13 -11
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.d.ts +5 -5
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +18 -0
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +32 -5
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.d.ts +41 -32
- package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js +11 -8
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +37 -32
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts +8 -9
- package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +9 -10
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +12 -4
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +18 -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 +5 -5
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +1 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +2 -3
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +16 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +55 -0
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +134 -94
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js +297 -145
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.d.ts +69 -0
- package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -0
- package/lib/cjs/geometry3d/Ray2d.js +146 -0
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -0
- package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +10 -3
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +18 -6
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.d.ts +7 -49
- package/lib/cjs/numerics/ConvexPolygon2d.d.ts.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js +16 -107
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +0 -2
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js +5 -5
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +73 -12
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +117 -31
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +11 -0
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +79 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +11 -0
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +30 -0
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.d.ts +2 -7
- package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +2 -7
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +2 -1
- package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.d.ts +2 -1
- package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.d.ts +2 -1
- package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +2 -2
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +9 -0
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js +3 -3
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
- package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts +1 -1
- package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts +15 -17
- package/lib/esm/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js +24 -20
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.d.ts +28 -28
- package/lib/esm/clipping/BooleanClipFactory.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js +28 -28
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.d.ts +11 -11
- package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js +11 -11
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.d.ts +73 -76
- package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPlane.js +105 -86
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +78 -47
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +112 -54
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.d.ts +54 -44
- package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +33 -29
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.d.ts +39 -25
- package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
- package/lib/esm/clipping/ClipVector.js +35 -23
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +61 -38
- package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js +64 -41
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +50 -30
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +3 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +3 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +2 -1
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +2 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +62 -42
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +70 -47
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.d.ts +36 -26
- package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
- package/lib/esm/curve/CurveCollection.js +46 -39
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +67 -3
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +74 -6
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts +6 -6
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +9 -7
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.d.ts +77 -0
- package/lib/esm/curve/CurveOps.d.ts.map +1 -0
- package/lib/esm/curve/CurveOps.js +156 -0
- package/lib/esm/curve/CurveOps.js.map +1 -0
- package/lib/esm/curve/CurvePrimitive.d.ts +21 -18
- package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js +4 -3
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.d.ts +2 -2
- package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
- package/lib/esm/curve/GeometryQuery.js +2 -2
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +7 -5
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +5 -5
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +2 -2
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +2 -2
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +7 -5
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +18 -6
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.d.ts +97 -0
- package/lib/esm/curve/OffsetOptions.d.ts.map +1 -0
- package/lib/esm/curve/OffsetOptions.js +161 -0
- package/lib/esm/curve/OffsetOptions.js.map +1 -0
- package/lib/esm/curve/ParityRegion.d.ts +7 -7
- package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
- package/lib/esm/curve/ParityRegion.js +19 -11
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.d.ts +6 -6
- package/lib/esm/curve/Path.d.ts.map +1 -1
- package/lib/esm/curve/Path.js +15 -9
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.d.ts +5 -7
- package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
- package/lib/esm/curve/ProxyCurve.js +7 -7
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +76 -56
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +84 -61
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -2
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +6 -2
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.d.ts +6 -5
- package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
- package/lib/esm/curve/UnionRegion.js +17 -8
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
- package/lib/esm/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
- package/lib/esm/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -0
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts +2 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js +6 -2
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +59 -70
- package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js +129 -218
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +86 -173
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js +4 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +9 -0
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +13 -0
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.d.ts +43 -48
- package/lib/esm/geometry3d/BilinearPatch.d.ts.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js +51 -55
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.d.ts +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js +13 -11
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.d.ts +5 -5
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +18 -0
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +32 -5
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.d.ts +41 -32
- package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js +11 -8
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +37 -32
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.d.ts +8 -9
- package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +9 -10
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +12 -4
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +18 -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 +5 -5
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +1 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +2 -3
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +16 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +56 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +134 -94
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js +297 -145
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.d.ts +69 -0
- package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -0
- package/lib/esm/geometry3d/Ray2d.js +142 -0
- package/lib/esm/geometry3d/Ray2d.js.map +1 -0
- package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +10 -3
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +18 -6
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.d.ts +7 -49
- package/lib/esm/numerics/ConvexPolygon2d.d.ts.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js +14 -104
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +0 -2
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js +5 -5
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +73 -12
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +117 -32
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +11 -0
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +78 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +11 -0
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +30 -0
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.d.ts +2 -7
- package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +2 -7
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +2 -1
- package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.d.ts +2 -1
- package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.d.ts +2 -1
- package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +2 -2
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +9 -0
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js +3 -3
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +6 -17
- package/lib/cjs/curve/ChainCollectorContext.d.ts.map +0 -1
- package/lib/cjs/curve/ChainCollectorContext.js.map +0 -1
- package/lib/esm/curve/ChainCollectorContext.d.ts.map +0 -1
- package/lib/esm/curve/ChainCollectorContext.js.map +0 -1
|
@@ -23,11 +23,13 @@ const ConvexClipPlaneSet_1 = require("./ConvexClipPlaneSet");
|
|
|
23
23
|
*/
|
|
24
24
|
class UnionOfConvexClipPlaneSets {
|
|
25
25
|
/** (property accessor) Return the (reference to the) array of `ConvexClipPlaneSet` */
|
|
26
|
-
get convexSets() {
|
|
26
|
+
get convexSets() {
|
|
27
|
+
return this._convexSets;
|
|
28
|
+
}
|
|
27
29
|
constructor() {
|
|
28
30
|
this._convexSets = [];
|
|
29
31
|
}
|
|
30
|
-
/** Return an array with the `toJSON` form of each
|
|
32
|
+
/** Return an array with the `toJSON` form of each `ConvexClipPlaneSet` */
|
|
31
33
|
toJSON() {
|
|
32
34
|
const val = [];
|
|
33
35
|
for (const convex of this._convexSets)
|
|
@@ -53,8 +55,9 @@ class UnionOfConvexClipPlaneSets {
|
|
|
53
55
|
return new UnionOfConvexClipPlaneSets();
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
|
-
* Return true if all member convex sets are almostEqual to corresponding members of other.
|
|
57
|
-
*
|
|
58
|
+
* Return true if all member convex sets are almostEqual to corresponding members of other. This includes
|
|
59
|
+
* identical order in array.
|
|
60
|
+
* @param other clip plane to compare.
|
|
58
61
|
*/
|
|
59
62
|
isAlmostEqual(other) {
|
|
60
63
|
if (this._convexSets.length !== other._convexSets.length)
|
|
@@ -64,14 +67,14 @@ class UnionOfConvexClipPlaneSets {
|
|
|
64
67
|
return false;
|
|
65
68
|
return true;
|
|
66
69
|
}
|
|
67
|
-
/** Create a `UnionOfConvexClipPlaneSets` with given `ConvexClipPlaneSet` members */
|
|
70
|
+
/** Create a `UnionOfConvexClipPlaneSets` with given `ConvexClipPlaneSet` members. */
|
|
68
71
|
static createConvexSets(convexSets, result) {
|
|
69
72
|
result = result ? result : new UnionOfConvexClipPlaneSets();
|
|
70
73
|
for (const set of convexSets)
|
|
71
74
|
result._convexSets.push(set);
|
|
72
75
|
return result;
|
|
73
76
|
}
|
|
74
|
-
/**
|
|
77
|
+
/** Return a deep copy. */
|
|
75
78
|
clone(result) {
|
|
76
79
|
result = result ? result : new UnionOfConvexClipPlaneSets();
|
|
77
80
|
result._convexSets.length = 0;
|
|
@@ -79,7 +82,8 @@ class UnionOfConvexClipPlaneSets {
|
|
|
79
82
|
result._convexSets.push(convexSet.clone());
|
|
80
83
|
return result;
|
|
81
84
|
}
|
|
82
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Append `toAdd` to the array of `ConvexClipPlaneSet`.
|
|
83
87
|
* * undefined toAdd is ignored.
|
|
84
88
|
*/
|
|
85
89
|
addConvexSet(toAdd) {
|
|
@@ -90,7 +94,7 @@ class UnionOfConvexClipPlaneSets {
|
|
|
90
94
|
* Test if there is any intersection with a ray defined by origin and direction.
|
|
91
95
|
* * Optionally record the range (null or otherwise) in caller-allocated result.
|
|
92
96
|
* * If the ray is unbounded inside the clip, result can contain positive or negative
|
|
93
|
-
* "Geometry.largeCoordinateResult" values
|
|
97
|
+
* "Geometry.largeCoordinateResult" values.
|
|
94
98
|
* * If no result is provide, there are no object allocations.
|
|
95
99
|
* @param maximalRange optional Range1d to receive parameters along the ray.
|
|
96
100
|
*/
|
|
@@ -111,7 +115,10 @@ class UnionOfConvexClipPlaneSets {
|
|
|
111
115
|
}
|
|
112
116
|
return !maximalRange.isNull;
|
|
113
117
|
}
|
|
114
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Return true if true is returned for any contained convex set returns true for
|
|
120
|
+
* `convexSet.isPointInside (point, tolerance)`.
|
|
121
|
+
*/
|
|
115
122
|
isPointInside(point) {
|
|
116
123
|
for (const convexSet of this._convexSets) {
|
|
117
124
|
if (convexSet.isPointInside(point)) {
|
|
@@ -120,7 +127,10 @@ class UnionOfConvexClipPlaneSets {
|
|
|
120
127
|
}
|
|
121
128
|
return false;
|
|
122
129
|
}
|
|
123
|
-
/**
|
|
130
|
+
/**
|
|
131
|
+
* Return true if true is returned for any contained convex set returns true for
|
|
132
|
+
* `convexSet.isPointOnOrInside (point, tolerance)`.
|
|
133
|
+
*/
|
|
124
134
|
isPointOnOrInside(point, tolerance = Geometry_1.Geometry.smallMetricDistance) {
|
|
125
135
|
for (const convexSet of this._convexSets) {
|
|
126
136
|
if (convexSet.isPointOnOrInside(point, tolerance))
|
|
@@ -128,7 +138,10 @@ class UnionOfConvexClipPlaneSets {
|
|
|
128
138
|
}
|
|
129
139
|
return false;
|
|
130
140
|
}
|
|
131
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Return true if true is returned for any contained convex set returns true for
|
|
143
|
+
* `convexSet.isSphereOnOrInside (point, tolerance)`.
|
|
144
|
+
*/
|
|
132
145
|
isSphereInside(point, radius) {
|
|
133
146
|
for (const convexSet of this._convexSets) {
|
|
134
147
|
if (convexSet.isSphereInside(point, radius))
|
|
@@ -136,7 +149,7 @@ class UnionOfConvexClipPlaneSets {
|
|
|
136
149
|
}
|
|
137
150
|
return false;
|
|
138
151
|
}
|
|
139
|
-
/**
|
|
152
|
+
/** Test if any part of a line segment is within the volume. */
|
|
140
153
|
isAnyPointInOrOnFromSegment(segment) {
|
|
141
154
|
for (const convexSet of this._convexSets) {
|
|
142
155
|
if (convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref))
|
|
@@ -146,19 +159,19 @@ class UnionOfConvexClipPlaneSets {
|
|
|
146
159
|
}
|
|
147
160
|
// Intervals must be Segment1d array, as there may be multiple intervals along segment that pass through set regions,
|
|
148
161
|
// and so splitting the intervals into segments aids in better organization
|
|
149
|
-
/** Returns the fractions of the segment that pass through the set region, as 1 dimensional pieces */
|
|
162
|
+
/** Returns the fractions of the segment that pass through the set region, as 1 dimensional pieces. */
|
|
150
163
|
appendIntervalsFromSegment(segment, intervals) {
|
|
151
164
|
for (const convexSet of this._convexSets) {
|
|
152
165
|
convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref, (fraction0, fraction1) => intervals.push(Segment1d_1.Segment1d.create(fraction0, fraction1)));
|
|
153
166
|
}
|
|
154
167
|
}
|
|
155
|
-
/**
|
|
168
|
+
/** Apply `transform` to all the ConvexClipPlaneSet's. */
|
|
156
169
|
transformInPlace(transform) {
|
|
157
170
|
for (const convexSet of this._convexSets) {
|
|
158
171
|
convexSet.transformInPlace(transform);
|
|
159
172
|
}
|
|
160
173
|
}
|
|
161
|
-
/** Returns 1, 2, or 3 based on whether point is strongly inside, ambiguous, or strongly outside respectively */
|
|
174
|
+
/** Returns 1, 2, or 3 based on whether point is strongly inside, ambiguous, or strongly outside respectively. */
|
|
162
175
|
classifyPointContainment(points, onIsOutside) {
|
|
163
176
|
for (const convexSet of this._convexSets) {
|
|
164
177
|
const thisStatus = convexSet.classifyPointContainment(points, onIsOutside);
|
|
@@ -167,7 +180,10 @@ class UnionOfConvexClipPlaneSets {
|
|
|
167
180
|
}
|
|
168
181
|
return ClipUtils_1.ClipPlaneContainment.StronglyOutside;
|
|
169
182
|
}
|
|
170
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Clip a polygon using this ClipPlaneSet, returning new polygon boundaries. Note that each polygon may lie
|
|
185
|
+
* next to the previous, or be disconnected.
|
|
186
|
+
*/
|
|
171
187
|
polygonClip(input, output) {
|
|
172
188
|
output.length = 0;
|
|
173
189
|
if (Array.isArray(input))
|
|
@@ -181,13 +197,13 @@ class UnionOfConvexClipPlaneSets {
|
|
|
181
197
|
}
|
|
182
198
|
}
|
|
183
199
|
/**
|
|
184
|
-
*
|
|
185
|
-
* * all clipPlaneSets are inspected
|
|
200
|
+
* Announce clipSegment() for each convexSet in this ClipPlaneSet.
|
|
201
|
+
* * all clipPlaneSets are inspected.
|
|
186
202
|
* * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.
|
|
187
203
|
* @param f0 active interval start.
|
|
188
|
-
* @param f1 active interval end
|
|
189
|
-
* @param pointA line segment start
|
|
190
|
-
* @param pointB line segment end
|
|
204
|
+
* @param f1 active interval end.
|
|
205
|
+
* @param pointA line segment start.
|
|
206
|
+
* @param pointB line segment end.
|
|
191
207
|
* @param announce function to announce interval.
|
|
192
208
|
* @returns Return true if any announcements are made.
|
|
193
209
|
*/
|
|
@@ -199,7 +215,8 @@ class UnionOfConvexClipPlaneSets {
|
|
|
199
215
|
}
|
|
200
216
|
return numAnnounce > 0;
|
|
201
217
|
}
|
|
202
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Find parts of an arc that are inside any member clipper.
|
|
203
220
|
* Announce each with `announce(startFraction, endFraction, this)`
|
|
204
221
|
*/
|
|
205
222
|
announceClippedArcIntervals(arc, announce) {
|
|
@@ -215,12 +232,12 @@ class UnionOfConvexClipPlaneSets {
|
|
|
215
232
|
}
|
|
216
233
|
/**
|
|
217
234
|
* Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.
|
|
218
|
-
*
|
|
219
235
|
* @param transform (optional) transform to apply to the points.
|
|
220
236
|
* @param points (optional) array to which computed points are to be added.
|
|
221
|
-
* @param range (optional) range to be extended by the computed points
|
|
237
|
+
* @param range (optional) range to be extended by the computed points.
|
|
222
238
|
* @param transform (optional) transform to apply to the accepted points.
|
|
223
|
-
* @param testContainment if true, test each point to see if it is within the convex set
|
|
239
|
+
* @param testContainment if true, test each point to see if it is within the convex set (send false if confident
|
|
240
|
+
* that the convex set is rectilinear set such as a slab. Send true if chiseled corners are possible).
|
|
224
241
|
* @returns number of points.
|
|
225
242
|
*/
|
|
226
243
|
computePlanePlanePlaneIntersectionsInAllConvexSets(points, rangeToExtend, transform, testContainment = true) {
|
|
@@ -234,8 +251,9 @@ class UnionOfConvexClipPlaneSets {
|
|
|
234
251
|
* Multiply all ClipPlanes DPoint4d by matrix.
|
|
235
252
|
* @param matrix matrix to apply.
|
|
236
253
|
* @param invert if true, use in verse of the matrix.
|
|
237
|
-
* @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter)
|
|
238
|
-
* * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect
|
|
254
|
+
* @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter).
|
|
255
|
+
* * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect
|
|
256
|
+
* on the plane is the inverse transpose of matrixA.
|
|
239
257
|
* * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.
|
|
240
258
|
* * Both params default to true to get the full effect of transforming space.
|
|
241
259
|
* @param matrix matrix to apply
|
|
@@ -272,7 +290,7 @@ class UnionOfConvexClipPlaneSets {
|
|
|
272
290
|
this._convexSets.push(convexSet);
|
|
273
291
|
}
|
|
274
292
|
}
|
|
275
|
-
/**
|
|
293
|
+
/** Move convex sets from source.*/
|
|
276
294
|
takeConvexSets(source) {
|
|
277
295
|
let convexSet;
|
|
278
296
|
while ((undefined !== (convexSet = source._convexSets.pop()))) {
|
|
@@ -282,8 +300,10 @@ class UnionOfConvexClipPlaneSets {
|
|
|
282
300
|
/**
|
|
283
301
|
*
|
|
284
302
|
* @param xyz input polygon. This is not changed.
|
|
285
|
-
* @param insideFragments Array to receive "inside" fragments.
|
|
286
|
-
*
|
|
303
|
+
* @param insideFragments Array to receive "inside" fragments. Each fragment is a GrowableXYZArray grabbed from
|
|
304
|
+
* the cache. This is NOT cleared.
|
|
305
|
+
* @param outsideFragments Array to receive "outside" fragments. Each fragment is a GrowableXYZArray grabbed from
|
|
306
|
+
* the cache. This is NOT cleared.
|
|
287
307
|
* @param arrayCache cache for reusable GrowableXYZArray.
|
|
288
308
|
*/
|
|
289
309
|
appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnionOfConvexClipPlaneSets.js","sourceRoot":"","sources":["../../../src/clipping/UnionOfConvexClipPlaneSets.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,0CAAuC;AACvC,6EAA0E;AAC1E,qEAAkE;AAElE,+CAAuD;AAGvD,uDAAoD;AAGpD,2CAA2F;AAC3F,6DAAmF;AAOnF;;;;;GAKG;AACH,MAAa,0BAA0B;IAErC,uFAAuF;IACvF,IAAW,UAAU,KAA2B,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAE1E;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IACD,2EAA2E;IACpE,MAAM;QACX,MAAM,GAAG,GAA8B,EAAE,CAAC;QAC1C,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,WAAW;YACnC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QAE5B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,sEAAsE;IAC/D,MAAM,CAAC,QAAQ,CAAC,IAAiD,EAAE,MAAmC;QAC3G,MAAM,GAAG,M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;;;;;EAcE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { AnnounceNumberNumberCurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GrowableFloat64Array } from \"../geometry3d/GrowableFloat64Array\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\nimport { Segment1d } from \"../geometry3d/Segment1d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { Clipper, ClipPlaneContainment, ClipUtilities, PolygonClipper } from \"./ClipUtils\";\r\nimport { ConvexClipPlaneSet, ConvexClipPlaneSetProps } from \"./ConvexClipPlaneSet\";\r\n\r\n/** Wire format describing a [[UnionOfConvexClipPlaneSets]].\r\n * @public\r\n */\r\nexport type UnionOfConvexClipPlaneSetsProps = ConvexClipPlaneSetProps[];\r\n\r\n/**\r\n * A collection of ConvexClipPlaneSets.\r\n * * A point is \"in\" the clip plane set if it is \"in\" one or more of the ConvexClipPlaneSet\r\n * * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.\r\n * @public\r\n */\r\nexport class UnionOfConvexClipPlaneSets implements Clipper, PolygonClipper {\r\n private _convexSets: ConvexClipPlaneSet[];\r\n /** (property accessor) Return the (reference to the) array of `ConvexClipPlaneSet` */\r\n public get convexSets(): ConvexClipPlaneSet[] { return this._convexSets; }\r\n\r\n private constructor() {\r\n this._convexSets = [];\r\n }\r\n /** Return an array with the `toJSON` form of each `ConvexClipPlaneSet` */\r\n public toJSON(): UnionOfConvexClipPlaneSetsProps {\r\n const val: ConvexClipPlaneSetProps[] = [];\r\n for (const convex of this._convexSets)\r\n val.push(convex.toJSON());\r\n\r\n return val;\r\n }\r\n\r\n /** Convert json `UnionOfConvexClipPlaneSets`, using `setFromJSON`. */\r\n public static fromJSON(json: UnionOfConvexClipPlaneSetsProps | undefined, result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n if (!Array.isArray(json))\r\n return result;\r\n\r\n for (const thisJson of json)\r\n result._convexSets.push(ConvexClipPlaneSet.fromJSON(thisJson));\r\n\r\n return result;\r\n }\r\n\r\n /** Create a `UnionOfConvexClipPlaneSets` with no members. */\r\n public static createEmpty(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n if (result) {\r\n result._convexSets.length = 0;\r\n return result;\r\n }\r\n return new UnionOfConvexClipPlaneSets();\r\n }\r\n /**\r\n * Return true if all member convex sets are almostEqual to corresponding members of other. This includes identical order in array.\r\n * @param other clip plane to compare\r\n */\r\n public isAlmostEqual(other: UnionOfConvexClipPlaneSets): boolean {\r\n if (this._convexSets.length !== other._convexSets.length)\r\n return false;\r\n for (let i = 0; i < this._convexSets.length; i++)\r\n if (!this._convexSets[i].isAlmostEqual(other._convexSets[i]))\r\n return false;\r\n return true;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with given `ConvexClipPlaneSet` members */\r\n public static createConvexSets(convexSets: ConvexClipPlaneSet[], result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n for (const set of convexSets)\r\n result._convexSets.push(set);\r\n return result;\r\n }\r\n /** return a deep copy. */\r\n public clone(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n for (const convexSet of this._convexSets)\r\n result._convexSets.push(convexSet.clone());\r\n return result;\r\n }\r\n /** Append `toAdd` to the array of `ConvexClipPlaneSet`.\r\n * * undefined toAdd is ignored.\r\n */\r\n public addConvexSet(toAdd: ConvexClipPlaneSet | undefined) {\r\n if (toAdd)\r\n this._convexSets.push(toAdd);\r\n }\r\n /**\r\n * Test if there is any intersection with a ray defined by origin and direction.\r\n * * Optionally record the range (null or otherwise) in caller-allocated result.\r\n * * If the ray is unbounded inside the clip, result can contain positive or negative\r\n * \"Geometry.largeCoordinateResult\" values\r\n * * If no result is provide, there are no object allocations.\r\n * @param maximalRange optional Range1d to receive parameters along the ray.\r\n */\r\n public hasIntersectionWithRay(ray: Ray3d, maximalRange?: Range1d): boolean {\r\n if (maximalRange === undefined) {\r\n // if complete result is not requested, return after any hit.\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray))\r\n return true;\r\n }\r\n return false;\r\n }\r\n maximalRange.setNull();\r\n const rangeA = Range1d.createNull();\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray, rangeA))\r\n maximalRange.extendRange(rangeA);\r\n }\r\n return !maximalRange.isNull;\r\n }\r\n\r\n /** Return true if true is returned for any contained convex set returns true for `convexSet.isPointInside (point, tolerance)` */\r\n public isPointInside(point: Point3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointInside(point)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n /** Return true if true is returned for any contained convex set returns true for `convexSet.isPointOnOrInside (point, tolerance)` */\r\n public isPointOnOrInside(point: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointOnOrInside(point, tolerance))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** Return true if true is returned for any contained convex set returns true for `convexSet.isSphereOnOrInside (point, tolerance)` */\r\n public isSphereInside(point: Point3d, radius: number) {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isSphereInside(point, radius))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** test if any part of a line segment is within the volume */\r\n public isAnyPointInOrOnFromSegment(segment: LineSegment3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref))\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n // Intervals must be Segment1d array, as there may be multiple intervals along segment that pass through set regions,\r\n // and so splitting the intervals into segments aids in better organization\r\n /** Returns the fractions of the segment that pass through the set region, as 1 dimensional pieces */\r\n public appendIntervalsFromSegment(segment: LineSegment3d, intervals: Segment1d[]) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref,\r\n (fraction0: number, fraction1: number) =>\r\n intervals.push(Segment1d.create(fraction0, fraction1)));\r\n }\r\n }\r\n /** apply `transform` to all the ConvexClipPlaneSet's */\r\n public transformInPlace(transform: Transform) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.transformInPlace(transform);\r\n }\r\n }\r\n\r\n /** Returns 1, 2, or 3 based on whether point is strongly inside, ambiguous, or strongly outside respectively */\r\n public classifyPointContainment(points: Point3d[], onIsOutside: boolean): number {\r\n for (const convexSet of this._convexSets) {\r\n const thisStatus = convexSet.classifyPointContainment(points, onIsOutside);\r\n if (thisStatus !== ClipPlaneContainment.StronglyOutside)\r\n return thisStatus;\r\n }\r\n return ClipPlaneContainment.StronglyOutside;\r\n }\r\n\r\n /** Clip a polygon using this ClipPlaneSet, returning new polygon boundaries. Note that each polygon may lie next to the previous, or be disconnected. */\r\n public polygonClip(input: GrowableXYZArray | Point3d[], output: GrowableXYZArray[]) {\r\n output.length = 0;\r\n if (Array.isArray(input))\r\n input = GrowableXYZArray.create(input);\r\n const work = new GrowableXYZArray();\r\n for (const convexSet of this._convexSets) {\r\n const convexSetOutput = new GrowableXYZArray();\r\n convexSet.polygonClip(input, convexSetOutput, work);\r\n if (convexSetOutput.length !== 0)\r\n output.push(convexSetOutput);\r\n }\r\n }\r\n\r\n /**\r\n * * announce clipSegment() for each convexSet in this ClipPlaneSet.\r\n * * all clipPlaneSets are inspected\r\n * * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.\r\n * @param f0 active interval start.\r\n * @param f1 active interval end\r\n * @param pointA line segment start\r\n * @param pointB line segment end\r\n * @param announce function to announce interval.\r\n * @returns Return true if any announcements are made.\r\n */\r\n public announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void): boolean {\r\n let numAnnounce = 0;\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce))\r\n numAnnounce++;\r\n }\r\n return numAnnounce > 0;\r\n }\r\n\r\n private static _clipArcFractionArray = new GrowableFloat64Array();\r\n /** Find parts of an arc that are inside any member clipper.\r\n * Announce each with `announce(startFraction, endFraction, this)`\r\n */\r\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n const breaks = UnionOfConvexClipPlaneSets._clipArcFractionArray;\r\n breaks.clear();\r\n for (const convexSet of this._convexSets) {\r\n for (const clipPlane of convexSet.planes) {\r\n clipPlane.appendIntersectionRadians(arc, breaks);\r\n }\r\n }\r\n arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);\r\n return ClipUtilities.selectIntervals01(arc, breaks, this, announce);\r\n }\r\n\r\n /**\r\n * Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.\r\n *\r\n * @param transform (optional) transform to apply to the points.\r\n * @param points (optional) array to which computed points are to be added.\r\n * @param range (optional) range to be extended by the computed points\r\n * @param transform (optional) transform to apply to the accepted points.\r\n * @param testContainment if true, test each point to see if it is within the convex set. (Send false if confident that the convex set is rectilinear set such as a slab. Send true if chiseled corners are possible)\r\n * @returns number of points.\r\n */\r\n public computePlanePlanePlaneIntersectionsInAllConvexSets(points: Point3d[] | undefined, rangeToExtend: Range3d | undefined, transform?: Transform, testContainment: boolean = true): number {\r\n let n = 0;\r\n for (const convexSet of this._convexSets) {\r\n n += convexSet.computePlanePlanePlaneIntersections(points, rangeToExtend, transform, testContainment);\r\n }\r\n return n;\r\n }\r\n /**\r\n * Multiply all ClipPlanes DPoint4d by matrix.\r\n * @param matrix matrix to apply.\r\n * @param invert if true, use in verse of the matrix.\r\n * @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter)\r\n * * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect on the plane is the inverse transpose of matrixA\r\n * * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.\r\n * * Both params default to true to get the full effect of transforming space.\r\n * @param matrix matrix to apply\r\n */\r\n public multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean {\r\n if (invert) { // form inverse once here, reuse for all planes\r\n const inverse = matrix.createInverse();\r\n if (!inverse)\r\n return false;\r\n return this.multiplyPlanesByMatrix4d(inverse, false, transpose);\r\n }\r\n // (no inversion -- no failures possible)\r\n for (const convexSet of this._convexSets) {\r\n convexSet.multiplyPlanesByMatrix4d(matrix, false, transpose);\r\n }\r\n return true;\r\n }\r\n /** Recursively call `setInvisible` on all member convex sets. */\r\n public setInvisible(invisible: boolean) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.setInvisible(invisible);\r\n }\r\n }\r\n /** add convex sets that accept points below `zLow` and above `zHigh` */\r\n public addOutsideZClipSets(invisible: boolean, zLow?: number, zHigh?: number) {\r\n if (zLow) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, zLow);\r\n this._convexSets.push(convexSet);\r\n }\r\n if (zHigh) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, undefined, zHigh);\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /** move convex sets from source.*/\r\n public takeConvexSets(source: UnionOfConvexClipPlaneSets) {\r\n let convexSet;\r\n while ((undefined !== (convexSet = source._convexSets.pop()))) {\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /**\r\n *\r\n * @param xyz input polygon. This is not changed.\r\n * @param insideFragments Array to receive \"inside\" fragments. Each fragment is a GrowableXYZArray grabbed from the cache. This is NOT cleared.\r\n * @param outsideFragments Array to receive \"outside\" fragments. Each fragment is a GrowableXYZArray grabbed from the cache. This is NOT cleared.\r\n * @param arrayCache cache for reusable GrowableXYZArray.\r\n */\r\n public appendPolygonClip(\r\n xyz: GrowableXYZArray,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache): void {\r\n const oldOutsideCount = outsideFragments.length;\r\n const oldInsideCount = insideFragments.length;\r\n let carryForwardA = [arrayCache.grabAndFill(xyz)];\r\n let carryForwardB: GrowableXYZArray[] = [];\r\n let tempAB;\r\n let shard;\r\n // At each convex set, carryForwardA is all the fragments that have been outside all previous convex sets.\r\n // Clip each such fragment to the current set, sending the outside parts to carryForwardB, which will got to the next clipper\r\n // The final surviving carryForward really is out.\r\n for (const c of this._convexSets) {\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n c.appendPolygonClip(shard, insideFragments, carryForwardB, arrayCache);\r\n arrayCache.dropToCache(shard);\r\n }\r\n tempAB = carryForwardB;\r\n carryForwardB = carryForwardA; // and that is empty\r\n carryForwardA = tempAB;\r\n }\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n outsideFragments.push(shard);\r\n }\r\n if (outsideFragments.length === oldOutsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(insideFragments, oldInsideCount, xyz, arrayCache);\r\n else if (insideFragments.length === oldInsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(outsideFragments, oldOutsideCount, xyz, arrayCache);\r\n }\r\n}\r\n\r\n/* FUNCTIONS SKIPPED DUE TO BSPLINES, VU, OR NON-USAGE IN NATIVE CODE----------------------------------------------------------------\r\n\r\nInvolves vu: skipping for now...\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[]): ClipPlaneSet;\r\n public parseConcavePolygonPlanes(...)\r\n\r\nUses bsplines... skipping for now:\r\n public appendIntervalsClipPlaneSetFromCurve();\r\n\r\nUses bsplines... skipping for now:\r\n public isAnyPointInOrOnFrom();\r\n\r\nSkipped fromSweptPolygon(...), which is overloaded function from first, due to presence of vu\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[], shapes: Point3d[])\r\n*/\r\n"]}
|
|
1
|
+
{"version":3,"file":"UnionOfConvexClipPlaneSets.js","sourceRoot":"","sources":["../../../src/clipping/UnionOfConvexClipPlaneSets.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,0CAAuC;AACvC,6EAA0E;AAC1E,qEAAkE;AAElE,+CAAuD;AAGvD,uDAAoD;AAGpD,2CAA2F;AAC3F,6DAAmF;AAQnF;;;;;GAKG;AACH,MAAa,0BAA0B;IAErC,uFAAuF;IACvF,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACD;QACE,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IACD,0EAA0E;IACnE,MAAM;QACX,MAAM,GAAG,GAA8B,EAAE,CAAC;QAC1C,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,WAAW;YACnC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC;IACD,sEAAsE;IAC/D,MAAM,CAAC,QAAQ,CACpB,IAAiD,EAAE,MAAmC;QAEtF,MAAM,GAAG,MAAM,CAAC,CAA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sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { AnnounceNumberNumberCurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { GrowableFloat64Array } from \"../geometry3d/GrowableFloat64Array\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\r\nimport { Ray3d } from \"../geometry3d/Ray3d\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\nimport { Segment1d } from \"../geometry3d/Segment1d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { Clipper, ClipPlaneContainment, ClipUtilities, PolygonClipper } from \"./ClipUtils\";\r\nimport { ConvexClipPlaneSet, ConvexClipPlaneSetProps } from \"./ConvexClipPlaneSet\";\r\n\r\n/**\r\n * Wire format describing a [[UnionOfConvexClipPlaneSets]].\r\n * @public\r\n */\r\nexport type UnionOfConvexClipPlaneSetsProps = ConvexClipPlaneSetProps[];\r\n\r\n/**\r\n * A collection of ConvexClipPlaneSets.\r\n * * A point is \"in\" the clip plane set if it is \"in\" one or more of the ConvexClipPlaneSet\r\n * * Hence the boolean logic is that the ClipPlaneSet is a UNION of its constituents.\r\n * @public\r\n */\r\nexport class UnionOfConvexClipPlaneSets implements Clipper, PolygonClipper {\r\n private _convexSets: ConvexClipPlaneSet[];\r\n /** (property accessor) Return the (reference to the) array of `ConvexClipPlaneSet` */\r\n public get convexSets(): ConvexClipPlaneSet[] {\r\n return this._convexSets;\r\n }\r\n private constructor() {\r\n this._convexSets = [];\r\n }\r\n /** Return an array with the `toJSON` form of each `ConvexClipPlaneSet` */\r\n public toJSON(): UnionOfConvexClipPlaneSetsProps {\r\n const val: ConvexClipPlaneSetProps[] = [];\r\n for (const convex of this._convexSets)\r\n val.push(convex.toJSON());\r\n return val;\r\n }\r\n /** Convert json `UnionOfConvexClipPlaneSets`, using `setFromJSON`. */\r\n public static fromJSON(\r\n json: UnionOfConvexClipPlaneSetsProps | undefined, result?: UnionOfConvexClipPlaneSets,\r\n ): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n if (!Array.isArray(json))\r\n return result;\r\n\r\n for (const thisJson of json)\r\n result._convexSets.push(ConvexClipPlaneSet.fromJSON(thisJson));\r\n return result;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with no members. */\r\n public static createEmpty(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n if (result) {\r\n result._convexSets.length = 0;\r\n return result;\r\n }\r\n return new UnionOfConvexClipPlaneSets();\r\n }\r\n /**\r\n * Return true if all member convex sets are almostEqual to corresponding members of other. This includes\r\n * identical order in array.\r\n * @param other clip plane to compare.\r\n */\r\n public isAlmostEqual(other: UnionOfConvexClipPlaneSets): boolean {\r\n if (this._convexSets.length !== other._convexSets.length)\r\n return false;\r\n for (let i = 0; i < this._convexSets.length; i++)\r\n if (!this._convexSets[i].isAlmostEqual(other._convexSets[i]))\r\n return false;\r\n return true;\r\n }\r\n /** Create a `UnionOfConvexClipPlaneSets` with given `ConvexClipPlaneSet` members. */\r\n public static createConvexSets(\r\n convexSets: ConvexClipPlaneSet[], result?: UnionOfConvexClipPlaneSets,\r\n ): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n for (const set of convexSets)\r\n result._convexSets.push(set);\r\n return result;\r\n }\r\n /** Return a deep copy. */\r\n public clone(result?: UnionOfConvexClipPlaneSets): UnionOfConvexClipPlaneSets {\r\n result = result ? result : new UnionOfConvexClipPlaneSets();\r\n result._convexSets.length = 0;\r\n for (const convexSet of this._convexSets)\r\n result._convexSets.push(convexSet.clone());\r\n return result;\r\n }\r\n /**\r\n * Append `toAdd` to the array of `ConvexClipPlaneSet`.\r\n * * undefined toAdd is ignored.\r\n */\r\n public addConvexSet(toAdd: ConvexClipPlaneSet | undefined) {\r\n if (toAdd)\r\n this._convexSets.push(toAdd);\r\n }\r\n /**\r\n * Test if there is any intersection with a ray defined by origin and direction.\r\n * * Optionally record the range (null or otherwise) in caller-allocated result.\r\n * * If the ray is unbounded inside the clip, result can contain positive or negative\r\n * \"Geometry.largeCoordinateResult\" values.\r\n * * If no result is provide, there are no object allocations.\r\n * @param maximalRange optional Range1d to receive parameters along the ray.\r\n */\r\n public hasIntersectionWithRay(ray: Ray3d, maximalRange?: Range1d): boolean {\r\n if (maximalRange === undefined) {\r\n // if complete result is not requested, return after any hit.\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray))\r\n return true;\r\n }\r\n return false;\r\n }\r\n maximalRange.setNull();\r\n const rangeA = Range1d.createNull();\r\n for (const planeSet of this._convexSets) {\r\n if (planeSet.hasIntersectionWithRay(ray, rangeA))\r\n maximalRange.extendRange(rangeA);\r\n }\r\n return !maximalRange.isNull;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isPointInside (point, tolerance)`.\r\n */\r\n public isPointInside(point: Point3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointInside(point)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isPointOnOrInside (point, tolerance)`.\r\n */\r\n public isPointOnOrInside(point: Point3d, tolerance: number = Geometry.smallMetricDistance): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isPointOnOrInside(point, tolerance))\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return true if true is returned for any contained convex set returns true for\r\n * `convexSet.isSphereOnOrInside (point, tolerance)`.\r\n */\r\n public isSphereInside(point: Point3d, radius: number) {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.isSphereInside(point, radius))\r\n return true;\r\n }\r\n return false;\r\n }\r\n /** Test if any part of a line segment is within the volume. */\r\n public isAnyPointInOrOnFromSegment(segment: LineSegment3d): boolean {\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref))\r\n return true;\r\n }\r\n return false;\r\n }\r\n // Intervals must be Segment1d array, as there may be multiple intervals along segment that pass through set regions,\r\n // and so splitting the intervals into segments aids in better organization\r\n /** Returns the fractions of the segment that pass through the set region, as 1 dimensional pieces. */\r\n public appendIntervalsFromSegment(segment: LineSegment3d, intervals: Segment1d[]) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.announceClippedSegmentIntervals(0.0, 1.0, segment.point0Ref, segment.point1Ref,\r\n (fraction0: number, fraction1: number) =>\r\n intervals.push(Segment1d.create(fraction0, fraction1)));\r\n }\r\n }\r\n /** Apply `transform` to all the ConvexClipPlaneSet's. */\r\n public transformInPlace(transform: Transform) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.transformInPlace(transform);\r\n }\r\n }\r\n /** Returns 1, 2, or 3 based on whether point is strongly inside, ambiguous, or strongly outside respectively. */\r\n public classifyPointContainment(points: Point3d[], onIsOutside: boolean): number {\r\n for (const convexSet of this._convexSets) {\r\n const thisStatus = convexSet.classifyPointContainment(points, onIsOutside);\r\n if (thisStatus !== ClipPlaneContainment.StronglyOutside)\r\n return thisStatus;\r\n }\r\n return ClipPlaneContainment.StronglyOutside;\r\n }\r\n /**\r\n * Clip a polygon using this ClipPlaneSet, returning new polygon boundaries. Note that each polygon may lie\r\n * next to the previous, or be disconnected.\r\n */\r\n public polygonClip(input: GrowableXYZArray | Point3d[], output: GrowableXYZArray[]) {\r\n output.length = 0;\r\n if (Array.isArray(input))\r\n input = GrowableXYZArray.create(input);\r\n const work = new GrowableXYZArray();\r\n for (const convexSet of this._convexSets) {\r\n const convexSetOutput = new GrowableXYZArray();\r\n convexSet.polygonClip(input, convexSetOutput, work);\r\n if (convexSetOutput.length !== 0)\r\n output.push(convexSetOutput);\r\n }\r\n }\r\n /**\r\n * Announce clipSegment() for each convexSet in this ClipPlaneSet.\r\n * * all clipPlaneSets are inspected.\r\n * * announced intervals are for each individual clipPlaneSet -- adjacent intervals are not consolidated.\r\n * @param f0 active interval start.\r\n * @param f1 active interval end.\r\n * @param pointA line segment start.\r\n * @param pointB line segment end.\r\n * @param announce function to announce interval.\r\n * @returns Return true if any announcements are made.\r\n */\r\n public announceClippedSegmentIntervals(\r\n f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: (fraction0: number, fraction1: number) => void,\r\n ): boolean {\r\n let numAnnounce = 0;\r\n for (const convexSet of this._convexSets) {\r\n if (convexSet.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce))\r\n numAnnounce++;\r\n }\r\n return numAnnounce > 0;\r\n }\r\n private static _clipArcFractionArray = new GrowableFloat64Array();\r\n /**\r\n * Find parts of an arc that are inside any member clipper.\r\n * Announce each with `announce(startFraction, endFraction, this)`\r\n */\r\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n const breaks = UnionOfConvexClipPlaneSets._clipArcFractionArray;\r\n breaks.clear();\r\n for (const convexSet of this._convexSets) {\r\n for (const clipPlane of convexSet.planes) {\r\n clipPlane.appendIntersectionRadians(arc, breaks);\r\n }\r\n }\r\n arc.sweep.radiansArrayToPositivePeriodicFractions(breaks);\r\n return ClipUtilities.selectIntervals01(arc, breaks, this, announce);\r\n }\r\n /**\r\n * Collect the output from computePlanePlanePlaneIntersections in all the contained convex sets.\r\n * @param transform (optional) transform to apply to the points.\r\n * @param points (optional) array to which computed points are to be added.\r\n * @param range (optional) range to be extended by the computed points.\r\n * @param transform (optional) transform to apply to the accepted points.\r\n * @param testContainment if true, test each point to see if it is within the convex set (send false if confident\r\n * that the convex set is rectilinear set such as a slab. Send true if chiseled corners are possible).\r\n * @returns number of points.\r\n */\r\n public computePlanePlanePlaneIntersectionsInAllConvexSets(\r\n points: Point3d[] | undefined, rangeToExtend: Range3d | undefined, transform?: Transform, testContainment: boolean = true,\r\n ): number {\r\n let n = 0;\r\n for (const convexSet of this._convexSets) {\r\n n += convexSet.computePlanePlanePlaneIntersections(points, rangeToExtend, transform, testContainment);\r\n }\r\n return n;\r\n }\r\n /**\r\n * Multiply all ClipPlanes DPoint4d by matrix.\r\n * @param matrix matrix to apply.\r\n * @param invert if true, use in verse of the matrix.\r\n * @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter).\r\n * * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect\r\n * on the plane is the inverse transpose of matrixA.\r\n * * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.\r\n * * Both params default to true to get the full effect of transforming space.\r\n * @param matrix matrix to apply\r\n */\r\n public multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean {\r\n if (invert) { // form inverse once here, reuse for all planes\r\n const inverse = matrix.createInverse();\r\n if (!inverse)\r\n return false;\r\n return this.multiplyPlanesByMatrix4d(inverse, false, transpose);\r\n }\r\n // (no inversion -- no failures possible)\r\n for (const convexSet of this._convexSets) {\r\n convexSet.multiplyPlanesByMatrix4d(matrix, false, transpose);\r\n }\r\n return true;\r\n }\r\n /** Recursively call `setInvisible` on all member convex sets. */\r\n public setInvisible(invisible: boolean) {\r\n for (const convexSet of this._convexSets) {\r\n convexSet.setInvisible(invisible);\r\n }\r\n }\r\n /** add convex sets that accept points below `zLow` and above `zHigh` */\r\n public addOutsideZClipSets(invisible: boolean, zLow?: number, zHigh?: number) {\r\n if (zLow) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, zLow);\r\n this._convexSets.push(convexSet);\r\n }\r\n if (zHigh) {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n convexSet.addZClipPlanes(invisible, undefined, zHigh);\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /** Move convex sets from source.*/\r\n public takeConvexSets(source: UnionOfConvexClipPlaneSets) {\r\n let convexSet;\r\n while ((undefined !== (convexSet = source._convexSets.pop()))) {\r\n this._convexSets.push(convexSet);\r\n }\r\n }\r\n /**\r\n *\r\n * @param xyz input polygon. This is not changed.\r\n * @param insideFragments Array to receive \"inside\" fragments. Each fragment is a GrowableXYZArray grabbed from\r\n * the cache. This is NOT cleared.\r\n * @param outsideFragments Array to receive \"outside\" fragments. Each fragment is a GrowableXYZArray grabbed from\r\n * the cache. This is NOT cleared.\r\n * @param arrayCache cache for reusable GrowableXYZArray.\r\n */\r\n public appendPolygonClip(\r\n xyz: GrowableXYZArray,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache,\r\n ): void {\r\n const oldOutsideCount = outsideFragments.length;\r\n const oldInsideCount = insideFragments.length;\r\n let carryForwardA = [arrayCache.grabAndFill(xyz)];\r\n let carryForwardB: GrowableXYZArray[] = [];\r\n let tempAB;\r\n let shard;\r\n // At each convex set, carryForwardA is all the fragments that have been outside all previous convex sets.\r\n // Clip each such fragment to the current set, sending the outside parts to carryForwardB, which will got to the next clipper\r\n // The final surviving carryForward really is out.\r\n for (const c of this._convexSets) {\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n c.appendPolygonClip(shard, insideFragments, carryForwardB, arrayCache);\r\n arrayCache.dropToCache(shard);\r\n }\r\n tempAB = carryForwardB;\r\n carryForwardB = carryForwardA; // and that is empty\r\n carryForwardA = tempAB;\r\n }\r\n while (undefined !== (shard = carryForwardA.pop())) {\r\n outsideFragments.push(shard);\r\n }\r\n if (outsideFragments.length === oldOutsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(insideFragments, oldInsideCount, xyz, arrayCache);\r\n else if (insideFragments.length === oldInsideCount)\r\n ClipUtilities.restoreSingletonInPlaceOfMultipleShards(outsideFragments, oldOutsideCount, xyz, arrayCache);\r\n }\r\n}\r\n\r\n/* FUNCTIONS SKIPPED DUE TO BSPLINES, VU, OR NON-USAGE IN NATIVE CODE----------------------------------------------------------------\r\n\r\nInvolves vu: skipping for now...\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[]): ClipPlaneSet;\r\n public parseConcavePolygonPlanes(...)\r\n\r\nUses bsplines... skipping for now:\r\n public appendIntervalsClipPlaneSetFromCurve();\r\n\r\nUses bsplines... skipping for now:\r\n public isAnyPointInOrOnFrom();\r\n\r\nSkipped fromSweptPolygon(...), which is overloaded function from first, due to presence of vu\r\n public fromSweptPolygon(points: Point3d[], directions: Vector3d[], shapes: Point3d[])\r\n*/\r\n"]}
|
|
@@ -34,8 +34,8 @@ export declare class LineStringOffsetClipperContext {
|
|
|
34
34
|
* @param points
|
|
35
35
|
* @param positiveOffsetLeft offset to left. 0 is clip on the path.
|
|
36
36
|
* @param positiveOffsetRight offset to the right. 0 is clip on the path.
|
|
37
|
-
* @param z0 z for lower clipping plane.
|
|
38
|
-
* @param z1 z for upper clipping plane.
|
|
37
|
+
* @param z0 z for lower clipping plane. If undefined, unbounded in positive z
|
|
38
|
+
* @param z1 z for upper clipping plane. If undefined, unbounded in negative z.
|
|
39
39
|
*/
|
|
40
40
|
static createClipBetweenOffsets(points: IndexedXYZCollection, positiveOffsetLeft: number, positiveOffsetRight: number, z0: number | undefined, z1: number | undefined): UnionOfConvexClipPlaneSets;
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineStringOffsetClipperContext.d.ts","sourceRoot":"","sources":["../../../../src/clipping/internalContexts/LineStringOffsetClipperContext.ts"],"names":[],"mappings":"AAMA,OAAO,EAAW,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E;;;GAGG;AACH,qBAAa,8BAA8B;IACzC,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO;IAKP;;;;;;;;OAQG;WACW,UAAU,
|
|
1
|
+
{"version":3,"file":"LineStringOffsetClipperContext.d.ts","sourceRoot":"","sources":["../../../../src/clipping/internalContexts/LineStringOffsetClipperContext.ts"],"names":[],"mappings":"AAMA,OAAO,EAAW,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E;;;GAGG;AACH,qBAAa,8BAA8B;IACzC,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO;IAKP;;;;;;;;OAQG;WACW,UAAU,CACtB,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAE,OAAc,GACpF,QAAQ,GAAG,SAAS;IA6BvB,OAAO,CAAC,MAAM,CAAC,mBAAmB;IASlC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,uBAAuB;IAyD/B;;;;;;OAMG;WACW,wBAAwB,CACpC,MAAM,EAAE,oBAAoB,EAC5B,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,EAAE,EAAE,MAAM,GAAG,SAAS,GACrB,0BAA0B;CAwB9B"}
|
|
@@ -132,8 +132,8 @@ class LineStringOffsetClipperContext {
|
|
|
132
132
|
* @param points
|
|
133
133
|
* @param positiveOffsetLeft offset to left. 0 is clip on the path.
|
|
134
134
|
* @param positiveOffsetRight offset to the right. 0 is clip on the path.
|
|
135
|
-
* @param z0 z for lower clipping plane.
|
|
136
|
-
* @param z1 z for upper clipping plane.
|
|
135
|
+
* @param z0 z for lower clipping plane. If undefined, unbounded in positive z
|
|
136
|
+
* @param z1 z for upper clipping plane. If undefined, unbounded in negative z.
|
|
137
137
|
*/
|
|
138
138
|
static createClipBetweenOffsets(points, positiveOffsetLeft, positiveOffsetRight, z0, z1) {
|
|
139
139
|
const context = new LineStringOffsetClipperContext(positiveOffsetLeft, positiveOffsetRight);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineStringOffsetClipperContext.js","sourceRoot":"","sources":["../../../../src/clipping/internalContexts/LineStringOffsetClipperContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,6CAA0C;AAE1C,8EAA2E;AAC3E,8DAA2D;AAC3D,4CAAyC;AAEzC;;;GAGG;AACH,MAAa,8BAA8B;IAIzC,YAAoB,kBAA0B,EAAE,mBAA2B;QACzE,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;QAC9C,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,UAAU,CAAC,MAA4B,EAAE,MAAc,EAAE,MAAe,EAAE,SAAkB,IAAI;QAC5G,kEAAkE;QAClE,qCAAqC;QACrC,4DAA4D;QAC5D,IAAI,EAAE,GAAG,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG,MAAM,GAAG,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,MAAM,EAAE;YACV,IAAI,MAAM,GAAG,CAAC,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AqB,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC,CAAC;YAChG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;gBAC3D,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;gBACvD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;gBAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC,EACvF,MAAM,CAAC,+BAA+B,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;gBACxF,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;gBACvC,IAAI,OAAO;oBACT,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;aAChC;SACF;aAAM;YACL,8CAA8C;YAC9C,MAAM,OAAO,GAAG,uCAAkB,CAAC,WAAW,EAAE,CAAC;YACjD,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;gBAC3B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAChC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AApJD,wEAoJC","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\nimport { Geometry } from \"../../Geometry\";\r\nimport { Point3d, Vector3d } from \"../../geometry3d/Point3dVector3d\";\r\nimport { UnionOfConvexClipPlaneSets } from \"../UnionOfConvexClipPlaneSets\";\r\nimport { ConvexClipPlaneSet } from \"../ConvexClipPlaneSet\";\r\nimport { ClipPlane } from \"../ClipPlane\";\r\nimport { IndexedXYZCollection } from \"../../geometry3d/IndexedXYZCollection\";\r\n/**\r\n * Class for building clip sets for offset regions.\r\n * @internal\r\n */\r\nexport class LineStringOffsetClipperContext {\r\n private _positiveOffsetLeft: number;\r\n private _positiveOffsetRight: number;\r\n private _turnDegrees: number;\r\n private constructor(positiveOffsetLeft: number, positiveOffsetRight: number) {\r\n this._positiveOffsetLeft = positiveOffsetLeft;\r\n this._positiveOffsetRight = positiveOffsetRight;\r\n this._turnDegrees = 60.0;\r\n }\r\n /**\r\n * Create a unit vector from point i to point i+1.\r\n * If closed, do point indexing with\r\n * * index less than 0 get final segment\r\n * * index at or beyond points.length-1 wraps to first segment\r\n * @param points\r\n * @param index0\r\n * @param closed indicates that first and last points are identical and need wrap logic.\r\n */\r\n public static createUnit(points: IndexedXYZCollection, index0: number, closed: boolean, xyOnly: boolean = true): Vector3d | undefined {\r\n // pick two indices of active points, allowing for wrap if needed:\r\n // normally use index0 and index0 + 1\r\n // but apply wrap if appropriate, and shift ahead of needed.\r\n let k0 = index0;\r\n let k1 = index0 + 1;\r\n const last = points.length - 1;\r\n if (closed) {\r\n if (index0 < 0) {\r\n k0 = last - 1; k1 = last;\r\n } else if (index0 >= last) {\r\n k0 = 0; k1 = 1;\r\n }\r\n } else {\r\n if (index0 === 0) {\r\n k0 = 0; k1 = 1;\r\n } else if (k1 > last) {\r\n k0 = last - 1;\r\n k1 = last;\r\n }\r\n }\r\n const result = points.vectorIndexIndex(k0, k1);\r\n if (result) {\r\n if (xyOnly)\r\n result.z = 0.0;\r\n return result.normalize(result);\r\n }\r\n return undefined;\r\n }\r\nprivate static createDirectedPlane(basePoint: Point3d, vector: Vector3d, shift: number, normalScale: number, interior: boolean = false) {\r\n return ClipPlane.createNormalAndPointXYZXYZ(\r\n vector.x * normalScale, vector.y * normalScale, vector.z * normalScale,\r\n basePoint.x + shift * vector.x, basePoint.y + shift * vector.y, basePoint.z + shift * vector.z, interior, interior);\r\n }\r\n /**\r\n * Create (if needed) the chamfer cutback plane for a turn.\r\n * @param clipSet set to receive the plane\r\n * @param point central point\r\n * @param unitA incoming vector\r\n * @param unitB outgoing vector\r\n */\r\n private createChamferCut(clipSet: ConvexClipPlaneSet, point: Point3d, unitA: Vector3d, unitB: Vector3d) {\r\n const degreesA = unitA.angleToXY(unitB).degrees;\r\n if (Math.abs(degreesA) > this._turnDegrees) {\r\n const perpAB = unitA.interpolate(0.5, unitB);\r\n perpAB.rotate90CCWXY(perpAB);\r\n perpAB.normalizeInPlace();\r\n if (degreesA > 0)\r\n clipSet.addPlaneToConvexSet(LineStringOffsetClipperContext.createDirectedPlane(point, perpAB, -this._positiveOffsetRight, 1.0, false));\r\n else\r\n clipSet.addPlaneToConvexSet(LineStringOffsetClipperContext.createDirectedPlane(point, perpAB, this._positiveOffsetLeft, -1.0, false));\r\n }\r\n }\r\n private createOffsetFromSegment(pointA: Point3d, pointB: Point3d,\r\n unitA: Vector3d | undefined,\r\n unitB: Vector3d | undefined,\r\n unitC: Vector3d | undefined): ConvexClipPlaneSet | undefined {\r\n if (unitB === undefined)\r\n return undefined;\r\n if (unitA === undefined)\r\n unitA = unitB;\r\n if (unitC === undefined)\r\n unitC = unitB;\r\n const unitAB = unitA.interpolate(0.5, unitB);\r\n unitAB.normalizeInPlace();\r\n const perpB = unitB.rotate90CCWXY();\r\n const unitBC = unitB.interpolate(0.5, unitC);\r\n unitBC.normalizeInPlace();\r\n const clipSet = ConvexClipPlaneSet.createEmpty();\r\n clipSet.addPlaneToConvexSet(LineStringOffsetClipperContext.createDirectedPlane(pointA, perpB, this._positiveOffsetLeft, -1.0, false));\r\n clipSet.addPlaneToConvexSet(LineStringOffsetClipperContext.createDirectedPlane(pointA, perpB, -this._positiveOffsetRight, 1.0, false));\r\n clipSet.addPlaneToConvexSet(LineStringOffsetClipperContext.createDirectedPlane(pointA, unitAB, 0, 1.0, true));\r\n clipSet.addPlaneToConvexSet(LineStringOffsetClipperContext.createDirectedPlane(pointB, unitBC, 0, -1.0, true));\r\n this.createChamferCut(clipSet, pointA, unitA, unitB);\r\n this.createChamferCut(clipSet, pointB, unitB, unitC);\r\n /*\r\n const degreesA = unitA.angleToXY(unitB).degrees;\r\n if (Math.abs(degreesA) > this._turnDegrees) {\r\n const perpAB = unitA.interpolate(0.5, unitB);\r\n perpAB.rotate90CCWXY(perpAB);\r\n perpAB.normalizeInPlace();\r\n if (degreesA > 0)\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointA, perpAB, -this._positiveOffsetRight, 1.0));\r\n else\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointA, perpAB, -this._positiveOffsetLeft, -1.0));\r\n }\r\n const degreesB = unitB.angleToXY(unitC).degrees;\r\n if (Math.abs(degreesB) > this._turnDegrees) {\r\n const perpBC = unitB.interpolate(0.5, unitC);\r\n perpBC.rotate90CCWXY(perpBC);\r\n perpBC.normalizeInPlace();\r\n if (degreesB > 0)\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointB, perpBC, -this._positiveOffsetRight, 1.0));\r\n else\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointB, perpBC, -this._positiveOffsetLeft, -1.0));\r\n }\r\n */\r\n return clipSet;\r\n }\r\n /**\r\n * @param points\r\n * @param positiveOffsetLeft offset to left. 0 is clip on the path.\r\n * @param positiveOffsetRight offset to the right. 0 is clip on the path.\r\n * @param z0 z for lower clipping plane. If undefined, unbounded in positive z\r\n * @param z1 z for upper clipping plane. If undefined, unbounded in negative z.\r\n */\r\n public static createClipBetweenOffsets(points: IndexedXYZCollection, positiveOffsetLeft: number, positiveOffsetRight: number, z0: number | undefined, z1: number | undefined): UnionOfConvexClipPlaneSets {\r\n const context = new LineStringOffsetClipperContext(positiveOffsetLeft, positiveOffsetRight);\r\n const result = UnionOfConvexClipPlaneSets.createEmpty();\r\n if (points.length > 1) {\r\n const closed = Geometry.isSmallMetricDistance(points.distanceIndexIndex(0, points.length - 1)!);\r\n for (let i = 0; i + 1 < points.length; i++) {\r\n const unitVectorA = this.createUnit(points, i - 1, closed);\r\n const unitVectorB = this.createUnit(points, i, closed);\r\n const unitVectorC = this.createUnit(points, i + 1, closed);\r\n const clipSet = context.createOffsetFromSegment(points.getPoint3dAtUncheckedPointIndex(i),\r\n points.getPoint3dAtUncheckedPointIndex(i + 1), unitVectorA, unitVectorB, unitVectorC);\r\n clipSet?.addZClipPlanes(false, z0, z1);\r\n if (clipSet)\r\n result.addConvexSet(clipSet);\r\n }\r\n } else {\r\n // make a singleton clipper with the z values.\r\n const clipSet = ConvexClipPlaneSet.createEmpty();\r\n clipSet?.addZClipPlanes(false, z0, z1);\r\n if (clipSet.planes.length > 0)\r\n result.addConvexSet(clipSet);\r\n }\r\n return result;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LineStringOffsetClipperContext.js","sourceRoot":"","sources":["../../../../src/clipping/internalContexts/LineStringOffsetClipperContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,6CAA0C;AAE1C,8EAA2E;AAC3E,8DAA2D;AAC3D,4CAAyC;AAEzC;;;GAGG;AACH,MAAa,8BAA8B;IAIzC,YAAoB,kBAA0B,EAAE,mBAA2B;QACzE,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;QAC9C,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC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,MAAM,OAAO,GAAG,uCAAkB,CAAC,WAAW,EAAE,CAAC;YACjD,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;gBAC3B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAChC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA/KD,wEA+KC","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\nimport { Geometry } from \"../../Geometry\";\r\nimport { Point3d, Vector3d } from \"../../geometry3d/Point3dVector3d\";\r\nimport { UnionOfConvexClipPlaneSets } from \"../UnionOfConvexClipPlaneSets\";\r\nimport { ConvexClipPlaneSet } from \"../ConvexClipPlaneSet\";\r\nimport { ClipPlane } from \"../ClipPlane\";\r\nimport { IndexedXYZCollection } from \"../../geometry3d/IndexedXYZCollection\";\r\n/**\r\n * Class for building clip sets for offset regions.\r\n * @internal\r\n */\r\nexport class LineStringOffsetClipperContext {\r\n private _positiveOffsetLeft: number;\r\n private _positiveOffsetRight: number;\r\n private _turnDegrees: number;\r\n private constructor(positiveOffsetLeft: number, positiveOffsetRight: number) {\r\n this._positiveOffsetLeft = positiveOffsetLeft;\r\n this._positiveOffsetRight = positiveOffsetRight;\r\n this._turnDegrees = 60.0;\r\n }\r\n /**\r\n * Create a unit vector from point i to point i+1.\r\n * If closed, do point indexing with\r\n * * index less than 0 get final segment\r\n * * index at or beyond points.length-1 wraps to first segment\r\n * @param points\r\n * @param index0\r\n * @param closed indicates that first and last points are identical and need wrap logic.\r\n */\r\n public static createUnit(\r\n points: IndexedXYZCollection, index0: number, closed: boolean, xyOnly: boolean = true,\r\n ): Vector3d | undefined {\r\n // pick two indices of active points, allowing for wrap if needed:\r\n // normally use index0 and index0 + 1\r\n // but apply wrap if appropriate, and shift ahead of needed.\r\n let k0 = index0;\r\n let k1 = index0 + 1;\r\n const last = points.length - 1;\r\n if (closed) {\r\n if (index0 < 0) {\r\n k0 = last - 1; k1 = last;\r\n } else if (index0 >= last) {\r\n k0 = 0; k1 = 1;\r\n }\r\n } else {\r\n if (index0 === 0) {\r\n k0 = 0; k1 = 1;\r\n } else if (k1 > last) {\r\n k0 = last - 1;\r\n k1 = last;\r\n }\r\n }\r\n const result = points.vectorIndexIndex(k0, k1);\r\n if (result) {\r\n if (xyOnly)\r\n result.z = 0.0;\r\n return result.normalize(result);\r\n }\r\n return undefined;\r\n }\r\n private static createDirectedPlane(\r\n basePoint: Point3d, vector: Vector3d, shift: number, normalScale: number, interior: boolean = false,\r\n ): ClipPlane | undefined {\r\n return ClipPlane.createNormalAndPointXYZXYZ(\r\n vector.x * normalScale, vector.y * normalScale, vector.z * normalScale,\r\n basePoint.x + shift * vector.x, basePoint.y + shift * vector.y, basePoint.z + shift * vector.z,\r\n interior, interior,\r\n );\r\n }\r\n /**\r\n * Create (if needed) the chamfer cutback plane for a turn.\r\n * @param clipSet set to receive the plane\r\n * @param point central point\r\n * @param unitA incoming vector\r\n * @param unitB outgoing vector\r\n */\r\n private createChamferCut(clipSet: ConvexClipPlaneSet, point: Point3d, unitA: Vector3d, unitB: Vector3d) {\r\n const degreesA = unitA.angleToXY(unitB).degrees;\r\n if (Math.abs(degreesA) > this._turnDegrees) {\r\n const perpAB = unitA.interpolate(0.5, unitB);\r\n perpAB.rotate90CCWXY(perpAB);\r\n perpAB.normalizeInPlace();\r\n if (degreesA > 0)\r\n clipSet.addPlaneToConvexSet(\r\n LineStringOffsetClipperContext.createDirectedPlane(point, perpAB, -this._positiveOffsetRight, 1.0, false),\r\n );\r\n else\r\n clipSet.addPlaneToConvexSet(\r\n LineStringOffsetClipperContext.createDirectedPlane(point, perpAB, this._positiveOffsetLeft, -1.0, false),\r\n );\r\n }\r\n }\r\n private createOffsetFromSegment(\r\n pointA: Point3d,\r\n pointB: Point3d,\r\n unitA: Vector3d | undefined,\r\n unitB: Vector3d | undefined,\r\n unitC: Vector3d | undefined,\r\n ): ConvexClipPlaneSet | undefined {\r\n if (unitB === undefined)\r\n return undefined;\r\n if (unitA === undefined)\r\n unitA = unitB;\r\n if (unitC === undefined)\r\n unitC = unitB;\r\n const unitAB = unitA.interpolate(0.5, unitB);\r\n unitAB.normalizeInPlace();\r\n const perpB = unitB.rotate90CCWXY();\r\n const unitBC = unitB.interpolate(0.5, unitC);\r\n unitBC.normalizeInPlace();\r\n const clipSet = ConvexClipPlaneSet.createEmpty();\r\n clipSet.addPlaneToConvexSet(\r\n LineStringOffsetClipperContext.createDirectedPlane(pointA, perpB, this._positiveOffsetLeft, -1.0, false),\r\n );\r\n clipSet.addPlaneToConvexSet(\r\n LineStringOffsetClipperContext.createDirectedPlane(pointA, perpB, -this._positiveOffsetRight, 1.0, false),\r\n );\r\n clipSet.addPlaneToConvexSet(\r\n LineStringOffsetClipperContext.createDirectedPlane(pointA, unitAB, 0, 1.0, true),\r\n );\r\n clipSet.addPlaneToConvexSet(\r\n LineStringOffsetClipperContext.createDirectedPlane(pointB, unitBC, 0, -1.0, true),\r\n );\r\n this.createChamferCut(clipSet, pointA, unitA, unitB);\r\n this.createChamferCut(clipSet, pointB, unitB, unitC);\r\n /*\r\n const degreesA = unitA.angleToXY(unitB).degrees;\r\n if (Math.abs(degreesA) > this._turnDegrees) {\r\n const perpAB = unitA.interpolate(0.5, unitB);\r\n perpAB.rotate90CCWXY(perpAB);\r\n perpAB.normalizeInPlace();\r\n if (degreesA > 0)\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointA, perpAB, -this._positiveOffsetRight, 1.0));\r\n else\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointA, perpAB, -this._positiveOffsetLeft, -1.0));\r\n }\r\n const degreesB = unitB.angleToXY(unitC).degrees;\r\n if (Math.abs(degreesB) > this._turnDegrees) {\r\n const perpBC = unitB.interpolate(0.5, unitC);\r\n perpBC.rotate90CCWXY(perpBC);\r\n perpBC.normalizeInPlace();\r\n if (degreesB > 0)\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointB, perpBC, -this._positiveOffsetRight, 1.0));\r\n else\r\n clipSet.addPlaneToConvexSet(BuildingCodeRegionOffsetsOps.createDirectedPlane(pointB, perpBC, -this._positiveOffsetLeft, -1.0));\r\n }\r\n */\r\n return clipSet;\r\n }\r\n /**\r\n * @param points\r\n * @param positiveOffsetLeft offset to left. 0 is clip on the path.\r\n * @param positiveOffsetRight offset to the right. 0 is clip on the path.\r\n * @param z0 z for lower clipping plane. If undefined, unbounded in positive z\r\n * @param z1 z for upper clipping plane. If undefined, unbounded in negative z.\r\n */\r\n public static createClipBetweenOffsets(\r\n points: IndexedXYZCollection,\r\n positiveOffsetLeft: number,\r\n positiveOffsetRight: number,\r\n z0: number | undefined,\r\n z1: number | undefined,\r\n ): UnionOfConvexClipPlaneSets {\r\n const context = new LineStringOffsetClipperContext(positiveOffsetLeft, positiveOffsetRight);\r\n const result = UnionOfConvexClipPlaneSets.createEmpty();\r\n if (points.length > 1) {\r\n const closed = Geometry.isSmallMetricDistance(points.distanceIndexIndex(0, points.length - 1)!);\r\n for (let i = 0; i + 1 < points.length; i++) {\r\n const unitVectorA = this.createUnit(points, i - 1, closed);\r\n const unitVectorB = this.createUnit(points, i, closed);\r\n const unitVectorC = this.createUnit(points, i + 1, closed);\r\n const clipSet = context.createOffsetFromSegment(points.getPoint3dAtUncheckedPointIndex(i),\r\n points.getPoint3dAtUncheckedPointIndex(i + 1), unitVectorA, unitVectorB, unitVectorC);\r\n clipSet?.addZClipPlanes(false, z0, z1);\r\n if (clipSet)\r\n result.addConvexSet(clipSet);\r\n }\r\n } else {\r\n // make a singleton clipper with the z values.\r\n const clipSet = ConvexClipPlaneSet.createEmpty();\r\n clipSet?.addZClipPlanes(false, z0, z1);\r\n if (clipSet.planes.length > 0)\r\n result.addConvexSet(clipSet);\r\n }\r\n return result;\r\n }\r\n}\r\n"]}
|
|
@@ -127,6 +127,7 @@ export * from "./geometry3d/Point3dArrayCarrier";
|
|
|
127
127
|
export * from "./geometry3d/PolylineOps";
|
|
128
128
|
export * from "./geometry3d/PolygonOps";
|
|
129
129
|
export * from "./geometry3d/Range";
|
|
130
|
+
export * from "./geometry3d/Ray2d";
|
|
130
131
|
export * from "./geometry3d/Ray3d";
|
|
131
132
|
export * from "./geometry3d/Segment1d";
|
|
132
133
|
export * from "./geometry3d/Transform";
|
|
@@ -171,17 +172,18 @@ export * from "./curve/CurveCurveIntersectXY";
|
|
|
171
172
|
export * from "./curve/CurveCurveIntersectXYZ";
|
|
172
173
|
export * from "./curve/CurveLocationDetail";
|
|
173
174
|
export * from "./curve/CurveFactory";
|
|
175
|
+
export * from "./curve/CurveOps";
|
|
174
176
|
export * from "./curve/CurvePrimitive";
|
|
175
177
|
export * from "./curve/CurveProcessor";
|
|
176
178
|
export * from "./curve/GeometryQuery";
|
|
177
179
|
export * from "./curve/LineSegment3d";
|
|
178
180
|
export * from "./curve/LineString3d";
|
|
179
181
|
export * from "./curve/Loop";
|
|
182
|
+
export * from "./curve/OffsetOptions";
|
|
180
183
|
export * from "./curve/ParityRegion";
|
|
181
184
|
export * from "./curve/Path";
|
|
182
185
|
export * from "./curve/RegionMomentsXY";
|
|
183
186
|
export * from "./curve/RegionOps";
|
|
184
|
-
export * from "./curve/internalContexts/PolygonOffsetContext";
|
|
185
187
|
export * from "./curve/PointString3d";
|
|
186
188
|
export * from "./curve/ProxyCurve";
|
|
187
189
|
export * from "./curve/StrokeOptions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-geometry.d.ts","sourceRoot":"","sources":["../../src/core-geometry.ts"],"names":[],"mappings":"AAKA;;GAEG;AASH;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;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AAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC"}
|
package/lib/cjs/core-geometry.js
CHANGED
|
@@ -163,6 +163,7 @@ __exportStar(require("./geometry3d/Point3dArrayCarrier"), exports);
|
|
|
163
163
|
__exportStar(require("./geometry3d/PolylineOps"), exports);
|
|
164
164
|
__exportStar(require("./geometry3d/PolygonOps"), exports);
|
|
165
165
|
__exportStar(require("./geometry3d/Range"), exports);
|
|
166
|
+
__exportStar(require("./geometry3d/Ray2d"), exports);
|
|
166
167
|
__exportStar(require("./geometry3d/Ray3d"), exports);
|
|
167
168
|
__exportStar(require("./geometry3d/Segment1d"), exports);
|
|
168
169
|
__exportStar(require("./geometry3d/Transform"), exports);
|
|
@@ -207,17 +208,18 @@ __exportStar(require("./curve/CurveCurveIntersectXY"), exports);
|
|
|
207
208
|
__exportStar(require("./curve/CurveCurveIntersectXYZ"), exports);
|
|
208
209
|
__exportStar(require("./curve/CurveLocationDetail"), exports);
|
|
209
210
|
__exportStar(require("./curve/CurveFactory"), exports);
|
|
211
|
+
__exportStar(require("./curve/CurveOps"), exports);
|
|
210
212
|
__exportStar(require("./curve/CurvePrimitive"), exports);
|
|
211
213
|
__exportStar(require("./curve/CurveProcessor"), exports);
|
|
212
214
|
__exportStar(require("./curve/GeometryQuery"), exports);
|
|
213
215
|
__exportStar(require("./curve/LineSegment3d"), exports);
|
|
214
216
|
__exportStar(require("./curve/LineString3d"), exports);
|
|
215
217
|
__exportStar(require("./curve/Loop"), exports);
|
|
218
|
+
__exportStar(require("./curve/OffsetOptions"), exports);
|
|
216
219
|
__exportStar(require("./curve/ParityRegion"), exports);
|
|
217
220
|
__exportStar(require("./curve/Path"), exports);
|
|
218
221
|
__exportStar(require("./curve/RegionMomentsXY"), exports);
|
|
219
222
|
__exportStar(require("./curve/RegionOps"), exports);
|
|
220
|
-
__exportStar(require("./curve/internalContexts/PolygonOffsetContext"), exports);
|
|
221
223
|
__exportStar(require("./curve/PointString3d"), exports);
|
|
222
224
|
__exportStar(require("./curve/ProxyCurve"), exports);
|
|
223
225
|
__exportStar(require("./curve/StrokeOptions"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-geometry.js","sourceRoot":"","sources":["../../src/core-geometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F;;GAEG;AAEH,UAAU;AACV,+GAA+G;AAC/G,wDAAwD;AACxD,+FAA+F;AAC/F,6HAA6H;AAC7H,kEAAkE;AAElE;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,4CAA4C;AAC5C;;;;;;;;;GASG;AACH,8CAA8C;AAE9C;;;;;;;;GAQG;AACH,kCAAkC;AAElC;;;;;;;;;;;;GAYG;AACH,gCAAgC;AAChC;;;GAGG;AACH,mCAAmC;AACnC;;;GAGG;AACH,mCAAmC;AACnC;;;;GAIG;AACH,wCAAwC;AACxC;;;;;;;;;;GAUG;AACH,gCAAgC;AAChC;;;GAGG;AACH,mCAAmC;AACnC;;;GAGG;AACH,qDAAmC;AACnC,0DAAwC;AACxC,yEAAuD;AACvD,mEAAiD;AACjD,6DAA2C;AAC3C,yDAAuC;AACvC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAClD,oEAAkD;AAClD,+DAA6C;AAC7C,gEAA8C;AAC9C,yEAAuD;AACvD,mEAAiD;AACjD,oEAAkD;AAClD,wDAAsC;AACtC,qEAAmD;AACnD,uDAAqC;AACrC,4EAA0D;AAC1D,yEAAuD;AACvD,mEAAiD;AACjD,+DAA6C;AAC7C,+DAA6C;AAC7C,4DAA0C;AAC1C,mEAAiD;AACjD,2DAAyC;AACzC,0DAAwC;AACxC,qDAAmC;AACnC,qDAAmC;AACnC,yDAAuC;AACvC,yDAAuC;AACvC,4DAA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yC;AACzC,sDAAoC;AACpC,iEAA+C;AAC/C,oEAAkD;AAClD,6DAA2C;AAC3C,0DAAwC;AACxC,2DAAyC;AACzC,0DAAwC;AACxC,+DAA6C;AAC7C,mDAAiC;AACjC,2DAAyC;AACzC,gEAA8C;AAC9C,mEAAiD;AACjD,8DAA4C;AAC5C,kEAAgD;AAChD,uFAAsF;AAA7E,sIAAA,yBAAyB,OAAA","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 Utility\r\n */\r\n\r\n// REMARK:\r\n// The docs-group-description comments are followed by empty classes with names corresponding to the doc-group.\r\n// Normally (in committed code) these are commented out.\r\n// The comments have distinctive strings so that simple search and replace can make the \"real\".\r\n// This is useful when working on the documentation: When the empty classes are present, VSCode will format the doc comments\r\n// for and display them when the mouse hovers over the class name.\r\n\r\n/**\r\n * @docs-package-description\r\n * The core-geometry package contains classes for working with geometry: points, vectors, curves, surfaces, and analytic solids\r\n */\r\n/**\r\n * @docs-group-description CartesianGeometry\r\n * Points, Vectors, Planes, and Transformations for x,y,z geometry.\r\n * * Fundamental cartesian geometry objects:\r\n * * Point2d, Point3d -- points with x,y,z coordinates\r\n * * Vector2d, Vector3d -- vectors with x,y,z coordinates\r\n * * Matrix3d -- 3x3 matrix\r\n * * * commonly used for pure rotations\r\n * * * scale and skew entries are also allowed.\r\n * * Transform -- an origin and axes.\r\n * * Range1d, Range2d, Range3d -- subsets of 1d, 2d, and 3d space bounded by low and high values.\r\n * * Ray3d -- a ray defined by origin and direction vector\r\n * * Plane3d -- an abstract base class extended by Plane3dByOriginAndNormal, Plane3dByOriginAndUnitNormal, Point4d, and ClipPlane\r\n * * Plane3dByOriginAndUnitNormal -- a plane defined by an origin and a single vector which is perpendicular to the plane\r\n * * plane3dByOriginAndVectors -- a plane defined by an origin and two vectors in the plane.\r\n * * Angles\r\n * * Angle -- a strongly typed angle object whose method names make it clear whether input and outputs are degrees or radians.\r\n * * AngleSweep -- an angular interval\r\n * * LatitudeLongitudeNumber -- carrier for position and altitude on sphere or ellipsoid\r\n * * YawPitchAndRollAngles -- 3 angles that define a rotated coordinate system.\r\n * * Utility classes\r\n * * FrameBuilder -- construction of coordinate frames from mixed data sources.\r\n * * ClipPlane -- a single plane\r\n * * ConvexClipPlaneSet -- an array of planes bounding a convex volume\r\n * * ClipPlaneSet -- an array of ConvexClipPlaneSet, defining the union of their volumes\r\n * * BilinearPatch -- twisted quadrilateral defined by 4 points\r\n * * BarycentricTriangle -- triangle defined by 3 points.\r\n * * Constant -- various numeric values exported as readonly constants\r\n */\r\n// doc:export class CartesianGeometryDoc { }\r\n/**\r\n * @docs-group-description ArraysAndInterfaces\r\n * These classes support array operations and inheritance-based algorithms.\r\n * * Arrays\r\n * * GrowableArray -- A carrier for a Float64Array, with methods that hide reallocation of the underlying array as contents are added.\r\n * * Point2dArray, Point3dArray, Point4dArray, Vector3dArray -- miscellaneous operations on arrays of 2d and 3d points.\r\n * * Interfaces\r\n * * GeometryHandler -- a double-dispatch protocol used for efficient implementation of algorithms that work on many geometry types.\r\n *\r\n */\r\n// doc:export class ArraysAndInterfacesDoc { }\r\n\r\n/**\r\n * @docs-group-description Bspline\r\n * A bspline curve or surface is used for curved freeform geometry defined by controls points (sometimes called poles).\r\n * * BSplineCurve -- a curve defined by control points (which are not on the curve)\r\n * * InterpolationCurve -- a curve defined by passthrough points, with \"good\" visual properties\r\n * * BSplineSurfaceXYZ -- a surface with XYZ\r\n * * BsplineSurfaceXYZW -- a surface with weighted (rational) XYZ coordinates\r\n * * KnotVector -- vector of breakpoints in bspline definitions.\r\n */\r\n// doc:export class BsplineDoc { }\r\n\r\n/**\r\n * @docs-group-description Curve\r\n * Curves in the GeometryQuery hierarchy: LineSegment3d, LineString3d, Arc3d, TransitionSpiral3d\r\n * * CurvePrimitive -- base class for parametric curves\r\n * * LineSegment3d -- a (bounded) portion of an unbounded line\r\n * * Arc3d -- a circular or elliptic arc\r\n * * LineString3d -- a sequence of points joined by line segments\r\n * * TransitionSpiral -- controlled transition between curvatures\r\n * * Support classes\r\n * * PointString3d -- a sequence of isolated points\r\n * * StrokeOptions -- tolerances to describe stroking accuracy\r\n * * RecursiveCurveProcessor, RecursiveCurveProcessorWithStack -- algorithmic support for trees with CurvePrimitives at the leaf level.\r\n */\r\n// doc:export class CurveDoc { }\r\n/**\r\n * @docs-group-description Numerics\r\n * The Numerics classes have geometric and numeric methods used during large algorithms in other classes.\r\n */\r\n// doc:export class NumericsDoc { }\r\n/**\r\n * @docs-group-description Polyface\r\n * A Polyface is a mesh structure with arrays of points that are shared among multiple incident facets.\r\n */\r\n// doc:export class PolyfaceDoc { }\r\n/**\r\n * @docs-group-description Serialization\r\n * These classes are related to serialization of geometry classes.\r\n * * IModelJson.Reader, IModelJson.Writer -- Conversion of in-memory geometry objects to json objects for persistence and transmission.\r\n */\r\n// doc:export class SerializationDoc { }\r\n/**\r\n * @docs-group-description Solid\r\n * Analytic Solids in the GeometryQuery hierarchy: Box, Sphere, Cone, TorusPipe, LinearSweep, RotationalSweep, RuledSweep\r\n * * Box -- a box solid. This is usually rectangular on all faces, but can in one directly like a view frustum\r\n * * Sphere -- a sphere\r\n * * Cone -- a cone or cylinder\r\n * * TorusPipe -- a pipe elbow\r\n * * LinearSweep -- a linear sweep of a base contour\r\n * * RotationalSweep -- a rotational sweep of a base contour\r\n * * RuledSweep -- two or more similarly structured contours joined by linear rule lines.\r\n */\r\n// doc:export class SolidDOc { }\r\n/**\r\n * @docs-group-description Topology\r\n * The Topology classes provide adjacency structures used in triangulations.\r\n */\r\n// doc:export class TopologyDoc { }\r\n/**\r\n * @docs-group-description RangeSearch\r\n * Support classes for searching collections of ranges.\r\n */\r\nexport * from \"./geometry3d/Angle\";\r\nexport * from \"./geometry3d/AngleSweep\";\r\nexport * from \"./geometry3d/LongitudeLatitudeAltitude\";\r\nexport * from \"./geometry3d/BarycentricTriangle\";\r\nexport * from \"./geometry3d/BilinearPatch\";\r\nexport * from \"./geometry3d/Ellipsoid\";\r\nexport * from \"./geometry3d/FrameBuilder\";\r\nexport * from \"./geometry3d/FrustumAnimation\";\r\nexport * from \"./geometry3d/GeometryHandler\";\r\nexport * from \"./geometry3d/GrowableBlockedArray\";\r\nexport * from \"./geometry3d/GrowableFloat64Array\";\r\nexport * from \"./geometry3d/GrowableXYArray\";\r\nexport * from \"./geometry3d/GrowableXYZArray\";\r\nexport * from \"./geometry3d/IndexedCollectionInterval\";\r\nexport * from \"./geometry3d/IndexedXYCollection\";\r\nexport * from \"./geometry3d/IndexedXYZCollection\";\r\nexport * from \"./geometry3d/Matrix3d\";\r\nexport * from \"./geometry3d/OrderedRotationAngles\";\r\nexport * from \"./geometry3d/Plane3d\";\r\nexport * from \"./geometry3d/Plane3dByOriginAndUnitNormal\";\r\nexport * from \"./geometry3d/Plane3dByOriginAndVectors\";\r\nexport * from \"./geometry3d/Point2dArrayCarrier\";\r\nexport * from \"./geometry3d/Point2dVector2d\";\r\nexport * from \"./geometry3d/Point3dVector3d\";\r\nexport * from \"./geometry3d/PointHelpers\";\r\nexport * from \"./geometry3d/Point3dArrayCarrier\";\r\nexport * from \"./geometry3d/PolylineOps\";\r\nexport * from \"./geometry3d/PolygonOps\";\r\nexport * from \"./geometry3d/Range\";\r\nexport * from \"./geometry3d/Ray3d\";\r\nexport * from \"./geometry3d/Segment1d\";\r\nexport * from \"./geometry3d/Transform\";\r\nexport * from \"./geometry3d/UVSurfaceOps\";\r\nexport * from \"./geometry3d/XYZProps\";\r\nexport * from \"./geometry3d/YawPitchRollAngles\";\r\n\r\nexport * from \"./Geometry\";\r\nexport * from \"./Constant\";\r\nexport * from \"./clipping/BooleanClipFactory\";\r\nexport * from \"./clipping/ClipPlane\";\r\nexport * from \"./clipping/ConvexClipPlaneSet\";\r\nexport * from \"./clipping/UnionOfConvexClipPlaneSets\";\r\nexport * from \"./clipping/ClipPrimitive\";\r\nexport * from \"./clipping/ClipVector\";\r\nexport * from \"./clipping/ClipUtils\";\r\nexport * from \"./numerics/ConvexPolygon2d\";\r\nexport * from \"./geometry4d/PlaneByOriginAndVectors4d\";\r\nexport * from \"./geometry4d/Point4d\";\r\nexport * from \"./geometry4d/Matrix4d\";\r\nexport * from \"./geometry4d/Map4d\";\r\nexport * from \"./geometry4d/MomentData\";\r\nexport * from \"./numerics/BezierPolynomials\";\r\nexport * from \"./numerics/ClusterableArray\";\r\nexport * from \"./numerics/Newton\";\r\nexport * from \"./numerics/Complex\";\r\nexport * from \"./numerics/ConvexPolygon2d\";\r\nexport * from \"./numerics/Newton\";\r\nexport * from \"./numerics/PascalCoefficients\";\r\nexport * from \"./numerics/Polynomials\";\r\nexport * from \"./numerics/Quadrature\";\r\nexport * from \"./numerics/Range1dArray\";\r\nexport * from \"./numerics/TriDiagonalSystem\";\r\n\r\nexport * from \"./curve/Arc3d\";\r\nexport * from \"./curve/ConstructCurveBetweenCurves\";\r\nexport * from \"./curve/CoordinateXYZ\";\r\nexport * from \"./curve/CurveChain\";\r\nexport * from \"./curve/CurveChainWithDistanceIndex\";\r\nexport * from \"./curve/CurveExtendMode\";\r\nexport * from \"./curve/CurveCollection\";\r\nexport * from \"./curve/CurveCurve\";\r\nexport * from \"./curve/CurveCurveIntersectXY\";\r\nexport * from \"./curve/CurveCurveIntersectXYZ\";\r\nexport * from \"./curve/CurveLocationDetail\";\r\nexport * from \"./curve/CurveFactory\";\r\nexport * from \"./curve/CurvePrimitive\";\r\nexport * from \"./curve/CurveProcessor\";\r\nexport * from \"./curve/GeometryQuery\";\r\nexport * from \"./curve/LineSegment3d\";\r\nexport * from \"./curve/LineString3d\";\r\nexport * from \"./curve/Loop\";\r\nexport * from \"./curve/ParityRegion\";\r\nexport * from \"./curve/Path\";\r\nexport * from \"./curve/RegionMomentsXY\";\r\nexport * from \"./curve/RegionOps\";\r\nexport * from \"./curve/internalContexts/PolygonOffsetContext\";\r\nexport * from \"./curve/PointString3d\";\r\nexport * from \"./curve/ProxyCurve\";\r\nexport * from \"./curve/StrokeOptions\";\r\nexport * from \"./curve/spiral/TransitionSpiral3d\";\r\nexport * from \"./curve/spiral/IntegratedSpiral3d\";\r\nexport * from \"./curve/spiral/DirectSpiral3d\";\r\nexport * from \"./curve/UnionRegion\";\r\nexport * from \"./curve/Query/StrokeCountMap\";\r\nexport * from \"./solid/Box\";\r\nexport * from \"./solid/Cone\";\r\nexport * from \"./solid/LinearSweep\";\r\nexport * from \"./solid/RotationalSweep\";\r\nexport * from \"./solid/RuledSweep\";\r\nexport * from \"./solid/SolidPrimitive\";\r\nexport * from \"./solid/Sphere\";\r\nexport * from \"./solid/SweepContour\";\r\nexport * from \"./solid/TorusPipe\";\r\nexport * from \"./bspline/AkimaCurve3d\";\r\nexport * from \"./bspline/Bezier1dNd\";\r\nexport * from \"./bspline/BezierCurveBase\";\r\nexport * from \"./bspline/BezierCurve3d\";\r\nexport * from \"./bspline/BezierCurve3dH\";\r\nexport * from \"./bspline/BSplineCurve\";\r\nexport * from \"./bspline/BSplineCurveOps\";\r\nexport * from \"./bspline/BSpline1dNd\";\r\nexport * from \"./bspline/BSplineCurve3dH\";\r\nexport * from \"./bspline/BSplineSurface\";\r\nexport * from \"./bspline/InterpolationCurve3d\";\r\nexport * from \"./bspline/KnotVector\";\r\nexport * from \"./polyface/AuxData\";\r\nexport * from \"./polyface/BoxTopology\";\r\nexport * from \"./polyface/FacetFaceData\";\r\nexport * from \"./polyface/Polyface\";\r\nexport * from \"./polyface/FacetLocationDetail\";\r\nexport * from \"./polyface/IndexedPolyfaceVisitor\";\r\nexport * from \"./polyface/PolyfaceBuilder\";\r\nexport * from \"./polyface/PolyfaceData\";\r\nexport * from \"./polyface/PolyfaceQuery\";\r\nexport * from \"./polyface/PolyfaceClip\";\r\nexport * from \"./polyface/TaggedNumericData\";\r\nexport * from \"./topology/Graph\";\r\nexport * from \"./topology/Triangulation\";\r\nexport * from \"./topology/SpaceTriangulation\";\r\nexport * from \"./serialization/IModelJsonSchema\";\r\nexport * from \"./serialization/DeepCompare\";\r\nexport * from \"./serialization/GeometrySamples\";\r\nexport { BentleyGeometryFlatBuffer } from \"./serialization/BentleyGeometryFlatBuffer\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"core-geometry.js","sourceRoot":"","sources":["../../src/core-geometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F;;GAEG;AAEH,UAAU;AACV,+GAA+G;AAC/G,wDAAwD;AACxD,+FAA+F;AAC/F,6HAA6H;AAC7H,kEAAkE;AAElE;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,4CAA4C;AAC5C;;;;;;;;;GASG;AACH,8CAA8C;AAE9C;;;;;;;;GAQG;AACH,kCAAkC;AAElC;;;;;;;;;;;;GAYG;AACH,gCAAgC;AAChC;;;GAGG;AACH,mCAAmC;AACnC;;;GAGG;AACH,mCAAmC;AACnC;;;;GAIG;AACH,wCAAwC;AACxC;;;;;;;;;;GAUG;AACH,gCAAgC;AAChC;;;GAGG;AACH,mCAAmC;AACnC;;;GAGG;AACH,qDAAmC;AACnC,0DAAwC;AACxC,yEAAuD;AACvD,mEAAiD;AACjD,6DAA2C;AAC3C,yDAAuC;AACvC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,oEAAkD;AAClD,oEAAkD;AAClD,+DAA6C;AAC7C,gEAA8C;AAC9C,yEAAuD;AACvD,mEAAiD;AACjD,oEAAkD;AAClD,wDAAsC;AACtC,qEAAmD;AACnD,uDAAqC;AACrC,4EAA0D;AAC1D,yEAAuD;AACvD,mEAAiD;AACjD,+DAA6C;AAC7C,+DAA6C;AAC7C,4DAA0C;AAC1C,mEAAiD;AACjD,2DAAyC;AACzC,0DAAwC;AACxC,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AACnC,yDAAuC;AACvC,yDAAuC;AACvC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yDAAuC;AACvC,2DAAyC;AACzC,sDAAoC;AACpC,iEAA+C;AAC/C,oEAAkD;AAClD,6DAA2C;AAC3C,0DAAwC;AACxC,2DAAyC;AACzC,0DAAwC;AACxC,+DAA6C;AAC7C,mDAAiC;AACjC,2DAAyC;AACzC,gEAA8C;AAC9C,mEAAiD;AACjD,8DAA4C;AAC5C,kEAAgD;AAChD,uFAAsF;AAA7E,sIAAA,yBAAyB,OAAA","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 Utility\r\n */\r\n\r\n// REMARK:\r\n// The docs-group-description comments are followed by empty classes with names corresponding to the doc-group.\r\n// Normally (in committed code) these are commented out.\r\n// The comments have distinctive strings so that simple search and replace can make the \"real\".\r\n// This is useful when working on the documentation: When the empty classes are present, VSCode will format the doc comments\r\n// for and display them when the mouse hovers over the class name.\r\n\r\n/**\r\n * @docs-package-description\r\n * The core-geometry package contains classes for working with geometry: points, vectors, curves, surfaces, and analytic solids\r\n */\r\n/**\r\n * @docs-group-description CartesianGeometry\r\n * Points, Vectors, Planes, and Transformations for x,y,z geometry.\r\n * * Fundamental cartesian geometry objects:\r\n * * Point2d, Point3d -- points with x,y,z coordinates\r\n * * Vector2d, Vector3d -- vectors with x,y,z coordinates\r\n * * Matrix3d -- 3x3 matrix\r\n * * * commonly used for pure rotations\r\n * * * scale and skew entries are also allowed.\r\n * * Transform -- an origin and axes.\r\n * * Range1d, Range2d, Range3d -- subsets of 1d, 2d, and 3d space bounded by low and high values.\r\n * * Ray3d -- a ray defined by origin and direction vector\r\n * * Plane3d -- an abstract base class extended by Plane3dByOriginAndNormal, Plane3dByOriginAndUnitNormal, Point4d, and ClipPlane\r\n * * Plane3dByOriginAndUnitNormal -- a plane defined by an origin and a single vector which is perpendicular to the plane\r\n * * plane3dByOriginAndVectors -- a plane defined by an origin and two vectors in the plane.\r\n * * Angles\r\n * * Angle -- a strongly typed angle object whose method names make it clear whether input and outputs are degrees or radians.\r\n * * AngleSweep -- an angular interval\r\n * * LatitudeLongitudeNumber -- carrier for position and altitude on sphere or ellipsoid\r\n * * YawPitchAndRollAngles -- 3 angles that define a rotated coordinate system.\r\n * * Utility classes\r\n * * FrameBuilder -- construction of coordinate frames from mixed data sources.\r\n * * ClipPlane -- a single plane\r\n * * ConvexClipPlaneSet -- an array of planes bounding a convex volume\r\n * * ClipPlaneSet -- an array of ConvexClipPlaneSet, defining the union of their volumes\r\n * * BilinearPatch -- twisted quadrilateral defined by 4 points\r\n * * BarycentricTriangle -- triangle defined by 3 points.\r\n * * Constant -- various numeric values exported as readonly constants\r\n */\r\n// doc:export class CartesianGeometryDoc { }\r\n/**\r\n * @docs-group-description ArraysAndInterfaces\r\n * These classes support array operations and inheritance-based algorithms.\r\n * * Arrays\r\n * * GrowableArray -- A carrier for a Float64Array, with methods that hide reallocation of the underlying array as contents are added.\r\n * * Point2dArray, Point3dArray, Point4dArray, Vector3dArray -- miscellaneous operations on arrays of 2d and 3d points.\r\n * * Interfaces\r\n * * GeometryHandler -- a double-dispatch protocol used for efficient implementation of algorithms that work on many geometry types.\r\n *\r\n */\r\n// doc:export class ArraysAndInterfacesDoc { }\r\n\r\n/**\r\n * @docs-group-description Bspline\r\n * A bspline curve or surface is used for curved freeform geometry defined by controls points (sometimes called poles).\r\n * * BSplineCurve -- a curve defined by control points (which are not on the curve)\r\n * * InterpolationCurve -- a curve defined by passthrough points, with \"good\" visual properties\r\n * * BSplineSurfaceXYZ -- a surface with XYZ\r\n * * BsplineSurfaceXYZW -- a surface with weighted (rational) XYZ coordinates\r\n * * KnotVector -- vector of breakpoints in bspline definitions.\r\n */\r\n// doc:export class BsplineDoc { }\r\n\r\n/**\r\n * @docs-group-description Curve\r\n * Curves in the GeometryQuery hierarchy: LineSegment3d, LineString3d, Arc3d, TransitionSpiral3d\r\n * * CurvePrimitive -- base class for parametric curves\r\n * * LineSegment3d -- a (bounded) portion of an unbounded line\r\n * * Arc3d -- a circular or elliptic arc\r\n * * LineString3d -- a sequence of points joined by line segments\r\n * * TransitionSpiral -- controlled transition between curvatures\r\n * * Support classes\r\n * * PointString3d -- a sequence of isolated points\r\n * * StrokeOptions -- tolerances to describe stroking accuracy\r\n * * RecursiveCurveProcessor, RecursiveCurveProcessorWithStack -- algorithmic support for trees with CurvePrimitives at the leaf level.\r\n */\r\n// doc:export class CurveDoc { }\r\n/**\r\n * @docs-group-description Numerics\r\n * The Numerics classes have geometric and numeric methods used during large algorithms in other classes.\r\n */\r\n// doc:export class NumericsDoc { }\r\n/**\r\n * @docs-group-description Polyface\r\n * A Polyface is a mesh structure with arrays of points that are shared among multiple incident facets.\r\n */\r\n// doc:export class PolyfaceDoc { }\r\n/**\r\n * @docs-group-description Serialization\r\n * These classes are related to serialization of geometry classes.\r\n * * IModelJson.Reader, IModelJson.Writer -- Conversion of in-memory geometry objects to json objects for persistence and transmission.\r\n */\r\n// doc:export class SerializationDoc { }\r\n/**\r\n * @docs-group-description Solid\r\n * Analytic Solids in the GeometryQuery hierarchy: Box, Sphere, Cone, TorusPipe, LinearSweep, RotationalSweep, RuledSweep\r\n * * Box -- a box solid. This is usually rectangular on all faces, but can in one directly like a view frustum\r\n * * Sphere -- a sphere\r\n * * Cone -- a cone or cylinder\r\n * * TorusPipe -- a pipe elbow\r\n * * LinearSweep -- a linear sweep of a base contour\r\n * * RotationalSweep -- a rotational sweep of a base contour\r\n * * RuledSweep -- two or more similarly structured contours joined by linear rule lines.\r\n */\r\n// doc:export class SolidDOc { }\r\n/**\r\n * @docs-group-description Topology\r\n * The Topology classes provide adjacency structures used in triangulations.\r\n */\r\n// doc:export class TopologyDoc { }\r\n/**\r\n * @docs-group-description RangeSearch\r\n * Support classes for searching collections of ranges.\r\n */\r\nexport * from \"./geometry3d/Angle\";\r\nexport * from \"./geometry3d/AngleSweep\";\r\nexport * from \"./geometry3d/LongitudeLatitudeAltitude\";\r\nexport * from \"./geometry3d/BarycentricTriangle\";\r\nexport * from \"./geometry3d/BilinearPatch\";\r\nexport * from \"./geometry3d/Ellipsoid\";\r\nexport * from \"./geometry3d/FrameBuilder\";\r\nexport * from \"./geometry3d/FrustumAnimation\";\r\nexport * from \"./geometry3d/GeometryHandler\";\r\nexport * from \"./geometry3d/GrowableBlockedArray\";\r\nexport * from \"./geometry3d/GrowableFloat64Array\";\r\nexport * from \"./geometry3d/GrowableXYArray\";\r\nexport * from \"./geometry3d/GrowableXYZArray\";\r\nexport * from \"./geometry3d/IndexedCollectionInterval\";\r\nexport * from \"./geometry3d/IndexedXYCollection\";\r\nexport * from \"./geometry3d/IndexedXYZCollection\";\r\nexport * from \"./geometry3d/Matrix3d\";\r\nexport * from \"./geometry3d/OrderedRotationAngles\";\r\nexport * from \"./geometry3d/Plane3d\";\r\nexport * from \"./geometry3d/Plane3dByOriginAndUnitNormal\";\r\nexport * from \"./geometry3d/Plane3dByOriginAndVectors\";\r\nexport * from \"./geometry3d/Point2dArrayCarrier\";\r\nexport * from \"./geometry3d/Point2dVector2d\";\r\nexport * from \"./geometry3d/Point3dVector3d\";\r\nexport * from \"./geometry3d/PointHelpers\";\r\nexport * from \"./geometry3d/Point3dArrayCarrier\";\r\nexport * from \"./geometry3d/PolylineOps\";\r\nexport * from \"./geometry3d/PolygonOps\";\r\nexport * from \"./geometry3d/Range\";\r\nexport * from \"./geometry3d/Ray2d\";\r\nexport * from \"./geometry3d/Ray3d\";\r\nexport * from \"./geometry3d/Segment1d\";\r\nexport * from \"./geometry3d/Transform\";\r\nexport * from \"./geometry3d/UVSurfaceOps\";\r\nexport * from \"./geometry3d/XYZProps\";\r\nexport * from \"./geometry3d/YawPitchRollAngles\";\r\n\r\nexport * from \"./Geometry\";\r\nexport * from \"./Constant\";\r\nexport * from \"./clipping/BooleanClipFactory\";\r\nexport * from \"./clipping/ClipPlane\";\r\nexport * from \"./clipping/ConvexClipPlaneSet\";\r\nexport * from \"./clipping/UnionOfConvexClipPlaneSets\";\r\nexport * from \"./clipping/ClipPrimitive\";\r\nexport * from \"./clipping/ClipVector\";\r\nexport * from \"./clipping/ClipUtils\";\r\nexport * from \"./numerics/ConvexPolygon2d\";\r\nexport * from \"./geometry4d/PlaneByOriginAndVectors4d\";\r\nexport * from \"./geometry4d/Point4d\";\r\nexport * from \"./geometry4d/Matrix4d\";\r\nexport * from \"./geometry4d/Map4d\";\r\nexport * from \"./geometry4d/MomentData\";\r\nexport * from \"./numerics/BezierPolynomials\";\r\nexport * from \"./numerics/ClusterableArray\";\r\nexport * from \"./numerics/Newton\";\r\nexport * from \"./numerics/Complex\";\r\nexport * from \"./numerics/ConvexPolygon2d\";\r\nexport * from \"./numerics/Newton\";\r\nexport * from \"./numerics/PascalCoefficients\";\r\nexport * from \"./numerics/Polynomials\";\r\nexport * from \"./numerics/Quadrature\";\r\nexport * from \"./numerics/Range1dArray\";\r\nexport * from \"./numerics/TriDiagonalSystem\";\r\n\r\nexport * from \"./curve/Arc3d\";\r\nexport * from \"./curve/ConstructCurveBetweenCurves\";\r\nexport * from \"./curve/CoordinateXYZ\";\r\nexport * from \"./curve/CurveChain\";\r\nexport * from \"./curve/CurveChainWithDistanceIndex\";\r\nexport * from \"./curve/CurveExtendMode\";\r\nexport * from \"./curve/CurveCollection\";\r\nexport * from \"./curve/CurveCurve\";\r\nexport * from \"./curve/CurveCurveIntersectXY\";\r\nexport * from \"./curve/CurveCurveIntersectXYZ\";\r\nexport * from \"./curve/CurveLocationDetail\";\r\nexport * from \"./curve/CurveFactory\";\r\nexport * from \"./curve/CurveOps\";\r\nexport * from \"./curve/CurvePrimitive\";\r\nexport * from \"./curve/CurveProcessor\";\r\nexport * from \"./curve/GeometryQuery\";\r\nexport * from \"./curve/LineSegment3d\";\r\nexport * from \"./curve/LineString3d\";\r\nexport * from \"./curve/Loop\";\r\nexport * from \"./curve/OffsetOptions\";\r\nexport * from \"./curve/ParityRegion\";\r\nexport * from \"./curve/Path\";\r\nexport * from \"./curve/RegionMomentsXY\";\r\nexport * from \"./curve/RegionOps\";\r\nexport * from \"./curve/PointString3d\";\r\nexport * from \"./curve/ProxyCurve\";\r\nexport * from \"./curve/StrokeOptions\";\r\nexport * from \"./curve/spiral/TransitionSpiral3d\";\r\nexport * from \"./curve/spiral/IntegratedSpiral3d\";\r\nexport * from \"./curve/spiral/DirectSpiral3d\";\r\nexport * from \"./curve/UnionRegion\";\r\nexport * from \"./curve/Query/StrokeCountMap\";\r\nexport * from \"./solid/Box\";\r\nexport * from \"./solid/Cone\";\r\nexport * from \"./solid/LinearSweep\";\r\nexport * from \"./solid/RotationalSweep\";\r\nexport * from \"./solid/RuledSweep\";\r\nexport * from \"./solid/SolidPrimitive\";\r\nexport * from \"./solid/Sphere\";\r\nexport * from \"./solid/SweepContour\";\r\nexport * from \"./solid/TorusPipe\";\r\nexport * from \"./bspline/AkimaCurve3d\";\r\nexport * from \"./bspline/Bezier1dNd\";\r\nexport * from \"./bspline/BezierCurveBase\";\r\nexport * from \"./bspline/BezierCurve3d\";\r\nexport * from \"./bspline/BezierCurve3dH\";\r\nexport * from \"./bspline/BSplineCurve\";\r\nexport * from \"./bspline/BSplineCurveOps\";\r\nexport * from \"./bspline/BSpline1dNd\";\r\nexport * from \"./bspline/BSplineCurve3dH\";\r\nexport * from \"./bspline/BSplineSurface\";\r\nexport * from \"./bspline/InterpolationCurve3d\";\r\nexport * from \"./bspline/KnotVector\";\r\nexport * from \"./polyface/AuxData\";\r\nexport * from \"./polyface/BoxTopology\";\r\nexport * from \"./polyface/FacetFaceData\";\r\nexport * from \"./polyface/Polyface\";\r\nexport * from \"./polyface/FacetLocationDetail\";\r\nexport * from \"./polyface/IndexedPolyfaceVisitor\";\r\nexport * from \"./polyface/PolyfaceBuilder\";\r\nexport * from \"./polyface/PolyfaceData\";\r\nexport * from \"./polyface/PolyfaceQuery\";\r\nexport * from \"./polyface/PolyfaceClip\";\r\nexport * from \"./polyface/TaggedNumericData\";\r\nexport * from \"./topology/Graph\";\r\nexport * from \"./topology/Triangulation\";\r\nexport * from \"./topology/SpaceTriangulation\";\r\nexport * from \"./serialization/IModelJsonSchema\";\r\nexport * from \"./serialization/DeepCompare\";\r\nexport * from \"./serialization/GeometrySamples\";\r\nexport { BentleyGeometryFlatBuffer } from \"./serialization/BentleyGeometryFlatBuffer\";\r\n"]}
|