Rotate family instance based on a placed family


#1

Hello guys,

I’ve spend a good deal of time in order to get this to work, but I’ve still not succeeded, so I’m gonna ask here.

Im in an ARC model with a MEP model linked in. I need to extract the location of all firehose cabinets, place a void in the same location, make it cut the wall geometry. This would be easy if all the walls where facing the same direction, but this is often not the case :-). So the firehose cabinet is naturally rotated (90, 180 or 270 degrees) around it’s own z-axis, to accommodate the direction of the wall its hosted in. And this is where i run my head into a wall. I can get the graph to extract the location of the cabinet, place the void, and rotate it, but the voids don’t rotate the propper amount of degrees. I think this can be solved with some sort of mapping of coordinates between the elements, but I just cant figure out what I need to do, to get this done.

When I compare the elementID’s of the list of cabinets, and the list of voids, and then check them in the model, I can see, that the first element of the lists are not corrosponding.

Info: The void family is created just like the firehose cabinet, so if the cabinet is placed at 0 degrees, then the void is placed correctly.

Hope the info is sufficient.

Best regards, Martin

 


#2

Hi Martin,

See this post http://dynamobim.org/forums/topic/use-linked-mechanical-model-to-create-voids-in-walls/ there are examples how to use void’s.

Good Luck!


#3

Hey Kulkul,

I actually hav ethat post bookmarked :-). I’ll see if I can reuse some of it for this operation.

Thx for your time.


#4

How much is the rotation off? Is everyone off by the same amount?


#5

See the preview in the math.round :-).

 


#6

That is the rotation of the firehose cabinets. how much is the rotation of the void different.


#7

All the voids are placed at 0 degrees. This is why I wanted to associate the void with the cabinet it shares insertion coordiantes with, and then rotate it accordingly.


#8

I can get the graph to extract the location of the cabinet, place the void, and rotate it, but the voids don’t rotate the proper amount of degrees.” In your first post you said they did not rotate the proper amount thus why I asked what I did. You never said anything about them not rotating at all.

Have you checked that the family can be rotated in that direction? After it places the void family try using the Revit rotate on one of them to make sure it is not locked to a workplace or face.

If you have not see this you can give it a try as well. http://archi-lab.net/rotate-family-with-dynamo/


#9

Hi Martin,

I need to closer look at your files. Is it possible for you to put here Dummy rvt file and your dyn file. I will solve your issue.


#10

Steven, the voids do rotate, so I dont think that is the issue, but i’ll check and make sure this it not the problem. They just dont rotate accordingly to the cabinet they are placed upon. That’s why im saying in the original post, that I think i need to get the point coordinates mapped propperly, before the rotation happens. So the geometry.intersect might be the propper way to go, as kulkul is suggesting.

I have also looked into Konrads way of doing it, but the example i found wasn’t as elaborate as the one you just linked. I’ll take a look at it when i get home tonight. Cheers :-).

Kulkul, that is very nice of you, but I was looking for directions rather then just getting the answer. But i really appreciate it, and if I keep running my head into a wall, then I’ll let you solve it. Is that OK? :slight_smile:


#11

If they are rotating then thats good. I was wondering how much the difference of rotation between the cabinet and void so we can start to determine what the problem is. If they are all off by 90* then its how the family was made (the void is rotated 90* in the family environment compared to the cabinet). This could be fixed by making a new family or just by subtracting 90 from the mathround (also how much is this rounding the numbers? Do you want to round or use the exact rotation or the cabinet?)

 

As far as the points coordinates go it should just be the origin of the family’s (the intersection of the two reference lines when you first start a new family)(you can also try the built in node FamilyInstance.Location instead of Element.Location). If the void in its family does not match the same location as the geometry in the cabinet family based on the origin then they will not line up once loaded in.


#12

So I’ve tried a couple of things based on the post you linked, Kulkul. Dimitars approach gave the best result, but 2/2 voids are still not placed propperly :-(.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My graph:


#13

ARCH

MEP1

GeometryIntersect_TEST2

Testfiles+dyn.

If you wanna give it a go, then go ahead. I don’t think i posses the dynamo knowledge to figure this one out.

 

 

 


#14

Hi,

after tools.surrounding:

  1. make intersection check -> you get points

2.place family by host (points: points from intersection, hosts: walls)

  1. get parameters like height/width from elements (from tools.surrounding)and pass it to new family (create one with correct parameters, can be based on opening family from revit)

  2. profit

Before tools.surrounding:

  1. remove all stuff, leave only elements

#15

I’m not able to find the Elements.Get.Rotation node. Is this in a different package?


#16

I think its in Archi-lab