Adjust closed surface seam in Grasshopper

Despite the plethora of GH plugins that I have, I was unable to find a component to do what the Rhino “Adjust closed surface seam” does.

Any suggestions or workarounds ?

Extract isocurves, change their seam, and recreate the surface.

var dir = s.Faces[0].IsClosed(0) ? 0 : s.Faces[0].IsClosed(1) ? 1 : 2;
if(dir != 2)
  A = Brep.ChangeSeam(s.Faces[0], dir, p, Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance) ?? s;
else
  Component.AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "Surface is not closed and the seam cannot be adjusted");

SrfSeam.gh (62.8 KB)

8 Likes

Spot on !

Hi. I just found your script as I had the same issue. Brilliant, but do you also have it i nU-V direction for a torus or closed pipe? I need the outside edge somewhere else to avoid issues in boolean operations.
Thank you.

You can make your own pipe. It’s a little fragile, not all values of the seam slider work.


pipe_seam_2022Oct6a.gh (6.8 KB)

P.S. It appears to work the same way with only one section circle at the start of the curve (‘t’=0):


pipe_seam_2022Oct6b.gh (6.8 KB)

2 Likes

Thanks for the idea. I tried something similar. The issue is that I have ca. 500 irregular pipes (all shuffled in a different way) where I just need to seam the outside edge to have less issues with boolean operations.
If I build them up in this way the result will be a bit different and it will last quite a while. Also the Sweep tools do not work well in Grasshopper - there are always some pieces that just do not work once the pipes get a bit more complicated.

What bothers me the most is that the seam surface tool exists in Rhino, but not in Grasshopper. Just simple: input: surface+seam U+seam V.
They made us love the Grasshopper, now they make me seaming 500 pieces by hand :sunglasses:

Surface Seam+.gh (60.2 KB)

I took the chance to work on this topic before the year ends and reworked the c# script from @Mahdiyar above.
So the scipt now projects curves on a brep and moves the seam far away from the surface to have less issues when it comes to boolean operations.

Strange enough we have SrfSeam in Rhino, but not in Grasshopper and I also could not find it in Python (which I know a bit), so luckily enough the c# script by @Mahdiyar was written clear enough so I could not completely destroy it…