Separating edge panels on a divided surface into separate lists

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.

Hi Paul,

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.

Hopefully that is useful :slight_smile:

Mark

Hi Mark:

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.

1 Like

I’d go a slightly different route:

  1. Get the points from each panel and keep them grouped.
  2. Build a polycurve from the curtain wall or curtain system edges.
  3. Find the ClosestPointTo the polycurve for each panel point set.
  4. Find the index of the lowest item of the parameters.
  5. 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.

1 Like

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

1 Like

Ah - I didn’t write step 3.5 (really step four).

3.5) Find the parameter at point for each of the points in the subgroup on the polycurve.
4) Get the index of the lowest parameter value in the list.

Hi Jacob:

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:

This is the result in Revit:


Notice only a few panels are correct. So I tried feeding in the indices without inversing them. It was better, but still not right:

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.

Maybe you need a 3-point adaptive and a 4-point adaptive?

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.

Why not find the longest rib of a three point panel and see what’s adjacent
That would give you the 3 and 4 point panels

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… :slight_smile: Wish me luck!

I bet its been done before :slight_smile:
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)

2 Likes

Good work @Paul_Aubin!

1 Like

Thanks

1 Like