You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MathNet.Spatial.Euclidean.Point3D LinePt1 = new Point3D(200, 0, 0);
MathNet.Spatial.Euclidean.Point3D LinePt2 = new Point3D(100, 0, 0);
Line3D a_Line3D = new Line3D(LinePt1, LinePt2);
Ap = -100; Bp = 0; Cp = -3.979039320256561E-13;
Vector3D aNormal = new Vector3D(Ap, Bp, Cp);
UnitVector3D aNormalV = aNormal.Normalize();
Point3D PtOnPlane = new Point3D(200, -100, 100);
Plane a_Plane = new Plane(PtOnPlane, aNormalV);
Point3D? aPtint = new Point3D();
aPtint = a_Line3D.IntersectionWith(a_Plane, 4.9E-324); //returns unexpected NULL.
//------------------------------------
Below DOES work, receives aPtint = (200, 0, 0);
MathNet.Spatial.Euclidean.Point3D LinePt1 = new Point3D(200, 0, 0);
MathNet.Spatial.Euclidean.Point3D LinePt2 = new Point3D(100, 0, 0);
Line3D a_Line3D = new Line3D(LinePt1, LinePt2);
Vector3D aNormal = new Vector3D(-100, 0, 0);
UnitVector3D aNormalV = aNormal.Normalize();
Point3D PtOnPlane = new Point3D(200, -100, 100);
Plane a_Plane = new Plane(PtOnPlane, aNormalV);
Point3D? aPtint = new Point3D();
aPtint = a_Line3D.IntersectionWith(a_Plane, 4.9E-324);
Notes:
_difference in above is changing Cp value from -3.979039320256561E-13 to 0;
_modification of error epsilon from 4.9E-324 to 0 etc did not change results.
_employing using VS 2017 fully updated; Working as expected for all other code within subject test.
Apparently reason for listed ~issue is: Line SEGMENT is slightly ~short of penetrating the Plane.
We are desiring to determine Plane intersect with INFINITE Line.
Method suggestion appreciated.
Apparently reason for listed ~issue is: Line SEGMENT is slightly ~short of penetrating the Plane. We are desiring to determine Plane intersect with INFINITE Line. Method suggestion appreciated.
I am not really sure I understood your explanation, can you explain it again with other words please?
Reference the original posted FAILS code: That code returns NULL for the intersection (ie, No Intersect); I suggest This because the LINE is not considered infinite by MathNet. Using Ray3D in-place-of Line3D probably is the solution; However, I suspect would need to check BOTH directions (direct and mirror) of Ray to insure all tested for plane intersect.
I think the error lies in the implementation of public Point3D? IntersectionWith(Line3D line, double tolerance = float.Epsilon) of Plane.cs, which is identical to public Point3D? IntersectionWith(LineSegment3D line, double tolerance = float.Epsilon) (notice, Line3D vs. LineSegment3D).
As far as I can tell, Spatial treats Ray3D as an infinite (mathematical) line and LineSegment3D as a... segment of a line, with a given start and end.
For my understanding, Line3D should de removed and its usages replaced by Ray3D
Activity
ASCmetrology commentedon Dec 29, 2023
Apparently reason for listed ~issue is: Line SEGMENT is slightly ~short of penetrating the Plane.
We are desiring to determine Plane intersect with INFINITE Line.
Method suggestion appreciated.
jkalias commentedon Dec 29, 2023
I am not really sure I understood your explanation, can you explain it again with other words please?
ASCmetrology commentedon Dec 29, 2023
Reference the original posted FAILS code: That code returns NULL for the intersection (ie, No Intersect); I suggest This because the LINE is not considered infinite by MathNet. Using Ray3D in-place-of Line3D probably is the solution; However, I suspect would need to check BOTH directions (direct and mirror) of Ray to insure all tested for plane intersect.
jkalias commentedon Dec 31, 2023
I think the error lies in the implementation of
public Point3D? IntersectionWith(Line3D line, double tolerance = float.Epsilon)ofPlane.cs, which is identical topublic Point3D? IntersectionWith(LineSegment3D line, double tolerance = float.Epsilon)(notice,Line3Dvs.LineSegment3D).As far as I can tell, Spatial treats
Ray3Das an infinite (mathematical) line andLineSegment3Das a... segment of a line, with a given start and end.For my understanding,
Line3Dshould de removed and its usages replaced byRay3DJones-Adam commentedon Feb 22, 2024
Indeed, Line3D was at one point on the schedule to be deprecated