How to Understand Surfaces in Grasshopper, Foundations in Grasshopper

Bradenkoh
6 min readFeb 21, 2022

--

Hi there,

In the post, we looked at Curves which are the connection between points. Today, we are taking a look at Surfaces in Rhino. Which are the connection between curves. And similarly enough, surfaces can be manipulated through the control points of their control curves.

Surface Definition

Much like how curves are made from control points, surfaces are made from control curves which are known as isocurves. Similar to the X and Y axis, surfaces have a U and a V isocurve.

Figure 1: Isocurves of a surface

But for most modeling software out there like Rhino, we normally don’t have to create these isocurves ourselves. They get generated as part of any surface creation function.

Surface Creation in Rhino

Rhino offers a lot of methods to create a surface that we will come to know better when we look at modeling workflows in the future. But for now, let’s just take a look at two surface creation functions that I personally use the most.

The Loft and PlanarSrf command.

Loft

The Loft command lets you create a surface between two curves in Rhino. Take these two curves for example.

Figure 2: Two Curves for lofting

Simply select two curves and type loft which should prompt you with this message along with a preview of what the generated surface would look like.

Figure 3: Loft Options

These loft options give you some control over how the surface is generated which will be handy later on but for now, the default option is good enough. After clicking on OK you should have something like this.

Figure 4: The Lofted Surface

Be sure, to change your viewport settings to Shaded to be able to better see the surface.

Figure 5: The Shaded Settings

You should have also noticed that there are now a lot more curves in between the two original curves that you selected to loft, those are the generated isocurves.

Planar Surface (PlanarSrf)

This is a command I find myself using the most because it is the quickest and simplest way to create a surface in Rhino.

Rhino allows you to create a surface from a closed planar curve which is a curve that is closed and flat on a plane. It doesn’t have to be the world plane, but it does have to be flat on a plane. Take this curve, for example, it’s flat on the YZ Plane.

Figure 6: Closed Planar Curve

Select the closed curve and then type planarsrf which should give you a surface like this :

Figure 7: Planar Surface

The one thing you will immediately notice is that the isocurves that are shown in the view do not represent the surface at all. It at first seems like using the planarsrf command gives you weird isocurves that go against what we just learned about the definition of surfaces.

If we were to recreate this surface using the Loft command instead, the surface would look the same but the Isocurves representing the surface would look very different. Let’s explore that difference to get a better understanding of what is going on.

Loft Vs PlanarSrf

Now, we can just split the curve and loft between the left and rightmost sides.

Figure 8: Loft vs PlanarSrf

You can see that lofting will actually give us the same results together with the isocurves we expected. This happens because of a special type of surface that Rhino has called a trimmed surface.

Trimmed vs Untrimmed Surface

In what I believe is an attempt to optimize the performance and storage of the program, Rhino has further separated surfaces into two categories. Trimmed and Untrimmed surfaces.

let’s look at an example

Figure 9: Rectangular Surface

and I cut this surface by some curve.

Figure 10: Cutting Curve

I can do this by first selecting the rectangle, then typing split, and finally selecting the cutting curve. I am then going to delete the right half of the rectangle, which leaves us with:

Figure 11: Split Surface

If I then select the shape and run the PointsOn command, to see the control points.

Figure 12: Trimmed Surface Control Points

You should see that the control point or the Iso curves didn’t change at all. This is because Rhino has stored the surface as a Trimmed surface. This is important to know because if we move the control points of the shape, we are moving the control points of the Untrimmed Surface and not the surface that we see in the view itself.

I think that this allows Rhino to store a lot less data for a surface but it also means we have to be wary about any future operations on this surface.

We can even restore the original rectangle by running the Untrim command. We could even force Rhino to get rid of those outer control points and redefine the surface using the RefitTrim command.

But to demonstrate the function of the RefitTrim command, I have to first increase the number of control points that this surface has. This is because the RefitTrim command uses the existing information of the surface to redefine the surface. At the moment, this surface has only 4 control points which are not enough to represent the curvy edge.

To increase the number of control points on the surface, we can use the rebuild command that works similarly to Curves and then run the RefitTrim command.

Figure 13: Redefined Trimmed Surface

Rhino will then redefine the surface and re-generate the isocurves for the trimmed surface.

Modifying a Surface

Similar to curves, the way we manipulate a surface is through its control points. But what we are actually doing is changing the control points of the control curves that define the surface.

We can also use the rebuild command to add degrees and points to the control curves as we did before with the RefitTrim command.

If we take our rectangle from before and run the rebuild command on it.

Figure 14: Rebuild Surface Options

We are presented with a very similar set of options but we now have to input the number of points and degrees in two directions, the U and the V direction.

Figure 15: A rebuilt rectangle with 50 points in the U and V direction

The same best practices from curves apply to surfaces. A high-quality surface is one that requires the least amount of degrees and points to maintain its definition.

Final Thoughts

Surfaces are a step up from curves in terms of complexity but they still follow a very similar logic to curves. I hope this post has helped you better understand surfaces but as with everything so far, the more you use them, the more intuitive it will be.

You will also have plenty of time to understand surfaces as we get into modeling workflows later.

So, if you are interested in learning more, stick around and consider subscribing to the Newsletter and to this publication.

Thanks for reading,

Braden.

P.S. I also made a Youtube video that walks through this article that might better show what is going on in Rhino itself.

Originally published at https://allthingscomputational.substack.com on February 21, 2022.

--

--

Bradenkoh
Bradenkoh

Written by Bradenkoh

Engineer. Programmer. Computational Designer. Currently in Sydney.

No responses yet