/// <summary> /// 判断两条曲线是否近似垂直,默认tolerance为0.01 /// </summary> /// <param name="curve1"></param> /// <param name="curve2"></param> /// <returns></returns> public static bool IsAlmostVerticalTo(this Curve curve1, Curve curve2) { if (curve1 is Line && curve2 is Line) { XYZ xyz1 = (curve1 as Line).Direction; XYZ xyz2 = (curve2 as Line).Direction; return(xyz1.IsAlmostVerticalTo(xyz2)); } return(false); }