BoundingBoxUV与BoundingBoxXYZ
start
end
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();
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();
我这个博客废弃不用了,今天想寻找外链的时候,突然想到这个博客权重很高。
有需要免费外链的,留言即可,我准备把这个博客变成免费的友情链接站点。