CAD Clinic: Creating Detailed Civil 3D Subassemblies from Simple Polylines, Part 210 Mar, 2006 By: Mike Choquette Cadalyst
More tips on customizing your designs by converting a polyline to a static subassembly.
This article is a continuation of a topic started in last month's CAD Clinic. If you are a roadway designer working with Civil 3D 2006, you may have noticed the dozens of stock subassemblies that ship with the program. These individual cross-section components are used to represent lanes, curbs, medians and other design elements that are strung together to form assemblies. These assemblies are the typical sections used in Civil 3D Corridors: dynamic 3D design models used for proposed roadways and other linear designs.
When you need a subassembly component that may not be available out-of-the-box, you have two options: create a new dynamic subassembly through VBA scripting or convert a polyline to a custom, static subassembly. As with script-based subassemblies, converted subassemblies can include points, links and shapes, all of which you can assign feature codes. The geometry of converted subassemblies is static, though, and you cannot assign dynamic properties such as variable width, slope, etc. This article completes the topic started last time, which focused on how to create detailed (yet static) subassemblies from polylines.
Adding Link Feature Codes
After the subassembly is generated from a polyline and point feature codes are added, the next step usually is to add link feature codes. (Points, links, shapes and their feature codes were described in depth in the December 2005 CAD Clinic article.)
One reason for assigning link codes is to simplify corridor surface generation later on. For example, if you wish to include the face and top of curb in a surface generated from top links, then you first need to assign the face and top to have the correct feature code. To do so, select the subassembly, right-click and choose Add Code. (The Code Set Style lists the currently defined link codes and the link styles that control their display.) You can assign links that exist along the bottom of the proposed roadbed as datum links, which you can use to create a datum surface. You can compare this surface to existing ground for an earthwork quantity calculation. Not every link needs to have a code assigned to it, and links can have more than one code if desired. Figure 1 shows some examples of codes assigned to the sample custom subassemblies introduced in the previous article. (Note that I manually created the text as AutoCAD mtext, but the Code Set Style can assign automatic labeling as well.)
Figure 1. Examples of codes assigned to custom subassemblies.
Shapes are 2D areas used to represent different materials in cross-section. You can use these shapes in quantity calculations and assign material-specific hatching in sections. To add a shape, select the subassembly, right-click and choose Add Shape. Shapes are defined by selecting links in sequence around the perimeter of the subassembly. (In my testing I find it best to start selecting links adjacent to the origin point, moving in a counterclockwise direction. If this attempt doesn't work correctly, launch the Undo command and re-try by clicking links in a clockwise direction.) As you select links around the perimeter of your subassembly an automatic fill pattern will appear within the shape. Figure 2 shows how this fill would appear right before the last link of the subassembly is selected.
Figure 2. Defining the shape.
After a shape is defined, assign a code to it that identifies the material it is meant to represent. Similar to working with points and links, you select the subassembly, right-click and choose Add Code. Shape codes and their resulting display also are managed through the Code Set Style along with points and links.
Add Subassembly to an Assembly
After all necessary points, links and shapes are defined, you are ready to add the custom subassembly to an assembly. Before doing so, you can redefine the origin point if necessary, such as if the a curb's origin is not at the gutter point in our example. To do so, select the custom subassembly, right-click and choose Modify Origin (figure 3). When prompted, snap to the vertex you wish to use as the origin. The origin point will display as a grip when the subassembly is selected.
Figure 3. The Modify Origin command.
At this point you can add the subassembly to an assembly by selecting it, right-clicking and choosing Add to Assembly. When prompted, choose the appropriate point marker where you would like to attach the custom subassembly.
In summary, custom subassemblies often are necessary to create a detailed road design in Civil 3D. A large number of dynamic subassemblies ship with the product, and I encourage all users to thoroughly scour the stock subassembly libraries before making their own. When you need custom subassemblies that allow for varying widths or slopes (such as transitions, superelevation or other complex layout criteria), you may need to resort to visual basic (VBA) scripting to create these components.
If you can use static subassemblies without adjustable properties, though -- such as for many curbs -- creating custom subassemblies from polylines is a powerful and often less time-consuming method.
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!
Poll not yet available.