diff --git a/FemDesign.Core/Geometry/Point3d.cs b/FemDesign.Core/Geometry/Point3d.cs index a14abe78..2c81cf96 100644 --- a/FemDesign.Core/Geometry/Point3d.cs +++ b/FemDesign.Core/Geometry/Point3d.cs @@ -173,8 +173,10 @@ public static bool ArePointsOnPlane(List 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;