Smooth Sailing1 Dec, 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 designswhether 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 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 roomsloftslocated 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 solidone 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.
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.
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.
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.
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.
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 anotherno 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 arcsregardless of how large their radius isor 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.
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.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!