Digging Deeper Into Rhino Surfaces28 Feb, 2002 By: John E. Wilson
Our exploration of Rhino's surfaces continues this month, as we look at more ways to create surfaces and tools for modifying surfaces. Rhino, which is short for Rhinoceros, is a powerful, yet moderately priced, 3D modeling program from Robert McNeel & Associates that runs on most computers using an MS Windows operating system. Visit its Web site at www.rhino3d.com for more information on its capabilities and on its hardware requirements. You can also download an evaluation version of Rhino from this Web site.
Special-Situation Surface Creation Tools
When you encounter a situation in which none of the surface creation tools described in the previous Third Dimension column are applicable, you are likely to select Patch from Rhino's Surface menu. Patch is an extremely versatile tool for creating a surface from any number and combination of existing curves, surface edges, and even points. As its name implies, you will often use patch for filling a hole between existing surfaces, as shown in Figure 1. You can also use it, though, to create a surface when no others exist. For example, you can create a surface that resembles hills and valleys from a set of closed curves that serve as contour lines.
Choose Drape from the Surface menu to create a surface that is dropped like a cloth over existing 3D objects. The resulting surface is similar to the plastic blister-wrap often used for packaging small items. To create a surface from a set of points, select Point Grid from the Surface menu. Each point serves as a node on the surface, and generally, you will use a command script file to specify the points.
Figure 1. Choose Patch from Rhino's Surface menu to fill an empty space within a surface. As shown on the left in this figure, you can select any number of existing surface edges in creating the patch surface. The resulting surface patch is shown on the right.
Figure 2. To fill a gap between two surfaces, such as the one shown on the left in this figure, choose Blend from Rhino's Surface menu. After selecting the two sets of surface edges, options allow you to specify the shape of the blend surface and its continuity level with the adjacent surfaces.
Heightfield from Bitmap in the Surface menu is for creating a surface from the grayscale brightness levels of a shaded bitmap image. The lighter an area in the image, the higher the relative elevation of the resulting surface. From its command line, Rhino will ask you to specify the name of a bitmap file and the size and location of the surface; and from a dialog box, to specify the height sampling data parameters. This tool is useful for creating surfaces of organic objects, such as animals and insects, and of embossed patterns, such as steel tread-plates.
Surfaces from Surfaces
You will choose Blend from the Surfaces menu when you need to fill a gap between two surfaces. See Figure 2 for an example. From the command line, Rhino will ask you to select two sets of surface edges, and the software offers options for you to specify that the new surface is to have either tangent or curvature continuity with the existing surfaces. (See the sidebar Defining Smoothness for an explanation of continuity levels.) You can also specify that the blend surface be linear.
You can create a rounded surface between two existing surfaces by choosing Fillet from the Surfaces menu. Rhino will issue a prompt for you to specify the fillet radius and to select the two surfaces that are to adjoin the fillet surface. The edges of the two surfaces can touch each other, overlap, or be spaced apart. Although there is no menu item or toolbar button for making variable radius fillets between two surfaces, you can create them by entering VRBSRF on Rhino's command line. You will be asked to specify fillet radii, along with points on the surface edges for the radii. To create a linear, or beveled, surface between two surfaces, choose Chamfer from the Surface menu.
Choose Offset from the Surfaces menu to create an offset copy of an existing surface. Rhino will prompt you to select the surfaces that are to be copied, and the offset distance and direction. Depending on the offset direction, the curvature of curved surfaces will increase or decrease.
Unroll Developable Srf in the Surfaces menu creates a surface that is the flat version of an existing surface. The existing surface must be linear in one direction, which means that surfaces having spherical and similar shapes cannot be unrolled.
To lengthen a surface, choose Extend from the Surfaces menu, select a surface edge, and then specify the extension distance. Command line options permit the extension to be linear or to continue the surface's curvature. You cannot shorten a surface with this tool.
Several of the tools listed in Rhino's Edit menu work on both surfaces and curves. In this menu, choose Join to unite two or more surfaces. The adjoining edges must have the same shape and they must exactly touch one another. Although the appearance of the surfaces does not change, they do become a single object, which Rhino calls a polysurface. You can restore the original surfaces by choosing Explode from the Edit menu. Trim, in the Edit menu, cuts a surface back to a selected boundary object, while Split divides a surface at a selected boundary object. The boundary object can be a curve or an intersecting surface.
You can display the control points of a surface (pressing the F10 key is one of several ways to do this), and once they are displayed, you can select an individual control point by simply picking it, or you can choose Select Control Points from the Edit menu to use one of several methods for simultaneously selecting any number of control points. Once you have selected one or more control points, you can change their weight, and you can change the surface's shape by dragging control points to a new location. You can also use dragging to change the shape of a surface by choosing Point Editing from the Edit menu, and then choosing Handlebar Editor from the resulting secondary menu. Rhino displays the handlebar as two crossed lines that are tangent, and a third one that is perpendicular, to the surface. You can slide the handlebar along the surface to the point you wish to change, and then drag or rotate the handlebar to re-shape the surface.
To access editing tools that are specifically for surfaces, choose Edit Tools from the Surfaces menu. In this secondary menu, Match adjusts the shape of one surface to achieve a specific continuity level with another surface. Rhino will first ask you to select the surface that is to be changed, and then to select the target surface. Then, Rhino will display a dialog box for you to choose the continuity level. The matching ends of the two surfaces will exactly touch, but the surfaces will still be individual objects. Choose Merge, in the Edit Tools menu, to join two surfaces. You can specify a tolerance level for edge mismatch, and you can specify that the curvature of both surfaces be adjusted to assure a smooth transition across the joint.
Split by Isopram, in the Edit Tools menu, divides a surface in its M or N direction, or both. (Isopram is the word Rhino uses for the mesh lines it draws on a surface to help you visualize it.) After specifying a split direction, you will drag the screen cursor along the surface to your intended splitting point.
Trimmed surfaces retain all of their original control points. As a result, you can restore a trimmed surface's original size and shape by choosing Untrim from the Edit Tools menu. You can also restore a trimmed surface by choosing Detach Trim from the Edit Tools menu. The difference is that Detach Trim creates curves from the edges of the trimmed surface, and Untrim does not. A heavily edited surface sometimes ends up with control points that extend far beyond the trimmed boundaries of the surface. Choose Shrink Trimmed Surface to reduce the number of control points and the size of the underlying, unseen surface.
John Wilson runs a design and drafting service in St. Louis Park, MN. He is the author of 3D Modeling in AutoCAD and Mechanical Desktop 5 from CMP Books.
Smoothness is usually your overriding concern in surface modeling. Consequently, 3D modelers such as Rhino have an assortment of tools for creating smooth surfaces, for analyzing surface smoothness, and for fixing surfaces and joints that are not smooth. As you use these tools, you frequently encounter the terms curvature and continuity in instructions, prompts, and messages.
Curvature is a basic geometry term for indicating the extent that a curve or surface deviates from perfect straightness or flatness. It is the inverse of radius. Thus, curves and surfaces have a low curvature and a large radius when they are bent slightly, and they have a high curvature and a small radius when they are bent sharply. Curvature is constant for arcs and circles, and for surfaces based on arcs and circles; but the curvature of ellipses, parabolas, and splines, and for surfaces based on such curves, continually changes along the length of the curve and the length and width of the surface. Rhino can display the relative curvature of both curves and surface objects as a graph, as shown in Figure 3.
Continuity is a term used in many 3D modelers for indicating curvature relationships between points along a curve or on a surface. It is also used to indicate curvature relationships between two abutting curves or surfaces. These relationships fall into one of three levels of continuity: C0, C1, and C2. The definitions of these continuity levels are given in Table 1. Occasionally you also see references to G0, G1, and G2 continuity. While there is a mathematical difference between the C and G continuity definitions, there is no practical difference for most of us.
The differences between these continuity levels for a curve, or a section through a surface, are illustrated in Figure 3. Continuity level is not necessarily related to desirability, and sometimes you will deliberately have a C0 or C1 seam on a surface to improve its strength or even its appearance.<