Intersection top wall with floor

Hi,

I have a dynamo script that is not working correctly.

I want to change te color of the walls when the top is connected to a floor. I’ve come this far in the image below but it is only working for one wall. But the wall with the blue Arrow should also be red…

change lacing at Geometry.doesIntersect to crossproduct

2 Likes

Is a crossproduct a node? Not near a computer at the moment :-s

In the picture you also see the node intersect all. But that should be deleted. Was a test

Lacing (shortest, longest, or cross-product) is how a node handles lists. It’s explained here in the primer.

1 Like

Thanks Nick!

I now know what you mean, right click on the node and set it to cross :slight_smile:

1 Like

So got the code working with Crossover.

Only thing i want to add to this code is that it only turns red if the top of the wall is intersect with a floor.
So the wall at the blue arrow should stay white in this case.

Is this possible? i tried something with face selection that intersect with the floor element but that doesn’t work

Capture

Clockwork has a Surface.Orientation node. Rather than checking your wall solids, you could filter for the horizontal wall surfaces, find the one with the highest z-value (the top surface), and run intersection checks that way. It’s more computations but it does check for the top surface only.

Hi Nick,

Thanks! Does this clock node need to be connected after “all elements of categorie” ?

You would still get your wall solids, but then you would need to convert them to surfaces. The clockwork node just filters surfaces by their orientation.

Oke extract the surfaces from the elements and connect it to the clockwork node. I Will try :slight_smile:

Hi,

I tested the clockworks node but only in the situation when a wall have the same height as the floor surface and it’s not connected it also gets red. So i thought can you make a script that checks if all 4 top edges have an intersection with a floor surface? then it would be working for 100%

I came this far but i don’t know how to filter back the walls only with a true value

Maybe someone have a good idea about this :slight_smile:

Maybe a better explanation of my problem. As you can see for one building story it is working. The walls connected to the bottom of the first floor are turning red :slight_smile:


But when you run the code again with a new floor at the level above one wall get’s grey but it is connected to the floor

And it’s going wrong here i think.

When one wall is connected to the floor at level 1 and one to the floor on level 2. I gives you a true value that the surfaces are connected. But when you do the FilterByBoolMask one walls get true and the other false?

Hopefully someone knows what to do here :slight_smile:

Some fustrating hours later :wink: i solved the intersection!!!

The code is complete different but now it shoots a line up in the Z-Axis to see if it’s intersect with a floor and now it’s working :slight_smile:

Here is a snapshot from the code:

1 Like

Just a few quick pointers…

This could just be graphical. It looks like you have geometry preview turned on for all your nodes. You could have your original (grey) geometry showing on top of your filtered (green) geometry. When dealing with colored geometry it’s best to turn off any geometry previews you don’t absolutely need.

Be sure to check your list structure here. I’m guessing your lists don’t match.

1 Like

Hi,

I’m also not satified with my code that is working. So i picked up the first one what must work.

What i did is pick all the surfaces from a wall where the Z-values are pointing up.


the rest of the code is almost the same as the working one. But for some reason something is going wrong in the list.

Here you can find the code and the example “Building” to test how it works. What happens is that 2 inner walls that should get a color, doesn’t get overriden but two outer walls?:

intersection.dyn (28.9 KB)

Voorbeeld Dynamo.rvt (1.6 MB)

Thanks

I think part of the issue is that you filter and clean your list of surfaces but then use your complete list of walls to override elements, so you’re not comparing the same lists.

Try something like this:

3 Likes

Thank you so much Nick!

Finally working. I new that i missed something in the list compare after the “does intersect” but i couldn’t find it.

So thanks for all your help :grinning:

1 Like