Surface continuity between swept profile and patch on GH (equivalent to 'surface match' on rhino?)

I have a swept profile around a superellipse path, that I would like to patch with a slightly domed surface. I have managed to do so, but can’t seem to control the continuity between surfaces - In rhino I can use ‘surface match’ and preserve the curvature for a smooth transition between surfaces, but can’t seem to replicate this on Grasshopper.
I have tried lofting and network surface instead of patch but they all give me problems in terms or surface continuity.

Also, on the right viewpot, I can see the patch surface ‘lifting’ on the edge - which makes “brep” join fail

SuperEllipse_case_curvy (21.7 KB)

Any help will be much appreciated!

Whenever you use the patch for creating a surface keep in mind that the Patch, approximates the input boundary. That’s why the join component fail to join the two surafces. I tried other method for creating the top part surface.

SuperEllipse_case_curvy (20.4 KB)

Hi @Mahan,
Fair enough, that solves the brep join, however it still generates a surface with a clear kink between the two former surfaces, instead of one that matches the tangency of the sweep.

thank you for the input - I’ll keep looking :eyes:

Hi Mireia,

I think that MatchSrf is not in RhinoCommon, and therefore can’t be scripted unfortunately. I think there was a MatchCrv at some point, but I’m not sure it was finalised. Maybe in grasshopper 2!

MatchSrf would adjust the untrimmed surface of course (the swept one) to match the trimmed surface at the top (the patch). It can’t work the other way around.

One alternative might be to create the profile curve up to the top point and then sweep with 2 rails. This would create a tiny hole at the top, however continuity of curvature can be achieved by setting the ‘same height’ property to true in the gh component. I’m not sure if this meets your constraints for the project, however MatchSrf would have adjusted your sweep anyway so maybe it might help.

SuperEllipse_case_curvy (15.4 KB)

Of course you could adjust the profile curve in different ways to suit the constraints of your problem, but granted it might not be quite the solution you’re looking for.


Hi John,
very interesting work around!

I just capped the little circle and already get a much better surface

I’ll see if I can do with it.
thanks! (* ̄3 ̄)╭

Brilliant, great news @mireia.

One thing I realised though that you should be aware of. Setting the maintain height to true seems to lose the vertical tangency around the base as you go around the sweep. A bit of a shame.

A workaround is to switch to lofting instead and creating a suitable array of curves. The curves will need to be set out on planes around the outer curve that point to the centre. The strength of the ‘top’ tangency also needs to be adjusted as you go around the curve (see the top vector display for how I propose this might be changed based on distance from the edge to the centre).

Hope that gives you a few options. Be nice to see MatchSrf in Rhinocommon if possible, although I do know that some methods that involve picking things are harder to include in the API. (19.8 KB)

Best wishes,


1 Like

thanks again for the insights, I hadn’t seen the tangency errors in the previous definition.
I’ll have a play with this last one and see how it works within my model.
I’m still not very familiar with rhinocommon and scripting but will have a look anyways.