面与线的交点
public XYZ IntersectPointOfFaceAndCurve(Face face, Curve curve)
{
//交点数组
IntersectionResultArray result = new IntersectionResultArray();
//枚举,用于判断相交类型
SetComparisonResult setResult = face.Intersect(curve, out result);
XYZ interResult = null;
//Disjoint为不相交
if (SetComparisonResult.Disjoint != setResult)
{
//isEmpty判断是否为空
if (!result.IsEmpty)
interResult = result.get_Item(0).XYZPoint;
}
return interResult;
}