***下面的代码在UG里生成一条直线,有一点不理解为何前面生成点要一个FeatureBuilder ***
而这个不要也能生成线?
public class CREATE_LINE
{
public void create_line()
{
Session theSession = Session.GetSession();
Part workPart = theSession.Parts.Work;
// 创建直线的起点和终点坐标
Point3d startPoint = new Point3d(0.0, 0.0, 0.0);
Point3d endPoint = new Point3d(100.0, 100.0, 0.0);
// 使用Curves.CreateLine方法创建直线
Line line = workPart.Curves.CreateLine(startPoint, endPoint);
}
}