/// <summary>
///
/// </summary>
/// <param name="alignment"></param>
/// <param name="pipe"></param>
/// <returns></returns>
public static List<Point2d> IntersectWithPipe2d(this Alignment alignment, Pipe pipe)
{
List<Point2d> ret = new List<Point2d>();
try
{
if (pipe.Length3DCenterToCenter > 0.0 && alignment.Length > 0.0)
{
Point3dCollection col = new Point3dCollection();
Plane xy = new Plane(Point3d.Origin, Vector3d.ZAxis);
alignment.IntersectWith(pipe, Intersect.OnBothOperands, xy, col, IntPtr.Zero, IntPtr.Zero);
foreach (Point3d pt in col)
{
ret.Add(pt.Convert2d(xy));
}
}
}
catch (System.Exception ex)
{
Debug.WriteLine(ex.Message);
Debug.WriteLine(ex.StackTrace);
}
return ret;
}