For a while now, I’ve been preaching how to add contour data to my classes and nowhere have I ever seen anyone else teach it the way I do. I’ve done some searching online and even the folks over at http://www.civil4d.com (formerly http://www.civil3d.com) do it the same way everyone else does, and they are doing it wrong (sorry).
So, what do I do different then everyone else? First off, let’s talk about what everyone else does.
The Incorrect Way To Add Contour Data
When you add contour data to a surface, you are offered four options for minimizing flat areas:
As you can see in the image above, three of these options are toggled on by default (1, 3, and4) and one is toggled off (2). Everywhere I’ve ever seen anyone talk about adding contour data says “Use these settings when adding contour data”. Examples:
http://www.civil4d.com/2006/04/creating-an-accurate-surface-from-contours/
http://www.theswamp.org/index.php?topic=32786.0
http://forums.augi.com/showthread.php?t=122101
http://www.bae.ncsu.edu/programs/extension/wqg/srp/pdfs/rc221_chap2.pdf
Even the official Autodesk Best Practices Guide for Civil 3D 2012 says to do it this way:
http://docs.autodesk.com/CIV3D/2012/ENU/filesCBP/GUID-5268C849-DC6E-4FE6-81FE-21DB9407A77-92.htm
So what’s wrong with doing it this way? Well, IT JUST DOESN’T WORK! First off, let’s see what happens when you don’t do any minimizing at all. In the following image, you’ll see a group of contours. These are 5′ and 25′ contours.
Now, I’m going to add these contours to a surface and I’m not going to do any sort of minimizing options at all (all unchecked). The resulting surface (showing 5′ and 25′ contours) shows why you need to minimize your flat areas.
The surface contours and the data contours don’t match up at all, so we minimize the flat areas. First off, I’m going to show you what happens if you just swap the edges (toggle just option 2 on). When you swap edges, Civil 3D merely changes the way it triangulates the data.
This does a pretty good job fixing the contours but there are still some areas that it just doesn’t quite work. I think it’s because of this that people say not to use the swapping edges method. Instead of swapping edges, the next image shows the exact same surface with options specified by all of the sources linked to above, 1) Filling gaps in contour data* 3) Adding points to flat triangle edges and 4) Adding points to flat edges.
*This is not really a minimizing option and I’m not sure why it’s included in this dialog box. I suppose they had to put this option somewhere and they decided to place it here.
As you can see, the new contours match up exactly with the original contour data (within the parameters set by the weeding factors at least). People see this and think to themselves, “Hey! That looks perfect! I’m done!” Well, let’s take a closer look at the surface, I’m going to do this by using a different contour interval. The original data was 5′ contours so I’m going to display my surface with 1′ contours.
Even though we told Civil 3D to minimize the flat areas, this image shows that there are still flat areas. Well, technically, they aren’t flat. When you use the default options to minimize flat areas, it takes the flat areas and puts a really small slope on them so they are no longer perfectly flat, they are just really really close to being flat. And this is the problem with using the default settings. The surface contours that are at the exact same elevation as the data contours match up exactly. However, between the contours, it just doesn’t do a good job estimating what the surface should do.
The Correct Way To Add Contour Data
Ok, I’ve just shown you that everything you know is wrong about contour data so, what’s the correct way to add contour data to a surface? The answer is suprisingly simple, just use all the options when you add your contour data. For the flat areas, if it can swap the edges, it does. If it can’t swap the edges, it adds the points. The following image shows how this same surface looks with all four of the options turned on.
It’s not perfect. There are still some flat areas (hence the term MINIMIZING flat areas) but using all the options results in a much better surface than the default options. Hopefully I’ve convinced you to come over to the dark side and use all the minimizing options when adding contour data. Of course, there may be situations where the different options will provide better results (and if you know of any, please let me know what they are) but overall, just toggle them all on.
Unfortunately, there doesn’t seem to be a way to change the defaults used for the Minimize Flat Areas command so you’re going to be stuck toggling on the swapping edges each time you add contour data or use the edit (again, if anyone know how to change the defaults, please let me know).
<edit>Looks like you can now edit the defaults in Civil 3D 2013. Right click on the command AddSurfaceContours in the settings tab and you can change the defaults:
Thanks to Gunnar on the discussion groups.
</edit>
Now get out there and buck the C3D system!
August 13, 2011 at 12:25 pm
great post. thanks
August 13, 2011 at 1:06 pm
In the surface definition tree, when you have an array of polyline contour definitions, you only need ONE instance of Minimize flatten located at the bottom of the tree. Also the definition is not linked to the contours you added at that time, and it is for the entire surface regardless of area contours were added. Meaning if you have a Breakline for finished floor added to make a flat spot, and add a contour somewhere else, the mini/flat will put “magic spots” or approximate surface points (maybe ff+ .1 maybe ff – .1) in your building making sure that it is not entirely flat. To fix this, just bump that Minimize/Flatten down to the bottom of the surface build tree, right above the boundary.
August 13, 2011 at 1:20 pm
Awesome! Thanks for the additional information!
August 24, 2011 at 6:44 am
Right on John. It’s something we have to continually do in surface development. That is move the “minimize” edits to the bottom of the list along with the outer boundary as well. I even put the hide boundaries at the end for clarity, not required though.
August 14, 2011 at 5:24 pm
Great post!! You’re absolutely right. I too have been creating contour surfaces like everyone else, with the default settings. I’m going to have to edit my templates now.
August 14, 2011 at 8:04 pm
Steve,
I wasn’t able to find anyway to change the default settings of this in the template. If you do find something, please let me and the rest of my readers know.
Thanks!
August 24, 2011 at 6:49 am
Nice post Brian. But even with swapping edges, the root problem is the resolution of the original contours. If you expect to display the surface in any other contour interval than that of the contour data added, you’ll have more luck winning the lottery than getting the new interval to display “correctly.”
So is the “common” method wrong? Depends on your intended output. I have no problem manipulating the model to get the desired result. We need to be aware of all options for sure.
August 24, 2011 at 4:04 pm
Kevin,
This could be debated for years and years with no one ever coming up with an agreeable answer. The root of the problem is not getting the resolution of the original contours (using the minimizing flat area techniques, my new contours exactly replicate the old contours). The root of the problem is contour data sucks. There is no data between the contours and that’s the problem. The minimizing algorithms do a decent job in approximating what is between the contours (it definitely isn’t perfect). At any point on a surface that was created from contours, the elevation of the surface can be off by up to the contour interval (2′ contours, the elevation can be off by up to 2′) unless you are exactly on the contour.
This post is intended to get people to not simply do something without understanding the why of it. I really like a quote I heard a while back and would love to find it so I can quote it exactly, but it went something like, “If you’re doing it that way because that’s the way you’ve always done it, you’re doing it wrong.”
Brian
August 24, 2011 at 4:06 pm
Reading your comment again, perhaps you meant “resolution of the original surface” instead of “resolution of the original contours”. If that’s the case, than I think we agree.
Either way, thanks for the comments!
September 11, 2011 at 4:51 pm
Great Post – I agree with Brian, Contour data just sucks for re-creating, although it’s often what we’re stuck with on the design side today. While it’s probably a bit of a pain up front, I still like to proxy breaklines on all draws and ridges just to force the right interpolation. It usually doesn’t take too long to do and usually fixes the rendering so you don’t have to fix flat areas. When looking in a 3d model with elevation exaggeration, it’s pretty quickly obvious that it really helps render all the channels/ridges much more naturally.
September 11, 2011 at 6:17 pm
I disagree, to a point. I think it would be better to add the minimize flat areas edit prior to adding your breaklines. The areas that still need assistance, go back and fix them with your breaklines. The minimize flat areas edit will automate a lot of that effort for you. Just make sure that you go back and move your minimize edit to the end of the surface build like John Spell suggested.
January 23, 2012 at 4:46 pm
See? Even the Civil 3D 2012 Best Practices Guide has it wrong!
http://docs.autodesk.com/CIV3D/2012/ENU/filesCBP/GUID-5268C849-DC6E-4FE6-81FE-21DB9407A77-92.htm
April 16, 2015 at 7:50 am
Brian, I’m just learning to create 3d surfaces from contour lines for estimating purposes, now I’m fearing that even if I get civil3d come up with volumes my quantities might be off… since you mention: “The root of the problem is contour data sucks” “At any point on a surface that was created from contours, the elevation of the surface can be off by up to the contour interval (2′ contours, the elevation can be off by up to 2′)”
Im trying to estimate earthwork with civil3d, the problem i have is that all the info i get is in pdf, I never get cad files, no coordinates, no cogo points, etc.
I only have my pdf plan with existing contours and my grading plan.
Please advise.
April 21, 2015 at 7:50 pm
You have two options, get better data or understand the limits of the data you do have.