有任何问题,直接qq254033230
Revit怎么建空间曲线?
其实对该软件比较熟悉的人应该知道,比较好建的是通过空间点串成空间曲线,也即通过CurveByPoints形成空间曲线。
这个比较简单,就直接放一段原始代码:
private void CreateAdaptiveComponentFamily(Document document)
{
Transaction transaction = new Transaction(document);
transaction.Start("创建线");
ReferencePointArray refPointArray = new ReferencePointArray();
for (int i = 0; i < ListData.ListX.Count; i++)
{
ReferencePoint referencePoint = document.FamilyCreate.NewReferencePoint(new XYZ(ListData.ListX[i]/304.8, ListData.ListY[i]/304.8, ListData.ListZ[i]/304.8));
refPointArray.Append(referencePoint);
}
CurveByPoints curve = document.FamilyCreate.NewCurveByPoints(refPointArray);
transaction.Commit();
}