Apply Family Instance to Linked Model Geometry

Apply Family Instance to Linked Model Geometry

Anonymous
Not applicable
312 Views
0 Replies
Message 1 of 1

Apply Family Instance to Linked Model Geometry

Anonymous
Not applicable

Hi all,

 

The short story here is that I’m trying to get the face of a door in a linked model and then create a new family instance of an element I have in my active model to that face.

 

Whenever I try and go through the geometry of the door and then apply the new instances to those faces, the new instances all appear to be floating a few feet in front of the door itself.

 

 

The long story for this project is that I am trying to apply door hardware in the main model to a door in the linked model, and since I can’t access the door family in the linked model I am using the geometry instead. I also have a text file with the positional data for all of the hardware to be placed on the doors calculated from the left edge of the door.

 

The first step here is to translate this relative positional data to the Revit coordinates the door sits at. For this I use the position of the wall’s face at the edge of the door and the tangent at the same point to calculate the coordinates to place the hardware at.

 

Then I use those coordinates (along with the door normal) to do a ray triangle intersection test on the triangles of each face of the door instance until I find the face this point intersects with. The function manages to grab a face, but the problem happens when I try to create the instances on it. Now it suddenly looks like the face was a few feet in front of the door itself.

 

Just for sanity’s sake I also tried to hard code the face I was getting from the geometry in the sample project and most of the faces appeared to be some distance away from the front or side of the door, EXCEPT for if the face was parallel with the Z plane, in which case the hardware would lie on the top or bottom of the door/frame directly.

 

For wall hardware I have no problem creating the linked instance on the wall face. I can also manually affix the door hardware to the face of the door so I believe this should be possible.

 

Is there a problem with how I am getting the geometry of the door? Or maybe a deeper problem with the design?

 

Thanks!

0 Likes
313 Views
0 Replies
Replies (0)