Hello again, thank you all very much for your help.
As I progress, more questions arise in the code and I return to the nodes, although once I clean it I will try to pass everything to code.
My problem is the following. I have a surface that I want to divide into small segments, for this I am leaning on the grids, however when I use split geometry, it does not give me the result, so it will most likely be resolved in code, that is why I ask of your help to know how you would have to implement it to achieve this goal.
Hi @Luiscko !
I add a script of mine at the end of yours
It works but it needs to be improved because if there is too much splitting lines it takes long time to run and it is memory consuming, given it is based on combination nodes…
from Autodesk.DesignScript.Geometry import *
# Convert an instance/list to a list
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]# Convert an instance/list to a list
# Split surface recusively
for i in cutters:
srf = Geometry.Split(Surface , i)
#picking the second surface to split
Surface = srf
if i == cutters [-1]:
splits = 
geom = 
# Loop cutters over geometry, cutting the remainder each time, and adding the new cut to the results until all cutters are used
for p in IN:
g = geom[-1]
s = Splitter(g,tolist(p))
OUT = splits
Why go recursive? Extruding the curves to create surfaces will allow you to then join the many surfaces into one polysurface. There are some good examples of doing this at scale in the AU session I gave with Alexandra Nelson of Perkins Eastman - specifically the 2nd and 3rd examples (finding the optimal location for the Quidditch World Cup stadium and the layout of the Care of Magical Creatures OWL). Note that these are not necessarily optimized, but I found them faster than a recursive split. Split is a complex operation, and doing it N *N times is [complex operation squared], vs [one simple operation n times + one simple operation n times + 1 or two complex operations].