Change curtain panel type based on position of windows/doors

Hi,

For a project of mine, I want to change panel type to empty for all panels in front of windows or doors placed in a wall behind the curtain wall.

My solution is working ok, but the script gets slow when the amount of panels and windows increase. For just 1000 panels and 30 windows the script has to run 30000 intersection tests as it checks bounding box collisions for each panel and every window/door.

Another downside is that the current script can only handle one building facade at a time as the script requires a work plane to be specified.

I’m curious to see if perhaps anyone of you Dynamo Pros out there has a better approach to this than what I could come up with? Maybe an idea for a fast script that handles mutliple facade orientations. :smiley:

Then why is all this you may be thinking… Well… I was thinking of modeling the facade cladding as a curtain wall in front of the external wall, in order to make some facade color designs using curtain wall panels with different colors, something a little bit like the this picture (but really thats the next part of my quest):

Anyway, any hints would be much appreciated!

CullCurtainPanelsInFront_211005v2.dyn (89.2 KB)
CullCurtainPanelsInFront_211005.rvt (3.5 MB)

Hello @CarlC ,

I know one concept to improve the efficiency of the script.
In place of using “BoundingBox.Intersects” use the same node logic in python.
and once you got the intersection, break that loop.

for example in you case, we have 30 door and 1000 walls.
in previous logic, if 1st door clash with 1st wall but it will check for other 999 wall also whether it clash or not. but i am logic if 1st door clash with 1st wall then break that loop and go for 2nd door and check for the intersection.

In my logic - ideal case is 1st door with 1st wall , 2nd door with 2nd wall then it will check for (30*(30+1)/2) = 450 case only and in worst case 30000-450 = 29550 case it will check.

Another logic is to reduce the number of iteration, by grouping the Door and Wall by level,
Because if both are in same level then only it will intersect other it will not.

So if i am assuming we have 3 level in the building (GF, FF and SF) and 10 door in each level and 333 wall in each level
so now i am finding the intersection of 10 door with 333 wall = 3330 intersection check and on 3 level = 9990 check in total as compare to previous total of 30000 it is 3 times lesser.

Thanks for the suggestions! Have to get better at the python stuff, still a newbie :sweat_smile:

Hello @CarlC ,
You can try some other filter method, like group the door and wall by level, So you can reduce the intersection check.
If you cant group the elements by level then may be you can group the elements zone wise.

Ultimately i am trying to remove the false intersection between the door and wall by applying some other logic. So my multiplication / interference check might get reduce.

Here’s a suggestion
1- Get all your Windows (30)
2- Get the facong orientation
3- Cast a raybounce in the orientation direction
4- The panel it hits is the one to swap

1 Like

Nice one! Didn’t know about the RayBounce node. Will definitely give it a try.

Went outside the box a bit here. My method is:

  1. Get curtain panels, and their outer curves. Explode them and get each midpoint
  2. Get all doors/windows and then their host wall(s)
  3. Get host wall geometry, push it forward a bit and union it together
  4. Clash each midpoint list against this solid
  5. Isolate the lists with any occurence of false (must be in front of a window/door)
  6. Set types using an in/out for a bool mask

I find usually when geometry is involved an abstract method like this is needed to get best results. I focused on reducing your intersection set to one on many versus many on many. Tested it on 300 panels and it took a few seconds. This will work for walls of any linear orientation behind curtain panels.

Note: The Python block is from clockworks’ Wall.Orientation node, which seems to have an incorrect input type required for some versions, but the Python inside works when out in the open.

check wall and panel.dyn (45.8 KB)
sample model.rvt (1.8 MB)

Get all the doors and windows as aligned solids (recent thread on aligned bounding boxes should help)

Thicken the aligned forms to extend into the panel area.

Merge all of the thickened solids into one solid.

Get the panel’s extents rather than the actual form, and produce a basic surface of it’s outline.

Intersection text the one solid against the N basic surfaces, ensuring you only have N tests to run (instead of N * M, or N* M/LevelCount).

The solid union might take a bit, but it shouldn’t break the clock, and you should also be able run all facades at once.

Awsome, works like a charm! I was suprised the solid union could also handle non intersecting walls and treat them like one solid even as they do not touch.

I think i get the python part, as long as all walls have the proper exterior side outwards it works well. (To not rely on this always being the case I guess calculating the direction from the wall to the closest curtain wall is also legit :stuck_out_tongue: )

Thanks for the help!

1 Like

Thanks for the input, I actually just spent a few hours getting the bounding boxes to align :sweat_smile: That was to perform a raybounce out of the window surfaces but eventually things got to complicated with the list logic. I managed to separate out the bounding boxes that needed alignement and rotated them, but then I lost the list structure that kept track of what windows corresponded to what wall.

The one solid part is really clever. Seems like a similar approach to Gavin.