Hello:
I have a simple surface in the massing environment. I have applied a divided surface and panelization to it. Revit generates the partial panels at the edges. I want to replace these with a custom adaptive component.
I have a graph that works, but sadly it appears that the placement order of points is different on each side. The main divided surface uses a four-point adaptive component in the rhomboid pattern. At the edges, I need a custom three point version of the same.
The graph selects all components on the divided surface. Then it filters out the full panels (focusing just on the partials at the edges). I get all of the location points from these partial panels, then check to see if they intersect the original surface. I drop all points that donât intersect. (one for each panel, getting me to the required three per).
This all works great⌠BUT, the order of placement only works for one of the four edges of the surface. So the rest have their placed components twisted in an odd way.
Here is what I have so far:
So, I am wondering if there is a convenient way to split my list of placement points into four lists, one for each edge of the original surface, so that I can then use shift indices with a different amount for each side?
OR, some other more intelligent way to control the order that the points get placedâŚ
Thanks very much.
Quick hacky idea⌠Apologies, Iâm sure there will be better!
How about get the average point of each panel, see how the ânon intersectingâ point relates and shift indices accordingly? If the ânon intersecting point is +x +y the panel points shift so much, -x +y a different amount and so on⌠with some extra work you could relate the values to the face normal or similar.
That was useful. It made me think of âClosest toâ. So I got the edges of the surface, then used closest to from Springs to group them by face. Place Triangle Panels_V2.dyn (80.5 KB) (let me know if the Revit file is needed).
I just donât like all the extra âGet item at indexâ I had to do. I am sure there is a more elegant solution, but this is what i came up with.
Figuring out the indices was just trial and error. ICK.
I am including this in a course I am doing that covers adaptive components in Revit. So this is really just a sidebar to that discussion. So I donât want to go deep down the Dynamo path in this. I also donât want any code or python. The point I am trying to make is that if you donât want to place these panels manually, you can script it. I just wish my solution wasnât so ugly LOL.
So if anyone has any more elegant or concise solutions (without code or python) I would appreciate it.
Thanks very much.
Get the points from each panel and keep them grouped.
Build a polycurve from the curtain wall or curtain system edges.
Find the ClosestPointTo the polycurve for each panel point set.
Find the index of the lowest item of the parameters.
Shift the point set by the inverse of that index.
If the first point in the set is the lowest, youâll get a 0, and shifting by zero means you wonât change the order so youâre good.
If the second point in the set is the lowest, youâll get a 1 and shifting -1 will move the first value to the end and the 2nd value will now be first.
Hope it makes sense - Iâm trying to avoid booting up the work laptop till Sunday, but if itâs needed I can try it out then if itâd help.
Might be worth iterating that Dynamo is code. Itâs just authored in another way.
Hi Jacob:
So I did most of that in my recent attempt. At least steps 1 through 3. I did not think of steps 4 and beyond. So by âlowestâ do you mean physically? As in its Z location? Or rather âsmallestâ as in "lowest numerical value? Some clarity there would help. Otherwise, conceptually I understand what you are suggesting and I think it would certainly be more elegant than my âhacky just stumble over the finish line any way possibleâ solution.
Oh and yes, I do ALWAYS characterize Dynamo as âcode in another formâ. I just prefer a node-based solution whenever I am planning to pass the solution on as I find this more accessible to the largest audience.
Thanks very much
Ah, that helps. Now I am making progress. But still not quite there. I was able to do everything you suggested, but alas, many of the panels are still pointing wrong. Here is my code so far:
So there is obviously some little logic error somewhere. Just canât work it out.
I should also point out that in my earlier version, I have some code that compares the points of the edge panels to the underlying surface and removes the points that donât intersect:
I am doing that because the partial panels are a four-point adaptive and I am replacing them with a three-point one. It does not seem to matter if I feed this into the code above before or after removing these points.
But looking at this, and considering the panel I want to place, the first placement point should always be the one that is opposite the one I am removing. So if you imagine the rhomboid at each edge of the surface, two of its vertices will lie on the surface edge, one will be inside the surface and one outside. I am removing the one outside. If I could just figure out the opposite one (the one inside), I could set that as index zero and I think I would be good to go. Hereâs an image:
So in this image, you can see the order of point placement in the lower right. Points 2 and 3 should be along the edges of the surface while point 1 is inside. The green diamonds are the four possible conditions I have, points labeled A are where I want to start, points labeled B are the ones I am removing. And I have those in a list. So, is there an easy way to find all point As from the list of point Bs?
Thanks again.
Hi Marcel:
Yes I have both. Sorry I wasnât clear about that. The original panel is four-point. I am adding the three-point to the edges. That is why I need to eliminate one of the points in the list. Thanks.
Itâs the three point ones Iâm adding. So I canât get their long side till placed.
Right now I am trying to compare the collections of points from the four-point panels to the edges of the surface. Since I have already found the points I want to remove, seems to me I can just get all the points that intersect the edge and eliminate those. That should leave me with the inner points I need. Those become point 1 in placement.
I think that logic is sound. Now I just need to translate it to nodes⌠Wish me luck!
I bet its been done before
Getting creative here:
Make a dynamo triangular mesh copy of the surface and match points maybe?
The 3 point lists match would give the edges?
OK. I got it. I have attached my final graph and I noted the heck out of it just in case anyone wants to follow the logic. Thanks for all the help everyone. Each idea sparks another, so always much appreciated.
The solution that I settled on was to first gather the four points for each edge panel, see if they intersect the surface and throw out the ones that donât. That was easy. The tricky part was then getting the remaining three point lists in the correct order. So I compared these three-point lists to a polycurve (traced around the surface) and checked to see if they intersected. On each list, two points answer true, one false. The falses became index zero on my final list of points. See attached. And thanks again. Place Triangle Panels_Final.dyn (73.9 KB)