Aligning family instance rotation

Hullo!

I’m almost there with my Dynamo / Python graph which places brickwork (a family face based brick) on a face.

The face which it places the bricks on is at a random inclined plane, with holes cut in it (for windows). This is for a building I’m working on.

The graph works by:

  1. The user sets a workplane to the face of the wall to place the bricks on.
  2. The user sets the Origin and X / Y axies for the placement.
  3. The routine generates some points to place the bricks at 0,0,0 to the project basepoint coords.
  4. The points are then translated to the face.
  5. (for some reason I can’t work out, the points are always slightly off of the face) So the points are projected onto the face.
  6. The intersect node works out which points fall on the face and which ones are over the edge of over a window (these are disregarded).
  7. The bricks are place on the points (Using the Springs place family instance node, I can’t get the Dynamo one to place more than one brick).

This all works nicely, but the bricks are not aligned to the correct rotation.


The pic shows the bricks on the plane, but at the wrong angle…

I’ve used the Family Instance - Set Rotation node to rotate them, but I cannot determine the correct rotation - it appears that they are rotated to the Project Coordinates X / Y axes (you can see this if you look at them in plan).

I tried to work out the rotation against the project basepoint X axis (see the nodes at the end of the graph), but it does rotate the bricks, but the rotation is not correct.

Attached is the Revit file (2017) and Dynamo node.

I’d appreciate some advise on how to get this to work.

To use the graph - Select the face (it should already be selected), the Python node sets the points to use (the endpoints of the red lines are the points to select, when you run the graph, you need to make Revit the focus and you’ll see the ‘Select origin’, ‘Select X Axis’ and ‘Select Y Axis’ prompt in the lower left corner of Revit (its easy to miss).

Thanks for any help in advance!

Place bricks - coord trans 19 post.dyn (66.0 KB)
Place bricks 2017 01.rvt (2.9 MB)

1 Like

OK, to answer my own post.

I worked out how to place the brick family on the face at the right angle.

I stopped using the Springs node and used the OOTB FamilyInstance.ByFace, this has a ‘reference direction’ input.

I created a vector from one of the red setting out lines which I used as the reference direction:

image

3 Likes