Code block to Python

I’m trying to create a grid on the surface of a wall that breaks around it’s openings (as below). The code block that generates the lines is below. This works when running the graph on >50 walls, as soon as there’s anymore it reaches the processing limit of dynamo and it hangs. I’ve got over 1200 walls. I’ve been reading about dynamo processing and thought if the process was done in a python node and only the line lengths were passed that it would reduce the amount of processing required by not having to create the geometry. Does anyone know how I would convert this to Python? Even just a start in the right direction. Or if the code block can be modified to only pass the line lengths without generating the geometry?

1 Like