Select faces by altitude

Hi! I have recently started looking into Ruby scripting, and I have encountered a problem that I can’t solve. I have code that allows me to create a horizontal cut through a terrain component. The height of the cut is defined by user input. My problem right now is how to select the faces inside the terrain component that are below the cutting line in the z-axis. No matter what i have tried so far I end up selecting all faces. Any ideas would be greatly appreciated!

Similar topic:

https://forums.sketchup.com/t/is-there-a-way-to-find-faces-found-in-a-z-range/

2 Likes

Thank you!