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();
//
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

BoundingBoxUV与BoundingBoxXYZ的更多相关文章

  1. 筛选出和该元素相交的元素之BoundingBoxIntersectsFilter

    //假设元素为ee BoundingBoxXYZ box = ee.get_BoundingBox(doc.ActiveView); //创建outline,通过boundingboxintersec ...

  2. Revit API根据链接文件开洞

    开洞信息数据: ]);             ;                     ;                     ;                     ;          ...

  3. Revit API找到风管穿过的墙(当前文档和链接文档)

    start [Transaction(TransactionMode.Manual)] [Regeneration(RegenerationOption.Manual)] public class c ...

  4. Revit API创建详图视图

    start //创建详图视图 Transaction ts = new Transaction(doc, "http://greatverve.cnblogs.com"); ts. ...

  5. Revit API遍历全部风管,找到与风管相关的墙开洞

    涉及向量计算,求相交等相关技术. )                 {                     foreach (Face face in solid.Faces)          ...

  6. revit 碰撞检测相关

    Revit二次开发:由房间获取房间的墙     之前用的方法是由房间边界构成的Solid,计算与该Solid相交的Element,然后判断是否为墙.相对来说这个方法比较通用,可以检索出房间的楼板.窗户 ...

随机推荐

  1. Javascript - 预编译与函数词法作用域

    预编译与函数词法作用域(Precompiled & Scoped) 预编译 Javascript脚本的宿主在执行代码之前对脚本做了预编译处理,比如浏览器对Js进行了预编译,编译器会扫描所有的声 ...

  2. Interval Sum I && II

    Given an integer array (index from 0 to n-1, where n is the size of this array), and an query list. ...

  3. Mysql读写分离-Amoeba Proxy

    参考:http://www.linuxidc.com/Linux/2015-10/124115.htm 一个完整的MySQL读写分离环境包括以下几个部分: 应用程序client database pr ...

  4. android 通用 Intent

    通用 Intent 本文内容显示详细信息 闹钟 日历 相机 联系人/人员应用 电子邮件 文件存储 本地操作 地图 音乐或视频 新笔记 电话 搜索 设置 发送短信 网络浏览器 使用 Android 调试 ...

  5. 【转】卖萌的大牛你桑不起啊 ——记CVPR2011一篇极品文章

    来源:http://blog.renren.com/share/228707015/7197269922 作者 : 庞宇 CVPR2011正在如火如荼的进行中,在网上能看到的部分文章中,我终于找到一篇 ...

  6. Windows 10安装pip方法

    pip是一款非常方便的python包管理工具,本文主要介绍在windows 10下安装pip方法. 1. 下载pip 地址:https://pypi.python.org/pypi/pip#downl ...

  7. CentOS6下Jenkins连接Git服务器出错的问题

    今天研究GitLab+Jenkins自动集成时,出现Failed to connect to repository : Command "git config --local credent ...

  8. Jupyter Notebook 入门

    参考     Jupyter Notebook 快速入门 进阶 可看: Jupyter Notebook 的 27 个窍门,技巧和快捷键 Jupyter Notebook(此前被称为 IPython ...

  9. 【AtCoder】ARC099题解

    C - Minimization 每次操作必然包含一个1 枚举第一次操作的位置计算两边即可 代码 #include <bits/stdc++.h> #define fi first #de ...

  10. 1044-Access denied for user 'root'@'%' to database 'lc_db'

    远程登录Linux中的MySQL时,如果直接在工具中创建数据库时,有可能出现下面图中这样的错误: 这种错误是在远程登录时造成的,如果直接在Linux中本地操作没有问题(在Linux中的MySQL下,通 ...