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();
}
微信公众号:xuebim
关注建筑行业BIM发展、研究建筑新技术,汇集建筑前沿信息!
← 微信扫一扫,关注我们+
评论前必须登录!
注册