@itwin/core-geometry 4.5.0-dev.9 → 4.6.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.d.ts +15 -0
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +27 -0
- 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.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.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.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.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- 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/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- 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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.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.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -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.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +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 +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.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- 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.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +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 +3 -0
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +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.d.ts +8 -2
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +11 -2
- 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.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js.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.js.map +1 -1
- package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.d.ts +16 -8
- package/lib/cjs/geometry3d/XYZProps.d.ts.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.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.js.map +1 -1
- 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.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +42 -50
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +81 -105
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +19 -10
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js +17 -10
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +18 -10
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +27 -21
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +137 -86
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js +300 -166
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +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.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.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.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.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.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.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.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.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +2 -8
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +0 -3
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +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.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.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.d.ts +18 -7
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js +50 -9
- 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.d.ts +15 -0
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +27 -0
- 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.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.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.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.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- 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/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- 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/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.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.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -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.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +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 +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.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- 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.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +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 +3 -0
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +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.d.ts +8 -2
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +11 -2
- 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.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js.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.js.map +1 -1
- package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.d.ts +16 -8
- package/lib/esm/geometry3d/XYZProps.d.ts.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.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.js.map +1 -1
- 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.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +42 -50
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +80 -103
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +19 -10
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js +17 -10
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +18 -10
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +27 -21
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +137 -86
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js +300 -166
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +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.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.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.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.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.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.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.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.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +2 -8
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +0 -3
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +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.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.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.d.ts +18 -7
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js +50 -9
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PolyfaceClip.js","sourceRoot":"","sources":["../../../src/polyface/PolyfaceClip.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,mEAAmE;AACnE,sDAA6C;AAC7C,qDAAkD;AAClD,uEAAoE;AACpE,uFAAoF;AAEpF,wDAAqD;AACrD,wCAAqC;AACrC,kDAAmE;AAEnE,sDAAmD;AACnD,0CAA+D;AAC/D,6DAA0D;AAC1D,qEAAkE;AAClE,mEAAkE;AAClE,yDAAsF;AACtF,+CAAgE;AAChE,2EAA0E;AAE1E,wDAAqD;AACrD,uDAA2D;AAC3D,yDAAsD;AACtD,yCAAwE;AACxE,uDAAoD;AACpD,mDAAgD;AAEhD;;;GAGG;AACH,MAAM,aAAa;IAGjB,YAAmB,MAAwB,EAAE,kBAA0B;QACrE,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,MAAa,uBAAuB;IAOlC,YAAoB,QAAqC,EAAE,QAAqC,EAAE,oBAA6B,KAAK;QAClI,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAA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K,CAAC,aAAa,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACvC,MAAM,cAAc,GAAG,iCAAe,CAAC,MAAM,EAAE,CAAC;QAChD,MAAM,aAAa,GAAG,iCAAe,CAAC,MAAM,EAAE,CAAC;QAC/C,cAAc,CAAC,uBAAuB,EAAE,CAAC;QACzC,IAAI,CAAC,+CAA+C,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;QACxG,cAAc,CAAC,uBAAuB,EAAE,CAAC;QACzC,aAAa,CAAC,uBAAuB,EAAE,CAAC;QACxC,IAAI,CAAC,+CAA+C,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QACxG,OAAO;YACL,WAAW,EAAE,cAAc,CAAC,aAAa,EAAE;YAC3C,UAAU,EAAE,aAAa,CAAC,aAAa,EAAE;SAC1C,CAAC;IACJ,CAAC;CACF;AA7gBD,oCA6gBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { ClipPlane } from \"../clipping/ClipPlane\";\r\nimport { ConvexClipPlaneSet } from \"../clipping/ConvexClipPlaneSet\";\r\nimport { UnionOfConvexClipPlaneSets } from \"../clipping/UnionOfConvexClipPlaneSets\";\r\nimport { AnyRegion } from \"../curve/CurveTypes\";\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { Loop } from \"../curve/Loop\";\r\nimport { RegionBinaryOpType, RegionOps } from \"../curve/RegionOps\";\r\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\r\nimport { UnionRegion } from \"../curve/UnionRegion\";\r\nimport { Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\r\nimport { FrameBuilder } from \"../geometry3d/FrameBuilder\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { IndexedXYZCollectionPolygonOps, PolygonOps } from \"../geometry3d/PolygonOps\";\r\nimport { Range1d, Range2d, Range3d } from \"../geometry3d/Range\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { SweepContour } from \"../solid/SweepContour\";\r\nimport { ChainMergeContext } from \"../topology/ChainMerge\";\r\nimport { RangeSearch } from \"./multiclip/RangeSearch\";\r\nimport { IndexedPolyface, Polyface, PolyfaceVisitor } from \"./Polyface\";\r\nimport { PolyfaceBuilder } from \"./PolyfaceBuilder\";\r\nimport { PolyfaceQuery } from \"./PolyfaceQuery\";\r\n\r\n/**\r\n * carrier for a point array with an index into UnionOfConvexClipPlaneSets\r\n * @private\r\n */\r\nclass ClipCandidate {\r\n public nextConvexSetIndex: number;\r\n public points: GrowableXYZArray;\r\n public constructor(points: GrowableXYZArray, nextConvexSetIndex: number) {\r\n this.nextConvexSetIndex = nextConvexSetIndex;\r\n this.points = points;\r\n }\r\n}\r\n\r\n/**\r\n * A pair of PolyfaceBuilder objects, for use by clippers that emit inside and outside parts.\r\n * * There are nominally 4 builders:\r\n * * builderA collects simple \"inside\" clip.\r\n * * builderB collects simple \"outside\" clip.\r\n * * builderA1 collects \"side\" clip for inside.\r\n * * builderB1 collets \"side\" clip for outside.\r\n * * `static ClippedPolyfaceBuilders.create(keepInside, keepOutside)` initializes `builderA` and `builderB` (each optionally to undefined), with undefined `builderA1` and `builderB1`\r\n * * `builders.enableSideBuilders()` makes `builderA1` and `builderB1` match `builderA` and `builderB`.\r\n * * construction methods aim their facets at appropriate builders if defined.\r\n * * @public\r\n */\r\nexport class ClippedPolyfaceBuilders {\r\n /** An available builder. Typically the \"inside\" parts */\r\n public builderA?: PolyfaceBuilder;\r\n /** An available builder. Typically the \"outside\" parts */\r\n public builderB?: PolyfaceBuilder;\r\n /** request to construct cut faces */\r\n public buildClosureFaces?: boolean;\r\n private constructor(builderA: PolyfaceBuilder | undefined, builderB: PolyfaceBuilder | undefined, buildClosureFaces: boolean = false) {\r\n this.builderA = builderA;\r\n this.builderB = builderB;\r\n this.buildClosureFaces = buildClosureFaces;\r\n }\r\n /** Simple create with default options on builder. */\r\n public static create(keepInside: boolean = true, keepOutside: boolean = false, buildSideFaces: boolean = false) {\r\n return new ClippedPolyfaceBuilders(keepInside ? PolyfaceBuilder.create() : undefined, keepOutside ? PolyfaceBuilder.create() : undefined, buildSideFaces);\r\n }\r\n\r\n public claimPolyface(selector: 0 | 1, fixup: boolean, tolerance: number = Geometry.smallMetricDistance): IndexedPolyface | undefined {\r\n const builder = selector === 0 ? this.builderA : this.builderB;\r\n if (builder) {\r\n let polyface = builder.claimPolyface(true, tolerance);\r\n if (fixup) {\r\n polyface = PolyfaceQuery.cloneWithTVertexFixup(polyface);\r\n polyface = PolyfaceQuery.cloneWithDanglingEdgesRemoved(polyface);\r\n }\r\n return polyface;\r\n }\r\n return undefined;\r\n }\r\n}\r\n/** PolyfaceClip is a static class gathering operations using Polyfaces and clippers.\r\n * @public\r\n */\r\nexport class PolyfaceClip {\r\n /** Clip each facet of polyface to the ClipPlane.\r\n * * Return all surviving clip as a new mesh.\r\n * * WARNING: The new mesh is \"points only\" -- parameters, normals, etc are not interpolated\r\n */\r\n public static clipPolyfaceClipPlaneWithClosureFace(polyface: Polyface, clipper: ClipPlane, insideClip: boolean = true, buildClosureFaces: boolean = true) {\r\n return this.clipPolyfaceClipPlane(polyface, clipper, insideClip, buildClosureFaces);\r\n }\r\n /** Clip each facet of polyface to the ClipPlane.\r\n * * Return all surviving clip as a new mesh.\r\n * * WARNING: The new mesh is \"points only\" -- parameters, normals, etc are not interpolated\r\n */\r\n public static clipPolyfaceClipPlane(polyface: Polyface, clipper: ClipPlane, insideClip: boolean = true, buildClosureFaces: boolean = false): Polyface {\r\n const builders = ClippedPolyfaceBuilders.create(insideClip, !insideClip, buildClosureFaces);\r\n this.clipPolyfaceInsideOutside(polyface, clipper, builders);\r\n return builders.claimPolyface(insideClip ? 0 : 1, true)!;\r\n }\r\n\r\n /** Clip each facet of polyface to the ClipPlane.\r\n * * Return surviving clip as a new mesh.\r\n * * WARNING: The new mesh is \"points only\".\r\n */\r\n public static clipPolyfaceConvexClipPlaneSet(polyface: Polyface, clipper: ConvexClipPlaneSet): Polyface {\r\n const visitor = polyface.createVisitor(0);\r\n const builder = PolyfaceBuilder.create();\r\n const work = new GrowableXYZArray(10);\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n clipper.clipConvexPolygonInPlace(visitor.point, work);\r\n if (visitor.point.length > 2)\r\n builder.addPolygonGrowableXYZArray(visitor.point);\r\n }\r\n return builder.claimPolyface(true);\r\n }\r\n\r\n /** Clip each facet of polyface to the the clippers.\r\n * * Add inside, outside fragments to builderA, builderB\r\n * * This does not consider params, normals, colors. Just points.\r\n * * outputSelect determines how the clip output is structured\r\n * * 0 outputs all shards -- this may have many interior edges.\r\n * * 1 stitches shards together to get cleaner facets.\r\n */\r\n public static clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface: Polyface | PolyfaceVisitor, allClippers: UnionOfConvexClipPlaneSets, destination: ClippedPolyfaceBuilders, outputSelector: number = 1) {\r\n if (polyface instanceof Polyface) {\r\n this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface.createVisitor(0), allClippers, destination, outputSelector);\r\n return;\r\n }\r\n const builderA = destination.builderA;\r\n const builderB = destination.builderB;\r\n const visitor = polyface; // alias; we have a visitor now\r\n const cache = new GrowableXYZArrayCache();\r\n const insideShards: GrowableXYZArray[] = [];\r\n const outsideShards: GrowableXYZArray[] = [];\r\n const residualPolygons: ClipCandidate[] = [];\r\n let candidate: ClipCandidate | undefined;\r\n const outsideParts: GrowableXYZArray[] = [];\r\n\r\n const numConvexSet = allClippers.convexSets.length;\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n residualPolygons.push(new ClipCandidate(cache.grabAndFill(visitor.point), 0));\r\n while ((candidate = residualPolygons.pop()) !== undefined) {\r\n const convexSetIndex = candidate.nextConvexSetIndex;\r\n if (convexSetIndex >= numConvexSet) {\r\n // ths remnant polygon is OUT ...\r\n if (candidate.points.length > 2)\r\n outsideShards.push(candidate.points);\r\n } else {\r\n const clipper = allClippers.convexSets[convexSetIndex];\r\n outsideParts.length = 0; // NO NO -- why isn't it empty from prior step cleanup?\r\n const insidePart = clipper.clipInsidePushOutside(candidate.points, outsideParts, cache);\r\n if (insidePart) {\r\n if (insidePart.length > 2)\r\n insideShards.push(insidePart);\r\n // Keep outside parts active for clip by later facets . . .\r\n for (const outsidePolygon of outsideParts) {\r\n residualPolygons.push(new ClipCandidate(outsidePolygon, convexSetIndex + 1));\r\n }\r\n } else {\r\n // Nothing was insidePart. The outside parts might be split by intermediate steps -- but all the pieces are there.\r\n candidate.nextConvexSetIndex++;\r\n residualPolygons.push(candidate);\r\n }\r\n outsideParts.length = 0;\r\n }\r\n }\r\n if (outsideShards.length === 0) {\r\n builderA?.addPolygonGrowableXYZArray(visitor.point);\r\n } else if (insideShards.length === 0) {\r\n // the facet spanned clippers but is intact outside\r\n builderB?.addPolygonGrowableXYZArray(visitor.point);\r\n } else {\r\n const localToWorld = FrameBuilder.createRightHandedFrame(undefined, visitor.point);\r\n let worldToLocal: Transform | undefined;\r\n if (outputSelector === 1 && localToWorld !== undefined\r\n && undefined !== (worldToLocal = localToWorld.inverse())) {\r\n this.cleanupAndAddRegion(builderA, insideShards, worldToLocal, localToWorld);\r\n this.cleanupAndAddRegion(builderB, outsideShards, worldToLocal, localToWorld);\r\n } else {\r\n for (const shard of insideShards)\r\n this.addPolygonToBuilderAndDropToCache(shard, builderA, cache);\r\n for (const shard of outsideShards)\r\n this.addPolygonToBuilderAndDropToCache(shard, builderB, cache);\r\n }\r\n }\r\n outsideShards.length = 0;\r\n insideShards.length = 0;\r\n }\r\n cache.dropAllToCache(outsideParts);\r\n if (destination.buildClosureFaces) {\r\n for (const clipper of allClippers.convexSets) {\r\n this.buildClosureFacesForConvexSet(visitor, clipper, destination, cache);\r\n }\r\n }\r\n }\r\n private static addRegion(builder: PolyfaceBuilder | undefined, region: AnyRegion | undefined) {\r\n if (builder !== undefined && region !== undefined) {\r\n if (region instanceof Loop && region.children.length === 1 && region.children[0] instanceof LineString3d) {\r\n builder.addPolygonGrowableXYZArray(region.children[0].packedPoints);\r\n } else if (region instanceof UnionRegion) {\r\n for (const child of region.children)\r\n this.addRegion(builder, child);\r\n } else {\r\n assert(!\"unexpected region encountered\");\r\n }\r\n }\r\n }\r\n // WARNING: shards are transformed into local system, not reverted!!!\r\n private static cleanupAndAddRegion(builder: PolyfaceBuilder | undefined, shards: GrowableXYZArray[],\r\n worldToLocal: Transform | undefined, localToWorld: Transform | undefined) {\r\n if (builder !== undefined && shards.length > 0) {\r\n if (worldToLocal)\r\n GrowableXYZArray.multiplyTransformInPlace(worldToLocal, shards);\r\n const outsidePieces = RegionOps.polygonBooleanXYToLoops(shards, RegionBinaryOpType.Union, []);\r\n if (outsidePieces && outsidePieces.children.length > 0) {\r\n if (localToWorld)\r\n outsidePieces.tryTransformInPlace(localToWorld);\r\n RegionOps.consolidateAdjacentPrimitives(outsidePieces); // source of the T-vertices removed in claimPolyface\r\n this.addRegion(builder, outsidePieces);\r\n }\r\n }\r\n }\r\n private static addPolygonToBuilderAndDropToCache(polygon: GrowableXYZArray | undefined, builder: PolyfaceBuilder | undefined, cache: GrowableXYZArrayCache) {\r\n if (polygon) {\r\n if (builder)\r\n builder.addPolygonGrowableXYZArray(polygon);\r\n cache.dropToCache(polygon);\r\n }\r\n }\r\n private static addPolygonArrayToBuilderAndDropToCache(polygonArray: GrowableXYZArray[], builder: PolyfaceBuilder | undefined, cache: GrowableXYZArrayCache) {\r\n let polygon;\r\n while ((polygon = polygonArray.pop()) !== undefined) {\r\n this.addPolygonToBuilderAndDropToCache(polygon, builder, cache);\r\n }\r\n }\r\n private static createChainContextsForConvexClipPlaneSet(clipper: ConvexClipPlaneSet): ChainMergeContext[] {\r\n const chainContexts = [];\r\n for (const plane of clipper.planes) {\r\n if (!plane.interior) {\r\n const c = ChainMergeContext.create();\r\n c.plane = plane;\r\n c.convexClipper = clipper;\r\n chainContexts.push(c);\r\n }\r\n }\r\n return chainContexts;\r\n }\r\n\r\n /** Clip each facet of polyface to the the clippers.\r\n * * Add inside, outside fragments to builderA, builderB\r\n * * This does not consider params, normals, colors. Just points.\r\n * @internal\r\n */\r\n public static clipPolyfaceConvexClipPlaneSetToBuilders(polyface: Polyface, clipper: ConvexClipPlaneSet, destination: ClippedPolyfaceBuilders) {\r\n const builderA = destination.builderA;\r\n const builderB = destination.builderB;\r\n const visitor = polyface.createVisitor(0);\r\n const cache = new GrowableXYZArrayCache();\r\n const outsideParts: GrowableXYZArray[] = [];\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n // !!! currentCandidates and next candidates are empty at this point !!!\r\n const insidePart = clipper.clipInsidePushOutside(visitor.point, outsideParts, cache);\r\n if (insidePart === undefined) {\r\n // everything is out ... outsideParts might be fragmented. Save only the original polygon\r\n builderB?.addPolygonGrowableXYZArray(visitor.point);\r\n cache.dropToCache(insidePart);\r\n cache.dropAllToCache(outsideParts);\r\n }\r\n this.addPolygonToBuilderAndDropToCache(insidePart, builderA, cache);\r\n this.addPolygonArrayToBuilderAndDropToCache(outsideParts, builderB, cache);\r\n }\r\n this.buildClosureFacesForConvexSet(visitor, clipper, destination, cache);\r\n }\r\n /**\r\n *\r\n * @param visitor visitor for all facets of interest (entire polyface)\r\n * @param clipper ConvexClipPlaneSet to apply\r\n * @param destination builders to receive inside, outside parts\r\n * @param cache GrowableArray cache.\r\n */\r\n private static buildClosureFacesForConvexSet(visitor: PolyfaceVisitor, clipper: ConvexClipPlaneSet, destination: ClippedPolyfaceBuilders,\r\n cache: GrowableXYZArrayCache) {\r\n if (destination.buildClosureFaces) {\r\n const chainContexts = this.createChainContextsForConvexClipPlaneSet(clipper);\r\n const workPoints = cache.grabFromCache();\r\n const facetPoints = cache.grabFromCache();\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n for (const chainContext of chainContexts) {\r\n const plane = chainContext.plane;\r\n facetPoints.clear();\r\n facetPoints.pushFrom(visitor.point);\r\n IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace(plane!, facetPoints, workPoints);\r\n chainContext.addSegmentsOnPlane(facetPoints, true);\r\n }\r\n }\r\n cache.dropToCache(facetPoints);\r\n cache.dropToCache(workPoints);\r\n for (const chainContext of chainContexts) {\r\n this.addClosureFacets(chainContext, destination, cache);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param visitor visitor for all facets of interest (entire polyface)\r\n * @param clipper ConvexClipPlaneSet to apply\r\n * @param destination builders to receive inside, outside parts\r\n * @param cache GrowableArray cache.\r\n */\r\n private static buildClosureFacesForPlane(visitor: PolyfaceVisitor, plane: PlaneAltitudeEvaluator, destination: ClippedPolyfaceBuilders,\r\n cache: GrowableXYZArrayCache) {\r\n if (destination.buildClosureFaces) {\r\n const chainContext = ChainMergeContext.create();\r\n chainContext.plane = plane;\r\n const workPoints = cache.grabFromCache();\r\n const facetPoints = cache.grabFromCache();\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n facetPoints.clear();\r\n facetPoints.pushFrom(visitor.point);\r\n IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace(plane, facetPoints, workPoints);\r\n chainContext.addSegmentsOnPlane(facetPoints, true);\r\n }\r\n cache.dropToCache(facetPoints);\r\n cache.dropToCache(workPoints);\r\n this.addClosureFacets(chainContext, destination, cache);\r\n }\r\n }\r\n private static evaluateInwardPlaneNormal(plane: PlaneAltitudeEvaluator, scale: number): Vector3d {\r\n return Vector3d.create(plane.velocityXYZ(scale, 0, 0), plane.velocityXYZ(0, scale, 0), plane.velocityXYZ(0, 0, scale));\r\n }\r\n /**\r\n * * Triangulate the contour.\r\n * * Add all the triangles to both builders\r\n * * reversed in builderB.\r\n */\r\n private static addClippedContour(contour: SweepContour, clipper: ConvexClipPlaneSet | undefined, destination: ClippedPolyfaceBuilders, cache: GrowableXYZArrayCache) {\r\n const polygonA = cache.grabFromCache();\r\n const polygonB = cache.grabFromCache();\r\n if (destination.builderB)\r\n destination.builderB.toggleReversedFacetFlag();\r\n contour.announceFacets((facets: IndexedPolyface) => {\r\n const visitor = facets.createVisitor();\r\n // The contour facets are convex .. easy clip ..\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n polygonA.clear();\r\n polygonA.pushFromGrowableXYZArray(visitor.point);\r\n clipper?.clipConvexPolygonInPlace(polygonA, polygonB);\r\n if (polygonA.length > 2) {\r\n destination.builderA?.addPolygonGrowableXYZArray(polygonA);\r\n destination.builderB?.addPolygonGrowableXYZArray(polygonA);\r\n }\r\n }\r\n }, undefined);\r\n if (destination.builderB)\r\n destination.builderB.toggleReversedFacetFlag();\r\n cache.dropToCache(polygonA);\r\n cache.dropToCache(polygonB);\r\n }\r\n\r\n /**\r\n * Gather loops out of the ChainMergeContext. Add to destination arrays.\r\n * @param chainContext ASSUMED TO HAVE A PLANE\r\n * @param destination\r\n */\r\n private static addClosureFacets(chainContext: ChainMergeContext, destination: ClippedPolyfaceBuilders, cache: GrowableXYZArrayCache) {\r\n const clipper = chainContext.convexClipper;\r\n const plane = chainContext.plane!;\r\n const outwardNormal = this.evaluateInwardPlaneNormal(plane, -1.0);\r\n chainContext.clusterAndMergeVerticesXYZ();\r\n const loops = chainContext.collectMaximalGrowableXYZArrays();\r\n if (loops.length > 1) {\r\n const loopSets = PolygonOps.sortOuterAndHoleLoops(loops, outwardNormal);\r\n for (const loopSet of loopSets) {\r\n PolygonOps.orientLoopsCCWForOutwardNormalInPlace(loopSet, outwardNormal);\r\n const contour = SweepContour.createForPolygon(loopSet, outwardNormal);\r\n if (contour !== undefined) {\r\n if (clipper) {\r\n this.addClippedContour(contour, clipper, destination, cache);\r\n } else {\r\n if (destination.builderA)\r\n contour.emitFacets(destination.builderA, true, clipper);\r\n if (destination.builderB)\r\n contour.emitFacets(destination.builderB, false, clipper);\r\n }\r\n }\r\n }\r\n } else {\r\n PolygonOps.orientLoopsCCWForOutwardNormalInPlace(loops, outwardNormal);\r\n const contour = SweepContour.createForPolygon(loops, outwardNormal);\r\n if (contour !== undefined) {\r\n if (clipper) {\r\n this.addClippedContour(contour, clipper, destination, cache);\r\n } else {\r\n if (destination.builderA)\r\n contour.emitFacets(destination.builderA, true, clipper);\r\n if (destination.builderB)\r\n contour.emitFacets(destination.builderB, false, clipper);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /** Clip each facet of polyface to the the clippers.\r\n * * Add inside, outside fragments to builderA, builderB\r\n * * This does not consider params, normals, colors. Just points.\r\n * @internal\r\n */\r\n public static clipPolyfaceClipPlaneToBuilders(polyface: Polyface, clipper: PlaneAltitudeEvaluator, destination: ClippedPolyfaceBuilders) {\r\n const builderA = destination.builderA;\r\n const builderB = destination.builderB;\r\n const visitor = polyface.createVisitor(0);\r\n const cache = new GrowableXYZArrayCache();\r\n const inside = cache.grabFromCache();\r\n const outside = cache.grabFromCache();\r\n const range = Range1d.createNull();\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n // !!! currentCandidates and next candidates are empty at this point !!!\r\n IndexedXYZCollectionPolygonOps.splitConvexPolygonInsideOutsidePlane(clipper, visitor.point, inside, outside, range);\r\n if (builderA)\r\n builderA.addPolygonGrowableXYZArray(inside);\r\n if (builderB)\r\n builderB.addPolygonGrowableXYZArray(outside);\r\n }\r\n this.buildClosureFacesForPlane(visitor, clipper, destination, cache);\r\n cache.dropToCache(inside);\r\n cache.dropToCache(outside);\r\n }\r\n\r\n /** Clip each facet of polyface to the ClipPlane or ConvexClipPlaneSet\r\n * * accumulate inside and outside facets -- to destination.builderA and destination.builderB\r\n * * if `destination.buildClosureFaces` is set, and also build closure facets\r\n * * This method parses the variant input types and calls a more specific method.\r\n * * WARNING: The new mesh is \"points only\".\r\n * * outputSelect applies only for UnionOfConvexClipPlaneSets -- see [[PolyfaceClip.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders]]\r\n */\r\n public static clipPolyfaceInsideOutside(polyface: Polyface, clipper: ClipPlane | ConvexClipPlaneSet | UnionOfConvexClipPlaneSets, destination: ClippedPolyfaceBuilders,\r\n outputSelect: number = 0) {\r\n if (clipper instanceof ClipPlane) {\r\n this.clipPolyfaceClipPlaneToBuilders(polyface, clipper, destination);\r\n } else if (clipper instanceof ConvexClipPlaneSet) {\r\n this.clipPolyfaceConvexClipPlaneSetToBuilders(polyface, clipper, destination);\r\n } else if (clipper instanceof UnionOfConvexClipPlaneSets) {\r\n this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface, clipper, destination, outputSelect);\r\n }\r\n }\r\n /** Clip each facet of polyface to the ClipPlane or ConvexClipPlaneSet\r\n * * This method parses the variant input types and calls a more specific method.\r\n * * To get both inside and outside parts, use clipPolyfaceInsideOutside\r\n * * WARNING: The new mesh is \"points only\".\r\n */\r\n public static clipPolyface(polyface: Polyface, clipper: ClipPlane | ConvexClipPlaneSet): Polyface | undefined {\r\n if (clipper instanceof ClipPlane)\r\n return this.clipPolyfaceClipPlane(polyface, clipper);\r\n if (clipper instanceof ConvexClipPlaneSet)\r\n return this.clipPolyfaceConvexClipPlaneSet(polyface, clipper);\r\n // (The if tests exhaust the type space -- this line is unreachable.)\r\n return undefined;\r\n }\r\n /**\r\n * Drape the region onto the mesh.\r\n * * This method computes the portion of the input mesh that lies inside the clipper generated from sweeping the input region in the given direction.\r\n * @param mesh input mesh, untouched\r\n * @param region planar region to drape onto mesh\r\n * @param sweepVector optional sweep direction for region, magnitude unused. If undefined, sweep is along the region normal.\r\n * @param options how to stroke the region boundary\r\n * @returns clipped facets. No other mesh data but vertices appear in output.\r\n */\r\n public static drapeRegion(mesh: Polyface | PolyfaceVisitor, region: AnyRegion, sweepVector?: Vector3d, options?: StrokeOptions): IndexedPolyface | undefined {\r\n if (mesh instanceof Polyface)\r\n return this.drapeRegion(mesh.createVisitor(0), region, sweepVector, options);\r\n const contour = SweepContour.createForLinearSweep(region);\r\n if (!contour)\r\n return undefined;\r\n let sweep = sweepVector;\r\n if (sweepVector && contour.localToWorld.matrix.dotColumnZ(sweepVector) < 0.0)\r\n sweep = sweepVector.scale(-1); // avoid inverted clipper\r\n const clipper = contour.sweepToUnionOfConvexClipPlaneSets(sweep, false, false, options);\r\n if (!clipper)\r\n return undefined;\r\n const builders = ClippedPolyfaceBuilders.create(true); // we want only the facets inside the clipper\r\n this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(mesh, clipper, builders, 1);\r\n return builders.claimPolyface(0, true);\r\n }\r\n /** Find consecutive points around a polygon (with implied closure edge) that are ON a plane\r\n * @param points array of points around polygon. Closure edge is implied.\r\n * @param chainContext context receiving edges\r\n * @param point0 work point\r\n * @param point1 work point\r\n */\r\n private static collectEdgesOnPlane(points: GrowableXYZArray, clipper: ClipPlane, chainContext: ChainMergeContext, point0: Point3d, point1: Point3d) {\r\n const n = points.length;\r\n if (n > 1) {\r\n points.getPoint3dAtUncheckedPointIndex(n - 1, point0);\r\n for (let i = 0; i < n; i++) {\r\n points.getPoint3dAtUncheckedPointIndex(i, point1);\r\n if (clipper.isPointOn(point0) && clipper.isPointOn(point1))\r\n chainContext.addSegment(point0, point1);\r\n point0.setFromPoint3d(point1);\r\n }\r\n }\r\n }\r\n /** Intersect each facet with the clip plane. (Producing intersection edges.)\r\n * * Return all edges chained as array of LineString3d.\r\n */\r\n public static sectionPolyfaceClipPlane(polyface: Polyface, clipper: ClipPlane): LineString3d[] {\r\n const chainContext = ChainMergeContext.create();\r\n\r\n const visitor = polyface.createVisitor(0);\r\n const work = new GrowableXYZArray(10);\r\n const point0 = Point3d.create();\r\n const point1 = Point3d.create();\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n clipper.clipConvexPolygonInPlace(visitor.point, work, true);\r\n this.collectEdgesOnPlane(visitor.point, clipper, chainContext, point0, point1);\r\n }\r\n chainContext.clusterAndMergeVerticesXYZ();\r\n return chainContext.collectMaximalChains();\r\n }\r\n\r\n /**\r\n * * Split facets of mesh \"A\" into parts that are\r\n * * under mesh \"B\"\r\n * * over mesh \"B\"\r\n * * both meshes are represented by visitors rather than the meshes themselves\r\n * * If the data in-hand is a mesh, call with `mesh.createVisitor`\r\n * * The respective clip parts are fed to caller-supplied builders.\r\n * * Caller may set either or both builders to toggle facet order (e.g. toggle the lower facets to make them \"point down\" in cut-fill application)\r\n * * This step is commonly one-half of \"cut fill\".\r\n * * A \"cut fill\" wrapper will call this twice with the visitor and builder roles reversed.\r\n * * Both polyfaces are assumed convex with CCW orientation viewed from above.\r\n * @param visitorA iterator over polyface to be split.\r\n * @param visitorB iterator over polyface that acts as a splitter\r\n * @param orientUnderMeshDownward if true, the \"meshAUnderB\" output is oriented with its normals reversed so it can act as the bottom side of a cut-fill pair.\r\n */\r\n public static clipPolyfaceUnderOverConvexPolyfaceIntoBuilders(visitorA: PolyfaceVisitor, visitorB: PolyfaceVisitor,\r\n builderAUnderB: PolyfaceBuilder | undefined,\r\n builderAOverB: PolyfaceBuilder | undefined) {\r\n const rangeDataA = PolyfaceQuery.collectRangeLengthData(visitorA);\r\n const searchA = RangeSearch.create2dSearcherForRangeLengthData<number>(rangeDataA);\r\n if (!searchA)\r\n return;\r\n const range = Range3d.create();\r\n for (visitorA.reset(); visitorA.moveToNextFacet();) {\r\n visitorA.point.setRange(range);\r\n searchA.addRange(range, visitorA.currentReadIndex());\r\n }\r\n const xyClip = new GrowableXYZArray(10);\r\n const workArray = new GrowableXYZArray(10);\r\n const xyFrustum = ConvexClipPlaneSet.createEmpty();\r\n const below = new GrowableXYZArray(10);\r\n const above = new GrowableXYZArray(10);\r\n const planeOfFacet = ClipPlane.createNormalAndPointXYZXYZ(0, 0, 1, 0, 0, 0)!;\r\n const altitudeRange = Range1d.createNull();\r\n\r\n for (visitorB.reset(); visitorB.moveToNextFacet();) {\r\n visitorB.point.setRange(range);\r\n ConvexClipPlaneSet.setPlaneAndXYLoopCCW(visitorB.point, planeOfFacet, xyFrustum);\r\n searchA.searchRange2d(range, (_rangeA: Range2d, readIndexA: number) => {\r\n visitorA.moveToReadIndex(readIndexA);\r\n xyFrustum.polygonClip(visitorA.point, xyClip, workArray);\r\n // builderAOverB.addPolygonGrowableXYZArray(xyClip);\r\n if (xyClip.length > 0) {\r\n // planeOfFacet.convexPolygonSplitInsideOutsideGrowableArrays(xyClip, below, above, altitudeRange);\r\n IndexedXYZCollectionPolygonOps.splitConvexPolygonInsideOutsidePlane(planeOfFacet, xyClip, below, above, altitudeRange);\r\n if (below.length > 0 && builderAUnderB)\r\n builderAUnderB.addPolygonGrowableXYZArray(below);\r\n if (above.length > 0 && builderAOverB)\r\n builderAOverB.addPolygonGrowableXYZArray(above);\r\n }\r\n return true;\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * * Split facets into vertically overlapping sections\r\n * * both meshes are represented by visitors rather than the meshes themselves\r\n * * If the data in-hand is a mesh, call with `mesh.createVisitor`\r\n * * The respective clip parts are returned as separate meshes.\r\n * * Caller may set either or both builders to toggle facet order (e.g. toggle the lower facets to make them \"point down\" in cut-fill application)\r\n * * Both polyfaces are assumed convex with CCW orientation viewed from above.\r\n * * Each output contains some facets from meshA and some from meshB:\r\n * * meshAUnderB -- areas where meshA is underneath mesh B.\r\n * * If A is \"design surface\" and B is existing DTM, this is \"cut\" volume\r\n * * meshAOverB -- areas where meshB is over meshB.\r\n * * If A is \"design surface\" and B is existing DTM, this is \"fill\" volume\r\n *\r\n * @param visitorA iterator over polyface to be split.\r\n * @param visitorB iterator over polyface that acts as a splitter\r\n * @param orientUnderMeshDownward if true, the \"meshAUnderB\" output is oriented with its normals reversed so it can act as the bottom side of a cut-fill pair.\r\n */\r\n public static computeCutFill(meshA: IndexedPolyface, meshB: IndexedPolyface): { meshAUnderB: IndexedPolyface, meshAOverB: IndexedPolyface } {\r\n const visitorA = meshA.createVisitor();\r\n const visitorB = meshB.createVisitor();\r\n const builderAUnderB = PolyfaceBuilder.create();\r\n const builderAOverB = PolyfaceBuilder.create();\r\n builderAUnderB.toggleReversedFacetFlag();\r\n this.clipPolyfaceUnderOverConvexPolyfaceIntoBuilders(visitorA, visitorB, builderAUnderB, builderAOverB);\r\n builderAUnderB.toggleReversedFacetFlag();\r\n builderAOverB.toggleReversedFacetFlag();\r\n this.clipPolyfaceUnderOverConvexPolyfaceIntoBuilders(visitorB, visitorA, builderAOverB, builderAUnderB);\r\n return {\r\n meshAUnderB: builderAUnderB.claimPolyface(),\r\n meshAOverB: builderAOverB.claimPolyface(),\r\n };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"PolyfaceClip.js","sourceRoot":"","sources":["../../../src/polyface/PolyfaceClip.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,mEAAmE;AACnE,sDAA6C;AAC7C,qDAAkD;AAClD,uEAAoE;AACpE,uFAAoF;AAEpF,wDAAqD;AACrD,wCAAqC;AACrC,kDAAmE;AAEnE,sDAAmD;AACnD,0CAA+D;AAC/D,6DAA0D;AAC1D,qEAAkE;AAClE,mEAAkE;AAClE,yDAAsF;AACtF,+CAAgE;AAChE,2EAA0E;AAE1E,wDAAqD;AACrD,uDAA2D;AAC3D,yDAAsD;AACtD,yCAAwE;AACxE,uDAAoD;AACpD,mDAAgD;AAEhD;;;GAGG;AACH,MAAM,aAAa;IAGjB,YAAmB,MAAwB,EAAE,kBAA0B;QACrE,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,MAAa,uBAAuB;IAOlC,YAAoB,QAAqC,EAAE,QAA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J;IACH,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACI,MAAM,CAAC,cAAc,CAAC,KAAsB,EAAE,KAAsB;QACzE,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACvC,MAAM,cAAc,GAAG,iCAAe,CAAC,MAAM,EAAE,CAAC;QAChD,MAAM,aAAa,GAAG,iCAAe,CAAC,MAAM,EAAE,CAAC;QAC/C,cAAc,CAAC,uBAAuB,EAAE,CAAC;QACzC,IAAI,CAAC,+CAA+C,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;QACxG,cAAc,CAAC,uBAAuB,EAAE,CAAC;QACzC,aAAa,CAAC,uBAAuB,EAAE,CAAC;QACxC,IAAI,CAAC,+CAA+C,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;QACxG,OAAO;YACL,WAAW,EAAE,cAAc,CAAC,aAAa,EAAE;YAC3C,UAAU,EAAE,aAAa,CAAC,aAAa,EAAE;SAC1C,CAAC;IACJ,CAAC;CACF;AA7gBD,oCA6gBC","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 Polyface\n */\n\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\nimport { assert } from \"@itwin/core-bentley\";\nimport { ClipPlane } from \"../clipping/ClipPlane\";\nimport { ConvexClipPlaneSet } from \"../clipping/ConvexClipPlaneSet\";\nimport { UnionOfConvexClipPlaneSets } from \"../clipping/UnionOfConvexClipPlaneSets\";\nimport { AnyRegion } from \"../curve/CurveTypes\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Loop } from \"../curve/Loop\";\nimport { RegionBinaryOpType, RegionOps } from \"../curve/RegionOps\";\nimport { StrokeOptions } from \"../curve/StrokeOptions\";\nimport { UnionRegion } from \"../curve/UnionRegion\";\nimport { Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { FrameBuilder } from \"../geometry3d/FrameBuilder\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { IndexedXYZCollectionPolygonOps, PolygonOps } from \"../geometry3d/PolygonOps\";\nimport { Range1d, Range2d, Range3d } from \"../geometry3d/Range\";\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { SweepContour } from \"../solid/SweepContour\";\nimport { ChainMergeContext } from \"../topology/ChainMerge\";\nimport { RangeSearch } from \"./multiclip/RangeSearch\";\nimport { IndexedPolyface, Polyface, PolyfaceVisitor } from \"./Polyface\";\nimport { PolyfaceBuilder } from \"./PolyfaceBuilder\";\nimport { PolyfaceQuery } from \"./PolyfaceQuery\";\n\n/**\n * carrier for a point array with an index into UnionOfConvexClipPlaneSets\n * @private\n */\nclass ClipCandidate {\n public nextConvexSetIndex: number;\n public points: GrowableXYZArray;\n public constructor(points: GrowableXYZArray, nextConvexSetIndex: number) {\n this.nextConvexSetIndex = nextConvexSetIndex;\n this.points = points;\n }\n}\n\n/**\n * A pair of PolyfaceBuilder objects, for use by clippers that emit inside and outside parts.\n * * There are nominally 4 builders:\n * * builderA collects simple \"inside\" clip.\n * * builderB collects simple \"outside\" clip.\n * * builderA1 collects \"side\" clip for inside.\n * * builderB1 collets \"side\" clip for outside.\n * * `static ClippedPolyfaceBuilders.create(keepInside, keepOutside)` initializes `builderA` and `builderB` (each optionally to undefined), with undefined `builderA1` and `builderB1`\n * * `builders.enableSideBuilders()` makes `builderA1` and `builderB1` match `builderA` and `builderB`.\n * * construction methods aim their facets at appropriate builders if defined.\n * * @public\n */\nexport class ClippedPolyfaceBuilders {\n /** An available builder. Typically the \"inside\" parts */\n public builderA?: PolyfaceBuilder;\n /** An available builder. Typically the \"outside\" parts */\n public builderB?: PolyfaceBuilder;\n /** request to construct cut faces */\n public buildClosureFaces?: boolean;\n private constructor(builderA: PolyfaceBuilder | undefined, builderB: PolyfaceBuilder | undefined, buildClosureFaces: boolean = false) {\n this.builderA = builderA;\n this.builderB = builderB;\n this.buildClosureFaces = buildClosureFaces;\n }\n /** Simple create with default options on builder. */\n public static create(keepInside: boolean = true, keepOutside: boolean = false, buildSideFaces: boolean = false) {\n return new ClippedPolyfaceBuilders(keepInside ? PolyfaceBuilder.create() : undefined, keepOutside ? PolyfaceBuilder.create() : undefined, buildSideFaces);\n }\n\n public claimPolyface(selector: 0 | 1, fixup: boolean, tolerance: number = Geometry.smallMetricDistance): IndexedPolyface | undefined {\n const builder = selector === 0 ? this.builderA : this.builderB;\n if (builder) {\n let polyface = builder.claimPolyface(true, tolerance);\n if (fixup) {\n polyface = PolyfaceQuery.cloneWithTVertexFixup(polyface);\n polyface = PolyfaceQuery.cloneWithDanglingEdgesRemoved(polyface);\n }\n return polyface;\n }\n return undefined;\n }\n}\n/** PolyfaceClip is a static class gathering operations using Polyfaces and clippers.\n * @public\n */\nexport class PolyfaceClip {\n /** Clip each facet of polyface to the ClipPlane.\n * * Return all surviving clip as a new mesh.\n * * WARNING: The new mesh is \"points only\" -- parameters, normals, etc are not interpolated\n */\n public static clipPolyfaceClipPlaneWithClosureFace(polyface: Polyface, clipper: ClipPlane, insideClip: boolean = true, buildClosureFaces: boolean = true) {\n return this.clipPolyfaceClipPlane(polyface, clipper, insideClip, buildClosureFaces);\n }\n /** Clip each facet of polyface to the ClipPlane.\n * * Return all surviving clip as a new mesh.\n * * WARNING: The new mesh is \"points only\" -- parameters, normals, etc are not interpolated\n */\n public static clipPolyfaceClipPlane(polyface: Polyface, clipper: ClipPlane, insideClip: boolean = true, buildClosureFaces: boolean = false): Polyface {\n const builders = ClippedPolyfaceBuilders.create(insideClip, !insideClip, buildClosureFaces);\n this.clipPolyfaceInsideOutside(polyface, clipper, builders);\n return builders.claimPolyface(insideClip ? 0 : 1, true)!;\n }\n\n /** Clip each facet of polyface to the ClipPlane.\n * * Return surviving clip as a new mesh.\n * * WARNING: The new mesh is \"points only\".\n */\n public static clipPolyfaceConvexClipPlaneSet(polyface: Polyface, clipper: ConvexClipPlaneSet): Polyface {\n const visitor = polyface.createVisitor(0);\n const builder = PolyfaceBuilder.create();\n const work = new GrowableXYZArray(10);\n for (visitor.reset(); visitor.moveToNextFacet();) {\n clipper.clipConvexPolygonInPlace(visitor.point, work);\n if (visitor.point.length > 2)\n builder.addPolygonGrowableXYZArray(visitor.point);\n }\n return builder.claimPolyface(true);\n }\n\n /** Clip each facet of polyface to the the clippers.\n * * Add inside, outside fragments to builderA, builderB\n * * This does not consider params, normals, colors. Just points.\n * * outputSelect determines how the clip output is structured\n * * 0 outputs all shards -- this may have many interior edges.\n * * 1 stitches shards together to get cleaner facets.\n */\n public static clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface: Polyface | PolyfaceVisitor, allClippers: UnionOfConvexClipPlaneSets, destination: ClippedPolyfaceBuilders, outputSelector: number = 1) {\n if (polyface instanceof Polyface) {\n this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface.createVisitor(0), allClippers, destination, outputSelector);\n return;\n }\n const builderA = destination.builderA;\n const builderB = destination.builderB;\n const visitor = polyface; // alias; we have a visitor now\n const cache = new GrowableXYZArrayCache();\n const insideShards: GrowableXYZArray[] = [];\n const outsideShards: GrowableXYZArray[] = [];\n const residualPolygons: ClipCandidate[] = [];\n let candidate: ClipCandidate | undefined;\n const outsideParts: GrowableXYZArray[] = [];\n\n const numConvexSet = allClippers.convexSets.length;\n for (visitor.reset(); visitor.moveToNextFacet();) {\n residualPolygons.push(new ClipCandidate(cache.grabAndFill(visitor.point), 0));\n while ((candidate = residualPolygons.pop()) !== undefined) {\n const convexSetIndex = candidate.nextConvexSetIndex;\n if (convexSetIndex >= numConvexSet) {\n // ths remnant polygon is OUT ...\n if (candidate.points.length > 2)\n outsideShards.push(candidate.points);\n } else {\n const clipper = allClippers.convexSets[convexSetIndex];\n outsideParts.length = 0; // NO NO -- why isn't it empty from prior step cleanup?\n const insidePart = clipper.clipInsidePushOutside(candidate.points, outsideParts, cache);\n if (insidePart) {\n if (insidePart.length > 2)\n insideShards.push(insidePart);\n // Keep outside parts active for clip by later facets . . .\n for (const outsidePolygon of outsideParts) {\n residualPolygons.push(new ClipCandidate(outsidePolygon, convexSetIndex + 1));\n }\n } else {\n // Nothing was insidePart. The outside parts might be split by intermediate steps -- but all the pieces are there.\n candidate.nextConvexSetIndex++;\n residualPolygons.push(candidate);\n }\n outsideParts.length = 0;\n }\n }\n if (outsideShards.length === 0) {\n builderA?.addPolygonGrowableXYZArray(visitor.point);\n } else if (insideShards.length === 0) {\n // the facet spanned clippers but is intact outside\n builderB?.addPolygonGrowableXYZArray(visitor.point);\n } else {\n const localToWorld = FrameBuilder.createRightHandedFrame(undefined, visitor.point);\n let worldToLocal: Transform | undefined;\n if (outputSelector === 1 && localToWorld !== undefined\n && undefined !== (worldToLocal = localToWorld.inverse())) {\n this.cleanupAndAddRegion(builderA, insideShards, worldToLocal, localToWorld);\n this.cleanupAndAddRegion(builderB, outsideShards, worldToLocal, localToWorld);\n } else {\n for (const shard of insideShards)\n this.addPolygonToBuilderAndDropToCache(shard, builderA, cache);\n for (const shard of outsideShards)\n this.addPolygonToBuilderAndDropToCache(shard, builderB, cache);\n }\n }\n outsideShards.length = 0;\n insideShards.length = 0;\n }\n cache.dropAllToCache(outsideParts);\n if (destination.buildClosureFaces) {\n for (const clipper of allClippers.convexSets) {\n this.buildClosureFacesForConvexSet(visitor, clipper, destination, cache);\n }\n }\n }\n private static addRegion(builder: PolyfaceBuilder | undefined, region: AnyRegion | undefined) {\n if (builder !== undefined && region !== undefined) {\n if (region instanceof Loop && region.children.length === 1 && region.children[0] instanceof LineString3d) {\n builder.addPolygonGrowableXYZArray(region.children[0].packedPoints);\n } else if (region instanceof UnionRegion) {\n for (const child of region.children)\n this.addRegion(builder, child);\n } else {\n assert(!\"unexpected region encountered\");\n }\n }\n }\n // WARNING: shards are transformed into local system, not reverted!!!\n private static cleanupAndAddRegion(builder: PolyfaceBuilder | undefined, shards: GrowableXYZArray[],\n worldToLocal: Transform | undefined, localToWorld: Transform | undefined) {\n if (builder !== undefined && shards.length > 0) {\n if (worldToLocal)\n GrowableXYZArray.multiplyTransformInPlace(worldToLocal, shards);\n const outsidePieces = RegionOps.polygonBooleanXYToLoops(shards, RegionBinaryOpType.Union, []);\n if (outsidePieces && outsidePieces.children.length > 0) {\n if (localToWorld)\n outsidePieces.tryTransformInPlace(localToWorld);\n RegionOps.consolidateAdjacentPrimitives(outsidePieces); // source of the T-vertices removed in claimPolyface\n this.addRegion(builder, outsidePieces);\n }\n }\n }\n private static addPolygonToBuilderAndDropToCache(polygon: GrowableXYZArray | undefined, builder: PolyfaceBuilder | undefined, cache: GrowableXYZArrayCache) {\n if (polygon) {\n if (builder)\n builder.addPolygonGrowableXYZArray(polygon);\n cache.dropToCache(polygon);\n }\n }\n private static addPolygonArrayToBuilderAndDropToCache(polygonArray: GrowableXYZArray[], builder: PolyfaceBuilder | undefined, cache: GrowableXYZArrayCache) {\n let polygon;\n while ((polygon = polygonArray.pop()) !== undefined) {\n this.addPolygonToBuilderAndDropToCache(polygon, builder, cache);\n }\n }\n private static createChainContextsForConvexClipPlaneSet(clipper: ConvexClipPlaneSet): ChainMergeContext[] {\n const chainContexts = [];\n for (const plane of clipper.planes) {\n if (!plane.interior) {\n const c = ChainMergeContext.create();\n c.plane = plane;\n c.convexClipper = clipper;\n chainContexts.push(c);\n }\n }\n return chainContexts;\n }\n\n /** Clip each facet of polyface to the the clippers.\n * * Add inside, outside fragments to builderA, builderB\n * * This does not consider params, normals, colors. Just points.\n * @internal\n */\n public static clipPolyfaceConvexClipPlaneSetToBuilders(polyface: Polyface, clipper: ConvexClipPlaneSet, destination: ClippedPolyfaceBuilders) {\n const builderA = destination.builderA;\n const builderB = destination.builderB;\n const visitor = polyface.createVisitor(0);\n const cache = new GrowableXYZArrayCache();\n const outsideParts: GrowableXYZArray[] = [];\n for (visitor.reset(); visitor.moveToNextFacet();) {\n // !!! currentCandidates and next candidates are empty at this point !!!\n const insidePart = clipper.clipInsidePushOutside(visitor.point, outsideParts, cache);\n if (insidePart === undefined) {\n // everything is out ... outsideParts might be fragmented. Save only the original polygon\n builderB?.addPolygonGrowableXYZArray(visitor.point);\n cache.dropToCache(insidePart);\n cache.dropAllToCache(outsideParts);\n }\n this.addPolygonToBuilderAndDropToCache(insidePart, builderA, cache);\n this.addPolygonArrayToBuilderAndDropToCache(outsideParts, builderB, cache);\n }\n this.buildClosureFacesForConvexSet(visitor, clipper, destination, cache);\n }\n /**\n *\n * @param visitor visitor for all facets of interest (entire polyface)\n * @param clipper ConvexClipPlaneSet to apply\n * @param destination builders to receive inside, outside parts\n * @param cache GrowableArray cache.\n */\n private static buildClosureFacesForConvexSet(visitor: PolyfaceVisitor, clipper: ConvexClipPlaneSet, destination: ClippedPolyfaceBuilders,\n cache: GrowableXYZArrayCache) {\n if (destination.buildClosureFaces) {\n const chainContexts = this.createChainContextsForConvexClipPlaneSet(clipper);\n const workPoints = cache.grabFromCache();\n const facetPoints = cache.grabFromCache();\n for (visitor.reset(); visitor.moveToNextFacet();) {\n for (const chainContext of chainContexts) {\n const plane = chainContext.plane;\n facetPoints.clear();\n facetPoints.pushFrom(visitor.point);\n IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace(plane!, facetPoints, workPoints);\n chainContext.addSegmentsOnPlane(facetPoints, true);\n }\n }\n cache.dropToCache(facetPoints);\n cache.dropToCache(workPoints);\n for (const chainContext of chainContexts) {\n this.addClosureFacets(chainContext, destination, cache);\n }\n }\n }\n\n /**\n *\n * @param visitor visitor for all facets of interest (entire polyface)\n * @param clipper ConvexClipPlaneSet to apply\n * @param destination builders to receive inside, outside parts\n * @param cache GrowableArray cache.\n */\n private static buildClosureFacesForPlane(visitor: PolyfaceVisitor, plane: PlaneAltitudeEvaluator, destination: ClippedPolyfaceBuilders,\n cache: GrowableXYZArrayCache) {\n if (destination.buildClosureFaces) {\n const chainContext = ChainMergeContext.create();\n chainContext.plane = plane;\n const workPoints = cache.grabFromCache();\n const facetPoints = cache.grabFromCache();\n for (visitor.reset(); visitor.moveToNextFacet();) {\n facetPoints.clear();\n facetPoints.pushFrom(visitor.point);\n IndexedXYZCollectionPolygonOps.clipConvexPolygonInPlace(plane, facetPoints, workPoints);\n chainContext.addSegmentsOnPlane(facetPoints, true);\n }\n cache.dropToCache(facetPoints);\n cache.dropToCache(workPoints);\n this.addClosureFacets(chainContext, destination, cache);\n }\n }\n private static evaluateInwardPlaneNormal(plane: PlaneAltitudeEvaluator, scale: number): Vector3d {\n return Vector3d.create(plane.velocityXYZ(scale, 0, 0), plane.velocityXYZ(0, scale, 0), plane.velocityXYZ(0, 0, scale));\n }\n /**\n * * Triangulate the contour.\n * * Add all the triangles to both builders\n * * reversed in builderB.\n */\n private static addClippedContour(contour: SweepContour, clipper: ConvexClipPlaneSet | undefined, destination: ClippedPolyfaceBuilders, cache: GrowableXYZArrayCache) {\n const polygonA = cache.grabFromCache();\n const polygonB = cache.grabFromCache();\n if (destination.builderB)\n destination.builderB.toggleReversedFacetFlag();\n contour.announceFacets((facets: IndexedPolyface) => {\n const visitor = facets.createVisitor();\n // The contour facets are convex .. easy clip ..\n for (visitor.reset(); visitor.moveToNextFacet();) {\n polygonA.clear();\n polygonA.pushFromGrowableXYZArray(visitor.point);\n clipper?.clipConvexPolygonInPlace(polygonA, polygonB);\n if (polygonA.length > 2) {\n destination.builderA?.addPolygonGrowableXYZArray(polygonA);\n destination.builderB?.addPolygonGrowableXYZArray(polygonA);\n }\n }\n }, undefined);\n if (destination.builderB)\n destination.builderB.toggleReversedFacetFlag();\n cache.dropToCache(polygonA);\n cache.dropToCache(polygonB);\n }\n\n /**\n * Gather loops out of the ChainMergeContext. Add to destination arrays.\n * @param chainContext ASSUMED TO HAVE A PLANE\n * @param destination\n */\n private static addClosureFacets(chainContext: ChainMergeContext, destination: ClippedPolyfaceBuilders, cache: GrowableXYZArrayCache) {\n const clipper = chainContext.convexClipper;\n const plane = chainContext.plane!;\n const outwardNormal = this.evaluateInwardPlaneNormal(plane, -1.0);\n chainContext.clusterAndMergeVerticesXYZ();\n const loops = chainContext.collectMaximalGrowableXYZArrays();\n if (loops.length > 1) {\n const loopSets = PolygonOps.sortOuterAndHoleLoops(loops, outwardNormal);\n for (const loopSet of loopSets) {\n PolygonOps.orientLoopsCCWForOutwardNormalInPlace(loopSet, outwardNormal);\n const contour = SweepContour.createForPolygon(loopSet, outwardNormal);\n if (contour !== undefined) {\n if (clipper) {\n this.addClippedContour(contour, clipper, destination, cache);\n } else {\n if (destination.builderA)\n contour.emitFacets(destination.builderA, true, clipper);\n if (destination.builderB)\n contour.emitFacets(destination.builderB, false, clipper);\n }\n }\n }\n } else {\n PolygonOps.orientLoopsCCWForOutwardNormalInPlace(loops, outwardNormal);\n const contour = SweepContour.createForPolygon(loops, outwardNormal);\n if (contour !== undefined) {\n if (clipper) {\n this.addClippedContour(contour, clipper, destination, cache);\n } else {\n if (destination.builderA)\n contour.emitFacets(destination.builderA, true, clipper);\n if (destination.builderB)\n contour.emitFacets(destination.builderB, false, clipper);\n }\n }\n }\n }\n\n /** Clip each facet of polyface to the the clippers.\n * * Add inside, outside fragments to builderA, builderB\n * * This does not consider params, normals, colors. Just points.\n * @internal\n */\n public static clipPolyfaceClipPlaneToBuilders(polyface: Polyface, clipper: PlaneAltitudeEvaluator, destination: ClippedPolyfaceBuilders) {\n const builderA = destination.builderA;\n const builderB = destination.builderB;\n const visitor = polyface.createVisitor(0);\n const cache = new GrowableXYZArrayCache();\n const inside = cache.grabFromCache();\n const outside = cache.grabFromCache();\n const range = Range1d.createNull();\n for (visitor.reset(); visitor.moveToNextFacet();) {\n // !!! currentCandidates and next candidates are empty at this point !!!\n IndexedXYZCollectionPolygonOps.splitConvexPolygonInsideOutsidePlane(clipper, visitor.point, inside, outside, range);\n if (builderA)\n builderA.addPolygonGrowableXYZArray(inside);\n if (builderB)\n builderB.addPolygonGrowableXYZArray(outside);\n }\n this.buildClosureFacesForPlane(visitor, clipper, destination, cache);\n cache.dropToCache(inside);\n cache.dropToCache(outside);\n }\n\n /** Clip each facet of polyface to the ClipPlane or ConvexClipPlaneSet\n * * accumulate inside and outside facets -- to destination.builderA and destination.builderB\n * * if `destination.buildClosureFaces` is set, and also build closure facets\n * * This method parses the variant input types and calls a more specific method.\n * * WARNING: The new mesh is \"points only\".\n * * outputSelect applies only for UnionOfConvexClipPlaneSets -- see [[PolyfaceClip.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders]]\n */\n public static clipPolyfaceInsideOutside(polyface: Polyface, clipper: ClipPlane | ConvexClipPlaneSet | UnionOfConvexClipPlaneSets, destination: ClippedPolyfaceBuilders,\n outputSelect: number = 0) {\n if (clipper instanceof ClipPlane) {\n this.clipPolyfaceClipPlaneToBuilders(polyface, clipper, destination);\n } else if (clipper instanceof ConvexClipPlaneSet) {\n this.clipPolyfaceConvexClipPlaneSetToBuilders(polyface, clipper, destination);\n } else if (clipper instanceof UnionOfConvexClipPlaneSets) {\n this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(polyface, clipper, destination, outputSelect);\n }\n }\n /** Clip each facet of polyface to the ClipPlane or ConvexClipPlaneSet\n * * This method parses the variant input types and calls a more specific method.\n * * To get both inside and outside parts, use clipPolyfaceInsideOutside\n * * WARNING: The new mesh is \"points only\".\n */\n public static clipPolyface(polyface: Polyface, clipper: ClipPlane | ConvexClipPlaneSet): Polyface | undefined {\n if (clipper instanceof ClipPlane)\n return this.clipPolyfaceClipPlane(polyface, clipper);\n if (clipper instanceof ConvexClipPlaneSet)\n return this.clipPolyfaceConvexClipPlaneSet(polyface, clipper);\n // (The if tests exhaust the type space -- this line is unreachable.)\n return undefined;\n }\n /**\n * Drape the region onto the mesh.\n * * This method computes the portion of the input mesh that lies inside the clipper generated from sweeping the input region in the given direction.\n * @param mesh input mesh, untouched\n * @param region planar region to drape onto mesh\n * @param sweepVector optional sweep direction for region, magnitude unused. If undefined, sweep is along the region normal.\n * @param options how to stroke the region boundary\n * @returns clipped facets. No other mesh data but vertices appear in output.\n */\n public static drapeRegion(mesh: Polyface | PolyfaceVisitor, region: AnyRegion, sweepVector?: Vector3d, options?: StrokeOptions): IndexedPolyface | undefined {\n if (mesh instanceof Polyface)\n return this.drapeRegion(mesh.createVisitor(0), region, sweepVector, options);\n const contour = SweepContour.createForLinearSweep(region);\n if (!contour)\n return undefined;\n let sweep = sweepVector;\n if (sweepVector && contour.localToWorld.matrix.dotColumnZ(sweepVector) < 0.0)\n sweep = sweepVector.scale(-1); // avoid inverted clipper\n const clipper = contour.sweepToUnionOfConvexClipPlaneSets(sweep, false, false, options);\n if (!clipper)\n return undefined;\n const builders = ClippedPolyfaceBuilders.create(true); // we want only the facets inside the clipper\n this.clipPolyfaceUnionOfConvexClipPlaneSetsToBuilders(mesh, clipper, builders, 1);\n return builders.claimPolyface(0, true);\n }\n /** Find consecutive points around a polygon (with implied closure edge) that are ON a plane\n * @param points array of points around polygon. Closure edge is implied.\n * @param chainContext context receiving edges\n * @param point0 work point\n * @param point1 work point\n */\n private static collectEdgesOnPlane(points: GrowableXYZArray, clipper: ClipPlane, chainContext: ChainMergeContext, point0: Point3d, point1: Point3d) {\n const n = points.length;\n if (n > 1) {\n points.getPoint3dAtUncheckedPointIndex(n - 1, point0);\n for (let i = 0; i < n; i++) {\n points.getPoint3dAtUncheckedPointIndex(i, point1);\n if (clipper.isPointOn(point0) && clipper.isPointOn(point1))\n chainContext.addSegment(point0, point1);\n point0.setFromPoint3d(point1);\n }\n }\n }\n /** Intersect each facet with the clip plane. (Producing intersection edges.)\n * * Return all edges chained as array of LineString3d.\n */\n public static sectionPolyfaceClipPlane(polyface: Polyface, clipper: ClipPlane): LineString3d[] {\n const chainContext = ChainMergeContext.create();\n\n const visitor = polyface.createVisitor(0);\n const work = new GrowableXYZArray(10);\n const point0 = Point3d.create();\n const point1 = Point3d.create();\n for (visitor.reset(); visitor.moveToNextFacet();) {\n clipper.clipConvexPolygonInPlace(visitor.point, work, true);\n this.collectEdgesOnPlane(visitor.point, clipper, chainContext, point0, point1);\n }\n chainContext.clusterAndMergeVerticesXYZ();\n return chainContext.collectMaximalChains();\n }\n\n /**\n * * Split facets of mesh \"A\" into parts that are\n * * under mesh \"B\"\n * * over mesh \"B\"\n * * both meshes are represented by visitors rather than the meshes themselves\n * * If the data in-hand is a mesh, call with `mesh.createVisitor`\n * * The respective clip parts are fed to caller-supplied builders.\n * * Caller may set either or both builders to toggle facet order (e.g. toggle the lower facets to make them \"point down\" in cut-fill application)\n * * This step is commonly one-half of \"cut fill\".\n * * A \"cut fill\" wrapper will call this twice with the visitor and builder roles reversed.\n * * Both polyfaces are assumed convex with CCW orientation viewed from above.\n * @param visitorA iterator over polyface to be split.\n * @param visitorB iterator over polyface that acts as a splitter\n * @param orientUnderMeshDownward if true, the \"meshAUnderB\" output is oriented with its normals reversed so it can act as the bottom side of a cut-fill pair.\n */\n public static clipPolyfaceUnderOverConvexPolyfaceIntoBuilders(visitorA: PolyfaceVisitor, visitorB: PolyfaceVisitor,\n builderAUnderB: PolyfaceBuilder | undefined,\n builderAOverB: PolyfaceBuilder | undefined) {\n const rangeDataA = PolyfaceQuery.collectRangeLengthData(visitorA);\n const searchA = RangeSearch.create2dSearcherForRangeLengthData<number>(rangeDataA);\n if (!searchA)\n return;\n const range = Range3d.create();\n for (visitorA.reset(); visitorA.moveToNextFacet();) {\n visitorA.point.setRange(range);\n searchA.addRange(range, visitorA.currentReadIndex());\n }\n const xyClip = new GrowableXYZArray(10);\n const workArray = new GrowableXYZArray(10);\n const xyFrustum = ConvexClipPlaneSet.createEmpty();\n const below = new GrowableXYZArray(10);\n const above = new GrowableXYZArray(10);\n const planeOfFacet = ClipPlane.createNormalAndPointXYZXYZ(0, 0, 1, 0, 0, 0)!;\n const altitudeRange = Range1d.createNull();\n\n for (visitorB.reset(); visitorB.moveToNextFacet();) {\n visitorB.point.setRange(range);\n ConvexClipPlaneSet.setPlaneAndXYLoopCCW(visitorB.point, planeOfFacet, xyFrustum);\n searchA.searchRange2d(range, (_rangeA: Range2d, readIndexA: number) => {\n visitorA.moveToReadIndex(readIndexA);\n xyFrustum.polygonClip(visitorA.point, xyClip, workArray);\n // builderAOverB.addPolygonGrowableXYZArray(xyClip);\n if (xyClip.length > 0) {\n // planeOfFacet.convexPolygonSplitInsideOutsideGrowableArrays(xyClip, below, above, altitudeRange);\n IndexedXYZCollectionPolygonOps.splitConvexPolygonInsideOutsidePlane(planeOfFacet, xyClip, below, above, altitudeRange);\n if (below.length > 0 && builderAUnderB)\n builderAUnderB.addPolygonGrowableXYZArray(below);\n if (above.length > 0 && builderAOverB)\n builderAOverB.addPolygonGrowableXYZArray(above);\n }\n return true;\n });\n }\n }\n\n /**\n * * Split facets into vertically overlapping sections\n * * both meshes are represented by visitors rather than the meshes themselves\n * * If the data in-hand is a mesh, call with `mesh.createVisitor`\n * * The respective clip parts are returned as separate meshes.\n * * Caller may set either or both builders to toggle facet order (e.g. toggle the lower facets to make them \"point down\" in cut-fill application)\n * * Both polyfaces are assumed convex with CCW orientation viewed from above.\n * * Each output contains some facets from meshA and some from meshB:\n * * meshAUnderB -- areas where meshA is underneath mesh B.\n * * If A is \"design surface\" and B is existing DTM, this is \"cut\" volume\n * * meshAOverB -- areas where meshB is over meshB.\n * * If A is \"design surface\" and B is existing DTM, this is \"fill\" volume\n *\n * @param visitorA iterator over polyface to be split.\n * @param visitorB iterator over polyface that acts as a splitter\n * @param orientUnderMeshDownward if true, the \"meshAUnderB\" output is oriented with its normals reversed so it can act as the bottom side of a cut-fill pair.\n */\n public static computeCutFill(meshA: IndexedPolyface, meshB: IndexedPolyface): { meshAUnderB: IndexedPolyface, meshAOverB: IndexedPolyface } {\n const visitorA = meshA.createVisitor();\n const visitorB = meshB.createVisitor();\n const builderAUnderB = PolyfaceBuilder.create();\n const builderAOverB = PolyfaceBuilder.create();\n builderAUnderB.toggleReversedFacetFlag();\n this.clipPolyfaceUnderOverConvexPolyfaceIntoBuilders(visitorA, visitorB, builderAUnderB, builderAOverB);\n builderAUnderB.toggleReversedFacetFlag();\n builderAOverB.toggleReversedFacetFlag();\n this.clipPolyfaceUnderOverConvexPolyfaceIntoBuilders(visitorB, visitorA, builderAOverB, builderAUnderB);\n return {\n meshAUnderB: builderAUnderB.claimPolyface(),\n meshAOverB: builderAOverB.claimPolyface(),\n };\n }\n}\n"]}
|
|
@@ -8,70 +8,85 @@ import { PolyfaceAuxData } from "./AuxData";
|
|
|
8
8
|
import { FacetFaceData } from "./FacetFaceData";
|
|
9
9
|
import { TaggedNumericData } from "./TaggedNumericData";
|
|
10
10
|
/**
|
|
11
|
-
* PolyfaceData carries data arrays for point, normal,
|
|
12
|
-
*
|
|
13
|
-
* *
|
|
14
|
-
* *
|
|
15
|
-
* *
|
|
11
|
+
* `PolyfaceData` carries data arrays for point, normal, uv-parameters, and color, and index arrays for each.
|
|
12
|
+
* * Normal, uv-parameter, and color data are optional.
|
|
13
|
+
* * A given data array is defined if and only if its corresponding index array is defined.
|
|
14
|
+
* * All defined index arrays have parallel face loop order and structure, and thus the same length.
|
|
15
|
+
* * `IndexedPolyface` carries a PolyfaceData as a member (NOT as a base class; it already has `GeometryQuery` as base).
|
|
16
|
+
* * `IndexedPolyfaceVisitor` uses PolyfaceData as a base class. In this use, there is only a single facet in `PolyfaceData`.
|
|
17
|
+
* * `PolyfaceData` does not know what index range constitutes a given facet. This is managed by a derived/carrier class.
|
|
16
18
|
* @public
|
|
17
19
|
*/
|
|
18
20
|
export declare class PolyfaceData {
|
|
19
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Relative tolerance used in tests for planar facets.
|
|
20
23
|
* @internal
|
|
21
|
-
|
|
24
|
+
*/
|
|
22
25
|
static readonly planarityLocalRelTol = 1e-13;
|
|
23
|
-
/** Coordinate data for points in the facets
|
|
26
|
+
/** Coordinate data for points in the facets (packed as numbers in a contiguous array). */
|
|
24
27
|
point: GrowableXYZArray;
|
|
25
28
|
/** Indices of points at facet vertices. */
|
|
26
29
|
pointIndex: number[];
|
|
27
|
-
/**
|
|
28
|
-
edgeVisible: boolean[];
|
|
29
|
-
/** Coordinates of normal vectors, packed as numbers in a contiguous array. */
|
|
30
|
+
/** Coordinates of normal vectors (packed as numbers in a contiguous array). */
|
|
30
31
|
normal: GrowableXYZArray | undefined;
|
|
31
32
|
/** Indices of normals at facet vertices. */
|
|
32
33
|
normalIndex: number[] | undefined;
|
|
33
|
-
/** Coordinates of uv parameters
|
|
34
|
+
/** Coordinates of uv parameters (packed as numbers in a contiguous array). */
|
|
34
35
|
param?: GrowableXYArray;
|
|
35
36
|
/** Indices of params at facet vertices. */
|
|
36
37
|
paramIndex: number[] | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* required (by display systems)
|
|
38
|
+
/**
|
|
39
|
+
* Color values. These are carried around as simple numbers, but are probably required (by display systems) to map
|
|
40
|
+
* exactly to 32-bit integers.
|
|
39
41
|
*/
|
|
40
42
|
color: number[] | undefined;
|
|
41
43
|
/** Indices of colors at facet vertices. */
|
|
42
44
|
colorIndex: number[] | undefined;
|
|
43
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Map from facet index to face data.
|
|
47
|
+
* * A "face" is a logical grouping of connected facets in the mesh, e.g., the facets that resulted from faceting
|
|
48
|
+
* a given face of a solid.
|
|
49
|
+
* * Face data remains empty until a face is specified.
|
|
50
|
+
*/
|
|
44
51
|
face: FacetFaceData[];
|
|
45
|
-
/** Auxiliary data */
|
|
52
|
+
/** Auxiliary data. */
|
|
46
53
|
auxData: PolyfaceAuxData | undefined;
|
|
47
|
-
/** Tagged geometry data */
|
|
54
|
+
/** Tagged geometry data. */
|
|
48
55
|
taggedNumericData: TaggedNumericData | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Booleans indicating visibility of corresponding edges.
|
|
58
|
+
* * The `edgeVisible` array is parallel to the `pointIndex` array.
|
|
59
|
+
* * The visibility flag applies to the edge whose start vertex index appears in the same place in the `pointIndex` array.
|
|
60
|
+
* * For example, consider the mesh with 2 triangular facets given by `pointIndex = [1,0,2, 1,2,3]`. If the triangles'
|
|
61
|
+
* shared edge is hidden, then the mesh has `edgeVisible = [true,true,false, false,true,true]`.
|
|
62
|
+
*/
|
|
63
|
+
edgeVisible: boolean[];
|
|
64
|
+
/** Boolean tag indicating if the facets are viewable from the back. */
|
|
49
65
|
private _twoSided;
|
|
50
|
-
/** boolean tag indicating if the facets are to be considered viewable from the back */
|
|
51
|
-
get twoSided(): boolean;
|
|
52
|
-
set twoSided(value: boolean);
|
|
53
|
-
/** set the `taggedNumericData` member */
|
|
54
|
-
setTaggedNumericData(data: TaggedNumericData | undefined): void;
|
|
55
|
-
private _expectedClosure;
|
|
56
66
|
/**
|
|
57
67
|
* Flag indicating if the mesh closure is unknown (0), open sheet (1), closed solid (2).
|
|
58
68
|
* * A boundary edge of a mesh is defined as an edge with only one connected facet.
|
|
59
69
|
* * Closed solid is a mesh with no boundary edge. Open sheet is a mesh that has boundary edge(s).
|
|
60
70
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
71
|
+
private _expectedClosure;
|
|
72
|
+
/**
|
|
73
|
+
* Constructor for facets.
|
|
74
|
+
* @param needNormals `true` to allocate empty normal data and index arrays; `false` (default) to leave undefined.
|
|
75
|
+
* @param needParams `true` to allocate empty uv parameter data and index arrays; `false` (default) to leave undefined.
|
|
76
|
+
* @param needColors `true` to allocate empty color data and index arrays; `false` (default) to leave undefined.
|
|
77
|
+
* @param twoSided `true` if the facets are to be considered viewable from the back; `false` (default) if not.
|
|
67
78
|
*/
|
|
68
79
|
constructor(needNormals?: boolean, needParams?: boolean, needColors?: boolean, twoSided?: boolean);
|
|
69
80
|
/** Return a deep clone. */
|
|
70
81
|
clone(): PolyfaceData;
|
|
71
|
-
/** Test for equal indices and nearly equal coordinates */
|
|
82
|
+
/** Test for equal indices and nearly equal coordinates. */
|
|
72
83
|
isAlmostEqual(other: PolyfaceData): boolean;
|
|
73
84
|
/** Ask if normals are required in this mesh. */
|
|
74
85
|
get requireNormals(): boolean;
|
|
86
|
+
/** Ask if params are required in this mesh. */
|
|
87
|
+
get requireParams(): boolean;
|
|
88
|
+
/** Ask if colors are required in this mesh. */
|
|
89
|
+
get requireColors(): boolean;
|
|
75
90
|
/** Get the point count */
|
|
76
91
|
get pointCount(): number;
|
|
77
92
|
/** Get the normal count */
|
|
@@ -80,74 +95,74 @@ export declare class PolyfaceData {
|
|
|
80
95
|
get paramCount(): number;
|
|
81
96
|
/** Get the color count */
|
|
82
97
|
get colorCount(): number;
|
|
83
|
-
/** Get the index count.
|
|
98
|
+
/** Get the index count. Note that the point array is always indexed, and index arrays all have the same length. */
|
|
84
99
|
get indexCount(): number;
|
|
85
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Get the number of faces.
|
|
86
102
|
* * Note that a "face" is not a facet.
|
|
87
|
-
* * A
|
|
103
|
+
* * A face is a subset of the Polyface's facets grouped for application purposes.
|
|
88
104
|
*/
|
|
89
105
|
get faceCount(): number;
|
|
90
|
-
/**
|
|
91
|
-
getPoint(i: number,
|
|
92
|
-
/**
|
|
93
|
-
getNormal(i: number): Vector3d | undefined;
|
|
94
|
-
/**
|
|
95
|
-
getParam(i: number): Point2d | undefined;
|
|
96
|
-
/**
|
|
106
|
+
/** Return indexed point at index `i`. This is a COPY of the coordinates, not a reference. */
|
|
107
|
+
getPoint(i: number, result?: Point3d): Point3d | undefined;
|
|
108
|
+
/** Return indexed normal at index `i`. This is a COPY of the normal, not a reference. */
|
|
109
|
+
getNormal(i: number, result?: Vector3d): Vector3d | undefined;
|
|
110
|
+
/** Return indexed param at index `i`. This is a COPY of the coordinates, not a reference. */
|
|
111
|
+
getParam(i: number, result?: Point2d): Point2d | undefined;
|
|
112
|
+
/** Return indexed color at index `i`. Index `i` is not checked for validity. */
|
|
97
113
|
getColor(i: number): number;
|
|
98
|
-
/**
|
|
114
|
+
/** Return indexed visibility. at index `i`. Index `i` is not checked for validity. */
|
|
99
115
|
getEdgeVisible(i: number): boolean;
|
|
100
|
-
/**
|
|
116
|
+
/** Get boolean tag indicating if the facets are to be considered viewable from the back. */
|
|
117
|
+
get twoSided(): boolean;
|
|
118
|
+
set twoSided(value: boolean);
|
|
119
|
+
/** Get flag indicating if the mesh closure is unknown (0), open sheet (1), closed solid (2). */
|
|
120
|
+
get expectedClosure(): number;
|
|
121
|
+
set expectedClosure(value: number);
|
|
122
|
+
/** Set the tagged geometry data. */
|
|
123
|
+
setTaggedNumericData(data: TaggedNumericData | undefined): void;
|
|
124
|
+
/** Copy the contents (not pointer) of `point[i]` into `dest`. Index `i` is not checked for validity. */
|
|
101
125
|
copyPointTo(i: number, dest: Point3d): void;
|
|
102
|
-
/** Copy the contents (not pointer) of normal[i] into dest. */
|
|
126
|
+
/** Copy the contents (not pointer) of `normal[i]` into `dest`. Index `i` is not checked for validity. */
|
|
103
127
|
copyNormalTo(i: number, dest: Vector3d): void;
|
|
104
|
-
/** Copy the contents (not pointer) of param[i] into dest. */
|
|
128
|
+
/** Copy the contents (not pointer) of `param[i]` into `dest`. Index `i` is not checked for validity. */
|
|
105
129
|
copyParamTo(i: number, dest: Point2d): void;
|
|
106
|
-
/**
|
|
107
|
-
isAlmostEqualParamIndexUV(
|
|
130
|
+
/** Test if param at a index `i` matches the given uv */
|
|
131
|
+
isAlmostEqualParamIndexUV(i: number, u: number, v: number): boolean;
|
|
108
132
|
/**
|
|
109
|
-
*
|
|
133
|
+
* Copy data from `other` to `this`.
|
|
110
134
|
* * This is the essence of transferring coordinates spread throughout a large polyface into a visitor's single facet.
|
|
111
|
-
* * "other" is the
|
|
112
|
-
* *
|
|
113
|
-
* * does NOT copy face data - visitors reference the FacetFaceData array for the whole polyface!!
|
|
135
|
+
* * Common usage: "other" is a Polyface, "this" is a PolyfaceVisitor to receive data from a single facet of the Polyface.
|
|
136
|
+
* * Does NOT copy face data - visitors reference the FacetFaceData array for the whole polyface.
|
|
114
137
|
* @param other polyface data being mined.
|
|
115
|
-
* @param index0 start index in other's index arrays
|
|
116
|
-
* @param index1 end index (one beyond last data
|
|
138
|
+
* @param index0 start index in other's index arrays.
|
|
139
|
+
* @param index1 end index (one beyond last data accessed) in other's index arrays.
|
|
117
140
|
* @param numWrap number of points to replicate as wraparound.
|
|
118
141
|
*/
|
|
119
142
|
gatherIndexedData(other: PolyfaceData, index0: number, index1: number, numWrap: number): void;
|
|
143
|
+
/** Trim the `data` arrays to the stated `length`. */
|
|
120
144
|
private static trimArray;
|
|
121
145
|
/**
|
|
122
|
-
* Trim all index arrays to the stated length
|
|
123
|
-
* This is called by PolyfaceBuilder to clean up after an aborted construction sequence.
|
|
146
|
+
* Trim all index arrays to the stated `length`.
|
|
147
|
+
* * This is called by PolyfaceBuilder to clean up after an aborted construction sequence.
|
|
124
148
|
*/
|
|
125
149
|
trimAllIndexArrays(length: number): void;
|
|
126
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Resize all data and index arrays to the specified `length`.
|
|
152
|
+
* * This is used by visitors, whose data and index arrays are all parallel.
|
|
153
|
+
*/
|
|
154
|
+
resizeAllArrays(length: number): void;
|
|
155
|
+
/**
|
|
156
|
+
* Resize all data arrays to the specified `length`.
|
|
157
|
+
* @deprecated in 4.x because name is misleading. Call [[PolyfaceData.resizeAllArrays]] instead.
|
|
158
|
+
*/
|
|
127
159
|
resizeAllDataArrays(length: number): void;
|
|
128
|
-
/** Return the range of the point array (optionally transformed) */
|
|
160
|
+
/** Return the range of the point array (optionally transformed). */
|
|
129
161
|
range(result?: Range3d, transform?: Transform): Range3d;
|
|
130
|
-
/**
|
|
131
|
-
*
|
|
132
|
-
* *
|
|
133
|
-
*
|
|
134
|
-
* * hence for "internal" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.
|
|
135
|
-
* *
|
|
136
|
-
*/
|
|
137
|
-
reverseIndices(facetStartIndex?: number[]): void;
|
|
138
|
-
/** reverse indices facet-by-facet, with the given facetStartIndex array delimiting faces.
|
|
139
|
-
*
|
|
140
|
-
* * facetStartIndex[0] == 0 always -- start of facet zero.
|
|
141
|
-
* * facet k has indices from facetStartIndex[k] <= i < facetStartIndex[k+1]
|
|
142
|
-
* * hence for "internal" k, facetStartIndex[k] is both the upper limit of facet k-1 and the start of facet k.
|
|
143
|
-
* *
|
|
144
|
-
*/
|
|
145
|
-
reverseIndicesSingleFacet(facetId: number, facetStartIndex: number[]): void;
|
|
146
|
-
/** Scale all the normals by -1 */
|
|
147
|
-
reverseNormals(): void;
|
|
148
|
-
/** Apply `transform` to point and normal arrays and to auxData.
|
|
149
|
-
* * IMPORTANT This base class is just a data carrier. It does not know if the index order and normal directions have special meaning.
|
|
150
|
-
* * i.e. caller must separately reverse index order and normal direction if needed.
|
|
162
|
+
/**
|
|
163
|
+
* Apply `transform` to point and normal arrays and to auxData.
|
|
164
|
+
* * IMPORTANT This base class is just a data carrier. It does not know if the index order and normal directions
|
|
165
|
+
* have special meaning, i.e., caller must separately reverse index order and normal direction if needed.
|
|
151
166
|
*/
|
|
152
167
|
tryTransformInPlace(transform: Transform): boolean;
|
|
153
168
|
/**
|
|
@@ -155,23 +170,59 @@ export declare class PolyfaceData {
|
|
|
155
170
|
* * Search for duplicates within points, normals, params, and colors.
|
|
156
171
|
* * Compress each data array.
|
|
157
172
|
* * Revise all indexing for the relocated data.
|
|
158
|
-
* @param tolerance optional tolerance for clustering mesh vertices. Default is [[Geometry.smallMetricDistance]].
|
|
173
|
+
* @param tolerance (optional) tolerance for clustering mesh vertices. Default is [[Geometry.smallMetricDistance]].
|
|
159
174
|
*/
|
|
160
175
|
compress(tolerance?: number): void;
|
|
161
176
|
/**
|
|
162
|
-
* Test if facetStartIndex is (minimally
|
|
163
|
-
* *
|
|
177
|
+
* Test if `facetStartIndex` is (minimally) valid.
|
|
178
|
+
* * Length must be nonzero (recall that for "no facets", the `facetStartIndex` array still must contain a 0).
|
|
164
179
|
* * Each entry must be strictly smaller than the one that follows.
|
|
165
|
-
* @param facetStartIndex
|
|
180
|
+
* @param facetStartIndex start indices of all facets. Facet k starts at facetStartIndex[k] up to (but not including)
|
|
181
|
+
* `facetStartIndex[k + 1]`
|
|
166
182
|
*/
|
|
167
183
|
static isValidFacetStartIndexArray(facetStartIndex: number[]): boolean;
|
|
168
|
-
/**
|
|
169
|
-
*
|
|
184
|
+
/**
|
|
185
|
+
* Reverse the indices for the specified facets in the given index array.
|
|
186
|
+
* * Parameterized over type T so non-number data (e.g., boolean visibility flags) can be reversed.
|
|
187
|
+
* @param facetStartIndex start indices of *consecutive* facets to be reversed, e.g., an IndexedPolyface's _facetStart
|
|
188
|
+
* array. See the non-static [[reverseIndices]].
|
|
189
|
+
* @param indices the index array, e.g., pointIndex, normalIndex, etc.
|
|
190
|
+
* @param preserveStart `true` to preserve the start index of each facet (e.g., facet [1,2,3,4] becomes [1,4,3,2]);
|
|
191
|
+
* `false` to reverse all indices (e.g., facet [1,2,3,4] becomes [4,3,2,1]).
|
|
170
192
|
*/
|
|
171
193
|
static reverseIndices<T>(facetStartIndex: number[], indices: T[] | undefined, preserveStart: boolean): boolean;
|
|
172
|
-
/**
|
|
173
|
-
*
|
|
194
|
+
/**
|
|
195
|
+
* Reverse the indices for the specified facet in the specified index array.
|
|
196
|
+
* * Parameterized over type T so non-number data (e.g., boolean visibility flags) can be reversed.
|
|
197
|
+
* @param facetIndex index of the facet to reverse. The entries of `indices` to be reversed are found at
|
|
198
|
+
* `facetStartIndex[facetIndex] <= i < facetStartIndex[facetIndex + 1]`.
|
|
199
|
+
* @param facetStartIndex start indices of *consecutive* facets, e.g., an IndexedPolyface's _facetStart array.
|
|
200
|
+
* See [[reverseIndices]].
|
|
201
|
+
* @param indices the index array, e.g., pointIndex, normalIndex, etc.
|
|
202
|
+
* @param preserveStart `true` to preserve the start index of each facet (e.g., facet [1,2,3,4] becomes [1,4,3,2]);
|
|
203
|
+
* `false` to reverse all indices (e.g., facet [1,2,3,4] becomes [4,3,2,1]).
|
|
174
204
|
*/
|
|
175
|
-
static reverseIndicesSingleFacet<T>(
|
|
205
|
+
static reverseIndicesSingleFacet<T>(facetIndex: number, facetStartIndex: number[], indices: T[] | undefined, preserveStart: boolean): boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Reverse the indices for the specified facets in the index arrays (pointIndex, normalIndex, paramIndex, colorIndex,
|
|
208
|
+
* and edgeVisible).
|
|
209
|
+
* @param facetStartIndex start indices of *consecutive* facets to be reversed.
|
|
210
|
+
* * Consecutive indices in this array define where a given facet is represented in each of the parallel index arrays.
|
|
211
|
+
* * The indices for facet k are `facetStartIndex[k]` up to (but not including) `facetStartIndex[k + 1]`.
|
|
212
|
+
* * This implies `facetStartIndex[k + 1]` is both the upper limit of facet k's indices, and the start index of facet k+1.
|
|
213
|
+
* * For example, passing an IndexedPolyface's _facetStart array into this method reverses every facet.
|
|
214
|
+
*/
|
|
215
|
+
reverseIndices(facetStartIndex?: number[]): void;
|
|
216
|
+
/**
|
|
217
|
+
* Reverse the indices for the specified facet in the index arrays (pointIndex, normalIndex, paramIndex, colorIndex,
|
|
218
|
+
* and edgeVisible).
|
|
219
|
+
* @param facetIndex index of the facet to reverse. The entries of each index array to be reversed are found at
|
|
220
|
+
* `facetStartIndex[facetIndex] <= i < facetStartIndex[facetIndex + 1]`.
|
|
221
|
+
* @param facetStartIndex start indices of *consecutive* facets, e.g., an IndexedPolyface's _facetStart array.
|
|
222
|
+
* See [[reverseIndices]].
|
|
223
|
+
*/
|
|
224
|
+
reverseIndicesSingleFacet(facetIndex: number, facetStartIndex: number[]): void;
|
|
225
|
+
/** Scale all the normals by -1. */
|
|
226
|
+
reverseNormals(): void;
|
|
176
227
|
}
|
|
177
228
|
//# sourceMappingURL=PolyfaceData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PolyfaceData.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceData.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PolyfaceData.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceData.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD;;;;;;;;;GASG;AACH,qBAAa,YAAY;IACvB;;;MAGE;IACF,gBAAuB,oBAAoB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