Visualizing Civil 3D Data, Part 1 (CAD Clinic: Civil 3D Tutorial)1 Mar, 2008 By: Mike Choquette
With a few changes to your code set style, you can view your corridors in 3D immediately.
More civil engineers and site designers are being asked to create 3D visualizations of their projects for clients and the general public. For most users, design visualization is Civil 3D's greatest untapped strength. Civil 3D 2008 and its AutoCAD 2008 platform contain a host of tools to help users generate respectable design visualizations. Being able to view designs in 3D as they develop is one of the most compelling reasons to work in Civil 3D's dynamic, model-based environment. This article is the first of a series focused on the visualization capabilities of AutoCAD Civil 3D.
Corridor objects are design tools used to model proposed roadways and other linear design features through alignments, profiles, and proposed cross-sections. In previous releases, visualizing corridors required the user to create one or more corridor surface models to represent different materials. Although users can still create corridor surfaces, these are no longer required for visualization in the 2008 release. Instead, you can use corridors to generate AutoCAD 3D graphics representing corridor materials automatically through code set style settings. This automated approach eliminates the time needed to configure masks and boundaries otherwise necessary to show different materials on the same corridor (asphalt, concrete, grass, and so on). It also means that with a few changes to your code set style, you can immediately start to view your corridors in 3D with multiple materials applied.
Links and Link Codes
The keys to this new functionality are the concepts of link codes and code set styles. Both of these topics were introduced in the December 2005 CAD Clinic article, and users new to these concepts should consider reading that document before continuing. In short, links are cross-sectional linework used to connect two points in a subassembly. Codes describe what a point, link, or shape is meant to represent. In the image below, the top link of the sidewalk subassembly is assigned codes of Top and Sidewalk, while the bottom link is defined as Datum. Links like Top and Datum are often used to easily identify data for corridor terrain models. You can use codes that describe the surface material like Sidewalk to create 3D geometry for visualization. It is important that every link across the top of your assembly has a code assigned to identify which material should represent it. Otherwise you may wind up with holes or missing portions of the 3D model.
Codes assigned to links across the top and bottom of a subassembly.
Many of Civil 3D's stock subassemblies have codes already applied to their links. To find out what codes are applied where, look up the subassembly in the online Help system's Subassembly Reference document. (Right-click on the Subassembly icon in a tool palette and choose Help.) In the Help system, look for a coding diagram like the one below for LaneOutsideSuper. Note that the uppermost link is identified as L1.
An example of a coding diagram.
Then look for a point, link, or shape code table to see what codes have been applied to a link. (In this example, LaneOutsideSuper's L1 has both Top and Pave codes assigned.) Custom subassemblies based on polylines can have any codes the user would like assigned to their links. Some stock subassemblies, like GenericPavementStructure, have fields where users can assign codes as needed to specific links. You can assign these values to GenericPavementStructure and similar subassemblies through the Subassembly and Assembly Properties dialog boxes.
Code Set Styles
Once all of the links along the top of the corridor have a material-specific code assigned, it is time to configure the code set style. Code set styles govern which object styles, automatic annotation, render materials, and fill patterns are displayed on points, links, and shapes. Whenever you view a subassembly, assembly, or section view, you are looking at it through the display controls of a code set style. You can assign the code set style in many places, including the Code tab of Subassembly and Assembly Properties dialog boxes and the Sections tab of the Sample Line Group Properties dialog box. You can assign corridors, assemblies, and sample line groups to display different code set styles as necessary in the same drawing. Code set styles are accessed through the Multipurpose Styles area of the Settings tab.
Below is a dialog box listing link codes in an example code set style. Note that the code Pave is assigned to display the render material Sitework.Paving - Surfacing.Asphalt. You can use this sample AutoCAD render material to represent asphalt. Seven different example materials ship with the product. You can configure these and create new ones through the AutoCAD Materials command.
An example of a code set style.
When viewing the corridor in 3D, Civil 3D will automatically create 3D geometry for any links in a corridor with codes matching those in its code set style, as long as those codes are assigned render materials. No additional steps are required. In other words, as soon as a corridor is assigned the code set style above, the LaneOutsideSuper subassemblies will have 3D geometry automatically created to represent the paved lane surfaces (which appear in a 3D view).
In the corridor below, each link along the top of the assembly was assigned codes listed in its code set style with render materials. Note how the lanes look different from the concrete curbs and sidewalk and grassed areas thanks to different render materials. The pavement markings, created by adding generic links just above and offset from the centerline, were assigned a unique code and a bright yellow material in the code set style. Keep in mind that this 3D geometry will automatically update as the corridor model changes.
This corridor 3D model shows multiple render materials.
There are a few things to watch out for when creating code set style-based corridor 3D geometry. First, any existing ground models present in the drawing will show through proposed conditions in the cut areas. You will need to either crop out or adjust those areas to allow the proposed work to show correctly.
A corridor 3D model in a proposed cut area where the existing ground model is showing through.
Also note that code matching in the code set styles is case sensitive. Therefore, a link with the code of GRASS will not match a code set style entry of Grass. That said, different stock subassemblies often use the same codes with different capitalizations, so you may need to have duplicate entries in your code set style based on what subassemblies are present (e.g., GRASS, Grass, grass). Also note that in Civil 3D 2008 any custom codes assigned to GenericPavementStructure subassemblies will be interpreted by Civil 3D as if they were in ALL CAPS.
This concludes the first installment of the Civil 3D Visualization CAD Clinic articles. Future articles will consider methods to hide existing ground in cut areas, create new render material styles, adjust camera angles and lighting, create animations, and other related topics.
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!