@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"}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Polyface
|
|
7
7
|
*/
|
|
8
|
-
// import { Point2d } from "./Geometry2d";
|
|
9
8
|
/* eslint-disable @typescript-eslint/naming-convention, no-empty */
|
|
10
9
|
import { Point3dArray } from "../geometry3d/PointHelpers";
|
|
11
10
|
import { BagOfCurves } from "../curve/CurveCollection";
|
|
@@ -37,6 +36,43 @@ import { Polyface } from "./Polyface";
|
|
|
37
36
|
import { PolyfaceBuilder } from "./PolyfaceBuilder";
|
|
38
37
|
import { RangeLengthData } from "./RangeLengthData";
|
|
39
38
|
import { SpacePolygonTriangulation } from "../topology/SpaceTriangulation";
|
|
39
|
+
import { HalfEdgeGraphFromIndexedLoopsContext } from "../topology/HalfEdgeGraphFromIndexedLoopsContext";
|
|
40
|
+
import { OffsetMeshContext } from "./multiclip/OffsetMeshContext";
|
|
41
|
+
import { ConvexFacetLocationDetail, NonConvexFacetLocationDetail, TriangularFacetLocationDetail } from "./FacetLocationDetail";
|
|
42
|
+
import { BarycentricTriangle } from "../geometry3d/BarycentricTriangle";
|
|
43
|
+
/**
|
|
44
|
+
* Options carrier for [[PolyfaceQuery.cloneOffset]].
|
|
45
|
+
* * Default options are strongly recommended.
|
|
46
|
+
* * The option most likely to be changed is chamferTurnAngle
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export class OffsetMeshOptions {
|
|
50
|
+
/** Constructor -- CAPTURE parameters ... */
|
|
51
|
+
constructor(smoothSingleAngleBetweenNormals = Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = Angle.createDegrees(60), chamferTurnAngle = Angle.createDegrees(90)) {
|
|
52
|
+
this.smoothSingleAngleBetweenNormals = smoothSingleAngleBetweenNormals.clone();
|
|
53
|
+
this.smoothAccumulatedAngleBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
|
|
54
|
+
this.chamferAngleBetweenNormals = chamferTurnAngle.clone();
|
|
55
|
+
}
|
|
56
|
+
/** construct and return an OffsetMeshOptions with given parameters.
|
|
57
|
+
* * Angles are forced to minimum values.
|
|
58
|
+
* * Clones of the angles are given to the constructor.
|
|
59
|
+
* @param smoothSingleRadiansBetweenNormals an angle larger than this (between facets) is considered a sharp edge
|
|
60
|
+
* @param smoothAccumulatedAngleBetweenNormals angles that sum to this much may be consolidated for average normal
|
|
61
|
+
* @param chamferTurnAngleBetweenNormals when facets meet with larger angle, a chamfer edge may be added if the angle between facet normals is larger than this.
|
|
62
|
+
*/
|
|
63
|
+
static create(smoothSingleAngleBetweenNormals = Angle.createDegrees(25), smoothAccumulatedAngleBetweenNormals = Angle.createDegrees(60), chamferTurnAngleBetweenNormals = Angle.createDegrees(120)) {
|
|
64
|
+
const mySmoothSingleRadiansBetweenNormals = smoothSingleAngleBetweenNormals.clone();
|
|
65
|
+
const mySmoothAccumulatedRadiansBetweenNormals = smoothAccumulatedAngleBetweenNormals.clone();
|
|
66
|
+
const myChamferTurnAngleBetweenNormals = chamferTurnAngleBetweenNormals.clone();
|
|
67
|
+
if (mySmoothSingleRadiansBetweenNormals.degrees < 1)
|
|
68
|
+
mySmoothAccumulatedRadiansBetweenNormals.setDegrees(1.0);
|
|
69
|
+
if (mySmoothAccumulatedRadiansBetweenNormals.degrees < 1.0)
|
|
70
|
+
mySmoothAccumulatedRadiansBetweenNormals.setDegrees(1.0);
|
|
71
|
+
if (mySmoothAccumulatedRadiansBetweenNormals.degrees < 15.0)
|
|
72
|
+
mySmoothAccumulatedRadiansBetweenNormals.setDegrees(15.0);
|
|
73
|
+
return new OffsetMeshOptions(mySmoothSingleRadiansBetweenNormals, mySmoothAccumulatedRadiansBetweenNormals, myChamferTurnAngleBetweenNormals);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
40
76
|
/**
|
|
41
77
|
* Enumeration of cases for retaining facets among duplicates
|
|
42
78
|
* @public
|
|
@@ -1234,6 +1270,27 @@ export class PolyfaceQuery {
|
|
|
1234
1270
|
for (let i = 0; i < data.edgeVisible.length; i++)
|
|
1235
1271
|
data.edgeVisible[i] = value;
|
|
1236
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Create a HalfEdgeGraph with a face for each facet of the IndexedPolyface
|
|
1275
|
+
* @param mesh mesh to convert
|
|
1276
|
+
* @internal
|
|
1277
|
+
*/
|
|
1278
|
+
static convertToHalfEdgeGraph(mesh) {
|
|
1279
|
+
const builder = new HalfEdgeGraphFromIndexedLoopsContext();
|
|
1280
|
+
const visitor = mesh.createVisitor(0);
|
|
1281
|
+
for (visitor.reset(); visitor.moveToNextFacet();) {
|
|
1282
|
+
builder.insertLoop(visitor.pointIndex);
|
|
1283
|
+
}
|
|
1284
|
+
const graph = builder.graph;
|
|
1285
|
+
const xyz = Point3d.create();
|
|
1286
|
+
graph.announceNodes((_graph, halfEdge) => {
|
|
1287
|
+
const vertexIndex = halfEdge.i;
|
|
1288
|
+
mesh.data.getPoint(vertexIndex, xyz);
|
|
1289
|
+
halfEdge.setXYZ(xyz);
|
|
1290
|
+
return true;
|
|
1291
|
+
});
|
|
1292
|
+
return graph;
|
|
1293
|
+
}
|
|
1237
1294
|
/**
|
|
1238
1295
|
* * Examine adjacent facet orientations throughout the mesh
|
|
1239
1296
|
* * If possible, reverse a subset to achieve proper pairing.
|
|
@@ -1255,13 +1312,75 @@ export class PolyfaceQuery {
|
|
|
1255
1312
|
* * Compute simple average of those normals
|
|
1256
1313
|
* * Index to the averages
|
|
1257
1314
|
* * For typical meshes, this correctly clusters adjacent normals.
|
|
1258
|
-
* * One
|
|
1315
|
+
* * 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.
|
|
1259
1316
|
* @param polyface polyface to update.
|
|
1260
1317
|
* @param toleranceAngle averaging is done between normals up to this angle.
|
|
1261
1318
|
*/
|
|
1262
1319
|
static buildAverageNormals(polyface, toleranceAngle = Angle.createDegrees(31.0)) {
|
|
1263
1320
|
BuildAverageNormalsContext.buildFastAverageNormals(polyface, toleranceAngle);
|
|
1264
1321
|
}
|
|
1322
|
+
/**
|
|
1323
|
+
* Offset the faces of the mesh.
|
|
1324
|
+
* @param source original mesh
|
|
1325
|
+
* @param signedOffsetDistance distance to offset
|
|
1326
|
+
* @param offsetOptions angle options. The default options are recommended.
|
|
1327
|
+
* @returns shifted mesh.
|
|
1328
|
+
*/
|
|
1329
|
+
static cloneOffset(source, signedOffsetDistance, offsetOptions = OffsetMeshOptions.create()) {
|
|
1330
|
+
const strokeOptions = StrokeOptions.createForFacets();
|
|
1331
|
+
const offsetBuilder = PolyfaceBuilder.create(strokeOptions);
|
|
1332
|
+
OffsetMeshContext.buildOffsetMeshWithEdgeChamfers(source, offsetBuilder, signedOffsetDistance, offsetOptions);
|
|
1333
|
+
return offsetBuilder.claimPolyface();
|
|
1334
|
+
}
|
|
1335
|
+
/** Search facets for the first one that intersects the infinite line.
|
|
1336
|
+
* * To process _all_ intersections, callers can supply an `options.acceptIntersection` callback that always returns false.
|
|
1337
|
+
* In this case, `intersectRay3d` will return undefined, but the callback will be invoked for each intersection.
|
|
1338
|
+
* * Example callback logic:
|
|
1339
|
+
* * Accept the first found facet that intersects the half-line specified by the ray: `return detail.a >= 0.0;`
|
|
1340
|
+
* * 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);`
|
|
1341
|
+
* @param visitor facet iterator
|
|
1342
|
+
* @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`.
|
|
1343
|
+
* @param options options for computing and populating an intersection detail, and an optional callback for accepting one
|
|
1344
|
+
* @return detail for the (accepted) intersection with `detail.IsInsideOrOn === true`, or `undefined` if no (accepted) intersection
|
|
1345
|
+
* @see PolygonOps.intersectRay3d
|
|
1346
|
+
*/
|
|
1347
|
+
static intersectRay3d(visitor, ray, options) {
|
|
1348
|
+
if (visitor instanceof Polyface)
|
|
1349
|
+
return PolyfaceQuery.intersectRay3d(visitor.createVisitor(0), ray, options);
|
|
1350
|
+
let detail;
|
|
1351
|
+
visitor.setNumWrap(0);
|
|
1352
|
+
while (visitor.moveToNextFacet()) {
|
|
1353
|
+
const numEdges = visitor.pointCount; // #vertices = #edges since numWrap is zero
|
|
1354
|
+
const vertices = visitor.point;
|
|
1355
|
+
if (3 === numEdges) {
|
|
1356
|
+
const tri = this._workTriangle = BarycentricTriangle.create(vertices.getPoint3dAtUncheckedPointIndex(0), vertices.getPoint3dAtUncheckedPointIndex(1), vertices.getPoint3dAtUncheckedPointIndex(2), this._workTriangle);
|
|
1357
|
+
const detail3 = this._workTriDetail = tri.intersectRay3d(ray, this._workTriDetail);
|
|
1358
|
+
tri.snapLocationToEdge(detail3, options?.distanceTolerance, options?.parameterTolerance);
|
|
1359
|
+
detail = this._workFacetDetail3 = TriangularFacetLocationDetail.create(visitor.currentReadIndex(), detail3, this._workFacetDetail3);
|
|
1360
|
+
}
|
|
1361
|
+
else {
|
|
1362
|
+
const detailN = this._workPolyDetail = PolygonOps.intersectRay3d(vertices, ray, options?.distanceTolerance, this._workPolyDetail);
|
|
1363
|
+
if (PolygonOps.isConvex(vertices))
|
|
1364
|
+
detail = this._workFacetDetailC = ConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailC);
|
|
1365
|
+
else
|
|
1366
|
+
detail = this._workFacetDetailNC = NonConvexFacetLocationDetail.create(visitor.currentReadIndex(), numEdges, detailN, this._workFacetDetailNC);
|
|
1367
|
+
}
|
|
1368
|
+
if (detail.isInsideOrOn) { // set optional caches, process the intersection
|
|
1369
|
+
if (options?.needNormal && visitor.normal)
|
|
1370
|
+
detail.getNormal(visitor.normal, vertices, options?.distanceTolerance);
|
|
1371
|
+
if (options?.needParam && visitor.param)
|
|
1372
|
+
detail.getParam(visitor.param, vertices, options?.distanceTolerance);
|
|
1373
|
+
if (options?.needColor && visitor.color)
|
|
1374
|
+
detail.getColor(visitor.color, vertices, options?.distanceTolerance);
|
|
1375
|
+
if (options?.needBarycentricCoordinates)
|
|
1376
|
+
detail.getBarycentricCoordinates(vertices, options?.distanceTolerance);
|
|
1377
|
+
if (options?.acceptIntersection && !options.acceptIntersection(detail, visitor))
|
|
1378
|
+
continue;
|
|
1379
|
+
return detail;
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
return undefined; // no intersection
|
|
1383
|
+
}
|
|
1265
1384
|
}
|
|
1266
1385
|
// amount of computation to do per step of async methods.
|
|
1267
1386
|
PolyfaceQuery._asyncWorkLimit = 1.e06;
|