简体   繁体   English

如何获取墙洞口的坐标

[英]How to Retrieve the Coordinates for the wall Openings

I would like to retrieve the coordinates (points) of a door which resides in a wall. 我想检索驻留在墙上的门的坐标(点)。 I am getting the openings as below. 我的开口如下。 Also, I am having the width. 另外,我有宽度。 How can I find out the end point of the opening. 我如何找出开口的终点。 Also, is there any easy other way to achieve this? 另外,有没有其他简便的方法可以做到这一点?

var openings = WallSelected.FindInserts(true, true, true, true); var openings = WallSelected.FindInserts(true,true,true,true);

Thanks in advance. 提前致谢。

You have a few options, here are two: 您有几个选择,这是两个:

  1. Each insert, if cast to a family instance, will have a location point in its location property. 如果将每个插入强制转换为族实例,则其位置属性中将具有一个定位点。 You can find that point, relate it to the direction of the wall (determined from the wall location line) and apply 1/2 the width in each direction to find the extents of the opening. 您可以找到该点,将其与墙的方向相关(从墙的位置线确定),并在每个方向上应用1/2的宽度以找到开口的范围。

  2. Get the geometry of the wall and iterate the faces array to locate faces of the elements you are interested in. You can use the location point of the insert to help narrow down the geometry search. 获取墙的几何形状,并迭代faces数组以找到您感兴趣的元素的面。您可以使用插入的位置点来帮助缩小几何搜索范围。 Once you have the faces associated with the opening, you will know the geometric extents of the opening as well. 一旦有了与该开口相关联的面,您还将知道该开口的几何范围。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM