Choose which edge Isoline is created on

Hello,

I’m a fairly experienced Revit user but recently I’ve been getting acquainted with it’s interactions with Dynamo. So far it’s been going quite well and I’m enjoying it. I’ve been trying to create a script which sets out shingles on any chosen face. The sizing and spacing of the individual shingles is guided by a couple of guiding principles but essentially every face/surface/wall will have unique setting out based on its dimensions/shape etc.

So far I’ve managed to make a script which divides the surface by using isolines U and V and then creates points at the intersections. I then insert a family (shingle) to each point and follow this by modifying the family’s parameters based on the script output to create the correct spacing.

Basically at this point the script does what I want. However, there is one major problem which I would appreciate help with. My shingles are directional: they go from top to down and from left to right. I use Surface.GetIsoline to divide my surfaces into points on which to drop the individual shingle families on. Everything works perfectly when the node picks out the starting isoline from the top and left edge of the selected face. However, sometimes the node picks out the bottom and right edge of the surface as the initial isoline. Is there a way to define which side to start on? Or am I doing this in a completely counter-intuitive way to start off with?

I appreciate that in a way it’s a bit silly to model individual shingles as this will no doubt cause the model to get quite heavy. This is somewhat of a learning project for me although I do expect to get some useful information out of it as well.

Below is a screen cap showing a correctly divided surface with the left-hand and top edge defining the spacing. Any help appreciated!!

Edit:
Or does the initial line even matter? Changing the parameter of get.isoline didnt seem to make a difference. Also reversing the list of resulting points didn’t work either. Below is an additional image. As you can see the points are created from the bottom edge and not from the top edge like in the previous image. I would always like to have points on the top edge with the bottom being free to not line up.

Below also two images showing the correct placed shingles (starting from left and top) and incorrectly placed shingles (starting from bottom and right). The first column is replaced with unique corner shingles. Additionally when placed like in the second image the families are placed on the reverse side of the face.

Thank you,
Ilkka

Try sorting the points by their Z value, then sort the sublists by the distance from Parameter 0,0.

The sorting doesn’t actually matter. The problem is that I’m trying to divide the wall into points (on which I place a family) and I want the starting point to be at the eave line. In cases where my division is uneven (like in this case) I want the odd end to be at the bottom.

Below is an image where you can see the points divided correctly. The wall is 4000mm high so the first points start at Z = 4000. I have a new row every 300mm so the last line in this list is at Z = 400 (I have another list where Z = 100).

Below is another image where you can see the points divided incorrectly. Here the initial isoline is at the base of the wall meaning the points start from Z = 0 and the odd points end up at the eave line. This means the last points are at Z = 3900.

I’m guessing I could solve this if I could somehow edit the StartPoint and EndPoint values of this node to Z=4000. Is there a way to do this?

Your points are showing up in order 1, 2, 3, 4 when looking at their Z value, but only sometimes.

You want them to be ordered 4, 3, 2, 1 in all cases.

You need three nodes:

Point.Z

List.SortByKey

List.Reverse

The points out of your Surface.PointAtParameter node wire into the Point.Z node and into the List input on the List.SortByKey. The result of the Point.Z node wires into the Key of the List.SortByKey node, and the Sorted List wires into the List.Reverse node. Set all node to work at level 2 I think (may be 3 - hard to really see the data structure here).

I don’t think this will solve it. The problem is I’m dividing the height of the face into rows. To simplify this let’s say the height of my face is 9 and I want a row every second number. I want there to be a row of points at Z = 9 regardless of the order. Therefore I want my points to be on rows at Z = 9, 7, 5, 3, 1. The order doesn’t actually matter, they could be 1, 3, 5, 7, 9 and the script would also work.

The problem I have is that the initial isoline is sometimes picked at Z = 0 instead of Z = 9. Therefore my list ends up as 0, 2, 4, 6, 8 (or reversed).

But by forcing the order to be 9…0 instead of 0…9 you ensure it’s always 9,7,5,3,1