Skip to content

Commit

Permalink
🐛 IsOnPlane
Browse files Browse the repository at this point in the history
comparison with tolerance.
  • Loading branch information
Marco-Pellegrino committed Aug 28, 2024
1 parent 8cbadbe commit 8b33309
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions FemDesign.Core/Geometry/Point3d.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ public static bool ArePointsOnPlane(List<Point3d> points)

for(int j = 0; j < points.Count; j++)
{
bool IsOnPlane = (a * points[j].X + b * points[j].Y + c * points[j].Z + d) == 0;
if (IsOnPlane == true)
double IsOnPlane = a * points[j].X + b * points[j].Y + c * points[j].Z + d;

// check is IsOnPlane is within tolerance
if (Math.Abs(IsOnPlane) <= Tolerance.LengthComparison)
continue;
else
return false;
Expand Down

0 comments on commit 8b33309

Please sign in to comment.