Smooth Sailing

30 Nov, 1999 By: John E. Wilson

Surfaces and edges that have shapes based on any geometry other than lines, circles and arcs have always caused drawing and drafting problems. This was true when designs were done by hand on drafting boards, and, until recently, it has also been true in computer-based designs–whether done in 2D or 3D. As a result of this inability to make smooth sculpted shapes, designs have often had unwieldy, boxy appearances. For an example you need only to compare the shapes of computer mice manufactured in the 1980s and even early 1990s with those of today.

Virtually every CAD program can now make wireframe curves that have continually changing radii as they blend smoothly from one point to another. While the mathematics behind these curves varies between programs, the curves generally duplicate those that were drawn by boat and aircraft designers when they traced the outline of bent flexible steel, plastic or wood strips. Since those flexible strips were called splines, the computer curves are also called splines.

Surfaces based on splines have been more difficult to achieve than wireframe curves, and it has only been in the last year or so that mid-range 3D modelers could easily construct solid models with spline-based surfaces. This month, let's take a look at the tools in Autodesk's Mechanical Desktop for creating 3D solids that have spline surfaces. Some of these tools were introduced in Release 4 of Mechanical Desktop, and none of them were available prior to Release 3. We will also describe two tools that do not make spline surfaces, but are options of a command that does make them.

Lofted Solids
Lofted solids are defined by a set of profiles, or cross sections, that are in different planes. Their name comes from an old practice in the ship building industry of making full size patterns of boat-hull beams in large rooms–lofts–located above manufacturing areas. 3D modeling programs have long had the ability to create lofted surface models, but only recently have they acquired the ability to create lofted solid models.

Figure 1. This model of a rectangular duct is based on Mechanical Desktop's AMLOFT command, which uses 2D cross sections, or profiles, in defining a 3D solid. I used three identical profiles to create this solid–one at each end, plus one in the middle to help define the surface between the ends. After making the lofted feature, I used extruded features to create the flanges.
Often the profiles for lofted solid models are parallel, or almost parallel, with each other, and they vary in size and shape, but neither condition is required, as demonstrated in Figure 1. The profiles used to make this model of a rectangular-shaped duct all have the same size and shape but the starting and ending profiles are perpendicular as well as offset from each other. A third profile in the middle (not visible in Figure 1) helps define the twist of the duct.

Mechanical Desktop refers to a solid such as this as a cubic loft because cubic spline equations are used to compute the solid's surface as it blends from one profile to another. By default the surface of the solid is initially 90 degrees to each end profile, but you can specify another angle at each end. You can also control the relative length of the solid's straight surface before it curves to accommodate the shape and location of the next profile.

Profile sketches made with Mechanical Desktop's AMPROFILE command are the most often used cross-section objects, but you can also use planar faces on existing 3D solids. You can even use a work point as a cross section, provided it is for either the first or last profile. If you have just two profiles, you can specify that the surface of the solid is to be either linear or curved between the profiles. For example, if you used a circle for one profile and a point for the other, you could make either a cone shaped solid (linear) or a bullet-nose shaped solid (curved). If you have three or more profiles, you can specify that one is to serve as both the first and last cross section, to make a closed, ring-like lofted solid.

The steps required to make the model shown in Figure 1 would have been reduced and simplified by using profile sketches that had an interior loop representing the inside wall of the duct. Release 4 of Mechanical Desktop allows such profile sketches, but its command for making lofted solids (AMLOFT) does not accept them. Therefore, I had to create two lofted features: one to make the outside surface; another, which was subtracted (or cut) from the first one, to make the inside surface. You might also suppose that the AMSHELL command could be used to hollow-out the first lofted feature rather than making a second lofted feature. However, even though you can often shell lofted features, AMSHELL failed to work on this particular model. Incidentally I added the flanges on this model after creating the duct itself.

Solids from 3D Helix Paths
Since Release 3, Mechanical Desktop has used splines to make helix shaped 3D wireframe paths that can be used to sweep a profile sketch in

Figure 2. You can use 3D helix paths in sweeping a profile to model such things as worm gears, threads and springs. Mechanical Desktop uses a dialog box for you to specify the helix parameters.
creating a spring or, as shown in Figure 2, grooves in a cylinder. You can create these helix-shaped paths through the Helical option of the AM3DPATH command. The option will first prompt you to establish the centerline of the helix by selecting an existing cylindrical-shaped solid (a solid with an elliptical cross section is also acceptable) or a work axis. You will select a cylinder if you intend to make screw threads or a worm gear, and you will select a work axis if you intend to make a spring. You can also use this option to create a spiral. Spirals grow laterally away from, rather than along, the axis with each revolution. The centerline for both helixes and spirals is in the z axis direction.

Once you have established the axis of the helix sweep path, Mechanical Desktop will display a dialog box for you to use in entering the curve's parameters. The basic parameters for any helix are its diameter, its pitch (the distance between coils), its overall length and its number of turns. Since pitch, length and number of turns are interrelated, you can specify any two of these parameters to set the third.

You can also specify that the helix will change diameter along its length. Changes in helix diameter are specified by an angle from the axis, rather than by a diameter increase per revolution. You cannot specify that the helix pitch will change. The other parameters you must establish for the helix are whether it will twist clockwise or counterclockwise and the helix start point as an angle relative to the x axis.

After you specify the helix parameters, press the OK button of the dialog box. Mechanical Desktop will draw the helix, or spiral, end the command and, as an option, place a work plane and a sketch plane on the start point of the helix path. Next, draw and constrain a profile sketch (made with AMPROFILE). Then use the AMSWEEP command to sweep the profile along the helix, or spiral, path.

Solids from Spline Paths
In Release 4 of Mechanical Desktop the AM3DPATH command was given three new options. One of them, Spline, transforms an existing wireframe

Figure 3. I created this model of a circular duct by sweeping a ring-like profile along a wireframe spline path. Just as with the model shown in Figure 1, the ends of this duct are perpendicular and offset to each other. I added the flanges after creating the base sweep feature.
spline curve into a path for sweeping a profile. An example of what you can construct by using spline sweep paths is shown in Figure 3. This model is similar to the one shown in Figure 1 in that it is a duct that has inlet and outlet flanges that are perpendicular and offset relative to each other. This duct, however, has a round, rather than rectangular, cross section. Therefore, the duct is easily constructed by connecting its inlet and the outlet points with a spline curve, turning the spline into a 3D sweep path and sweeping (via the AMSWEEP command) a ring-like profile along the path. Then, add the flanges to complete the model.

The spline sweep path and the profile for the duct are shown in Figure 4. Notice that unlike lofted solids, profiles having interior loops can be used in making sweep solids from spline paths. This enables you to

Figure 4. The spline that the model in Figure 3 is based on is easily drawn because it assumes a natural curve between just two user specified points. Mechanical Desktop can sweep profiles that have multiple loops such as this ring-like profile along spline paths.
create both the inside and outside walls of this duct in one step. However, a significant limitation in creating solids from 3D spline paths is that you cannot control the orientation, or twist, of the profile as it moves along the path. You cannot, for example, create the model shown in Figure 1 by sweeping a rectangular profile because you cannot force the edges of the solid to be parallel with the coordinate system's principal planes at the end of the sweep. Consequently you are basically restricted to sweeping circular shaped profiles when you use 3D spline paths.

Transforming a spline into a path is simple; you simply select an existing spline and specify which end of the spline is to be the starting end of the path. The spline can be open or closed. When you edit a 3D spline path, Mechanical Desktop displays a table-like dialog box that lists data on the coordinates and status of each fit point on the spline. (A spline's fit points are the user-specified points that define the shape of the spline. Unless a tolerance has been applied, the spline will pass through each fit point.) With this table, you can constrain or unconstrain fit points to a work point, delete fit points, insert new fit points and change the coordinates of fit points. For the first and last fit points, you can also set the spline's end tangent direction as well as the relative length at which each tangent direction is maintained within the spline. Thus, you can make the spline straight for a relatively long length at either end, or you can have it almost immediately begin curving as it heads toward the next fit point.

Solids from Part Edge Paths

Figure 5. With the Edge option of AM3DPATH, you can create a sweep path from the edges of an existing 3D solid feature. This is useful for making a feature such as a groove that must follow an existing edge.
Another new option of the AM3DPATH command in Release 4 creates 3D paths from edges of existing 3D solids. Edge paths are especially useful when you want to make a feature such as a groove that follows an existing edge, as shown in Figure 5. When you choose this option, command-line prompts will ask you to select the edges for the path. You must select each edge independently–window and crossing selection methods are not allowed.

The selected edges must connect and each edge must be tangent with its adjacent edges. Thus, the closed path on the solid in Figure 5 could not have been made if the four corners were not rounded. All of the edges on the upper side of the model in Figure 5 were selected to make a path completely around the model. On the other hand, only some edges, such as those for the two curved faces, could have been selected to make an open path.

When you have finished selecting the edges for the path, Mechanical Desktop prompts for the start of the path. It places a work point on the path starting point and offers you the option of placing a work point and sketch plane on the start point and perpendicular to the path.

Next, you need to make a profile sketch, and then you use the AMSWEEP command to sweep the profile sketch along the edge path. Although you cannot edit an edge path directly, the path automatically changes to match any changes that occur to the edges when the solid is edited.

Solids from Pipe Paths
The third new option of AM3DPATH in Release 4 of Mechanical Desktop is 3D Pipe Path, which transforms a set of connected lines and arcs into a 3D sweep path. As its name implies, this should be a useful tool for modeling a section of piping. You could draw the centerline of the pipe, turn it into a path and sweep a ring-shaped profile sketch along the path to create the pipe. Unfortunately the paths made with this option have problems sweeping profiles that have interior loops. As a result, this option cannot directly model objects such as pipes and tubes that have a hole along their length. You can, though, use AMSHELL to hollow out the swept 3D feature.

When you choose the pipe path option, Mechanical Desktop issues a command-line prompt for you to select a polyline element of the path. Despite the prompt, you can select lines and arcs as well as 2D and 3D polylines, and you can select them individually or with window and crossing selection methods. Splines are not accepted as a path element. The objects must exactly touch one another–no gaps or overlaps are allowed. Also, arcs must be tangent to adjacent arcs or lines. The path can be a closed loop, but it cannot have branches.

When you finish selecting the objects for the path, Mechanical Desktop prompts for a point to establish the start of the path. The object or the path end closest to the point you select will be the start point. Mechanical Desktop will always place a work point on the starting end of the path, and will also offer an option to place a work plane and sketch plane that are perpendicular to the first element of the path at the starting end.

The width of the profile sketch you use in creating the sweep solid cannot equal or exceed the radius of the smallest curve in the 3D pipe path. For instance, if the profile is a circle that has a one unit radius, the smallest arc in the 3D path must have a radius larger than one unit. When the path sketch contains two adjacent lines that make a sharp bend, though, (such as two adjacent lines that are perpendicular to each other) the sweep solid forms a mitered corner at the bend. Profiles that have interior loops can be used only if the sweep path is straight. Any arcs–regardless of how large their radius is–or bends in the sweep path will cause the sweep operation to fail if the profile has more than one loop.

Figure 6. The Pipe Path option of AM3DPATH transforms existing lines and arcs into a 3D path. However, you cannot sweep profiles that have multiple loops along such a path, which reduces the usefulness of these paths.
An example of a solid made by sweeping a rectangular shaped profile along a pipe path consisting of three arcs and four lines is shown in Figure 6. Dimension lines are shown on the path to help you visualize its shape. Mechanical Desktop does not need them to make the path.

Editing a pipe path is done through a table-like dialog box in which each path change of direction point is listed as a vertex. The coordinates of each vertex, their distance from the previous vertex, and the radius of the arc element at the vertex (vertexes between two straight lines have an arc radius of 0) is shown in the table. You can change that vertex data, and you can also constrain the vertexes to work points.

That finishes our review of the newer commands of Mechanical Desktop for making solids that have spline surfaces. We skipped AMSURFCUT since that command has been part of Mechanical Desktop since Release 1. AMSURFCUT uses a surface object, such as one made with the AMLOFTUV command, to shape a solid model. Since even now some geometric shapes cannot be made directly as a solid model, you may occasionally use AMSURFCUT. But do so only as a last resort because surface models are often difficult to work with and not parametric.

About the Author: John E. Wilson

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!