Rhino 9 Feature : Multi-sided surface patches

TL;DR

The Rhino 9 WIP as of today has a new feature: Multi-sided Surface Patches with the new command MultiSidedPatch. This command lets you to select a set of 3 or more curves and/or surface edges that form a closed outline, to create a smooth* multi-sided mesh or a trimmed NURBS patch fitted to the multi-sided mesh. The trimmed NURBS patch is typically similar or better than the outcome of the existing Patch command, where Patch either does not work at all, gives a result that is not as smooth or gives a result that cannot be joined to adjacent surfaces.

edges

mesh

trimmed NURBS patch

joined with pipes and blends - no naked edges

zebra analysis

This functionality is very much under development so you may encounter unexpected behavior or undesired outcomes. We very much like to get your feedback in this topic on what works and what does not, and where we can improve this functionality.

(*) the multi-sided geometry is smooth internally and connects with G1-continuity to surface edges and G0-continuity to normal curves.

Command options

  • Resolution (number) - the number of mesh points on each curve, determines how dense the mesh will be.
  • Fullness (number) - a number between 0.0 and 1.0 that influences the internal shape
  • CreatePatch (yes/no) - no: create a mesh, yes: create a trimmed NURBS patch
    • USpans (number) - the number of spans in U-direction to use for the NURBS patch
    • VSpans (number) - the number of spans in V-direction to use for the NURBS patch
    • Stiffness (number) - the internal stiffness of the control point network of the NURBS patch
  • Preview (yes/no) - shows a preview of the mesh or trimmed NURBS patch

When producing a mesh, the Resolution value can be set as high as you need; when using the mesh to inform the NURBS patch fitting with CreatePatch=Yes, the resolution can be chosen coarse, e.g. 10 points per edge as the edges are sampled more finely.

More details

The geometry modeling is based on generalized barycentric interpolation of ribbon surfaces. At each edge, a so-called ribbon surface is created that is matched to the edge, and is aligned with the tangents of the neighboring edges. For surface edges, the ribbon surface is G1-matched to the adjoining surface. A parametric domain is used to generate (u, v) parameters for evaluation. Each (u,v) parameter is converted to generalized barycentric coordinates that indicate which edge contributes how much to the point being evaluated. Lastly, these barycentric coordinates are converted to local (s, t)-parameters on each ribbon surface and the resulting points on each ribbon surface is blended to give a point.

The mesh is exact on the interpolated ribbon surfaces, and we’re hoping to eventually make the trimmed NURBS patch as good as this. The trimmed NURBS patch is currently approximated in the same way that the existing Patch command works, which the same shortcomings that that approach has.

Future developments

  • “your wishes here” - let us know what works and what needs improvement
  • improved smoothness
  • better fitting of trimmed NURBS surface to the multi-sided mesh by employing a different fitting strategy
  • improved G1- and addition of G2-continuity to surface edges
  • chaining tangent curves and edges into one surface side
  • concave curve assemblies

Some example files to get you started:
multi-sided-example-1.3dm (64.8 KB)
multi-sided-example-2.3dm (68.3 KB)
multi-sided-example-3.3dm (96.9 KB)

35 Likes

This looks awesome!

Given that the standard response is often to direct people to xnurbs as an alternative; are you matching your results with the output of xnurbs?

I think @Rhino_Bulgaria has noted that it is important to maintain internal consistency, not just edge consistency. The Zebra analysis here looks promising, but I can certainly see the shaded view seems to tell a different story.

Thanks! Hopefully this will make concepting easier if absolutely needed.

3 Likes

The math and geometry modeling behind this and xnurbs is quite different, even though we’re both trying to achieve the same goal. That makes a comparison a bit more difficult, but we’re seeing similar results for some cases. xnurbs at the moment is more complete, for example G2 edge matching is not in the new MultiSidedPatch command, yet.

I’d like to get some more context on “internal consistency”, what do you mean by that?

3 Likes

I just tried the example-1.

When the vertical cylinders are split like in my screenshot, the command fails.

I thought maybe the patch would get better when the semi arcs consist of two segments…

image

multi-sided-example-1_corner_normal_error.3dm (152.8 KB)

Btw, not sure when it got implemented but there seems to be a new dynamic highlight when pressing ctrl+shift… I like this a lot.

2 Likes

On example-3, I get that same error when trying to close the hole on the underside of the pipes.

It works fine on the top half of the pipes.

My next try:

2 Likes

You are right. The shaded viewport reveals some strange shadows along the match, which is probably a result of the orientation of the UV isocurves of the control polygon.

I suggest to add a new option caller “Angle” or “Rotation”, letting the user the ability to set a specific angle of rotation of the patch surface to try to find a better solution.

The first example posted by @martinsiegrist is great for that purpose, because the most natural orientation of the patch surface is following the existing edges perpendicularly.

As for the 3rd example, posted again by @martinsiegrist , I would like to see an ability to include 3 blend curves, each built between the top seams of the adjacent pipes. that would give the tool the best possible starting geometry to create a smooth transition across all edges.

P.S. Could someone post these files as Rhino 7 3dm, too?

1 Like

hi Menno, sorry for digging up the early xmas present even earlier! i am personally very thrilled about this new tool, may I send a virtual tray of beer your way and believe me if you were around i would come to celebrate this new implementation personally!

if i may utter some early thoughts to it:

entering 0.0 to 1.0 for fulness with 3 characters is not ideal
if it would be possible to set it from 0 to 10 instead keeping the same adjustment level but making it easier to enter with only 2 characters.

the command name MultiSidedPatch is a mouthful
i like the early implementation NPatch, that is of course for you to decide, but something that also has to do with questioning the name for possible later updates is that

the regular patch allows for a single curve or edge of a surface as input
like seen here below i often use it to cap stuff or even use it in my design or formfinding process, while it is great i would wish here for a better continuity to the tangency of the edges hoping that the new patch might be able to do it at some point, any thoughts?

finally if all that could work maybe we could make one patch command instead of 2?

1 Like

I think that the new command should be called “Patch”, while the old one could be either “PatchOld” or a Command line option called “OldPatch=Yes/No” or “LegacyPatch=Yes/No”.

3 Likes

So with example-3 I tried to create a patch covering half of the pipes and then mirror and join.

Joining worked after aligning the vertices

multi-sided-example-3_join_problem.3dm (1.3 MB)

I was able to join the two halves after running AlignVertices.

3 Likes

Now thats a useful tool that is much needed for me

2 Likes

@Rhino_Bulgaria I decided to save as Rhino 5

multi-sided-example-3_5.3dm (109.6 KB)
multi-sided-example-2_5.3dm (84.4 KB)
multi-sided-example-1_5.3dm (75.0 KB)

3 Likes

On example-2, I tried to quadremesh the mesh patch and then convert to nurbs and join with the surfaces around it. Turns out the naked mesh vertices are not exactly on the surface edges. Similar to what I reported above with the two mesh halves not joining…

I adjusted the naked vertices, ran quadremesh to subd to nurbs and matched the curved boundaries with the surfaces around them. The resulting curvature continuity isn’t exactly nice but at this point I mostly just wanted something that joins.

Well ok, the surface patch joins.

3 Likes

Hi Bobi -

You can use a Rhino file format converter so that you don’t depend on others for help. There are two different solutions available from this thread:

-wim

3 Likes

Thanks for the link! I already have this program on my laptop since several months, but not on my home PC.

1 Like

Thank you for the quick response! :slight_smile: Having these files in V5 format is great for people with older Rhino.

2 Likes

I strongly disagree.

MultiSidedPatch is fundamentally different than the Patch. MultiSidedPatch is limited to fitting a surface to a set of boundary curves/edges. Patch can fit surfaces to interior points, curves, meshes as well as boundary curves and edges. Interior points can be obtained from surfaces so Patch can fit surfaces to surfaces.

2 Likes

Once this new tools gets developed in the right direction, it may become a better substitute to the old “Patch” tool. :slight_smile: Only time will tell.

2 Likes

I have my doubts that this will happen.

well, with v8 the UI was rebuilt significantly, i basically had to relearn how to set up everything, very often not to the advantage of the user, while that may have caused some issues in general and maybe not specifically towards the commands we are talking about implementing a new tool with different/better functionality, in that case users that script and hack would have to rethink their scripts anyway.

as @Rhino_Bulgaria mentioned i also think that keeping it compact is less involving than dragging and splitting the same or similar needs into too man fractions which Rhino unfortunately is really brutally infamous for even if some out there may have a different opinion because they are just so used to having 3 tools doing a third of a job each.

2 Likes

yes, this is basically the point put out in bold:

3 Likes