@itwin/core-geometry 4.1.0-dev.8 → 4.1.0-dev.80
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/Constant.js.map +1 -1
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.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/BSplineCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.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/Bezier1dNd.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.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/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/bspline/SurfaceLocationDetail.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 +5 -1
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +5 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.d.ts +4 -3
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +7 -5
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChain.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 +6 -2
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +13 -9
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +74 -68
- package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js +100 -108
- package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +46 -48
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js +72 -61
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +32 -38
- package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js +86 -97
- package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.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 +26 -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/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.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/PointString3d.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/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.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/internalContexts/AppendPlaneIntersectionStrokeHandler.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/CloneCurvesContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- 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/NewtonRtoRStrokeHandler.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/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.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/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.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/CoincidentGeometryOps.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/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.d.ts +103 -97
- package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js +247 -124
- 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/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.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/Point2dArrayCarrier.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/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +6 -2
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +31 -22
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.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/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.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/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BandedSystem.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Complex.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/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.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/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/cjs/numerics/UnionFind.js.map +1 -1
- package/lib/cjs/numerics/UsageSums.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.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/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +93 -14
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +173 -34
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.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/TriangleCandidate.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/GriddedRaggedRange2dSet.d.ts +27 -19
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts +15 -12
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +104 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.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/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.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/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.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/solid/TorusPipe.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/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.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/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.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/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/Merging.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/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.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/BSplineCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.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/Bezier1dNd.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.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/bspline/KnotVector.js.map +1 -1
- package/lib/esm/bspline/SurfaceLocationDetail.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 +5 -1
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +5 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +4 -3
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +6 -4
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChain.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 +6 -2
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +13 -9
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +74 -68
- package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveCloseApproachXY.js +100 -108
- package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts +46 -48
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js +72 -61
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +32 -38
- package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXYZ.js +86 -97
- package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.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 +26 -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/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.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/PointString3d.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/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.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/internalContexts/AppendPlaneIntersectionStrokeHandler.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/CloneCurvesContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- 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/NewtonRtoRStrokeHandler.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/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.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/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.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/CoincidentGeometryOps.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/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.d.ts +103 -97
- package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js +247 -124
- 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/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/LongitudeLatitudeAltitude.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/Point2dArrayCarrier.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/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +6 -2
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +31 -22
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.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/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.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/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BandedSystem.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Complex.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/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.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/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/esm/numerics/UnionFind.js.map +1 -1
- package/lib/esm/numerics/UsageSums.js.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.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/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +93 -14
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +173 -35
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.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/TriangleCandidate.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/GriddedRaggedRange2dSet.d.ts +27 -19
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts +15 -12
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +102 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.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/Box.js.map +1 -1
- package/lib/esm/solid/Cone.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/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.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/solid/TorusPipe.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/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.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/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.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/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/Merging.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/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.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
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
import { Clipper } from "./ClipUtils";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A BooleanClipFactory is a factory to create objects that implement interior nodes of a tree of boolean clip operations.
|
|
3
4
|
* * These methods create specific clip tree types:
|
|
4
5
|
* * Union
|
|
5
6
|
* * Intersection
|
|
6
7
|
* * Parity
|
|
7
8
|
* * Difference
|
|
8
|
-
* * Each construction has a `keepInside` flag that optionally negates the initial result of the parity, intersection,
|
|
9
|
-
*
|
|
10
|
-
* * if `keepInside ===
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* * Each construction has a `keepInside` flag that optionally negates the initial result of the parity, intersection,
|
|
10
|
+
* parity, or difference:
|
|
11
|
+
* * if `keepInside === true`, accept the "inside" of the initial result.
|
|
12
|
+
* * if `keepInside === false`, accept the "outside" of the initial result.
|
|
13
|
+
* * These methods create various other specialized clippers.
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
16
|
export declare class BooleanClipFactory {
|
|
16
17
|
/**
|
|
17
|
-
* Create a boolean clipper which performs a union over its children
|
|
18
|
-
* * if `keepInside === true`, accept the "inside" of the union result
|
|
19
|
-
* * if `keepInside === false`, accept the "outside" of the union result
|
|
20
|
-
* @param clippers clip objects to capture
|
|
18
|
+
* Create a boolean clipper which performs a union over its children.
|
|
19
|
+
* * if `keepInside === true`, accept the "inside" of the union result.
|
|
20
|
+
* * if `keepInside === false`, accept the "outside" of the union result.
|
|
21
|
+
* @param clippers clip objects to capture.
|
|
21
22
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
22
23
|
*/
|
|
23
24
|
static createCaptureUnion(clippers: Clipper | Clipper[], keepInside: boolean): Clipper;
|
|
24
25
|
/**
|
|
25
|
-
* Create a boolean clipper which performs an intersection over its children
|
|
26
|
-
* * if `keepInside === true`, accept the "inside" of the intersection result
|
|
27
|
-
* * if `keepInside === false`, accept the "outside" of the intersection result
|
|
28
|
-
* @param clippers clip objects to capture
|
|
26
|
+
* Create a boolean clipper which performs an intersection over its children.
|
|
27
|
+
* * if `keepInside === true`, accept the "inside" of the intersection result.
|
|
28
|
+
* * if `keepInside === false`, accept the "outside" of the intersection result.
|
|
29
|
+
* @param clippers clip objects to capture.
|
|
29
30
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
30
31
|
*/
|
|
31
32
|
static createCaptureIntersection(clippers: Clipper | Clipper[], keepInside: boolean): Clipper;
|
|
32
33
|
/**
|
|
33
|
-
* Create a boolean clipper which performs a parity over its children
|
|
34
|
-
* * if `keepInside === true`, accept the "inside" of the parity result
|
|
35
|
-
* * if `keepInside === false`, accept the "outside" of the parity result
|
|
36
|
-
* @param clippers clip objects to capture
|
|
34
|
+
* Create a boolean clipper which performs a parity over its children.
|
|
35
|
+
* * if `keepInside === true`, accept the "inside" of the parity result.
|
|
36
|
+
* * if `keepInside === false`, accept the "outside" of the parity result.
|
|
37
|
+
* @param clippers clip objects to capture.
|
|
37
38
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
38
39
|
*/
|
|
39
40
|
static createCaptureParity(clippers: Clipper | Clipper[], keepInside: boolean): Clipper;
|
|
40
41
|
/**
|
|
41
|
-
* Create a boolean clipper which performs a difference operation for points "inside `primaryClipper`" and
|
|
42
|
-
*
|
|
43
|
-
* * if `keepInside ===
|
|
44
|
-
*
|
|
42
|
+
* Create a boolean clipper which performs a difference operation for points "inside `primaryClipper`" and
|
|
43
|
+
* "outside `excludedClipper`".
|
|
44
|
+
* * if `keepInside === true`, accept the "inside" of the difference.
|
|
45
|
+
* * if `keepInside === false`, accept the "outside" of the difference.
|
|
46
|
+
* @param primaryClipper any clip object whose output is treated as positive.
|
|
45
47
|
* @param excludeClip any clipper whose output is treated as negative.
|
|
46
48
|
* @param keepInside flag to select results inside or outside the initial `primary minus excludeClipper` clippers.
|
|
47
49
|
*/
|
|
48
50
|
static createCaptureDifference(primaryClipper: Clipper, excludedClipper: Clipper, keepInside: boolean): Clipper;
|
|
49
51
|
/**
|
|
50
|
-
* Create a boolean clipper which performs the reverse of that of `primaryClipper
|
|
51
|
-
* @param primaryClipper clip objects to capture
|
|
52
|
+
* Create a boolean clipper which performs the reverse of that of `primaryClipper`.
|
|
53
|
+
* @param primaryClipper clip objects to capture.
|
|
52
54
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
53
55
|
*/
|
|
54
56
|
static createCaptureClipOutside(primaryClipper: Clipper): Clipper;
|
|
55
57
|
/**
|
|
56
|
-
*
|
|
58
|
+
* Convert `source` to an array of clipper objects.
|
|
57
59
|
* * ANY TYPE OF Clipper is accepted.
|
|
58
60
|
* * REMARK: This is normally called only from the primary public method `parseToClipper`.
|
|
59
|
-
* @param source
|
|
60
|
-
* @param internal
|
|
61
61
|
*/
|
|
62
62
|
static parseToClipperArray(source: any): Clipper[] | undefined;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Look for content that represents a clipper.
|
|
65
65
|
* * Possible outputs are
|
|
66
66
|
* * `ClipPlane`
|
|
67
67
|
* * `ConvexClipPlaneSet`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanClipFactory.d.ts","sourceRoot":"","sources":["../../../src/clipping/BooleanClipFactory.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AAIrD
|
|
1
|
+
{"version":3,"file":"BooleanClipFactory.d.ts","sourceRoot":"","sources":["../../../src/clipping/BooleanClipFactory.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AAIrD;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAkB;IAC7B;;;;;;OAMG;WACW,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO;IAK7F;;;;;;OAMG;WACW,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO;IAKpG;;;;;;OAMG;WACW,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO;IAK9F;;;;;;;;OAQG;WACW,uBAAuB,CAAC,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO;IAItH;;;;OAIG;WACW,wBAAwB,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO;IAGxE;;;;OAIG;WACW,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,EAAE,GAAG,SAAS;IAoBrE;;;;;;;;;;;;OAYG;WACW,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IA0DlE,0DAA0D;WAC5C,gBAAgB,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS;CAO9D"}
|
|
@@ -13,25 +13,26 @@ const ClipPlane_1 = require("./ClipPlane");
|
|
|
13
13
|
const ClipUtils_1 = require("./ClipUtils");
|
|
14
14
|
const ConvexClipPlaneSet_1 = require("./ConvexClipPlaneSet");
|
|
15
15
|
const UnionOfConvexClipPlaneSets_1 = require("./UnionOfConvexClipPlaneSets");
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* A BooleanClipFactory is a factory to create objects that implement interior nodes of a tree of boolean clip operations.
|
|
17
18
|
* * These methods create specific clip tree types:
|
|
18
19
|
* * Union
|
|
19
20
|
* * Intersection
|
|
20
21
|
* * Parity
|
|
21
22
|
* * Difference
|
|
22
|
-
* * Each construction has a `keepInside` flag that optionally negates the initial result of the parity, intersection,
|
|
23
|
-
*
|
|
24
|
-
* * if `keepInside ===
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* * Each construction has a `keepInside` flag that optionally negates the initial result of the parity, intersection,
|
|
24
|
+
* parity, or difference:
|
|
25
|
+
* * if `keepInside === true`, accept the "inside" of the initial result.
|
|
26
|
+
* * if `keepInside === false`, accept the "outside" of the initial result.
|
|
27
|
+
* * These methods create various other specialized clippers.
|
|
27
28
|
* @public
|
|
28
29
|
*/
|
|
29
30
|
class BooleanClipFactory {
|
|
30
31
|
/**
|
|
31
|
-
* Create a boolean clipper which performs a union over its children
|
|
32
|
-
* * if `keepInside === true`, accept the "inside" of the union result
|
|
33
|
-
* * if `keepInside === false`, accept the "outside" of the union result
|
|
34
|
-
* @param clippers clip objects to capture
|
|
32
|
+
* Create a boolean clipper which performs a union over its children.
|
|
33
|
+
* * if `keepInside === true`, accept the "inside" of the union result.
|
|
34
|
+
* * if `keepInside === false`, accept the "outside" of the union result.
|
|
35
|
+
* @param clippers clip objects to capture.
|
|
35
36
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
36
37
|
*/
|
|
37
38
|
static createCaptureUnion(clippers, keepInside) {
|
|
@@ -40,10 +41,10 @@ class BooleanClipFactory {
|
|
|
40
41
|
return result;
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
|
-
* Create a boolean clipper which performs an intersection over its children
|
|
44
|
-
* * if `keepInside === true`, accept the "inside" of the intersection result
|
|
45
|
-
* * if `keepInside === false`, accept the "outside" of the intersection result
|
|
46
|
-
* @param clippers clip objects to capture
|
|
44
|
+
* Create a boolean clipper which performs an intersection over its children.
|
|
45
|
+
* * if `keepInside === true`, accept the "inside" of the intersection result.
|
|
46
|
+
* * if `keepInside === false`, accept the "outside" of the intersection result.
|
|
47
|
+
* @param clippers clip objects to capture.
|
|
47
48
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
48
49
|
*/
|
|
49
50
|
static createCaptureIntersection(clippers, keepInside) {
|
|
@@ -52,10 +53,10 @@ class BooleanClipFactory {
|
|
|
52
53
|
return result;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
|
-
* Create a boolean clipper which performs a parity over its children
|
|
56
|
-
* * if `keepInside === true`, accept the "inside" of the parity result
|
|
57
|
-
* * if `keepInside === false`, accept the "outside" of the parity result
|
|
58
|
-
* @param clippers clip objects to capture
|
|
56
|
+
* Create a boolean clipper which performs a parity over its children.
|
|
57
|
+
* * if `keepInside === true`, accept the "inside" of the parity result.
|
|
58
|
+
* * if `keepInside === false`, accept the "outside" of the parity result.
|
|
59
|
+
* @param clippers clip objects to capture.
|
|
59
60
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
60
61
|
*/
|
|
61
62
|
static createCaptureParity(clippers, keepInside) {
|
|
@@ -64,10 +65,11 @@ class BooleanClipFactory {
|
|
|
64
65
|
return result;
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
|
-
* Create a boolean clipper which performs a difference operation for points "inside `primaryClipper`" and
|
|
68
|
-
*
|
|
69
|
-
* * if `keepInside ===
|
|
70
|
-
*
|
|
68
|
+
* Create a boolean clipper which performs a difference operation for points "inside `primaryClipper`" and
|
|
69
|
+
* "outside `excludedClipper`".
|
|
70
|
+
* * if `keepInside === true`, accept the "inside" of the difference.
|
|
71
|
+
* * if `keepInside === false`, accept the "outside" of the difference.
|
|
72
|
+
* @param primaryClipper any clip object whose output is treated as positive.
|
|
71
73
|
* @param excludeClip any clipper whose output is treated as negative.
|
|
72
74
|
* @param keepInside flag to select results inside or outside the initial `primary minus excludeClipper` clippers.
|
|
73
75
|
*/
|
|
@@ -76,19 +78,17 @@ class BooleanClipFactory {
|
|
|
76
78
|
return this.createCaptureIntersection([primaryClipper, mask], keepInside);
|
|
77
79
|
}
|
|
78
80
|
/**
|
|
79
|
-
* Create a boolean clipper which performs the reverse of that of `primaryClipper
|
|
80
|
-
* @param primaryClipper clip objects to capture
|
|
81
|
+
* Create a boolean clipper which performs the reverse of that of `primaryClipper`.
|
|
82
|
+
* @param primaryClipper clip objects to capture.
|
|
81
83
|
* @param keepInside flag to select results inside or outside the clippers.
|
|
82
84
|
*/
|
|
83
85
|
static createCaptureClipOutside(primaryClipper) {
|
|
84
86
|
return this.createCaptureUnion([primaryClipper], false);
|
|
85
87
|
}
|
|
86
88
|
/**
|
|
87
|
-
*
|
|
89
|
+
* Convert `source` to an array of clipper objects.
|
|
88
90
|
* * ANY TYPE OF Clipper is accepted.
|
|
89
91
|
* * REMARK: This is normally called only from the primary public method `parseToClipper`.
|
|
90
|
-
* @param source
|
|
91
|
-
* @param internal
|
|
92
92
|
*/
|
|
93
93
|
static parseToClipperArray(source) {
|
|
94
94
|
if (Array.isArray(source)) {
|
|
@@ -112,7 +112,7 @@ class BooleanClipFactory {
|
|
|
112
112
|
return undefined;
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* Look for content that represents a clipper.
|
|
116
116
|
* * Possible outputs are
|
|
117
117
|
* * `ClipPlane`
|
|
118
118
|
* * `ConvexClipPlaneSet`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanClipFactory.js","sourceRoot":"","sources":["../../../src/clipping/BooleanClipFactory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,uDAA6G;AAC7G,2CAAwC;AACxC,2CAAqD;AACrD,6DAA0D;AAC1D,6EAA0E;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAa,kBAAkB;IAC7B;;;;;;OAMG;IACI,MAAM,CAAC,kBAAkB,CAAC,QAA6B,EAAE,UAAmB;QACjF,MAAM,MAAM,GAAG,IAAI,sCAAoB,CAAC,UAAU,CAAC,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,y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,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACnD;aAAM,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;YACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAE,MAAc,CAAC,IAAI,CAAC,CAAC;YAChE,IAAI,QAAQ;gBACV,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACnD;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,0DAA0D;IACnD,MAAM,CAAC,gBAAgB,CAAC,OAAY;QACzC,IAAI,yBAAa,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;YACpC,IAAI,OAAO,CAAC,MAAM;gBAChB,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;SAC3B;QACD,OAAO,SAAS,CAAC;IAEnB,CAAC;CACF;AArKD,gDAqKC","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 CartesianGeometry\r\n */\r\nimport { BooleanClipNodeIntersection, BooleanClipNodeParity, BooleanClipNodeUnion } from \"./BooleanClipNode\";\r\nimport { ClipPlane } from \"./ClipPlane\";\r\nimport { Clipper, ClipUtilities } from \"./ClipUtils\";\r\nimport { ConvexClipPlaneSet } from \"./ConvexClipPlaneSet\";\r\nimport { UnionOfConvexClipPlaneSets } from \"./UnionOfConvexClipPlaneSets\";\r\n\r\n/** A BooleanClipFactory is a factory to create objects that implement interior nodes of a tree of boolean clip operations.\r\n * * These methods create specific clip tree types:\r\n * * Union\r\n * * Intersection\r\n * * Parity\r\n * * Difference\r\n * * Each construction has a `keepInside` flag that optionally negates the initial result of the parity, intersection, parity, or difference:\r\n * * if `keepInside === true`, accept the \"inside\" of the initial result\r\n * * if `keepInside === false`, accept the \"outside\" of the initial result\r\n * * These methods create various other specialized clippers\r\n * *\r\n * @public\r\n */\r\nexport class BooleanClipFactory {\r\n /**\r\n * Create a boolean clipper which performs a union over its children\r\n * * if `keepInside === true`, accept the \"inside\" of the union result\r\n * * if `keepInside === false`, accept the \"outside\" of the union result\r\n * @param clippers clip objects to capture\r\n * @param keepInside flag to select results inside or outside the clippers.\r\n */\r\n public static createCaptureUnion(clippers: Clipper | Clipper[], keepInside: boolean): Clipper {\r\n const result = new BooleanClipNodeUnion(keepInside);\r\n result.captureChild(clippers);\r\n return result;\r\n }\r\n /**\r\n * Create a boolean clipper which performs an intersection over its children\r\n * * if `keepInside === true`, accept the \"inside\" of the intersection result\r\n * * if `keepInside === false`, accept the \"outside\" of the intersection result\r\n * @param clippers clip objects to capture\r\n * @param keepInside flag to select results inside or outside the clippers.\r\n */\r\n public static createCaptureIntersection(clippers: Clipper | Clipper[], keepInside: boolean): Clipper {\r\n const result = new BooleanClipNodeIntersection(keepInside);\r\n result.captureChild(clippers);\r\n return result;\r\n }\r\n /**\r\n * Create a boolean clipper which performs a parity over its children\r\n * * if `keepInside === true`, accept the \"inside\" of the parity result\r\n * * if `keepInside === false`, accept the \"outside\" of the parity result\r\n * @param clippers clip objects to capture\r\n * @param keepInside flag to select results inside or outside the clippers.\r\n */\r\n public static createCaptureParity(clippers: Clipper | Clipper[], keepInside: boolean): Clipper {\r\n const result = new BooleanClipNodeParity(keepInside);\r\n result.captureChild(clippers);\r\n return result;\r\n }\r\n /**\r\n * Create a boolean clipper which performs a difference operation for points \"inside `primaryClipper`\" and \"outside `excludedClipper`\"\r\n * * if `keepInside === true`, accept the \"inside\" of the difference\r\n * * if `keepInside === false`, accept the \"outside\" of the difference\r\n * @param primaryClipper any clip object whose output is treated as positive\r\n * @param excludeClip any clipper whose output is treated as negative.\r\n * @param keepInside flag to select results inside or outside the initial `primary minus excludeClipper` clippers.\r\n */\r\n public static createCaptureDifference(primaryClipper: Clipper, excludedClipper: Clipper, keepInside: boolean): Clipper {\r\n const mask = this.createCaptureUnion(excludedClipper, false);\r\n return this.createCaptureIntersection([primaryClipper, mask], keepInside);\r\n }\r\n /**\r\n * Create a boolean clipper which performs the reverse of that of `primaryClipper`\r\n * @param primaryClipper clip objects to capture\r\n * @param keepInside flag to select results inside or outside the clippers.\r\n */\r\n public static createCaptureClipOutside(primaryClipper: Clipper): Clipper {\r\n return this.createCaptureUnion([primaryClipper], false);\r\n }\r\n\r\n /**\r\n * convert `source` to an array of clipper objects.\r\n * * ANY TYPE OF Clipper is accepted.\r\n * * REMARK: This is normally called only from the primary public method `parseToClipper`.\r\n * @param source\r\n * @param internal\r\n */\r\n public static parseToClipperArray(source: any): Clipper[] | undefined {\r\n if (Array.isArray(source)) {\r\n const clippers = [];\r\n for (const c of source) {\r\n const c1 = this.parseToClipper(c);\r\n if (!c1)\r\n return undefined;\r\n clippers.push(c1);\r\n }\r\n if (clippers.length === 0)\r\n return undefined;\r\n return clippers;\r\n } else {\r\n // accept singleton to singleton array\r\n const c = this.parseToClipper(source);\r\n if (c)\r\n return [c];\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * look for content that represents a clipper.\r\n * * Possible outputs are\r\n * * `ClipPlane`\r\n * * `ConvexClipPlaneSet`\r\n * * `UnionOfConvexClipPlaneSets`\r\n * * One of the `ClipBoolean` derived classes\r\n * * `ClipBooleanXOR`\r\n * * `ClipBooleanOR`\r\n * * `ClipBooleanAND`\r\n * @param source json object\r\n * @public\r\n */\r\n public static parseToClipper(source?: object): Clipper | undefined {\r\n if (!source)\r\n return undefined;\r\n\r\n if (source.hasOwnProperty(\"normal\") && source.hasOwnProperty(\"dist\")) {\r\n return ClipPlane.fromJSON(source);\r\n } else if (Array.isArray(source)) {\r\n const clippers: Clipper[] = [];\r\n let numPlanes = 0;\r\n let numConvexSets = 0;\r\n for (const c of source) {\r\n const c1 = this.parseToClipper(c);\r\n if (!c1)\r\n return undefined;\r\n clippers.push(c1);\r\n if (c1 instanceof ClipPlane)\r\n numPlanes++;\r\n else if (c1 instanceof ConvexClipPlaneSet)\r\n numConvexSets++;\r\n else\r\n return undefined;\r\n }\r\n if (clippers.length === 0)\r\n return undefined;\r\n if (numPlanes === source.length) {\r\n // array of planes is a convex clip plane set.\r\n return ConvexClipPlaneSet.createPlanes(clippers as ClipPlane[]);\r\n } else if (numConvexSets === source.length) {\r\n return UnionOfConvexClipPlaneSets.createConvexSets(clippers as ConvexClipPlaneSet[]);\r\n }\r\n // array of mixed types should not occur. fall out to undefined.\r\n } else if (source.hasOwnProperty(\"OR\")) {\r\n const clippers = this.parseToClipperArray((source as any).OR);\r\n if (clippers)\r\n return this.createCaptureUnion(clippers, true);\r\n } else if (source.hasOwnProperty(\"NOR\")) {\r\n const clippers = this.parseToClipperArray((source as any).NOR);\r\n if (clippers)\r\n return this.createCaptureUnion(clippers, false);\r\n } else if (source.hasOwnProperty(\"AND\")) {\r\n const clippers = this.parseToClipperArray((source as any).AND);\r\n if (clippers)\r\n return this.createCaptureIntersection(clippers, true);\r\n } else if (source.hasOwnProperty(\"NAND\")) {\r\n const clippers = this.parseToClipperArray((source as any).NAND);\r\n if (clippers)\r\n return this.createCaptureIntersection(clippers, true);\r\n } else if (source.hasOwnProperty(\"XOR\")) {\r\n const clippers = this.parseToClipperArray((source as any).XOR);\r\n if (clippers)\r\n return this.createCaptureParity(clippers, true);\r\n } else if (source.hasOwnProperty(\"NXOR\")) {\r\n const clippers = this.parseToClipperArray((source as any).NXOR);\r\n if (clippers)\r\n return this.createCaptureParity(clippers, true);\r\n }\r\n return undefined;\r\n }\r\n /** Choose a `toJSON` method appropriate to the clipper */\r\n public static anyClipperToJSON(clipper: any): any | undefined {\r\n if (ClipUtilities.isClipper(clipper)) {\r\n if (clipper.toJSON)\r\n return clipper.toJSON();\r\n }\r\n return undefined;\r\n\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BooleanClipFactory.js","sourceRoot":"","sources":["../../../src/clipping/BooleanClipFactory.ts"],"names":[],"mappings":";AAA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IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;YACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAE,MAAc,CAAC,IAAI,CAAC,CAAC;YAChE,IAAI,QAAQ;gBACV,OAAO,IAAI,CAAC,yBAAyB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACzD;aAAM,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;YACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAE,MAAc,CAAC,GAAG,CAAC,CAAC;YAC/D,IAAI,QAAQ;gBACV,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACnD;aAAM,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;YACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAE,MAAc,CAAC,IAAI,CAAC,CAAC;YAChE,IAAI,QAAQ;gBACV,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACnD;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,0DAA0D;IACnD,MAAM,CAAC,gBAAgB,CAAC,OAAY;QACzC,IAAI,yBAAa,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;YACpC,IAAI,OAAO,CAAC,MAAM;gBAChB,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;SAC3B;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAlKD,gDAkKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module CartesianGeometry\n */\nimport { BooleanClipNodeIntersection, BooleanClipNodeParity, BooleanClipNodeUnion } from \"./BooleanClipNode\";\nimport { ClipPlane } from \"./ClipPlane\";\nimport { Clipper, ClipUtilities } from \"./ClipUtils\";\nimport { ConvexClipPlaneSet } from \"./ConvexClipPlaneSet\";\nimport { UnionOfConvexClipPlaneSets } from \"./UnionOfConvexClipPlaneSets\";\n\n/**\n * A BooleanClipFactory is a factory to create objects that implement interior nodes of a tree of boolean clip operations.\n * * These methods create specific clip tree types:\n * * Union\n * * Intersection\n * * Parity\n * * Difference\n * * Each construction has a `keepInside` flag that optionally negates the initial result of the parity, intersection,\n * parity, or difference:\n * * if `keepInside === true`, accept the \"inside\" of the initial result.\n * * if `keepInside === false`, accept the \"outside\" of the initial result.\n * * These methods create various other specialized clippers.\n * @public\n */\nexport class BooleanClipFactory {\n /**\n * Create a boolean clipper which performs a union over its children.\n * * if `keepInside === true`, accept the \"inside\" of the union result.\n * * if `keepInside === false`, accept the \"outside\" of the union result.\n * @param clippers clip objects to capture.\n * @param keepInside flag to select results inside or outside the clippers.\n */\n public static createCaptureUnion(clippers: Clipper | Clipper[], keepInside: boolean): Clipper {\n const result = new BooleanClipNodeUnion(keepInside);\n result.captureChild(clippers);\n return result;\n }\n /**\n * Create a boolean clipper which performs an intersection over its children.\n * * if `keepInside === true`, accept the \"inside\" of the intersection result.\n * * if `keepInside === false`, accept the \"outside\" of the intersection result.\n * @param clippers clip objects to capture.\n * @param keepInside flag to select results inside or outside the clippers.\n */\n public static createCaptureIntersection(clippers: Clipper | Clipper[], keepInside: boolean): Clipper {\n const result = new BooleanClipNodeIntersection(keepInside);\n result.captureChild(clippers);\n return result;\n }\n /**\n * Create a boolean clipper which performs a parity over its children.\n * * if `keepInside === true`, accept the \"inside\" of the parity result.\n * * if `keepInside === false`, accept the \"outside\" of the parity result.\n * @param clippers clip objects to capture.\n * @param keepInside flag to select results inside or outside the clippers.\n */\n public static createCaptureParity(clippers: Clipper | Clipper[], keepInside: boolean): Clipper {\n const result = new BooleanClipNodeParity(keepInside);\n result.captureChild(clippers);\n return result;\n }\n /**\n * Create a boolean clipper which performs a difference operation for points \"inside `primaryClipper`\" and\n * \"outside `excludedClipper`\".\n * * if `keepInside === true`, accept the \"inside\" of the difference.\n * * if `keepInside === false`, accept the \"outside\" of the difference.\n * @param primaryClipper any clip object whose output is treated as positive.\n * @param excludeClip any clipper whose output is treated as negative.\n * @param keepInside flag to select results inside or outside the initial `primary minus excludeClipper` clippers.\n */\n public static createCaptureDifference(primaryClipper: Clipper, excludedClipper: Clipper, keepInside: boolean): Clipper {\n const mask = this.createCaptureUnion(excludedClipper, false);\n return this.createCaptureIntersection([primaryClipper, mask], keepInside);\n }\n /**\n * Create a boolean clipper which performs the reverse of that of `primaryClipper`.\n * @param primaryClipper clip objects to capture.\n * @param keepInside flag to select results inside or outside the clippers.\n */\n public static createCaptureClipOutside(primaryClipper: Clipper): Clipper {\n return this.createCaptureUnion([primaryClipper], false);\n }\n /**\n * Convert `source` to an array of clipper objects.\n * * ANY TYPE OF Clipper is accepted.\n * * REMARK: This is normally called only from the primary public method `parseToClipper`.\n */\n public static parseToClipperArray(source: any): Clipper[] | undefined {\n if (Array.isArray(source)) {\n const clippers = [];\n for (const c of source) {\n const c1 = this.parseToClipper(c);\n if (!c1)\n return undefined;\n clippers.push(c1);\n }\n if (clippers.length === 0)\n return undefined;\n return clippers;\n } else {\n // accept singleton to singleton array\n const c = this.parseToClipper(source);\n if (c)\n return [c];\n }\n return undefined;\n }\n /**\n * Look for content that represents a clipper.\n * * Possible outputs are\n * * `ClipPlane`\n * * `ConvexClipPlaneSet`\n * * `UnionOfConvexClipPlaneSets`\n * * One of the `ClipBoolean` derived classes\n * * `ClipBooleanXOR`\n * * `ClipBooleanOR`\n * * `ClipBooleanAND`\n * @param source json object\n * @public\n */\n public static parseToClipper(source?: object): Clipper | undefined {\n if (!source)\n return undefined;\n\n if (source.hasOwnProperty(\"normal\") && source.hasOwnProperty(\"dist\")) {\n return ClipPlane.fromJSON(source);\n } else if (Array.isArray(source)) {\n const clippers: Clipper[] = [];\n let numPlanes = 0;\n let numConvexSets = 0;\n for (const c of source) {\n const c1 = this.parseToClipper(c);\n if (!c1)\n return undefined;\n clippers.push(c1);\n if (c1 instanceof ClipPlane)\n numPlanes++;\n else if (c1 instanceof ConvexClipPlaneSet)\n numConvexSets++;\n else\n return undefined;\n }\n if (clippers.length === 0)\n return undefined;\n if (numPlanes === source.length) {\n // array of planes is a convex clip plane set.\n return ConvexClipPlaneSet.createPlanes(clippers as ClipPlane[]);\n } else if (numConvexSets === source.length) {\n return UnionOfConvexClipPlaneSets.createConvexSets(clippers as ConvexClipPlaneSet[]);\n }\n // array of mixed types should not occur. fall out to undefined.\n } else if (source.hasOwnProperty(\"OR\")) {\n const clippers = this.parseToClipperArray((source as any).OR);\n if (clippers)\n return this.createCaptureUnion(clippers, true);\n } else if (source.hasOwnProperty(\"NOR\")) {\n const clippers = this.parseToClipperArray((source as any).NOR);\n if (clippers)\n return this.createCaptureUnion(clippers, false);\n } else if (source.hasOwnProperty(\"AND\")) {\n const clippers = this.parseToClipperArray((source as any).AND);\n if (clippers)\n return this.createCaptureIntersection(clippers, true);\n } else if (source.hasOwnProperty(\"NAND\")) {\n const clippers = this.parseToClipperArray((source as any).NAND);\n if (clippers)\n return this.createCaptureIntersection(clippers, true);\n } else if (source.hasOwnProperty(\"XOR\")) {\n const clippers = this.parseToClipperArray((source as any).XOR);\n if (clippers)\n return this.createCaptureParity(clippers, true);\n } else if (source.hasOwnProperty(\"NXOR\")) {\n const clippers = this.parseToClipperArray((source as any).NXOR);\n if (clippers)\n return this.createCaptureParity(clippers, true);\n }\n return undefined;\n }\n /** Choose a `toJSON` method appropriate to the clipper */\n public static anyClipperToJSON(clipper: any): any | undefined {\n if (ClipUtilities.isClipper(clipper)) {\n if (clipper.toJSON)\n return clipper.toJSON();\n }\n return undefined;\n }\n}\n"]}
|
|
@@ -36,35 +36,35 @@ export declare abstract class BooleanClipNode implements Clipper {
|
|
|
36
36
|
toJSON(): any;
|
|
37
37
|
/** Capture a (reference to a) child node or nodes */
|
|
38
38
|
captureChild(child: Clipper | Clipper[]): void;
|
|
39
|
-
/**
|
|
39
|
+
/** Toggle the "keepInside" behavior. Return the prior value. */
|
|
40
40
|
toggleResult(): boolean;
|
|
41
41
|
/** Set the "keepInside" behavior */
|
|
42
42
|
selectResult(keepInside: boolean): boolean;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Conditionally (if a1 > a0 strictly) call announce (a0, a1).
|
|
45
45
|
* * Return 0 if not called, 1 if called.
|
|
46
46
|
*/
|
|
47
47
|
protected testedAnnounceNN(a0: number, a1: number, announce?: AnnounceNumberNumber): number;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Conditionally (if a1 > a0 strictly) call announce (a0, a1, cp).
|
|
50
50
|
* * Return 0 if not called, 1 if called.
|
|
51
51
|
*/
|
|
52
52
|
protected testedAnnounceNNC(a0: number, a1: number, cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): number;
|
|
53
53
|
/** Swap the _intervalsA and _intervalsB */
|
|
54
54
|
protected swapAB(): void;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
* *
|
|
56
|
+
* Announce all "outside intervals" --not masked by intervals
|
|
57
|
+
* * Return true if any intervals announced.
|
|
58
58
|
*/
|
|
59
59
|
protected announcePartsNN(keepInside: boolean, intervals: Range1d[], f0: number, f1: number, announce?: AnnounceNumberNumber): boolean;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
* *
|
|
61
|
+
* Announce all "outside intervals" --not masked by intervals
|
|
62
|
+
* * Return true if any intervals announced.
|
|
63
63
|
*/
|
|
64
64
|
protected announcePartsNNC(keepInside: boolean, intervals: Range1d[], f0: number, f1: number, cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
|
|
65
65
|
/** Invoke callback to test if a point is "in" this clipper */
|
|
66
66
|
isPointOnOrInside(point: Point3d): boolean;
|
|
67
|
-
/** Announce "in" portions of a line segment.
|
|
67
|
+
/** Announce "in" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */
|
|
68
68
|
announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean;
|
|
69
69
|
/** Announce "in" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */
|
|
70
70
|
announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
|
|
@@ -76,7 +76,7 @@ export declare abstract class BooleanClipNode implements Clipper {
|
|
|
76
76
|
export declare class BooleanClipNodeUnion extends BooleanClipNode {
|
|
77
77
|
get operationName(): string;
|
|
78
78
|
constructor(keepInside: boolean);
|
|
79
|
-
/**
|
|
79
|
+
/** Return true if inside any child clipper */
|
|
80
80
|
isPointOnOrInsideChildren(point: Point3d): boolean;
|
|
81
81
|
combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[];
|
|
82
82
|
appendPolygonClip(xyz: GrowableXYZArray, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): void;
|
|
@@ -88,7 +88,7 @@ export declare class BooleanClipNodeUnion extends BooleanClipNode {
|
|
|
88
88
|
export declare class BooleanClipNodeParity extends BooleanClipNode {
|
|
89
89
|
get operationName(): string;
|
|
90
90
|
constructor(keepInside: boolean);
|
|
91
|
-
/**
|
|
91
|
+
/** Return true if inside an odd number of clippers child clipper */
|
|
92
92
|
isPointOnOrInsideChildren(point: Point3d): boolean;
|
|
93
93
|
combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[];
|
|
94
94
|
appendPolygonClip(xyz: GrowableXYZArray, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): void;
|
|
@@ -100,7 +100,7 @@ export declare class BooleanClipNodeParity extends BooleanClipNode {
|
|
|
100
100
|
export declare class BooleanClipNodeIntersection extends BooleanClipNode implements PolygonClipper {
|
|
101
101
|
get operationName(): string;
|
|
102
102
|
constructor(keepInside: boolean);
|
|
103
|
-
/**
|
|
103
|
+
/** Return false if outside of any child clipper */
|
|
104
104
|
isPointOnOrInsideChildren(point: Point3d): boolean;
|
|
105
105
|
combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[];
|
|
106
106
|
appendPolygonClip(xyz: GrowableXYZArray, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanClipNode.d.ts","sourceRoot":"","sources":["../../../src/clipping/BooleanClipNode.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAiC,cAAc,EAAE,MAAM,aAAa,CAAC;AAErF;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,eAAgB,YAAW,OAAO;IACtD,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC;IAC/B,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC;IACjC,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC;IACjC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC;gBAEZ,UAAU,EAAE,OAAO;IAMtC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IACrE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,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
54
54
|
this._clippers.push(child);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
57
|
+
/** Toggle the "keepInside" behavior. Return the prior value. */
|
|
58
58
|
toggleResult() {
|
|
59
59
|
return this.selectResult(!this._keepInside);
|
|
60
60
|
}
|
|
@@ -65,7 +65,7 @@ class BooleanClipNode {
|
|
|
65
65
|
return s;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Conditionally (if a1 > a0 strictly) call announce (a0, a1).
|
|
69
69
|
* * Return 0 if not called, 1 if called.
|
|
70
70
|
*/
|
|
71
71
|
testedAnnounceNN(a0, a1, announce) {
|
|
@@ -77,7 +77,7 @@ class BooleanClipNode {
|
|
|
77
77
|
return 0;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Conditionally (if a1 > a0 strictly) call announce (a0, a1, cp).
|
|
81
81
|
* * Return 0 if not called, 1 if called.
|
|
82
82
|
*/
|
|
83
83
|
testedAnnounceNNC(a0, a1, cp, announce) {
|
|
@@ -95,8 +95,8 @@ class BooleanClipNode {
|
|
|
95
95
|
this._intervalsB = q;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
99
|
-
* *
|
|
98
|
+
* Announce all "outside intervals" --not masked by intervals
|
|
99
|
+
* * Return true if any intervals announced.
|
|
100
100
|
*/
|
|
101
101
|
announcePartsNN(keepInside, intervals, f0, f1, announce) {
|
|
102
102
|
let numAnnounce = 0;
|
|
@@ -117,8 +117,8 @@ class BooleanClipNode {
|
|
|
117
117
|
return numAnnounce > 0;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
121
|
-
* *
|
|
120
|
+
* Announce all "outside intervals" --not masked by intervals
|
|
121
|
+
* * Return true if any intervals announced.
|
|
122
122
|
*/
|
|
123
123
|
announcePartsNNC(keepInside, intervals, f0, f1, cp, announce) {
|
|
124
124
|
let numAnnounce = 0;
|
|
@@ -143,7 +143,7 @@ class BooleanClipNode {
|
|
|
143
143
|
const q = this.isPointOnOrInsideChildren(point);
|
|
144
144
|
return this._keepInside ? q : !q;
|
|
145
145
|
}
|
|
146
|
-
/** Announce "in" portions of a line segment.
|
|
146
|
+
/** Announce "in" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */
|
|
147
147
|
announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
|
|
148
148
|
this._intervalsA.length = 0;
|
|
149
149
|
const announceIntervalB = (a0, a1) => {
|
|
@@ -202,7 +202,7 @@ class BooleanClipNodeUnion extends BooleanClipNode {
|
|
|
202
202
|
constructor(keepInside) {
|
|
203
203
|
super(keepInside);
|
|
204
204
|
}
|
|
205
|
-
/**
|
|
205
|
+
/** Return true if inside any child clipper */
|
|
206
206
|
isPointOnOrInsideChildren(point) {
|
|
207
207
|
for (const clipper of this._clippers) {
|
|
208
208
|
if (clipper.isPointOnOrInside(point))
|
|
@@ -227,7 +227,7 @@ class BooleanClipNodeParity extends BooleanClipNode {
|
|
|
227
227
|
constructor(keepInside) {
|
|
228
228
|
super(keepInside);
|
|
229
229
|
}
|
|
230
|
-
/**
|
|
230
|
+
/** Return true if inside an odd number of clippers child clipper */
|
|
231
231
|
isPointOnOrInsideChildren(point) {
|
|
232
232
|
let q = false;
|
|
233
233
|
for (const clipper of this._clippers) {
|
|
@@ -253,7 +253,7 @@ class BooleanClipNodeIntersection extends BooleanClipNode {
|
|
|
253
253
|
constructor(keepInside) {
|
|
254
254
|
super(keepInside);
|
|
255
255
|
}
|
|
256
|
-
/**
|
|
256
|
+
/** Return false if outside of any child clipper */
|
|
257
257
|
isPointOnOrInsideChildren(point) {
|
|
258
258
|
for (const clipper of this._clippers) {
|
|
259
259
|
if (!clipper.isPointOnOrInside(point))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanClipNode.js","sourceRoot":"","sources":["../../../src/clipping/BooleanClipNode.ts"],"names":[],"mappings":";AAAA;;;+FAG+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BD,kEA6BC","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 CartesianGeometry\r\n */\r\n\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { AnnounceNumberNumber, AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range1d } from \"../geometry3d/Range\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\nimport { Range1dArray } from \"../numerics/Range1dArray\";\r\nimport { Clipper, ClipStepAction, ClipUtilities, PolygonClipper } from \"./ClipUtils\";\r\n\r\n/** BooleanClipNode is an abstract base class for boolean actions by an array of clippers.\r\n * * Derived class must implement\r\n * * The single point test `isPointOnOrInsideChildren`\r\n * * Boolean operation on 1d intervals `combineIntervals`\r\n * * The `keepInside` flag controls an additional optional flip of the boolean result.\r\n * * if `keepInside === true`, accept the \"inside\" of the clip clippers\r\n * * if `keepInside === false`, accept the \"outside\" of the child clippers.\r\n * * Hence the combinations of derived classes for (OR, AND, XOR) and keepInside are\r\n * * (OR, true) = simple union (OR), i.e. \"in\" one or more clips\r\n * * (OR, false) = complement of union (NOR), i.e. \"outside\" all clips\r\n * * (AND, true) = simple intersection (AND), i.e. \"in\" all clips\r\n * * (AND, false) = complement of intersection (NAND), i.e. \"outside\" one or more clips\r\n * * (XOR,true) = simple parity, i.e. \"in\" an odd number of clips\r\n * * (XOR,false) = complement of parity ), i.e. \"in\" an even number of clips\r\n * @internal\r\n */\r\nexport abstract class BooleanClipNode implements Clipper {\r\n protected _clippers: Clipper[];\r\n protected _intervalsA: Range1d[];\r\n protected _intervalsB: Range1d[];\r\n protected _keepInside: boolean;\r\n\r\n public constructor(keepInside: boolean) {\r\n this._keepInside = keepInside;\r\n this._clippers = [];\r\n this._intervalsA = [];\r\n this._intervalsB = [];\r\n }\r\n protected abstract isPointOnOrInsideChildren(point: Point3d): boolean;\r\n protected abstract combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[];\r\n public abstract get operationName(): string;\r\n public toJSON(): any {\r\n const data = [];\r\n for (const c of this._clippers) {\r\n const c1 = c as any;\r\n if (c1.toJSON)\r\n data.push(c1.toJSON());\r\n }\r\n // return this.formatJSON(data);\r\n const s = this.operationName;\r\n const json: { [opType: string]: any[] } = {};\r\n json[s] = data;\r\n return json;\r\n\r\n }\r\n /** Capture a (reference to a) child node or nodes */\r\n public captureChild(child: Clipper | Clipper[]) {\r\n if (Array.isArray(child)) {\r\n for (const c of child) this.captureChild(c);\r\n } else {\r\n this._clippers.push(child);\r\n }\r\n }\r\n /** toggle the \"keepInside\" behavior. Return the prior value. */\r\n public toggleResult(): boolean {\r\n return this.selectResult(!this._keepInside);\r\n }\r\n /** Set the \"keepInside\" behavior */\r\n public selectResult(keepInside: boolean): boolean {\r\n const s = this._keepInside;\r\n this._keepInside = keepInside;\r\n return s;\r\n }\r\n\r\n /**\r\n * * Conditionally (if a1 > a0 strictly) call announce (a0, a1).\r\n * * Return 0 if not called, 1 if called.\r\n */\r\n protected testedAnnounceNN(a0: number, a1: number, announce?: AnnounceNumberNumber): number {\r\n if (a0 < a1) {\r\n if (announce)\r\n announce(a0, a1);\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n /**\r\n * * Conditionally (if a1 > a0 strictly) call announce (a0, a1, cp).\r\n * * Return 0 if not called, 1 if called.\r\n */\r\n protected testedAnnounceNNC(a0: number, a1: number, cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): number {\r\n if (a0 < a1) {\r\n if (announce)\r\n announce(a0, a1, cp);\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n /** Swap the _intervalsA and _intervalsB */\r\n protected swapAB(): void {\r\n const q = this._intervalsA;\r\n this._intervalsA = this._intervalsB;\r\n this._intervalsB = q;\r\n }\r\n /**\r\n * * announce all \"outside intervals\" --not masked by intervals\r\n * * return true if any intervals announced.\r\n */\r\n protected announcePartsNN(keepInside: boolean, intervals: Range1d[], f0: number, f1: number, announce?: AnnounceNumberNumber): boolean {\r\n let numAnnounce = 0;\r\n if (!keepInside) {\r\n let lowFraction = f0;\r\n for (const interval of intervals) {\r\n numAnnounce += this.testedAnnounceNN(lowFraction, interval.low, announce);\r\n lowFraction = interval.high;\r\n }\r\n numAnnounce += this.testedAnnounceNN(lowFraction, f1, announce);\r\n } else {\r\n for (const interval of intervals) {\r\n // use f0..f1 ?\r\n numAnnounce += this.testedAnnounceNN(interval.low, interval.high, announce);\r\n }\r\n }\r\n return numAnnounce > 0;\r\n }\r\n /**\r\n * * announce all \"outside intervals\" --not masked by intervals\r\n * * return true if any intervals announced.\r\n */\r\n protected announcePartsNNC(keepInside: boolean, intervals: Range1d[], f0: number, f1: number, cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n let numAnnounce = 0;\r\n if (!keepInside) {\r\n let lowFraction = f0;\r\n for (const interval of intervals) {\r\n numAnnounce += this.testedAnnounceNNC(lowFraction, interval.low, cp, announce);\r\n lowFraction = interval.high;\r\n }\r\n numAnnounce += this.testedAnnounceNNC(lowFraction, f1, cp, announce);\r\n } else {\r\n for (const interval of intervals) {\r\n // use f0..f1 ?\r\n numAnnounce += this.testedAnnounceNNC(interval.low, interval.high, cp, announce);\r\n }\r\n }\r\n return numAnnounce > 0;\r\n\r\n }\r\n /** Invoke callback to test if a point is \"in\" this clipper */\r\n public isPointOnOrInside(point: Point3d): boolean {\r\n const q = this.isPointOnOrInsideChildren(point);\r\n return this._keepInside ? q : !q;\r\n\r\n }\r\n\r\n /** Announce \"in\" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */\r\n public announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean {\r\n this._intervalsA.length = 0;\r\n const announceIntervalB = (a0: number, a1: number) => {\r\n this._intervalsB.push(Range1d.createXX(a0, a1));\r\n };\r\n // Strategy:\r\n // _intervalsA is the accumulated UNION of from clippers\r\n // _intervalsB is the current clipper.\r\n // announceIntervalB appends single new interval to _intervalB\r\n // at end, output gaps in _intervalsA\r\n //\r\n let i = 0;\r\n for (const c of this._clippers) {\r\n this._intervalsB.length = 0;\r\n c.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announceIntervalB);\r\n Range1dArray.simplifySortUnion(this._intervalsB);\r\n if (i === 0) {\r\n this.swapAB();\r\n } else {\r\n this._intervalsA = this.combineIntervals(this._intervalsA, this._intervalsB);\r\n }\r\n i++;\r\n }\r\n return this.announcePartsNN(this._keepInside, this._intervalsA, f0, f1, announce);\r\n }\r\n /** Announce \"in\" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */\r\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n this._intervalsA.length = 0;\r\n const announceIntervalB = (a0: number, a1: number) => {\r\n this._intervalsB.push(Range1d.createXX(a0, a1));\r\n };\r\n let i = 0;\r\n for (const c of this._clippers) {\r\n this._intervalsB.length = 0;\r\n c.announceClippedArcIntervals(arc, announceIntervalB);\r\n Range1dArray.simplifySortUnion(this._intervalsB);\r\n if (i === 0) {\r\n this.swapAB();\r\n } else {\r\n this._intervalsA = this.combineIntervals(this._intervalsA, this._intervalsB);\r\n }\r\n i++;\r\n }\r\n return this.announcePartsNNC(this._keepInside, this._intervalsA, 0, 1, arc, announce);\r\n }\r\n\r\n}\r\n/**\r\n * Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children\r\n * @internal\r\n */\r\nexport class BooleanClipNodeUnion extends BooleanClipNode {\r\n public get operationName(): string { return this._keepInside ? \"OR\" : \"NOR\"; }\r\n public constructor(keepInside: boolean) {\r\n super(keepInside);\r\n }\r\n /** return true if inside any child clipper */\r\n public isPointOnOrInsideChildren(point: Point3d): boolean {\r\n for (const clipper of this._clippers) {\r\n if (clipper.isPointOnOrInside(point))\r\n return true;\r\n }\r\n return false;\r\n }\r\n public combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[] {\r\n return Range1dArray.unionSorted(operandA, operandB);\r\n }\r\n public appendPolygonClip(\r\n xyz: GrowableXYZArray,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache) {\r\n ClipUtilities.doPolygonClipSequence(xyz, this._clippers,\r\n this._keepInside ? insideFragments : outsideFragments,\r\n this._keepInside ? outsideFragments : insideFragments,\r\n undefined,\r\n ClipStepAction.acceptIn, ClipStepAction.passToNextStep, ClipStepAction.acceptOut, arrayCache);\r\n }\r\n}\r\n\r\n/**\r\n * Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children\r\n * @internal\r\n */\r\nexport class BooleanClipNodeParity extends BooleanClipNode {\r\n public get operationName(): string { return this._keepInside ? \"XOR\" : \"NXOR\"; }\r\n public constructor(keepInside: boolean) {\r\n super(keepInside);\r\n }\r\n /** return true if inside an odd number of clippers child clipper */\r\n public isPointOnOrInsideChildren(point: Point3d): boolean {\r\n let q = false;\r\n for (const clipper of this._clippers) {\r\n if (clipper.isPointOnOrInside(point))\r\n q = !q;\r\n }\r\n return q;\r\n }\r\n public combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[] {\r\n return Range1dArray.paritySorted(operandA, operandB);\r\n }\r\n public appendPolygonClip(\r\n xyz: GrowableXYZArray,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache) {\r\n ClipUtilities.doPolygonClipParitySequence(xyz, this._clippers,\r\n this._keepInside ? insideFragments : outsideFragments,\r\n this._keepInside ? outsideFragments : insideFragments,\r\n arrayCache);\r\n }\r\n}\r\n/**\r\n * Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children\r\n * @internal\r\n */\r\nexport class BooleanClipNodeIntersection extends BooleanClipNode implements PolygonClipper{\r\n public get operationName(): string { return this._keepInside ? \"AND\" : \"NAND\"; }\r\n public constructor(keepInside: boolean) {\r\n super(keepInside);\r\n }\r\n /** return false if outside of any child clipper */\r\n public isPointOnOrInsideChildren(point: Point3d): boolean {\r\n for (const clipper of this._clippers) {\r\n if (!clipper.isPointOnOrInside(point))\r\n return false;\r\n }\r\n return true;\r\n }\r\n public combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[] {\r\n return Range1dArray.intersectSorted(operandA, operandB);\r\n }\r\n public appendPolygonClip(\r\n xyz: GrowableXYZArray,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache) {\r\n\r\n ClipUtilities.doPolygonClipSequence(xyz, this._clippers,\r\n this._keepInside ? insideFragments : outsideFragments,\r\n this._keepInside ? outsideFragments : insideFragments,\r\n undefined,\r\n ClipStepAction.passToNextStep, ClipStepAction.acceptOut, ClipStepAction.acceptIn, arrayCache);\r\n }\r\n\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BooleanClipNode.js","sourceRoot":"","sources":["../../../src/clipping/BooleanClipNode.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAU/F,+CAA8C;AAE9C,2DAAwD;AACxD,2CAAqF;AAErF;;;;;;;;;;;;;;;GAeG;AACH,MAAsB,eAAe;IAMnC,YAAmB,UAAmB;QACpC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IAIM,MAAM;QACX,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE;YAC9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UAAmB;QACpC,KAAK,CAAC,UAAU,CAAC,CAAC;IACpB,CAAC;IACD,mDAAmD;IAC5C,yBAAyB,CAAC,KAAc;QAC7C,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YACpC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC;gBACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACM,gBAAgB,CAAC,QAAmB,EAAE,QAAmB;QAC9D,OAAO,2BAAY,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC;IACM,iBAAiB,CACtB,GAAqB,EACrB,eAAmC,EACnC,gBAAoC,EACpC,UAAiC;QAGjC,yBAAa,CAAC,qBAAqB,CACjC,GAAG,EACH,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,EACrD,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,EACrD,SAAS,EACT,0BAAc,CAAC,cAAc,EAC7B,0BAAc,CAAC,SAAS,EACxB,0BAAc,CAAC,QAAQ,EACvB,UAAU,CACX,CAAC;IACJ,CAAC;CACF;AAnCD,kEAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { Arc3d } from \"../curve/Arc3d\";\nimport { AnnounceNumberNumber, AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"../curve/CurvePrimitive\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d } from \"../geometry3d/Range\";\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\nimport { Range1dArray } from \"../numerics/Range1dArray\";\nimport { Clipper, ClipStepAction, ClipUtilities, PolygonClipper } from \"./ClipUtils\";\n\n/** BooleanClipNode is an abstract base class for boolean actions by an array of clippers.\n * * Derived class must implement\n * * The single point test `isPointOnOrInsideChildren`\n * * Boolean operation on 1d intervals `combineIntervals`\n * * The `keepInside` flag controls an additional optional flip of the boolean result.\n * * if `keepInside === true`, accept the \"inside\" of the clip clippers\n * * if `keepInside === false`, accept the \"outside\" of the child clippers.\n * * Hence the combinations of derived classes for (OR, AND, XOR) and keepInside are\n * * (OR, true) = simple union (OR), i.e. \"in\" one or more clips\n * * (OR, false) = complement of union (NOR), i.e. \"outside\" all clips\n * * (AND, true) = simple intersection (AND), i.e. \"in\" all clips\n * * (AND, false) = complement of intersection (NAND), i.e. \"outside\" one or more clips\n * * (XOR,true) = simple parity, i.e. \"in\" an odd number of clips\n * * (XOR,false) = complement of parity ), i.e. \"in\" an even number of clips\n * @internal\n */\nexport abstract class BooleanClipNode implements Clipper {\n protected _clippers: Clipper[];\n protected _intervalsA: Range1d[];\n protected _intervalsB: Range1d[];\n protected _keepInside: boolean;\n\n public constructor(keepInside: boolean) {\n this._keepInside = keepInside;\n this._clippers = [];\n this._intervalsA = [];\n this._intervalsB = [];\n }\n protected abstract isPointOnOrInsideChildren(point: Point3d): boolean;\n protected abstract combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[];\n public abstract get operationName(): string;\n public toJSON(): any {\n const data = [];\n for (const c of this._clippers) {\n const c1 = c as any;\n if (c1.toJSON)\n data.push(c1.toJSON());\n }\n // return this.formatJSON(data);\n const s = this.operationName;\n const json: { [opType: string]: any[] } = {};\n json[s] = data;\n return json;\n }\n /** Capture a (reference to a) child node or nodes */\n public captureChild(child: Clipper | Clipper[]) {\n if (Array.isArray(child)) {\n for (const c of child) this.captureChild(c);\n } else {\n this._clippers.push(child);\n }\n }\n /** Toggle the \"keepInside\" behavior. Return the prior value. */\n public toggleResult(): boolean {\n return this.selectResult(!this._keepInside);\n }\n /** Set the \"keepInside\" behavior */\n public selectResult(keepInside: boolean): boolean {\n const s = this._keepInside;\n this._keepInside = keepInside;\n return s;\n }\n /**\n * Conditionally (if a1 > a0 strictly) call announce (a0, a1).\n * * Return 0 if not called, 1 if called.\n */\n protected testedAnnounceNN(a0: number, a1: number, announce?: AnnounceNumberNumber): number {\n if (a0 < a1) {\n if (announce)\n announce(a0, a1);\n return 1;\n }\n return 0;\n }\n /**\n * Conditionally (if a1 > a0 strictly) call announce (a0, a1, cp).\n * * Return 0 if not called, 1 if called.\n */\n protected testedAnnounceNNC(\n a0: number, a1: number, cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive,\n ): number {\n if (a0 < a1) {\n if (announce)\n announce(a0, a1, cp);\n return 1;\n }\n return 0;\n }\n /** Swap the _intervalsA and _intervalsB */\n protected swapAB(): void {\n const q = this._intervalsA;\n this._intervalsA = this._intervalsB;\n this._intervalsB = q;\n }\n /**\n * Announce all \"outside intervals\" --not masked by intervals\n * * Return true if any intervals announced.\n */\n protected announcePartsNN(\n keepInside: boolean, intervals: Range1d[], f0: number, f1: number, announce?: AnnounceNumberNumber,\n ): boolean {\n let numAnnounce = 0;\n if (!keepInside) {\n let lowFraction = f0;\n for (const interval of intervals) {\n numAnnounce += this.testedAnnounceNN(lowFraction, interval.low, announce);\n lowFraction = interval.high;\n }\n numAnnounce += this.testedAnnounceNN(lowFraction, f1, announce);\n } else {\n for (const interval of intervals) {\n // use f0..f1 ?\n numAnnounce += this.testedAnnounceNN(interval.low, interval.high, announce);\n }\n }\n return numAnnounce > 0;\n }\n /**\n * Announce all \"outside intervals\" --not masked by intervals\n * * Return true if any intervals announced.\n */\n protected announcePartsNNC(\n keepInside: boolean, intervals: Range1d[], f0: number, f1: number, cp: CurvePrimitive, announce?: AnnounceNumberNumberCurvePrimitive,\n ): boolean {\n let numAnnounce = 0;\n if (!keepInside) {\n let lowFraction = f0;\n for (const interval of intervals) {\n numAnnounce += this.testedAnnounceNNC(lowFraction, interval.low, cp, announce);\n lowFraction = interval.high;\n }\n numAnnounce += this.testedAnnounceNNC(lowFraction, f1, cp, announce);\n } else {\n for (const interval of intervals) {\n // use f0..f1 ?\n numAnnounce += this.testedAnnounceNNC(interval.low, interval.high, cp, announce);\n }\n }\n return numAnnounce > 0;\n }\n /** Invoke callback to test if a point is \"in\" this clipper */\n public isPointOnOrInside(point: Point3d): boolean {\n const q = this.isPointOnOrInsideChildren(point);\n return this._keepInside ? q : !q;\n }\n /** Announce \"in\" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */\n public announceClippedSegmentIntervals(\n f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber,\n ): boolean {\n this._intervalsA.length = 0;\n const announceIntervalB = (a0: number, a1: number) => {\n this._intervalsB.push(Range1d.createXX(a0, a1));\n };\n // Strategy:\n // _intervalsA is the accumulated UNION of from clippers\n // _intervalsB is the current clipper.\n // announceIntervalB appends single new interval to _intervalB\n // at end, output gaps in _intervalsA\n //\n let i = 0;\n for (const c of this._clippers) {\n this._intervalsB.length = 0;\n c.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announceIntervalB);\n Range1dArray.simplifySortUnion(this._intervalsB);\n if (i === 0) {\n this.swapAB();\n } else {\n this._intervalsA = this.combineIntervals(this._intervalsA, this._intervalsB);\n }\n i++;\n }\n return this.announcePartsNN(this._keepInside, this._intervalsA, f0, f1, announce);\n }\n /** Announce \"in\" portions of a line segment. See `Clipper.announceClippedSegmentIntervals` */\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n this._intervalsA.length = 0;\n const announceIntervalB = (a0: number, a1: number) => {\n this._intervalsB.push(Range1d.createXX(a0, a1));\n };\n let i = 0;\n for (const c of this._clippers) {\n this._intervalsB.length = 0;\n c.announceClippedArcIntervals(arc, announceIntervalB);\n Range1dArray.simplifySortUnion(this._intervalsB);\n if (i === 0) {\n this.swapAB();\n } else {\n this._intervalsA = this.combineIntervals(this._intervalsA, this._intervalsB);\n }\n i++;\n }\n return this.announcePartsNNC(this._keepInside, this._intervalsA, 0, 1, arc, announce);\n }\n}\n\n/**\n * Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children\n * @internal\n */\nexport class BooleanClipNodeUnion extends BooleanClipNode {\n public get operationName(): string { return this._keepInside ? \"OR\" : \"NOR\"; }\n public constructor(keepInside: boolean) {\n super(keepInside);\n }\n /** Return true if inside any child clipper */\n public isPointOnOrInsideChildren(point: Point3d): boolean {\n for (const clipper of this._clippers) {\n if (clipper.isPointOnOrInside(point))\n return true;\n }\n return false;\n }\n public combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[] {\n return Range1dArray.unionSorted(operandA, operandB);\n }\n public appendPolygonClip(\n xyz: GrowableXYZArray,\n insideFragments: GrowableXYZArray[],\n outsideFragments: GrowableXYZArray[],\n arrayCache: GrowableXYZArrayCache,\n ) {\n ClipUtilities.doPolygonClipSequence(\n xyz,\n this._clippers,\n this._keepInside ? insideFragments : outsideFragments,\n this._keepInside ? outsideFragments : insideFragments,\n undefined,\n ClipStepAction.acceptIn,\n ClipStepAction.passToNextStep,\n ClipStepAction.acceptOut,\n arrayCache,\n );\n }\n}\n\n/**\n * Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children\n * @internal\n */\nexport class BooleanClipNodeParity extends BooleanClipNode {\n public get operationName(): string { return this._keepInside ? \"XOR\" : \"NXOR\"; }\n public constructor(keepInside: boolean) {\n super(keepInside);\n }\n /** Return true if inside an odd number of clippers child clipper */\n public isPointOnOrInsideChildren(point: Point3d): boolean {\n let q = false;\n for (const clipper of this._clippers) {\n if (clipper.isPointOnOrInside(point))\n q = !q;\n }\n return q;\n }\n public combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[] {\n return Range1dArray.paritySorted(operandA, operandB);\n }\n public appendPolygonClip(\n xyz: GrowableXYZArray,\n insideFragments: GrowableXYZArray[],\n outsideFragments: GrowableXYZArray[],\n arrayCache: GrowableXYZArrayCache,\n ) {\n ClipUtilities.doPolygonClipParitySequence(\n xyz,\n this._clippers,\n this._keepInside ? insideFragments : outsideFragments,\n this._keepInside ? outsideFragments : insideFragments,\n arrayCache,\n );\n }\n}\n\n/**\n * Implement [BooleanClipNode] virtual methods for intersection (boolean OR) among children\n * @internal\n */\nexport class BooleanClipNodeIntersection extends BooleanClipNode implements PolygonClipper {\n public get operationName(): string { return this._keepInside ? \"AND\" : \"NAND\"; }\n public constructor(keepInside: boolean) {\n super(keepInside);\n }\n /** Return false if outside of any child clipper */\n public isPointOnOrInsideChildren(point: Point3d): boolean {\n for (const clipper of this._clippers) {\n if (!clipper.isPointOnOrInside(point))\n return false;\n }\n return true;\n }\n public combineIntervals(operandA: Range1d[], operandB: Range1d[]): Range1d[] {\n return Range1dArray.intersectSorted(operandA, operandB);\n }\n public appendPolygonClip(\n xyz: GrowableXYZArray,\n insideFragments: GrowableXYZArray[],\n outsideFragments: GrowableXYZArray[],\n arrayCache: GrowableXYZArrayCache,\n ) {\n\n ClipUtilities.doPolygonClipSequence(\n xyz,\n this._clippers,\n this._keepInside ? insideFragments : outsideFragments,\n this._keepInside ? outsideFragments : insideFragments,\n undefined,\n ClipStepAction.passToNextStep,\n ClipStepAction.acceptOut,\n ClipStepAction.acceptIn,\n arrayCache,\n );\n }\n}\n"]}
|