This came up in the discussion groups today, a user has a set of points that he needs to create a surface from but the points also have a depth value. He wants to create an additional surface below the original surface but at the depth below as recorded in the point (the depth is not constant, it changes for each point). For example, point 1 is at elevation 100 and has a depth of .55′, point 2 is at elevation 101 and has a depth of .48. The elevations of the first surface would be 100 at point 1 and 101 at point 2. The elevations of the second surface would be 99.45 at point 1 and 100.52 at point 2.

To do this, we’ll need to import the points twice (I would recommend doing this in two separate drawings and then data referencing the surfaces together), once at the original elevation and once at the adjusted elevation. Importing the original points is not a big deal and you can find all sorts of information on how to do this online so I’ll skip it here.

To do the elevation adjustment, we’ll need to know something about the point file. In the example I’m using here, I have a .txt file that is comma delimited and looks like the following:
1,5000, 5000,100,GND,-.55
2,5001,5001,101,GND,-.48

The format of this is very common, PNEZD (Point, Northing, Easting, Elevation, Description) but it has the added value of depth to it. We need to create a new Point File Format to import this data. On the settings tab of the prospector, expand out Points, right click on Point File Formats, and choose New. The format type you want is User Point File.

New_Point_File_Format.png

New Point File Format

After you choose In the new point file format, you’ll need to name the format, set up the columns to match the data that you have, and indicate how the file is delimited (a comma in this example). The PNEZD part is pretty straight forward (if you aren’t sure about it, check out one of the other point file formats that come with Civil 3D) but we need to add a column for the depth. The depth will depend on the how the data was collected. In my example, I have a negative sign indicating that the value is to go down so I’ll use the Z+ value. If the value is listed positive and you want it to go down, you’ll need to choose the Z- value.

 

Point_File_Format_Settings.png

Point File Format Settings

Now that we’ve done this, we can import the points. In order for the point elevations to be adjusted, we need to tell Civil 3D to actually adjust the elevations. On the Import Points dialog box, down towards the bottom in the advanced options section, there is an option to do elevation adjustments if possible. Makes sure this is toggled on and your points will come in at the adjusted elevations.

Import_Point_Settings.png

Import Points Settings

The following image shows the results of bringing in the same point file once using the elevation adjustment (on the right) and a second time bringing it in without the elevation adjustment (on the left):

Imported Points.png

With (right) and Without (left) Elevations Adjustments

Hope this helps out and let me know how you are using this. I would really like to know what you’re doing with it!

Advertisements

Have you ever had two surfaces that you needed to combine together but the problem is, at the boundary of the inner surface, its elevations don’t match the elevations of the outer surface. In cases like this, if you paste them together you can get some really odd things going on where they are supposed to meet.

An example of this might be that you have one surface that was created from USGS data and another surface that was surveyed. They should be close to the same elevations but they won’t be exact. I often have people ask me if there’s a way to combine them but use a buffer between. Using a buffer you won’t get those almost vertical triangles or triangles that go out for quite a while until they connect into the other surface.

basics_of_the_issue

Pasting Surfaces Issue

In the above image, I have two surfaces, one with green triangles and a yellow border and one with grey contours. I need to paste them together to create a combined surface. Any surface points that are under the border of the inner surface when it’s pasted in will be removed and that white, thick line represents the triangles from the outer surface that are unchanged. As you can see, there are some odd things going on.

Since there’s no way to add a buffer when pasting surfaces, what do you do? Well, here’s how you do it in five simple steps:

  1. Extract the border of the inner surface.
  2. Offset this extracted border the buffer distance.
  3. Assign the elevations from the outer surface to this new object.
  4. Create a surface from this offset.
  5. Paste all three surfaces together.

1. Extract the border of the inner surface.

You probably already know how to do this but, in case you don’t, it’s pretty simple. Just follow these steps:

  • Make sure the surface you want to extract the border from is using a style that actually displays the border (you can’t extract something if the surface isn’t dislaying it).
  • Select the surface and on the ribbon expand out “Extract from Surface” and choose “Extract Objects”.

    Extract_Border.png

    Extract Objects

  • Select “Border” from the options in the next dialog box (deselect anything else you don’t want to extract from your surface) and click OK.

    Extract_Border_2.png

    Select the Border to Extract

You now have a 3D polyline in your drawing where the border of the surface is.

2. Offset this extracted border the buffer distance

Again, pretty simple but I’ll explain the steps here. On the Modify tab of the ribbon, on Edit Geometry panel, there’s a command called, “Stepped Offset”.

Stepped_Offset.png

Stepped Offset

Follow the command line prompts and offset it the distance you need. When it comes to setting the elevation, it really doesn’t matter what you choose as we’ll set the elevation of this new polyline in the next step. The AutoCAD Offset command most likely will not work as this is likely to be a 3D Polyline and the Offset command only works on 2D objects.

Offset_Polyline.png

Offset Polyline

 

3. Assign the elevations from the outer surface to this new object

This new polyline needs the elevations of the outer surface. Still on the Modify tab of the Ribbon, on the Edit Elevations panel, there is a command called, “Elevations from Surface”.

Elevations_from_Surface.png

Elevations from Surface

Run this command and select the polyline. Next you’ll see a new dialog box asking you which surface to use. Select the outer surface (in this example it’s called “Pre-EG”) and make sure you toggle ON the option for, “Insert intermediate grade break points”.

Elevations_from_Surface_Options.png

Elevations from Surface Options

Your new 3D polyline now follows the outer surface exactly and we’re ready for the next step.

4. Create a surface from this object.

Again, pretty simple but here are the steps.

  1. On the Home tab of the ribbon, on the Create Ground Data panel, expand out Surfaces, and select the first option, “Create Surface”.
  2. Name it appropriately (I would call it something like “<inner surface name> Pasting Buffer”. Set any other settings you want (the style really doesn’t matter – I would probably choose something like, “No Display” if it’s an option).
  3. On the prospector, expand out the new surface, expand out the definition, right click on Breaklines and chose, “Add”. Select the offset 3d polyline and apply the breakline settings as desired.

And that’s it. You’re done.

5. Paste all three surfaces together.

Now, that you have done all that, we are ready to paste them all together. You can past them into the original outside surface but I’m not a fan of that. I would much rather have the outside surface remain intact in case I need to use it for something else. I typically will create a new surface (see step four for the steps to create a new surface).

On the Prospector tab, expand out the new surface, expand out definitions, and choose “Paste”. Select the surfaces you want to paste in. The order you paste them in is very important as whatever is within the border of the incoming surface will completely overwrite everything inside it. The order we will use here is 1) Outside surface 2) Buffer surface 3) Inner surface.

Pasting_Order.png

Paste Order

The following sequence of images show the progression of the new surface as the other three surfaces are pasted in. I left in the thick white line from earlier as a reference.

Outer_Surface_Pated.png

Outer Surface Pasted In

Buffer_Surface_Pasted.png

Buffer Surface Pasted In

Inner_Surface_Pasted.png

Inner Surface Pasted In

As you can see, that buffer works very nicely. You can compare this to a surface that only has the outer and inner surfaces pasted in.

Compare_with_no_buffer_surface.png

Same surface without the buffer surface

What do you think? Is this something you might use? Leave a comment if you do this a different way. I always love to hear about different ways of accomplishing things!

The data set I used is from the training manual “A Practical Guide to Civil 3D 2017” by Rick Elis. You can order a copy from his company CADapult if you would like one. This is the book I use in my classes.

So, you have an ESRI Shapfile with contour data in it and you want to create a surface from it. How is this done? Well, honestly, it really isn’t too terribly hard. There are, however, some gotchas you have to be aware of when using the easy method. Part 2 in this series will cover a more involved way of accomplishing this but will give you a much better surface.

Creating Surface

First off, displaying the contours in your drawing, this part is super easy. Simply drag your .shp file from Windows Explorer into you drawing area and it will connect to the .shp file and display it’s contents.

Importing a Shapefile

Importing a Shapefile

This part isn’t necessary but it is a nice way to compare the surface you get from the data you have.

Now, let’s actually create the surface. On the home tab of the Civil 3D Workspace on the ribbon, expand out the Surfaces pulldown and choose “Create Surface from GIS Data”.

Create Surface from GIS Data

Create Surface from GIS Data

This will open up another of the famous Civil 3D Wizards. The first tab allows you to set the properties of your new surface, such as the name, description, style, etc. I recommend not using a style that displays a lot of data. Typically, GIS files have a TON of data in them! You don’t want to unnecessarily overtax your system.

Object Options

Object Options

On the next tab, Connect to Data, you’ll choose the type of data you want to connect to and then the actual data source. Depending on the data type, options within the dialog will become available. In this example, I’m connecting to a shapefile so I choose that option and then browse to the file. Don’t forget to click on the Login button at the bottom (not sure why you need to login to a shapefile but you do).

Connect to Data

Connect to Data

the Schema and Coordinates section simply allows you to choose the data you want to bring in and assign it a coordinate system (if it doesn’t already have one). In this case, I simply toggled on the only data that was available. If you are using something other then a shapefile, you might have additional options here.

Schema and Coordinates

Schema and Coordinates

The Geospatial Query section allows you to choose the area of the data source that you want to create the surface from. In most cases, you don’t want to create a surface from the entire shapefile as that is just overkill. Choose the method you want to select the area and then define the area (it’s pretty straight forward). At the bottom of the dialog, you’ll see two options, Inside and Crossing. In most cases, I’ve found the Crossing option to work better. If you choose Inside, it will only select the objects that are completely inside the area of interest and ignore any that extend beyond it. Since most contours are very long, they’ll extend beyond your boundary and they won’t be selected so make sure to choose the Crossing option.

Geospatial Query

Geospatial Query

Finally, the Data Mapping section. This if one of the most important parts of the dialog. A shapefile is 2d file. This means the lines within the shapefile only have X,Y values, no Z values. The elevation of the contours are then assigned to the objects as a data field. You’ll need to tell Civil 3D which field within the shapefile represents the elevations of the contours.

Data Mapping

Data Mapping

Clicking Finish, Civil 3D then creates the surface, adds the data to it, and displays it in your drawing.

Surface Created

Surface Created

Surface Issues

Now that the surface is created, you should be aware of some issues with creating a surface using this method. First thing, not all the points from your contours are used in creating the surface. There is an automatic weeding being applied to the data that you have no ability to control.

Data Points Weeded Out

Data Points Weeded Out

Whenever you have a surface created from contour data, there is the possibility that flat areas can be created. Civil 3D has the ability to minimize these flat areas. When creating a surface from a shapefile, Civil 3D automatically applies the Minimize Flat Areas edit to your surface but, you can change the settings in this command. Add the problem, you can’t go back and change the settings later, remove the edit to add it back in, or do anything with it. You are stuck with it the way it is. See THIS post for information about the flat areas and what you settings you should use. When creating a surface from a shapefile, the “Swap Edges” option is not used and therefore, creates a less then desirable surface.

Missing Contours

Missing Contours

Ok, so the contours aren’t really missing, they should just follow the data better. In other words, there should be contours in the areas that I’ve pointed out in the image.

For an alternative method of creating the surface from a shapefile, stay tuned for Part 2.

In PART 1 of this series of posts, I showed you how to create a surface in Civil 3D from a shapefile that contained contour data. I also showed you some of the issues with using that command. In this post, I’ll show you how an alternative method for creating a surface from a shapefile. There are pros and cons to this method compared with the previous method:

  • Pros
    • Allows you to use all the data in the shapefile as needed.
    • Gives you control over the weeding and suplementing factors for the surface creation.
    • Allows you to use the correct options for minimizing flat areas.
  • Cons
    • There are a lot of steps to this process.
    • It potentially creates a much larger surface (data wise)

There are a lot of steps to this process so rather then detailing each step like I normally do, I’m going to summarize the steps here and then, if you need more detailed information, you can watch the included video.

  1. Import the shapefile into a drawing as AutoCAD entities (create object data from the shapefile data).
  2. Save the file as a new drawing and close it.
  3. Create a new drawing and attach the drawing with the contours to it via the Map Explorer in the Map Task Pane.
  4. Query the contours from the old drawing into the new drawing altering the elevations of the polylines to the elevation from the shapefile.
  5. Create a new surface.
  6. Add a dataclip boundary to the surface.
  7. Add the contours to the surface as contour data (make sure you toggle on all four minimize flat area options).

And that’s it! This will create a much better surface from your data but it definitely takes a lot longer to do.

So, you want to bring a surface from Civil 3D into Revit? It’s pretty easy, provided you have both Civil 3D and Revit Structure. What? You don’t have them both? You only have Civil 3D? Are you sure? Recently, anyone that had Civil 3D on subscription was automatically upgraded to the Infrastructure Design Suite Premium and, guess what, it has Revit Structure! So most likely, unless you specifically opted out of the upgrade, you have access to Revit Structure.

Please read this entire post as there is some very important information near the end. First, I’ll tell you how to Import the Surface and then I’ll tell you about the Limitations and Issues.

Import the Surface

The Bridge Modeling Tools have been around for a while now. If you haven’t installed them yet, go to the subscription website and download them. You’ll need both of them, one for Revit Structure and one for Civil 3D.

After you have installed them, simply open the drawing that has the surface in Civil 3D and then open the file in Revit Structure you want to bring the surface into. In Revit, there is a little bit of setup you need to do (if you’re a Revit person, you probably already know this stuff). Go to your “default 3D view” (that’s the “doghouse” on the quick access toolbar) and edit the Visibility/Graphic Overrides.

Setting Up Revit

Setting Up Revit

In the Visibility/Graphics Overrides, turn on the display of the Topography.

Topography Options

Topography Options

This will allow you to see the surface when you bring it in. Once Revit is set up (I’m sure there are some settings I’m not aware of and I’m sure a Revit Guru will correct me on this), go to the Extensions tab, expand out the Civil Structures tool and choose “Integration with AutoCAD Civil 3D”.

Integrate with Civil 3D

Integration with Civil 3D

If you have more than one drawing open in Civil 3D, you’ll need to choose the drawing with the surface in it, the surface(s) in the drawing you want to import, and then have it import the surface into Revit.

Import Settings

Import Settings

After hitting OK, you then have some options when importing the surface, such as the material that will be assigned to the surface and the limits of the surface (if you don’t want the entire thing).

Terrain Definition

Terrain Definition

Once done, you’ll have a surface in Revit that you can do whatever you want to with it.

Surface in Revit

Surface in Revit

Limitations and Issues

This tool is really, I mean REALLY cool! A few years ago, one of my coworkers (Brian Mackey) and I worked up a technique to do this very thing and believe me, it wasn’t this easy. This is easy but, you need to know what it does. If I take this surface in Revit and I compare it to the surface in Civil 3D (I’ve stylized it in C3D to be similar to what we see in Revit) you’ll see they are quite different.

Civil 3D vs. Revit

Civil 3D vs. Revit

As you can see, the limits of the surface from Civil 3D aren’t honored in Revit. In fact, the only thing that comes through in Revit is the surface points. If you have added any breaklines or boundaries to the surface in Civil 3D, Revit doesn’t recognize those. For you civil folks, to get a feel for what Revit is doing, basically extract the surface points from a surface and then add them to a new surface and that’s what you will have in Revit. This is still better than what we had though so it’s definitely an improvement. If this is important to you, file a support request with Autodesk so they know and perhaps they will adjust the way the tool works (the method Brian Mackey and I developed has the same issue by the way).

I WANT YOU TO MAKE THE SURFACE LOOK PRETTY!!!!!

Yes, we’ve all heard it before, Civil 3D makes contours that sometimes look like the recording of an earthquake on a Seismometer:

Seismometer Recording

Seismometer Recording

Really, it’s not the fault of Civil 3D, it’s the data. Add the same data to any other civil design program and you’ll get the same results. This seems to crop up quite a bit when you have cross grades. In the following image you can see that there are two roads going opposite directions and this is where the jagged contours are coming from:

Jagged Contours

Jagged Contours

No contractor would build it this way so, let’s see what our options are.

Option 1: Smooth the Contours

You can smooth the contours of the surface. In the style the surface is using, you can toggle on the option to smooth the contours. This is a great way to make a drawing “look pretty”. It will take the contours and smooth them out. This is only editing the display of the surface. If you have a profile through this area, smoothing contours does nothing to the profile because we aren’t smoothing the surface, we are smoothing the display of the surface.

To smooth the contours, go into the style the surface is using and, on the contours tab, toggle the option to smooth the contours to True. Once you have this toggled on, you can select the type of smoothing you want to apply to the surface as well as how aggressive you want the contour smoothing to be. Play around with these settings and see what looks best for you. There isn’t a correct setting for this because your goal, when smoothing contours, is to make the contours look pretty.

Contour Smoothing Options

Contour Smoothing Options

And here is the same area of that surface with the contour smoothing option set to True, the Smoothing Type set to “Add Vertices” and the contour smoothing maxed out.

Surface with Smoothed Contours

Surface with Smoothed Contours

There are some things to be concerned with when smoothing contours, you are sacrificing the accuracy of the contours to make them “look pretty”. If you have a spot elevation that happens to fall very close to a contour or perhaps a point that was used in the surface creation that’s really close to the contour elevation, you might see some discrepancies. In the following image, I placed a spot elevation and snapped to the contour and you can see it’s not the exact same elevation as the contour:

Smoothed Contours Labeled

Smoothed Contours Labeled

Another issue with smoothing contours is you might end up with contours that cross each other. You’ll see this sort of thing primarily where you have some really steep areas such as retaining walls.

Crossing Contours

Crossing Contours

Anyone that’s done any amount of surface modeling knows this is not allowed.

The last issue that I’m aware of with smoothing your contours is, it’s all or nothing. You can’t smooth just a portion of the contours of your surface. This is because it’s a part of the style.

Option 2: Smooth the Surface

The other option is to smooth the surface directly. This is an edit that is done to the surface and is found in the same place you can raise/lower the surface or paste in another surface.

Smooth Surface Command

Smooth Surface Command

There are two options when smoothing surfaces, “Natural neighbor interpolation” and “Kriging”. I’m not going to go into detail on how the different methods work or what settings to use. You’ll need to read the HELP FILE and do your own research to find out which method works best for your situation. In this example, I’m going to use the natural neighbor interpolation method.

Smothing Options

Smothing Options

So, how does this differ from smoothing the contours? Well, when you smooth contours, you are smoothing the display of the surface. When you smooth the surface, you are actually editing the surface and not just the display. Here is an image of the surface with the smoothing edit applied to it:

Smoothed Surface

Smoothed Surface

As you can see, the contours look much different then when the contour smoothing was applied. If you take a look at the triangles of the surface, you can get a better idea of what happened here (I did a 5′ grid in this example):

Smoothed Surface Triangles

Smoothed Surface Triangles

A couple things to note here, I didn’t smooth the entire surface, just the  area that needed it. Second, any data that was added to the surface was not modified in any way at all. If there are points, or breaklines, or corridors, or gradings, they are preserved (including the triangulation along the breaklines). This only affects the way the triangulation in the areas between data are calculated. Basically, instead of doing a straight grade between one point and the next, it rounds it out.

Something to be aware of, this can add a LOT of data to your surface and can make it very slow to work with so play around with the settings and get the results you want without adding too many points to the surface.

Hopefully this helps out when someone is complaining about your ugly contours!

Civil 3D uses a Triangulated Irregular Network (TIN)  for surface models, just like every other piece of civil engineering software that I’m aware of. There a  couple of major limitation to a TIN that you should be aware of. First, every single horizontal location (i.e. every x,y coordinate) can have only one elevation. This means no vertical faces and no overhangs or undercuts. The other limitation is since it’s made up of a bunch of triangles, you can’t have curves in your surface. If you have curved data that you want to add to your surface, you must approximate this with straight line segments, and this is where the mid-ordinate distance comes into play.

What the Mid Ordinate Distance Is

When you add data to your surface, one of the options is the mid-ordinate distance. What the heck is the mid-ordinate distance? Well, it’s the distance from the midpoint of a curve to the midpoint of the arc.

Mid Ordinate Distance

Mid Ordinate Distance

When you add something like a curve to your surface as a breakline, boundary, or contour; the surface cannot follow the curve so it uses the Mid Ordinate Distance to approximate the curve. Basically what happens is C3D will start at the end of the curve and draw a line to another point on the curve so the mid ordinate distance between those two points on the curve equal what is set in the dialog box.

Mid Ordinate Calculated

Mid Ordinate Calculated

As you can see in the image, there is a little bit left over at the end, when you add this to a surface, you don’t want that little bit left over so Civil 3D then evenly distributes the number of points added to the feature along it. This will result in a final Mid Ordinate Distance slightly less then what was calculated.

Mid Ordinates Distributed Along Curve

Mid Ordinates Distributed Along Curve

So, instead of adding just the ends of the curve to the surface, the Mid Ordinate Distance allows us to determine how many points along the curve we want to add.

What Should You Set It To?

Now that you know what it is, what should it be set to? In the default template, it’s value is set to 1 drawing unit (1′ in the imperial template and 1m in the metric template). Is this value too big? Too small? Or just right? Let’s think of this in a different way. Don’t think of it in the abstract Mid Ordinate Distance way, think of it instead as “How far away from my data should I allow my surface to be created?” If you set the Mid Ordinate Distance to 1′, then the triangle of your surface can be up to 1′ away from the actual data. It’s your call, is this acceptable or not?

Here’s how I like to figure out an acceptable Mid Ordinate Distance. What is the smallest distance between any two breaklines you’ll have in your surface? Are you modeling a haul road for a mine? Or are you modeling curb and gutter for a commercial parking lot? In my experience (primarily land development) I use a lot of curb and gutter. When I model the flow line and the top face of curb in a standard curb and gutter, that’s a horizontal distance of 2″. Take that smallest distance and cut it in half to get your desired Mid Ordinate Distance, in this case 1″. Since 1″ is about 0.08333 I will typically us 0.1′.

Can I Change the Default?

Well, of course you can! Ok, let me rephrase that, if you are using Civil 3D 2010 or later you can. On your toolspace, go to the Settings tab and expand out Surface and Commands:

Command Settings Location

Command Settings Location

As shown in the image, there are three commands (at least that I know of) that can have the Mid Ordinate Distance set, AddSurfaceBoundaries, AddSurfaceBreaklines, and AddSurfaceContours. Right click on the command you want to change and choose Edit Command Settings. In the command settings, expand out “Add data options” and change the “Default mid-ordinate distance” setting.

Mid Ordinate Distance Defaults

Mid Ordinate Distance Defaults

Hopefully this will help you understand what’s going on with this setting and, have a Merry Christmas!