Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Last active October 7, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/202109c0e073ff5de1af178e52903527 to your computer and use it in GitHub Desktop.
Save chuongmep/202109c0e073ff5de1af178e52903527 to your computer and use it in GitHub Desktop.
public static XYZ Intersection(this Autodesk.Revit.DB.Line line1, Autodesk.Revit.DB.Line line2)
{
IntersectionResultArray iResult = new IntersectionResultArray();
SetComparisonResult setComparisonResult = line1.Intersect(line2, out iResult);
if (setComparisonResult != SetComparisonResult.Disjoint)
return iResult.get_Item(0).XYZPoint;
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment