@itwin/core-geometry 4.0.0-dev.4 → 4.0.0-dev.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -3
- package/lib/cjs/Geometry.d.ts +56 -16
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +87 -30
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js +4 -5
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js +7 -10
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +2 -2
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js +4 -4
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +20 -13
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.d.ts +11 -8
- package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurve.js +16 -12
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +5 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/CurveCurveIntersectXY.js +11 -10
- package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/Loop.d.ts +2 -2
- package/lib/cjs/curve/Loop.d.ts.map +1 -1
- package/lib/cjs/curve/Loop.js +6 -0
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +10 -10
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js +11 -11
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +2 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +5 -2
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js +1 -2
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +1 -2
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +1 -2
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +19 -0
- package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Angle.js +39 -0
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +1 -0
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +1 -0
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +195 -8
- package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js +459 -11
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +1 -0
- package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js +3 -0
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js +2 -2
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +2 -2
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts +22 -7
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js +41 -5
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +58 -4
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +102 -4
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +479 -265
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +996 -784
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts +1 -0
- package/lib/cjs/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js +1 -0
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts +10 -0
- package/lib/cjs/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js +14 -0
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js +4 -6
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts +0 -6
- package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js +0 -6
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts +57 -57
- package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js +63 -65
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts +14 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js +33 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +127 -19
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +420 -22
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.d.ts +1 -1
- package/lib/cjs/geometry3d/Segment1d.js +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +12 -0
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +14 -0
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.d.ts +264 -0
- package/lib/cjs/polyface/FacetLocationDetail.d.ts.map +1 -0
- package/lib/cjs/polyface/FacetLocationDetail.js +376 -0
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -0
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +2 -5
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +5 -2
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts +24 -14
- package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js +74 -23
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js +6 -7
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
- package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +76 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +123 -3
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts +202 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +1038 -0
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -0
- package/lib/cjs/serialization/BGFBReader.js +4 -4
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.d.ts +8 -6
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +26 -19
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js +1 -2
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/solid/Sphere.d.ts +5 -5
- package/lib/cjs/solid/Sphere.js +5 -5
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js +8 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +113 -7
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +185 -7
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +38 -0
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -0
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +82 -0
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -0
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +2 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -0
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/esm/Geometry.d.ts +56 -16
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +86 -29
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js +4 -5
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js +7 -10
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +2 -2
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js +4 -4
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +21 -14
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.d.ts +11 -8
- package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurve.js +16 -12
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts +5 -1
- package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/CurveCurveIntersectXY.js +11 -10
- package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/Loop.d.ts +2 -2
- package/lib/esm/curve/Loop.d.ts.map +1 -1
- package/lib/esm/curve/Loop.js +6 -0
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +10 -10
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +11 -11
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +2 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +5 -2
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js +1 -2
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +1 -2
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -2
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +19 -0
- package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
- package/lib/esm/geometry3d/Angle.js +39 -0
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +1 -0
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +1 -0
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts +195 -8
- package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js +459 -12
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +1 -0
- package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js +3 -0
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js +2 -2
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +2 -2
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts +22 -7
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js +41 -5
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +58 -4
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +103 -5
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +479 -265
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +996 -784
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts +1 -0
- package/lib/esm/geometry3d/OrderedRotationAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js +1 -0
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts +10 -0
- package/lib/esm/geometry3d/Point2dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js +14 -0
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js +4 -6
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts +0 -6
- package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js +0 -6
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.d.ts +57 -57
- package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js +63 -65
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts +14 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js +33 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +127 -19
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +419 -22
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.d.ts +1 -1
- package/lib/esm/geometry3d/Segment1d.js +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +12 -0
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +14 -0
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/AuxData.js +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.d.ts +264 -0
- package/lib/esm/polyface/FacetLocationDetail.d.ts.map +1 -0
- package/lib/esm/polyface/FacetLocationDetail.js +369 -0
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -0
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +2 -5
- package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js +5 -2
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.d.ts +24 -14
- package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js +74 -23
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js +6 -7
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
- package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +76 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +121 -2
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts +202 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.d.ts.map +1 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js +1032 -0
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -0
- package/lib/esm/serialization/BGFBReader.js +4 -4
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.d.ts +8 -6
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +26 -19
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js +1 -2
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/solid/Sphere.d.ts +5 -5
- package/lib/esm/solid/Sphere.js +5 -5
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js +8 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +113 -7
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +185 -7
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +38 -0
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts.map +1 -0
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +78 -0
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -0
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +2 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -0
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/Triangulation.js +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/package.json +5 -5
|
@@ -8,9 +8,12 @@ import { Plane3dByOriginAndUnitNormal } from "../geometry3d/Plane3dByOriginAndUn
|
|
|
8
8
|
import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
|
|
9
9
|
import { Matrix4d } from "../geometry4d/Matrix4d";
|
|
10
10
|
import { MomentData } from "../geometry4d/MomentData";
|
|
11
|
+
import { HalfEdgeGraph } from "../topology/Graph";
|
|
11
12
|
import { IndexedEdgeMatcher, SortableEdgeCluster } from "./IndexedEdgeMatcher";
|
|
12
13
|
import { IndexedPolyface, Polyface, PolyfaceVisitor } from "./Polyface";
|
|
13
14
|
import { RangeLengthData } from "./RangeLengthData";
|
|
15
|
+
import { Ray3d } from "../geometry3d/Ray3d";
|
|
16
|
+
import { FacetIntersectOptions, FacetLocationDetail } from "./FacetLocationDetail";
|
|
14
17
|
/**
|
|
15
18
|
* Options carrier for cloneWithHolesFilled
|
|
16
19
|
* @public
|
|
@@ -27,6 +30,45 @@ export interface HoleFillOptions {
|
|
|
27
30
|
/** requests that all content from the original mesh be copied to the mesh with filled holes. */
|
|
28
31
|
includeOriginalMesh?: boolean;
|
|
29
32
|
}
|
|
33
|
+
/** Selective output options for PolyfaceQuery.cloneOffset:
|
|
34
|
+
* * undefined means the usual facets in the expected offset mesh.
|
|
35
|
+
* * if present as a json object, the various booleans select respective outputs.
|
|
36
|
+
* * @public
|
|
37
|
+
*/
|
|
38
|
+
export interface OffsetMeshSelectiveOutputOptions {
|
|
39
|
+
outputOffsetsFromFacesBeforeChamfers?: boolean;
|
|
40
|
+
outputOffsetsFromFaces?: boolean;
|
|
41
|
+
outputOffsetsFromEdges?: boolean;
|
|
42
|
+
outputOffsetsFromVertices?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Options carrier for [[PolyfaceQuery.cloneOffset]].
|
|
46
|
+
* * Default options are strongly recommended.
|
|
47
|
+
* * The option most likely to be changed is chamferTurnAngle
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export declare class OffsetMeshOptions {
|
|
51
|
+
/** max angle between normals to be considered smooth */
|
|
52
|
+
smoothSingleAngleBetweenNormals: Angle;
|
|
53
|
+
/** max accumulation of angle between normals to be considered smooth */
|
|
54
|
+
smoothAccumulatedAngleBetweenNormals: Angle;
|
|
55
|
+
/** When crossing an edge, this turn angle (typically 120 degrees) triggers a chamfer */
|
|
56
|
+
chamferAngleBetweenNormals: Angle;
|
|
57
|
+
/** optional control structure for selective output.
|
|
58
|
+
* * If undefined, output all expected offset facets.
|
|
59
|
+
*/
|
|
60
|
+
outputSelector?: OffsetMeshSelectiveOutputOptions;
|
|
61
|
+
/** Constructor -- CAPTURE parameters ... */
|
|
62
|
+
private constructor();
|
|
63
|
+
/** construct and return an OffsetMeshOptions with given parameters.
|
|
64
|
+
* * Angles are forced to minimum values.
|
|
65
|
+
* * Clones of the angles are given to the constructor.
|
|
66
|
+
* @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge
|
|
67
|
+
* @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal
|
|
68
|
+
* @param chamferTurnAngleBetweenNormals when facets meet with larger angle, a chamfer edge may be added if the angle between facet normals is larger than this.
|
|
69
|
+
*/
|
|
70
|
+
static create(smoothSingleAngleBetweenNormals?: Angle, smoothAccumulatedAngleBetweenNormals?: Angle, chamferTurnAngleBetweenNormals?: Angle): OffsetMeshOptions;
|
|
71
|
+
}
|
|
30
72
|
/**
|
|
31
73
|
* Structure to return multiple results from volume between facets and plane
|
|
32
74
|
* @public
|
|
@@ -383,6 +425,12 @@ export declare class PolyfaceQuery {
|
|
|
383
425
|
* @param value true for visible, false for hidden
|
|
384
426
|
*/
|
|
385
427
|
static markAllEdgeVisibility(mesh: IndexedPolyface, value: boolean): void;
|
|
428
|
+
/**
|
|
429
|
+
* Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface
|
|
430
|
+
* @param mesh mesh to convert
|
|
431
|
+
* @internal
|
|
432
|
+
*/
|
|
433
|
+
static convertToHalfEdgeGraph(mesh: IndexedPolyface): HalfEdgeGraph;
|
|
386
434
|
/**
|
|
387
435
|
* * Examine adjacent facet orientations throughout the mesh
|
|
388
436
|
* * If possible, reverse a subset to achieve proper pairing.
|
|
@@ -400,11 +448,38 @@ export declare class PolyfaceQuery {
|
|
|
400
448
|
* * Compute simple average of those normals
|
|
401
449
|
* * Index to the averages
|
|
402
450
|
* * For typical meshes, this correctly clusters adjacent normals.
|
|
403
|
-
* * One
|
|
451
|
+
* * One can imagine a vertex with multiple "smooth cone-like" sets of incident facets such that averaging occurs among two nonadjacent cones. But this does not seem to be a problem in practice.
|
|
404
452
|
* @param polyface polyface to update.
|
|
405
453
|
* @param toleranceAngle averaging is done between normals up to this angle.
|
|
406
454
|
*/
|
|
407
455
|
static buildAverageNormals(polyface: IndexedPolyface, toleranceAngle?: Angle): void;
|
|
456
|
+
/**
|
|
457
|
+
* Offset the faces of the mesh.
|
|
458
|
+
* @param source original mesh
|
|
459
|
+
* @param signedOffsetDistance distance to offset
|
|
460
|
+
* @param offsetOptions angle options. The default options are recommended.
|
|
461
|
+
* @returns shifted mesh.
|
|
462
|
+
*/
|
|
463
|
+
static cloneOffset(source: IndexedPolyface, signedOffsetDistance: number, offsetOptions?: OffsetMeshOptions): IndexedPolyface;
|
|
464
|
+
private static _workTriangle?;
|
|
465
|
+
private static _workTriDetail?;
|
|
466
|
+
private static _workPolyDetail?;
|
|
467
|
+
private static _workFacetDetail3?;
|
|
468
|
+
private static _workFacetDetailC?;
|
|
469
|
+
private static _workFacetDetailNC?;
|
|
470
|
+
/** Search facets for the first one that intersects the infinite line.
|
|
471
|
+
* * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
|
|
472
|
+
* In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
|
|
473
|
+
* * Example callback logic:
|
|
474
|
+
* * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
|
|
475
|
+
* * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d` returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
|
|
476
|
+
* @param visitor facet iterator
|
|
477
|
+
* @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
|
|
478
|
+
* @param options options for computing and populating an intersection detail, and an optional callback for accepting one
|
|
479
|
+
* @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
|
|
480
|
+
* @see PolygonOps.intersectRay3d
|
|
481
|
+
*/
|
|
482
|
+
static intersectRay3d(visitor: Polyface | PolyfaceVisitor, ray: Ray3d, options?: FacetIntersectOptions): FacetLocationDetail | undefined;
|
|
408
483
|
}
|
|
409
484
|
/** Announce the points on a drape panel.
|
|
410
485
|
* * The first two points in the array are always along the draped line segment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PolyfaceQuery.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceQuery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PolyfaceQuery.d.ts","sourceRoot":"","sources":["../../../src/polyface/PolyfaceQuery.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,OAAO,EA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ASE;WACY,mBAAmB,CAAC,QAAQ,EAAE,eAAe,EAAE,cAAc,GAAE,KAAiC;IAI9G;;;;;;OAMG;WACW,WAAW,CAAC,MAAM,EAAE,eAAe,EAC/C,oBAAoB,EAAE,MAAM,EAC5B,aAAa,GAAE,iBAA8C,GAAG,eAAe;IAOjF,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAsB;IACnD,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAyB;IACvD,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAwB;IACvD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAgC;IACjE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAA4B;IAC7D,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAA+B;IAEjE;;;;;;;;;;;MAWE;WACY,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,eAAe,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,mBAAmB,GAAG,SAAS;CAoChJ;AAED;;;;;;;;;GASG;AACH,oBAAY,kBAAkB,GAAG,CAAC,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAClF,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,GAAG,CAAC"}
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.PolyfaceQuery = exports.DuplicateFacetClusterSelector = void 0;
|
|
7
|
+
exports.PolyfaceQuery = exports.DuplicateFacetClusterSelector = exports.OffsetMeshOptions = void 0;
|
|
8
8
|
/** @packageDocumentation
|
|
9
9
|
* @module Polyface
|
|
10
10
|
*/
|
|
11
|
-
// import { Point2d } from "./Geometry2d";
|
|
12
11
|
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
13
12
|
const PointHelpers_1 = require("../geometry3d/PointHelpers");
|
|
14
13
|
const CurveCollection_1 = require("../curve/CurveCollection");
|
|
@@ -40,6 +39,44 @@ const Polyface_1 = require("./Polyface");
|
|
|
40
39
|
const PolyfaceBuilder_1 = require("./PolyfaceBuilder");
|
|
41
40
|
const RangeLengthData_1 = require("./RangeLengthData");
|
|
42
41
|
const SpaceTriangulation_1 = require("../topology/SpaceTriangulation");
|
|
42
|
+
const HalfEdgeGraphFromIndexedLoopsContext_1 = require("../topology/HalfEdgeGraphFromIndexedLoopsContext");
|
|
43
|
+
const OffsetMeshContext_1 = require("./multiclip/OffsetMeshContext");
|
|
44
|
+
const FacetLocationDetail_1 = require("./FacetLocationDetail");
|
|
45
|
+
const BarycentricTriangle_1 = require("../geometry3d/BarycentricTriangle");
|
|
46
|
+
/**
|
|
47
|
+
* Options carrier for [[PolyfaceQuery.cloneOffset]].
|
|
48
|
+
* * Default options are strongly recommended.
|
|
49
|
+
* * The option most likely to be changed is chamferTurnAngle
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
class OffsetMeshOptions {
|
|
53
|
+
/** Constructor -- CAPTURE parameters ... */
|
|
54
|
+
constructor(smoothSingleAngleBetweenNormals = Angle_1.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = Angle_1.Angle.createDegrees(60), chamferTurnAngle = Angle_1.Angle.createDegrees(90)) {
|
|
55
|
+
this.smoothSingleAngleBetweenNormals = smoothSingleAngleBetweenNormals.clone();
|
|
56
|
+
this.smoothAccumulatedAngleBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
|
|
57
|
+
this.chamferAngleBetweenNormals = chamferTurnAngle.clone();
|
|
58
|
+
}
|
|
59
|
+
/** construct and return an OffsetMeshOptions with given parameters.
|
|
60
|
+
* * Angles are forced to minimum values.
|
|
61
|
+
* * Clones of the angles are given to the constructor.
|
|
62
|
+
* @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge
|
|
63
|
+
* @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal
|
|
64
|
+
* @param chamferTurnAngleBetweenNormals when facets meet with larger angle, a chamfer edge may be added if the angle between facet normals is larger than this.
|
|
65
|
+
*/
|
|
66
|
+
static create(smoothSingleAngleBetweenNormals = Angle_1.Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = Angle_1.Angle.createDegrees(60), chamferTurnAngleBetweenNormals = Angle_1.Angle.createDegrees(120)) {
|
|
67
|
+
const mySmoothSingleRadiansBetweenNormals = smoothSingleAngleBetweenNormals.clone();
|
|
68
|
+
const mySmoothAccumulatedRadiansBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
|
|
69
|
+
const myChamferTurnAngleBetweenNormals = chamferTurnAngleBetweenNormals.clone();
|
|
70
|
+
if (mySmoothSingleRadiansBetweenNormals.degrees < 1)
|
|
71
|
+
mySmoothAccumulatedRadiansBetweenNormals.setDegrees(1.0);
|
|
72
|
+
if (mySmoothAccumulatedRadiansBetweenNormals.degrees < 1.0)
|
|
73
|
+
mySmoothAccumulatedRadiansBetweenNormals.setDegrees(1.0);
|
|
74
|
+
if (mySmoothAccumulatedRadiansBetweenNormals.degrees < 15.0)
|
|
75
|
+
mySmoothAccumulatedRadiansBetweenNormals.setDegrees(15.0);
|
|
76
|
+
return new OffsetMeshOptions(mySmoothSingleRadiansBetweenNormals, mySmoothAccumulatedRadiansBetweenNormals, myChamferTurnAngleBetweenNormals);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.OffsetMeshOptions = OffsetMeshOptions;
|
|
43
80
|
/**
|
|
44
81
|
* Enumeration of cases for retaining facets among duplicates
|
|
45
82
|
* @public
|
|
@@ -1237,6 +1274,27 @@ class PolyfaceQuery {
|
|
|
1237
1274
|
for (let i = 0; i < data.edgeVisible.length; i++)
|
|
1238
1275
|
data.edgeVisible[i] = value;
|
|
1239
1276
|
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface
|
|
1279
|
+
* @param mesh mesh to convert
|
|
1280
|
+
* @internal
|
|
1281
|
+
*/
|
|
1282
|
+
static convertToHalfEdgeGraph(mesh) {
|
|
1283
|
+
const builder = new HalfEdgeGraphFromIndexedLoopsContext_1.HalfEdgeGraphFromIndexedLoopsContext();
|
|
1284
|
+
const visitor = mesh.createVisitor(0);
|
|
1285
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
1286
|
+
builder.insertLoop(visitor.pointIndex);
|
|
1287
|
+
}
|
|
1288
|
+
const graph = builder.graph;
|
|
1289
|
+
const xyz = Point3dVector3d_1.Point3d.create();
|
|
1290
|
+
graph.announceNodes((_graph, halfEdge) => {
|
|
1291
|
+
const vertexIndex = halfEdge.i;
|
|
1292
|
+
mesh.data.getPoint(vertexIndex, xyz);
|
|
1293
|
+
halfEdge.setXYZ(xyz);
|
|
1294
|
+
return true;
|
|
1295
|
+
});
|
|
1296
|
+
return graph;
|
|
1297
|
+
}
|
|
1240
1298
|
/**
|
|
1241
1299
|
* * Examine adjacent facet orientations throughout the mesh
|
|
1242
1300
|
* * If possible, reverse a subset to achieve proper pairing.
|
|
@@ -1258,13 +1316,75 @@ class PolyfaceQuery {
|
|
|
1258
1316
|
* * Compute simple average of those normals
|
|
1259
1317
|
* * Index to the averages
|
|
1260
1318
|
* * For typical meshes, this correctly clusters adjacent normals.
|
|
1261
|
-
* * One
|
|
1319
|
+
* * One can imagine a vertex with multiple "smooth cone-like" sets of incident facets such that averaging occurs among two nonadjacent cones. But this does not seem to be a problem in practice.
|
|
1262
1320
|
* @param polyface polyface to update.
|
|
1263
1321
|
* @param toleranceAngle averaging is done between normals up to this angle.
|
|
1264
1322
|
*/
|
|
1265
1323
|
static buildAverageNormals(polyface, toleranceAngle = Angle_1.Angle.createDegrees(31.0)) {
|
|
1266
1324
|
BuildAverageNormalsContext_1.BuildAverageNormalsContext.buildFastAverageNormals(polyface, toleranceAngle);
|
|
1267
1325
|
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Offset the faces of the mesh.
|
|
1328
|
+
* @param source original mesh
|
|
1329
|
+
* @param signedOffsetDistance distance to offset
|
|
1330
|
+
* @param offsetOptions angle options. The default options are recommended.
|
|
1331
|
+
* @returns shifted mesh.
|
|
1332
|
+
*/
|
|
1333
|
+
static cloneOffset(source, signedOffsetDistance, offsetOptions = OffsetMeshOptions.create()) {
|
|
1334
|
+
const strokeOptions = StrokeOptions_1.StrokeOptions.createForFacets();
|
|
1335
|
+
const offsetBuilder = PolyfaceBuilder_1.PolyfaceBuilder.create(strokeOptions);
|
|
1336
|
+
OffsetMeshContext_1.OffsetMeshContext.buildOffsetMeshWithEdgeChamfers(source, offsetBuilder, signedOffsetDistance, offsetOptions);
|
|
1337
|
+
return offsetBuilder.claimPolyface();
|
|
1338
|
+
}
|
|
1339
|
+
/** Search facets for the first one that intersects the infinite line.
|
|
1340
|
+
* * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
|
|
1341
|
+
* In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
|
|
1342
|
+
* * Example callback logic:
|
|
1343
|
+
* * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
|
|
1344
|
+
* * Collect all intersections: `myIntersections.push(detail.clone()); return false;` Then after `intersectRay3d` returns, sort along `ray` with `myIntersections.sort((d0, d1) => d0.a - d1.a);`
|
|
1345
|
+
* @param visitor facet iterator
|
|
1346
|
+
* @param ray infinite line parameterized as a ray. The returned `detail.a` is the intersection parameter on the ray, e.g., zero at `ray.origin` and increasing in `ray.direction`.
|
|
1347
|
+
* @param options options for computing and populating an intersection detail, and an optional callback for accepting one
|
|
1348
|
+
* @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
|
|
1349
|
+
* @see PolygonOps.intersectRay3d
|
|
1350
|
+
*/
|
|
1351
|
+
static intersectRay3d(visitor, ray, options) {
|
|
1352
|
+
if (visitor instanceof Polyface_1.Polyface)
|
|
1353
|
+
return PolyfaceQuery.intersectRay3d(visitor.createVisitor(0), ray, options);
|
|
1354
|
+
let detail;
|
|
1355
|
+
visitor.setNumWrap(0);
|
|
1356
|
+
while (visitor.moveToNextFacet()) {
|
|
1357
|
+
const numEdges = visitor.pointCount; // #vertices = #edges since numWrap is zero
|
|
1358
|
+
const vertices = visitor.point;
|
|
1359
|
+
if (3 === numEdges) {
|
|
1360
|
+
const tri = this._workTriangle = BarycentricTriangle_1.BarycentricTriangle.create(vertices.getPoint3dAtUncheckedPointIndex(0), vertices.getPoint3dAtUncheckedPointIndex(1), vertices.getPoint3dAtUncheckedPointIndex(2), this._workTriangle);
|
|
1361
|
+
const detail3 = this._workTriDetail = tri.intersectRay3d(ray, this._workTriDetail);
|
|
1362
|
+
tri.snapLocationToEdge(detail3, options?.distanceTolerance, options?.parameterTolerance);
|
|
1363
|
+
detail = this._workFacetDetail3 = FacetLocationDetail_1.TriangularFacetLocationDetail.create(visitor.currentReadIndex(), detail3, this._workFacetDetail3);
|
|
1364
|
+
}
|
|
1365
|
+
else {
|
|
1366
|
+
const detailN = this._workPolyDetail = PolygonOps_1.PolygonOps.intersectRay3d(vertices, ray, options?.distanceTolerance, this._workPolyDetail);
|
|
1367
|
+
if (PolygonOps_1.PolygonOps.isConvex(vertices))
|
|
1368
|
+
detail = this._workFacetDetailC = FacetLocationDetail_1.ConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailC);
|
|
1369
|
+
else
|
|
1370
|
+
detail = this._workFacetDetailNC = FacetLocationDetail_1.NonConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailNC);
|
|
1371
|
+
}
|
|
1372
|
+
if (detail.isInsideOrOn) { // set optional caches, process the intersection
|
|
1373
|
+
if (options?.needNormal && visitor.normal)
|
|
1374
|
+
detail.getNormal(visitor.normal, vertices, options?.distanceTolerance);
|
|
1375
|
+
if (options?.needParam && visitor.param)
|
|
1376
|
+
detail.getParam(visitor.param, vertices, options?.distanceTolerance);
|
|
1377
|
+
if (options?.needColor && visitor.color)
|
|
1378
|
+
detail.getColor(visitor.color, vertices, options?.distanceTolerance);
|
|
1379
|
+
if (options?.needBarycentricCoordinates)
|
|
1380
|
+
detail.getBarycentricCoordinates(vertices, options?.distanceTolerance);
|
|
1381
|
+
if (options?.acceptIntersection && !options.acceptIntersection(detail, visitor))
|
|
1382
|
+
continue;
|
|
1383
|
+
return detail;
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
return undefined; // no intersection
|
|
1387
|
+
}
|
|
1268
1388
|
}
|
|
1269
1389
|
exports.PolyfaceQuery = PolyfaceQuery;
|
|
1270
1390
|
// amount of computation to do per step of async methods.
|