Filter faces by Nomal

Hello All

I have a list of faces that I need to filter. I need to separate them from the rest of faces in that view. What do you think is the best way to achieve this? Thanks

Surface.NormalAtParameter is likely a good start point.

Which faces are you after here?

All the faces that are facing up, in this case are 4.

Surface.NormalAtParameter to get all the surface normals. I’d use a UV value of of 0.5,0.5 but you likely know what’s best for your geometry.
Vector.Z to pull the Z value from the surface vectors.
== to check if the resulting Z values are equal to one.
List.FilterByBoolMask to filter your original list of surfaces using the results of the == node as the mask. The IN output are the surfaces who’s normal is vertical.

Hi Jacob

Your indications work perfectly with horizontal elements, but it does not work very well with inclined elements. Do you have any idea how to filter those other elements?

Not sure what you mean. Can you post your actual DYN and somehow clearly indicate what faces you’re trying to isolate? If it’s vertical faces they’d have a Z value of 0. Faces oriented to the -y direction would have a -y value… etc.

Enclosed are the RVT and DYN. I need to get the faces of the inclined elements. See imagen.

AH! now I get it. No need to change much in those cases.

To get those values and the flat ones, they’d all have normals with a Z value greater then 0. So change the == node to a > node, and the value to 0 instead of 1.

You can limit selection based on slope using values like 0.5, 0.25, 0.75, etc.

PS: the .rar file you linked won’t extract for me. Perhaps try a .zip if you wind up needing to upload and this doesn’t solve your problem.

1 Like

I share you the files by mega. https://mega.nz/#F!7CownagC!HriRT-SDbu0MpwoLbIjWaQ
With this sequence of nodes I get the inclined faces, but I get both those that look up and those that look down. I need only those that look up.

This is due to a rounding error. For future reference, if you get odd results check the values in the nodes preceeding it. When you see values like 1.24100258904982E-15 you pretty much know you have a rounding error.

After the Vector.Z add a Math.Round node to remove values after 6 digits.

1 Like

Thanks for your help

1 Like