Rhino 9 Feature : Patch re-implemented (formerly FillSrf)

Note: this post has been extensively edited on 7-JUL-2025. The new command that was formerly known as *FillSrf* has been renamed *Patch*, while the old *Patch* command is now called *PatchOld* (does not auto-complete).

Rhino 9 WIP has a completely revamped Patch command. This command takes a set surface edges, wire curves and points as input constraints to create a multi-sided patch with positional (G0), tangential (G1) or curvature (G2) continuity to selected edges, curves and points. The command refines the surface in places where the constraints are not met. This command produces better results than the old Patch (still available as PatchOld) command: better conformation to input curves, allowing the patch to be joined without naked edges, better surface smoothness and up to G2 continuity, where PatchOld only does G1.

Command flow

The new Patch command is non-linear in non-scripted, interactive mode. This means that you can start the command, select some input curves and points to view an initial patch result. While the dialog is open, you can keep using Rhino to add points, edit curves, move input patches, etc. etc. When input selected for Patch changes, the preview patch will update automatically. Finish the command by clicking [OK] in the dialog to add the result to the document.
The command also supports History and you can double-click on the result to activate the Edit mode, which re-opens the dialog and allows you to continue where you left off.

Command Dialog and Options

Constraints

Click on the [Constraints] button at the top to add/remove curves and points to the constraints. Hover over the green check-mark to reveal a red cross that will clear all constraints. The constraint curves and points will be labeled I, G0, G1 or G2 with their selected continuity. Left- or right-click on the labels to change the continuity to the next or previous continuity; Shift+left/right-click will change all contraints at the same time. Setting all constraints can also be done by clicking one of the buttons in the dialog below the [Constraints] button.

Stiffness

The stiffness will change the shape of the surface. Increasing the stiffness will remove more bending from the surface, at the cost of creating isolated spots where bending is higher, while reducing stiffness will distribute the bending more evenly over the whole surface. There are cases in which increasing the stiffness is needed to get a good result, but most of the time keeping stiffness at zero is a good choice.

Degree

The degree of the surface can be changed from 3 to 5.

Domain

The domain option is used to create a trim domain on the surface that outlines the patch. There are three options for the domain:
  • Untrimmed. This option is only available when the selected edges and G0 wire curves can be combined to give 4 curves and will create a four-sided untrimmed surface.
  • Projected. Suitable for input curves that are more or less planar; this option is selected automatically if that is the case.
  • Molded. Default in all other cases. This option will create the best trimming domain for curves that are not more or less planar.

Trim ends

Attempts to make a closed curve outline of the input curves. If that is possible, it removes dangling curve ends that do not participate in the closed outline. In other words, the selected curves do not need to meet end-to-end if this option is active.

Refine

Refines the surface in places where constraints are not met, by adding more control point lines.

Preview

When preview is off, options can be changed without triggering a re-calculation.

UV control (expert option; expand to see details)

Options here allow for a fine control of the domain and surface structure. UV rotation will rotate the surface by the given amount of degrees. This can help to make a fit at the cost of having more of the surface not participate in the patch. U- and V-spans will increase the number of starting control points and clicking the Starting surface button will let you select a starting surface whose degree, number of control points and knot vectors are used as input.

Tolerances (expand to see details)

image
The position, normal and internal constraint tolerances can be set in the Tolerances fold-out.

Constraint test results

At the bottom of the dialog, you get quick feedback whether constraints have been met within tolerance. The Int, G0, G1 and G2 text will be green if the tolerance was met, red if the tolerance was not met or grey if that type of constraint is not present.

Examples

The new Patch command is able to make complex patches, like in the following three examples:


fillsrf-example-1.3dm (154.5 KB)


fillsrf-example-2.3dm (246.4 KB)


fillsrf-example-3.3dm (215.3 KB)

This third example shows the untrimmed option for the two four-sided patches, while the corner is created with the aid of the two internal curves.

These examples are also relevant for the new Patch command:
multisided-example-1.3dm
multisided-example-2.3dm
multisided-example-3.3dm

More details

The modeling is based on treating the NURBS surface as a thin membrane with elasticity and internal strain under bending. This is captured in an "energy" that the surface has, and the algorithm minimizes this energy while complying as much as possible to the positional, tangential and curvature constraints applied. This approach is also known as *variational surfacing* and is similar to what the XNurbs plug-in uses.

Future developments

Note: the command is under development and its options and result may change without notice.

  • “your wishes here” - let us know what works and what needs improvement
  • Internal curves, points and normals as constraints :white_check_mark:
    • While it is currently possible to select curves that do not form a closed loop, the results may vary and no trimming is applied.
  • A more interactive user experience :white_check_mark:
    • ability to change continuity during the command, currently continuties that are chosen at the start cannot be changed
    • ability to add and remove curves during the command
    • a dialog with command options
  • History support RH-86002 :white_check_mark:
  • Grasshopper suppport RH-86003 :white_check_mark:
  • Automatic closed loop detection RH-86006 :white_check_mark:
  • Starting surface input RH-86009 :white_check_mark:
70 Likes

Great :+1:

1 Like

This is amazing.:slight_smile:

2 Likes

I see that the latest WIP release is not yet done (I thought it was) - you’re welcome to try out the command in the 9.0.25035.12305 | 4 February 2025 version, just know that a few features and one bug were fixed that will come in the next WIP version.

1 Like

Already great tool , plus this :+1::partying_face: Fingers crossed !!

Wait, so McNeel started not just one but two efforts to replace Xnurbs?

I really hope there’s at least 3 efforts running in parallel internally to replace VSR then. :wink:

Does this have History support?

6 Likes

I added your request for history support https://mcneel.myjetbrains.com/youtrack/issue/RH-86002

4 Likes

Hi @menno
Just ran a few quick test and it looks great! I’m sure there will be things to iron out along the way, but looks to be a GREAT addition to the Rhino toolbox! Well done :muscle:
Regards, Jakob

2 Likes

This is incredible! The command will simplify my workflow.(if you are making it available in the Rhinocommon API) Good job!

It will come to the RhinoCommon API, but we’re first getting some experience with that API ourselves before it goes public. You can always script it from RhinoCommon with RhinoApp.RunScript(...).

2 Likes

My needs:

  • Internal curves, points and normals as constraints/targets as in Patch.
  • Curves as surface boundaries in addition to surface edges.
  • Options to specify a starting surface as in Patch.
  • Option for “none” continuity to selected edge curves.

I model boat hulls based on “lines and offsets” or scan data using Patch. The goal is a surface which fits the input data.
_ A set of edge curves define the perimeter of the surface,
_ Internal curves and/or points are targets for the surface. A initial starting surface is created.
_ Patch is used to fit the starting surface to the data.
This can be an iterative process. The result of the previous iteration is modified by adding knots to improve the fit and removing knots where not needed, and the modified surface becomes the starting surface for the next iteration.

Let’s hope that at least we won’t be forced to use third-party plug-ins to create better surfaces for patches.

@davidcockey

  • Internal curves and points are coming in the next WIP release.
  • Selecting normal curves (not surface edges) as boundaries is coming in the next WIP release (it may already be in the 4-FEB release, I’m not sure).
  • Specifying an input surface: added RH-86009
  • Per-curve continuity input (G0/G1/G2) is in the next WIP release; I’m assuming that your “none” continuity is the G0 positional continuity?

How do you see yourself specifiing normals as constraints, as you mentioned in the first point? It can be done by selecting a surface edge and using G1 continuity, but maybe you mean something else? I have been thinking about using lines that give a positional and normal constraint: the line direction.

@menno One thing I find very useful is to constrain the patch to points or internal curves that follow the direction I want to take.


sorry, I saw that the radio can be heard in the audio while I was recording

2 Likes

Hi -

As Menno wrote, that will be available in the next public WIP.

-wim

6 Likes

No, free floating similar to the “None” options for “Preserve other end” in Match and MatchSrf.
The situation is the desired surface is not along a portion of its boundary.

Example:

3 Likes

History support is coming in the next WIP.

4 Likes

Ignore the “normal” part of my request.

1 Like

I see this as a built-in “xNurbs”, is that right?