简体   繁体   English

获取房间的地板和天花板

[英]Get the floor and ceiling of a room

How can I get the current floor and the current ceiling of a room with the Revit API? 如何使用Revit API获取房间的当前楼层和当前天花板? I`m using the 2012 version. 我正在使用2012版本。

I`ve tried: 我尝试过:

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

and: 和:

var cs = el.ClosedShell;

and even this: 甚至这样:

SpatialElementGeometryCalculator calculator = 
  new SpatialElementGeometryCalculator(doc);

SpatialElementGeometryResults results = 
  calculator.CalculateSpatialElementGeometry(el);

Solid roomSolid = results.GetGeometry(); 

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

I think there is no simple way to do this. 我认为没有简单的方法可以做到这一点。 You need to loop on faces, like in your third sample and compare the normal direction against Z vector (with XYZ.IsAlmostEqualTo ). 您需要像在第三个样本中那样在面部上循环,然后将法线方向与Z向量进行比较(使用XYZ.IsAlmostEqualTo )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Revit API移动天花板或地板图案 - Move a ceiling or floor pattern using the Revit API 对于 hololens,使用 MixedRealityToolKit V2 进行统一。 如何获得空间意识以获取表面类型(墙壁、地板、天花板等)? - For hololens, using MixedRealityToolKit V2 for unity. How to access spatial awareness to get surfacetypes (wall, floor, ceiling etc)? 是否有同时执行Ceiling和Floor本身任务的功能? - Is there any function that performs both tasks Ceiling and Floor itself? 快速地板和天花板替代品,用于积极的System.Double值 - Fast Floor and Ceiling alternatives for positive System.Double values Math.Floor(double)和Math.Ceiling(double)的意外行为 - Unexpected Behavior of Math.Floor(double) and Math.Ceiling(double) raycast 用于防止摄像机穿过天花板和地板使玩家卡住 Unity - raycast used to prevent camera from going through ceiling and floor making player stuck Unity 获取地砖的尺寸 - Get size of floor tiles 为什么Math.Round / Floor / Ceiling不返回long或int? - Why doesn't Math.Round/Floor/Ceiling return long or int? 获取Kudan Android中地板的位置 - Get Position of floor in Kudan Android 在C#中使剩余计数达到下一个上限10的最快方法 - Fastest way to get remaining count to next ceiling ten in C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM