CAD Clinic: Creating Detailed Civil 3D Subassemblies from Simple Polylines, Part 112 Feb, 2006 By: Mike Choquette Cadalyst
Customize your designs by converting a polyline to a custom, static subassembly.
If you are a roadway designer working in 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.
Many different components make up the world's roadways, so it is impossible to have everything we all need out-of-the-box. You have two options when you need a custom subassembly: 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 can be assigned feature codes. The geometry of converted subassemblies is static, though, since you cannot assign dynamic properties to custom subassemblies created from simple AutoCAD polylines. This topic is worthy of some in-depth examination, and I will continue it in next month's CAD Clinic article as well.
Let's use curbing for our examples -- a popular subject for custom subassemblies. Civil 3D 2006 ships with a handful of curb subassemblies such as the BasicCurb, BasicCurbAndGutter and a large collection of UrbanCurbAndGutter sections. Curbs are excellent subjects for converted subassemblies since so many kinds of curbs are used around the world and many of them have constant cross-sectional geometry.
So why create custom curbs? The BasicCurb (figure 1, left) uses the lower left point as its origin point (also called the hook or anchor point) where the curb subassembly will attach to an adjacent subassembly, such as a lane or median component. Many road designers may prefer to have a curb origin at the gutter point (on the top surface of the adjacent lane) rather than the base of the curb. Also, this subassembly includes a plumb-vertical face of curb that will be problematic when creating terrain models that include the face and top of curb. Also keep in mind that the various UrbanCurbAndGutter sections do not automatically change slope to drain away from the curb when on the high side of a superelevated region. (Although the BasicCurbAndGutter, figure 1 right, can.)
Figure 1. The BasicCurb (left) and the BasicCurbAndGutter (right) subassemblies that ship with Civil 3D.
The first part of the process is to draft your component polylines as accurately as possible without any vertical exaggeration. In figure 2 I've drafted three custom subassemblies as polylines representing vertical curbing, concrete sidewalk and a layer of gravel running below the other two. Once drafted, you may want to temporarily spread these components apart to make it easier to select a link in the correct subassembly.
Figure 2. Three custom subassemblies drafted as polylines.
When drafting components with vertical faces, use special care if you'll use those faces to create a terrain model. For example, if you include the top of the curb in a terrain model representing the top of finished grade, consider building in a small horizontal offset from the gutter point to the top of the curb (figure 3).
Figure 3. Build in small horizontal offsets to create a terrain model.
The curb in figure 3 was drawn with a 0.01' horizontal offset between the gutter point and the top of curb on a 0.5' x 1.5' vertical curb section with a 0.5' reveal. This kind of approximation is necessary as Civil 3D (and Land Desktop as well) can only include one z-elevation for each x,y coordinate. You may also want to build in a slight slope along the top of the curb. This second adjustment would allow the area along the top of the curb to drain into the lane if a watershed analysis is later calculated on this surface. Despite these adjustments, since the distances from the gutter to the bottom and the back of curb have not changed, you will not affect the quantity calculations around the curb. If you are concerned about the visual effects caused by these adjustments, use an even smaller offset distance such as 0.001'.
Once your components are drafted as polylines, convert them to subassemblies with the Corridors / Create Subassembly from Polyline command. When prompted, name your component (I include the roadway side, if applicable, such as Curb -- Right). The Code Set Style allows you to identify which point, link and shape styles you wish to use based on assigned feature codes. (Points, links, shapes and their feature codes were described in depth in the December 2005 CAD Clinic article.) Always set the link creation option to Multiple unless you want each line segment to have the same link code (figure 4).
Figure 4. The Create Subassembly from Polyline dialog box.
Once created, each line segment in the assembly is now considered a link. Their appearance is controlled by the link styles located under the Multipurpose Styles area of the Setting tab in the Civil 3D toolspace. By default the Code Set Style will assign all links the link style specified in its No Codes field. (When starting from the _AUTODESK CIVIL 3D IMPERIAL BY LAYER.DWT template, the All Codes code set style will assign links to the uncoded link style by default, which initially displays the links as yellow).
Each vertex also is considered a point now, and Code Set Style also assigns a marker style to control their display. (Similarly, when starting from the _AUTODESK CIVIL 3D IMPERIAL BY LAYER.DWT template, the All Codes in Code Set Style will assign points to the uncoded marker style by default. All points will display as a gray circle by default.) Shapes are not created during the conversion process; you'll need to add them manually.
Next you can add point codes to any points you wish to generate corridor feature lines from or later export to COGO points. To do so, select the custom subassembly, right-click and choose Add Code (figure 5). At the Command line enter the feature code you want, such as Gutter or Top of Curb. Assign the code by selecting the marker of the point (one of the circles). If this code matches an entry in the Code Set Style, then that point will display the marker style indicated.
Figure 5. Assign the code by selecting one of the circles.
Next month we will continue to refine our custom subassemblies by adding link codes and shapes, adjusting the hook point and finally attaching it to our assembly when complete.