What is difference between loft and patch

I want to convert a mesh into a single surface. Taking these two meshes as examples, what are the fundamental geometric differences between them? Why can one be resolved using Loft, Sweep, and Edge Surface, while the other can only be done using Patch?

In other words, what specific geometric properties must a mesh possess to be suitable for creating a single surface using Patch versus Loft?

what is difference between loft and patch.3dm (474.7 KB)

example.gh (13.5 KB)

A simple way of putting it is that Loft, Sweep, and Edge Surface create surfaces made up of 4 edges. Naturally NURBS surfaces have 4 edges. Normally these result in natural untrimmed surfaces.

Patch on the other hand is used if there are 3, 5 or more edges. This is much more difficult mathematically and normally results in a Trimmed surface. Which can be more difficult to edit.

There are other differences such as if the edges can be followed as is, or if fitting needs to be used with these various commands. But, hopefully this helps

Thank you. That explanation gave me a preliminary understanding of the differences between the two types of surfaces.

I’d like to ask about the difference between a standard dome(left) and a dome with an opening at the top(right). Why does a dome require the ‘Patch’ command, while a dome with an opening can be created using 'Sweep?

By the way, I found that 3 edge can built by sweep to be a untrimmed surface, for example

The 3 sided cone has a 4th side crushed down to 0. So it is a bit of a special case.

Yes, the hole at the top allows for a 4 sided surface. Top edge, bottom edge and the left and right edge is the closing edge that is shared.

The complete dome does not have that luxury.

Got it, then are there any specific types of triangular surfaces that cannot be created using Loft, Sweep, or EdgeSrf ? I hope there are some example.

Sure, any kind of shape that you could describe as “a soap bubble being blown through a triangular wire” would require more curves than just the boundary. You’d need some other method like Network Surface to describe such a surface with curves.

EDIT: Actually Loft can probably do anything with a triangular boundary but you’ll have a fun time with that.

It is not that simple. There are many triangular shapes that are possible, but there are others that can be a real challenge. At this point it really becomes giving it a try. Every model type has different requirements to what is acceptable. And even within stages of the design process requirements can vary.

@scottd @Tom_Newsom It means the untrimmed surface and ruled surface can only built by loft, sweep1 and edge surface?Trimmed surafce and free formcan only built by pacth?

There are a lot of ways to make surfaces. Here are a few:
https://docs.mcneel.com/rhino/mac/help/en-us/seealso/sak_surface.htm

I still am not sure what we are trying to solve yet. What are you trying to do with Rhino?

Also, wanting to know about NURBS, you can read this: https://www.rhino3d.com/features/nurbs/

Also, rhino does SubD and Mesh geometry that can also be helpful.

I’m trying to understand how untrimmed and trimmed surfaces are constructed—specifically, which commands create them and what their limitations are (for example, whether they can be split using Isotrim or Lunchbox). That said, the link you provided is really helpful, so I’ll start by exploring the basic concepts there.

An untrimmed surface is like a rectangular piece of pastry (or a triangle, or the even more degenerate 2-gon and 1-gon cases but let’s keep it simple for now). The max/min Iso Lines of an untrimmed surface are equivalent to its edges. Every point in the surface’s UV parameter space exists on the surface.

A trimmed surface is what happens when you use a cookie cutter on that pastry to define a new boundary. Now, the surface’s parameter space extends beyond the boundary. Iso Lines get trimmed at the boundary. Some UV coordinates give a result outside the boundary, but Iso Lines from that point still exist inside the boundary. Those Iso lines might even be split, if the trimming curve is concave.

In both cases, the same construction curves and control points exist. The edge curves remain the same when you Trim a surface and are revealed when you Untrim it.

Grasshopper components create trimmed/untrimmed surfaces as follows[1]

These components generate Untrimmed Surfaces:

Primitive Plane, Cone, Cylinder, Sphere[2]
Freeform 4Point, From Points, Edge, Fit Loft, Loft, Network, Ruled, Sum, Extrude (all types), Patch (with Trimmed set to False), Sweeps (for single-segment profiles and rails), Pipes (for single-segment curves, uncapped), Revolution (for single-segment profiles, both types)

These components generate Polysurfaces whose component surfaces are untrimmed:

Primitive Boxes, Quad Sphere
Freeform Pipes (for multi-segment curves), Sweeps (for multi-segment profiles and rails), Revolution (for multi-segment profiles, both types)

Deconstruct them and you get a list of Trimmed surfaces.

These components generate Trimmed surfaces

Freeform Boundary, Patch (with Trimmed set to True), Fragment


You can of course also generate Trimmed surfaces directly by many methods eg. Surface Split, Copy Trim. Some operations can create Trimmed surfaces indirectly eg when filleting a Brep edge, one of the two adjacent surfaces may become trimmed after the operation. Nearly all intersection operations (Union, Difference etc.) also result in trimming.

Note that Iso Trim ignores any Trim of the source surface.You always get the pure rectangle from the Untrimmed version.

To get the blue outline, you need to go the long way round and generate a grid of lines to use with Surface Split.


  1. Corrections welcome! I believe these lists are correct, but I may be unaware of some edge cases. ↩︎

  2. I feel sorry for the poor Torus, who usually gets included in such lists, but alas in GH you must roll your own with Revolve or Sweep ↩︎

Thank you very much, that’s very clear.

But taking spheres and ovals as examples, they clearly cannot be unfolded onto a flat plane, and their faces aren’t made of rectangles. So why are they still classified as ‘untrimmed surfaces’ and able to be ‘isotrimmed’?

They are “degenerate” cases. Two of the four edges are bent round to meet each other, at a line of longitude (exactly the same way as for a cylinder). The other two are shrunk so they become points at the poles. If you “unzipped” them at the longitude line and bent them flat, they’d have this shape:

Distorted, of course, but you can cut “rectangles” out of it so long as you follow the red and blue lines. But if your rectangle touches one of the poles, one edge collapses to a point and becomes a triangle.

PS: “Rectangle” and “triangle” only make sense if you consider the Iso Lines to be “straight”. Any surface that’s not a perfect rectangle is going to have distorted Iso Lines, but topology doesn’t care :slight_smile:

That’s cool! It sounds like I can understand this using the analogy of an unfolded globe.

Just remember that surface boundaries can be whatever shape you like so long as there’s no sharp corners. Sharp corners are only allowed where two boundaries meet. Otherwise you can stretch squash bend them to your heart’s content (even squash them up into a point) and it will still be an untrimmed surface :slight_smile:

There’s even a way of collapsing all the boundaries to the same point and it’s still a valid surface. I only learned about this recently and it’s kind of wild: Imagine a bin bag in a rectangular bin. The rectangle at the top is the four boundary lines. Now gather up the bag like you’re taking it out for collection. This “tied-off bin bag” shape has all its former edges scrunched up into a single point, but can still have “rectangular” sections Isotrimmed out of it, except for regions that touch the point, which are all “triangles”.

Or there’s this horrible thing, which leaves one edge free but bunches all the others up into a point.

I’d better stop there before someone reports me for Cruelty to NURBS

NSFW warning

(GH doesn’t like it if you turn lines into points for a network surface, so I am forced to stop just short of true terror)

Think of untrimmed surfaces as a “rubber” sheet which can be distorted, stretched and shrunk as much as desired.

Untrimmed surfaces can have 0, 1, 2, 3 or 4 sides of zero length.

I guess a positive is that you can Surface Morph these shapes without the same worries you have with polysurfaces.