Wednesday, September 17, 2014

How to create a fence style in Autodesk InfraWorks



We are often asked how to create a fence style in Autodesk InfraWorks, using a 3d model from SketchUp, AutoCAD, 3DS Max, Design or some other modeling program.

The following is a workflow you can follow in order to accomplish this task. We use AutoCAD to create and export a 3D model of the fence components.

Starting in AutoCAD (or AutoCAD Civil 3D) draw a 3d object that represents a fence board or section.

If you work in meters, do so. If you work in feet, be advised that InfraWorks is going to read the units of your 3D model in meters. If you want to be able to apply model scales that represent feet, create your model in AutoCAD and then scale times 0.3048 before exporting to FBX format.

We first draw our fence section design using standard AutoCAD objects. If you use Front View (and UCS to match,) the X, Y and Z will match InfraWorks.


 
Next, use the PressPull command to make an extrusion of the thickness of the fence. Optionally, add a material.
 
You should have a 3D object:
 
 
Use the AutoCAD FBXExport command to export the 3D object to an fbx file. This format is compatible with InfraWorks.
 

 
 
On the FBX Export Options dialog, set the pulldown to Selected Entities and then press the button to Select Objects:


We're not exporting lights and cameras, but be sure Objects is checked and Materials if you applied one or more.

Open your project in InfraWorks and turn on the Style Palette. Browse to any collection within the 3D Model tab. Remember where you are, you'll need to get back here later. Press the green plus sign at the bottom of the Style Palette and you'll get the Define New 3D Model dialog:

 
Press the ellipsis button at the top right to browse to the location of the FBX file you exported. If, in AutoCAD, you created the model to the exact size you want, in meters, you can leave the scaling alone. If you need to adjust scaling, do that on the dialog. Note the X, Y and Z scales.
 
Finish with your settings and press OK. You will be placed back on the Style Palette, there will be a new style and the style name will be in edit mode. Type the name you want to apply to this new 3D model style.
 
 
Move back to Civil 3D and use the MapExport command to export the polylines that represent the fenceline. Use either SDF or SHP format.
 
 
Using Windows Explorer, drag and drop the newly created SDF or SHP file onto InfraWorks. On the Data Source Configuration dialog, set Type to Barriers. In the Rule Style box, press the button for Style Chooser (the pencil). Change the tab to 3D Model, browse through the categories and find the new 3D Model style you created in the previous step.
 
Press OK.
 
Back on the Data Source Configuration dialog, if you want the fence to follow your terrain, go to the Source tab and set Draping Options to Drape.
 
Move to the Table tab, set your Object Spacing. In our example, the fence board is 1' wide and we want no gap between boards, so we set Object Spacing to 1. Press the Close and Refresh button. Your fence displays: