I’ve worked on a script with great enthusiasm the last week, what I want it to do is divide a roof surface by a list of diagonal lines. To do this, I’ve written a function to count the list length and then check for each line whether the line intersects with the surface and then use it to split the surface.
The first resulting surface is added to a list, and the second resulting surface is the new surface to be cut, effectively slicing the surface into strips. However, when the function returns the list it is empty.
The script needs to be used in combination with the file legrichting.rfa, which needs to exist in your project file when you select a face.
You can ignore the majority of the script (it is used to generate the lines), the fun starts in the tree on the far right side. (Also see the screen shot.) I’ve simulated the function in part with node blocks, to test whether my script def GetRowsFromRoof should work. So far I have no reason to believe that it shouldn’t.
Can someone tell me what I’m doing wrong, or whether there’s an easier way to do this? I’d love to use the While node, but I can’t make sense of it. I find it easier to just write it out line by line.
All help appreciated, sincerest gratitude Bram Weinreder.