Hi, i am working on a script for cutting plate material which has a custom hole maker. Some plates are (double) curved and i use the UnrollSrf function through Python to flatten them out. (I heard its not the most accurate but it works well enough.) As it stands i am cutting the holes before flattening, but ofc i lose the data structure. It would be better to flatten out the holes in parallel so i can find particular holes down the line, for annotation for instance.
So i recently noticed that the function has an optional argument for “following geometry”, but i cannot get it to work. I tried making it a variable, but maybe that is not how it works because in Rhino you just select all your geometry at once.
Can anyone tell me how to do this? Different routes or procedures are also welcome.
The curves in the file are really small btw, they’re located near the tip. Unroll-with-curves-2.gh (14.7 KB)
Change y input type hint to ghdoc Object when Geometry (rhinoscriptsyntax)
Change y input to List Access
Add separate outputs for unrolled breps and following geometry
Using 1 for absolute_tolerance was distorting the curves at the output, so I omitted the absolute_tolerance parameter from the call to rs.UnrollSurface() causing it to use the Rhino document tolerance
Yes, thats it! So glad it works, thanks! Never would have known to position the variables like that with a comma.
One more thing: In the example i actually didn’t include the data structure for the curves, but it works, sort of. The only thing is i get a grafted brep out as well. So now i created two Python components, one for the brep and one for the curves. Not the most elegant sollution. If you know of a better way please let me know.
If I understand correctly, your y input (curves) is a DataTree and you want to maintain the structure of that DataTree without causing the script to output grafted copies of the brep.