0

如何使用 Revit API 获取房间的当前楼层和当前天花板?我用的是2012版。

我试过了:

 segments = el.GetBoundarySegments(new SpatialElementBoundaryOptions());

和:

var cs = el.ClosedShell;

甚至这个:

SpatialElementGeometryCalculator calculator = 
  new SpatialElementGeometryCalculator(doc);

SpatialElementGeometryResults results = 
  calculator.CalculateSpatialElementGeometry(el);

Solid roomSolid = results.GetGeometry(); 

foreach (Face face in roomSolid.Faces)  
{
    // Subface Code
}
4

1 回答 1

0

我认为没有简单的方法可以做到这一点。您需要像在第三个示例中那样在面上循环,并将法线方向与 Z 向量(使用XYZ.IsAlmostEqualTo)进行比较。

于 2012-02-18T08:19:53.417 回答