A Projection or intersect between a PlanarFace(or face) and Familyinstance?

A Projection or intersect between a PlanarFace(or face) and Familyinstance?

Anonymous
Not applicable
972 Views
3 Replies
Message 1 of 4

A Projection or intersect between a PlanarFace(or face) and Familyinstance?

Anonymous
Not applicable

Good morning veryone~

 

I try to get a Revit api class  object or some data ,which can express the intersections between a PlanarFace(or face) and familyinstance.

Any ideas?

 

I get the idea about two solids ,by a Boolean operation.But may not useful?(I found the Face class is not base the solid class)

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.48

 

Notes:

The total ideas about what I am doing,is,  to split a planelface(now , 4 points,like rectangle) to a matrix,the value is bool,true or false.

true means the point could in the face .false means point could not in the face, such as a opening,or a obstacle like a familyinstance.

 

Did anyone tell any ideas about this?

The way I want to solve it is:

1,found the face 4 points and openings points. check the splited points is in the face or not and the openings.By the revit api document.What I need to do is try a math way to check,because I could get the face 4 points and the opening points.

2,not success. I want to found the intersection from a familyinstance,wihch could be best if the data get is like a opening value.Then I can check by  a almost way. But the question of the title comes,I can not get the intersection.

0 Likes
973 Views
3 Replies
Replies (3)
Message 2 of 4

BardiaJahan
Advocate
Advocate

So you want to see if a certain point is on a face or not?

In that case, you can simply use Face.Project() method. If it returns null, it means the point is definitely not on the face. Otherwise, compare the projection result and the original point, if they are the same it means the original point is on the face.

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

What I want is to use a matrix to stand for a planarface, which the value in it is true or false.True mean in planarface,false means in the opening or the obstacle cut with the planarface.

The matrix corresponding the points, split by the edgs of the planarface.

So, as you say, It is easy to check the point if it is in the planarface.By the api you put out.

But it was  hard for me to check if the point is in the obstacle ,en, yesterday.

 

Now I get the way to check,combine some revit api can realize the target.

0 Likes
Message 4 of 4

Anonymous
Not applicable

Get the solids from the instance,and get a solid after cut by a plan which overlap the planarface.

Then , do something with the solid after cut:get all the face which parallel and distance is 0.

 

check the point if it is in the face the get.if in ,false.

0 Likes