Created
October 7, 2020 17:08
-
-
Save chuongmep/5ae0772fa4054fc48470758d1197d10a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool IsHorizontal(this Line Line) | |
{ | |
double TOLERANCE = 0.0000001; | |
XYZ p1 = Line.GetEndPoint(0); | |
XYZ p2 = Line.GetEndPoint(1); | |
return Math.Abs(p1.Y - p2.Y) < TOLERANCE; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool IsVertical(this Line Line) | |
{ | |
double TOLERANCE = 0.0000001; | |
XYZ p1 = Line.GetEndPoint(0); | |
XYZ p2 = Line.GetEndPoint(1); | |
return Math.Abs(p1.X - p2.X) < TOLERANCE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment