在尝试获取最精确的房间体积实体时,我发现了一个有趣的行为:当打开房间体积计算时,Revit看起来只会得到房间的边界形状。!!
这是打开无界高度为15米+体积计算的房间:
...here是打开6m +体积计算后的未绑定高度:
...here是打开3m +体积计算时的未绑定高度:
获取房间的实体:
private static Solid _FirstSolid (Element elem)
{
Options op = new Options();
Solid roomSolid = (elem.get_Geometry(op) as GeometryElement).FirstOrDefault() as Solid;
return roomSolid;
}
使用DirectShapes烘焙:
using (Transaction t = new Transaction(doc,"bake Room Geometry"))
{
t.Start();
DirectShape ds = DirectShape.CreateElement(doc,new ElementId(BuiltInCategory.OST_GenericModel));
ds.SetShape((new List<GeometryObject> {transSolid as GeometryObject}));
t.Commit();
t.Dispose();
}
不确定这是否是体积计算的预期行为!但是当我们改变无界高度时,它也改变了计算出的体积值!
要获得最准确的房间体积实体,人们遇到的最佳方法是什么?能量分析API是解决这一问题的更可靠的方法吗?还有其他建议吗?
发布于 2019-10-29 07:10:46
https://stackoverflow.com/questions/58585323
复制相似问题