I’m attempting to make a Sierpinksi Carpet for an assignment in python grasshopper. My plan is to input a square curve, turn it into a surface, divide and split that with curves to get my individual squares. Maybe that’s a flawed approach but whatever, what I can’t figure out for the life of me is how to split surface with curves. I’ve been trying rhinoscriptsyntax.splitbrep and rhino.geometry.brep.split and clearly don’t understand the correct syntax. I’m trying to split rectSrf with rectInt.
It would really make my day if someone could demonstrate how to do this, even with just an arbitrary surface and curve but I’m uploading mine as well.
sierpinski carpet.gh (6.2 KB)
Even when I just input a surface and line from Rhino, I still got errors, just different ones. To disconnect between surfaces and breps in python, and the right syntax, is really bogging me down.
I need to duplicate this functionally in python: