您的位置:首页 > 其它

BoundingBoxUV与BoundingBoxXYZ

2014-02-25 15:55 309 查看
start
UIApplication app = commandData.Application;
Document doc = app.ActiveUIDocument.Document;
//
Face face = null;
BoundingBoxUV boxUV = face.GetBoundingBox();//二维矩形
UV center = (boxUV.Max + boxUV.Min) * 0.5;//二维坐标
UV uv = boxUV.get_Bounds(0);
//
Element elem = null;
BoundingBoxXYZ bbXYZ = elem.get_BoundingBox(doc.ActiveView);//三维矩形,立方体
//找到线穿过的墙
Outline outline = new Outline(bbXYZ.Min, bbXYZ.Max);
FilteredElementCollector collector = new FilteredElementCollector(doc);
BoundingBoxIntersectsFilter invertFilter = new BoundingBoxIntersectsFilter(outline, false);
IList<Element> intersectWalls = collector.OfClass(typeof(Wall)).WherePasses(invertFilter).ToElements();end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: