Tag Archives: drawings

Dynamic Drawing Production Cheats for Civil 3D Objects – Slope Shading and More

Why we all eagerly await the day that all Civil 3D objects, like corridors, become data shortcuts or Civil 3D gets replaced with Infraworks (Not sure which is going to happen first). Until that day though we still need to get those Civil 3D models into our drawings in the most dynamic way possible. So here are a few sneaky tricks to do so, keeping everything as dynamic as possible and not exploding a thing.

  • Surface Slope Shading
  •  Surface Boundary Technique for Linework and hatching
  • DXREF’s data shortcuts in XREFS

Feeling Lazy watch the video. (Coming Soon)

While I love all the slope patterns that get generated from grading’s and corridors. I’m sick of exploding AECOBJECTEXPLODE all my linework from my model and copying it across to my xrefs etc. Every time I update, drives me crazy!

So what If I told you that the image below has not a single bit of exploding in it. Everything is produced via data shortcuts, even the linework, all dynamic. Interested? read on ->

Slope Shading
It’s so simple you will kick yourself for not working it out earlier. To produce the grey slope shading on the surfaces is quite simple. Using the surface slope analysis. Right Click – Surface Properties – >Analysis Tab – > Select Slopes from dropdown.

My embankments are 1:2 cut and 1:2 fill -> so >40% and my road cross fall is 3 %. So im going to drop down two ranges

  • 0.0001% – 10 % and (< -you can’t type 0 exactly)
  • 10% – 999999999999999% (type lots of nines in case you make even steeper areas than you have, then it always updates)

Change the colours to 254 (light grey) and 253 (Slightly darker grey) respectively.

image010image001

Then you should have what I have above, dynamic updatable surface shading. If you can’t see anything then you will need to choose a surface style that has the slopes turned on under the “display tab”. See below. Make sure you set a layer for the slope objects if you want to utilize Autocad transparency.

Linework and Hatching – The Surface Boundary Technique
I unfortunately have to assume that if your reading this you know how corridor point, link and shape codes work. What we can do with these wonderful codes is create surfaces where the surface boundary represents the linework we are trying to display on plan. The Red, White and Orange dashed lines taht represent that linework.

So I create 3 additional surfaces in my corridor properties.

  • DS-ROAD_curb,
  • DS-ROAD_footpath and
  • DS-ROAD_pavement

You will then need to work out the boundaries for them. You can do an interactive boundary if you feel like wasting hours of time. Or just use the Angle/Length Trick.

Tod do so, go to the surface properties for the footpath for example. Definition Tab – > Expand the Build Section and make the maximum angle like 92º and the maximum length about 5m.

To explain what this is doing. It will analyse the footpath surface for triangles that have an angle greater than 90°, quite often these are the weird “spiderwebs” we get on the outside of the surface. Then it will analyse the triangles that have a length on any side greater than the number specified and remove them. It’s important to note that the “Maximum angle” only works on outside triangles, not internal triangles. The “maximum length” will remove triangles anywhere. See the diagram below.

Before Applying Angle/Length Parameters
After Applying Angle/Length Parameters

The finished result is just footpath. You can use this trick on all your surfaces though

Now do the rest of the surfaces as well in a similar fashion. You will need to create a style that has only border displayed to see the finished result. You may also need to play with your corridor frequencies to get the desired result.

Creating a surface style that only uses the border object

The finished Result is dynamic linework though. Using a surface border.

Surface that represent linework only using surface border styles

As for hatching well its as easy as using that hatch command

Putting it all together

The final step is to collate all this together for use in a drawing. Here is my recommended workflow.

  1. So i have data shortcutted my top surface and set the shading.
  2. Data shortcutted my linework surfaces in and created different “border only” surface styles that I needed.
  3. Added a hatch onto the pavement surface.
  4. I also brought in my alignments and station/chainage labels in as well.

Now I simple select it all and WBLOCK it out to an xref location.

The best part about the WBLOCK is that you only have the layers you need in the new drawing. Meaning improved performance when using it as an XREF as well as not doing your head in. WBLOCK does not destroy the data shortcuts either!

Let me know what you think below.

Loading

Google/Bing etc. Imagery into CAD using Quantum GIS (QGIS)

This is the free option for those of you looking to get some public imagery into cad. Although I imagine if you are using Civil 3D 2015 with the new bing maps functionality. This method is a little defunct. If your using Vanilla Autocad you will need to download the GEOREFIMG lisp from CAD Studio to import

Feeling Lazy… Watch the video


QGIS or Quantum GIS has much more functionality than just saving Aerial Imagery. It’s a very comprehensive and powerful free GIS tool that should be in every designers arsenal.

Firstly install the latest version from https://www.qgis.org/en/site/forusers/download.html

1. Next open up QGIS from the desktop shortcut (im using 2.8.3 Wien when writing this)

2. Go to Plugins – > Manage and Install Plugins

3. Search for the OpenLayers Plugin and Install

4. Next we need some data to quickly get your location correct. Export either a 2007 DXF or MAPEXPORT a SHP file that contains some line work of your area that’s in a known coordinate system.

5. You can either drag drop it into QGIS or just press the “Import Vector Data button”

6. QGIS should prompt you for a coordinate system for your data. If it doesnt, right Click on the layer in the layers window on the left and select “Set Layer CRS”

7. Im in Australia so I select MGA zone 56. QGIS’s coordinate system library is incredibly comprehensive so you shouldn’t have any problems finding yours here.

8. Now the imagery, go to Web -> OpenLayers plugin -> pick a imagery source. Google/Bing/Yahoo/OSM/Apple street and aerial/hybrid sources are available

9. You should now have imagery in. You might need to change the draw order to check that your line work matches up, drag drop them so that your line work is on top.
image009
I
magery in
imagery2

10. Now just get your viewport to the imagery extents you want, then turn off the linework. The image will save whatever you are looking at, in whatever coordinate system you have specified for the project.

The resolution will be what you see is what you get (WYSIWYG) so if you want a better resolution you will need to save multiple images at a closer view. See my post here on how to do that, or watch the video above.
imagery1

11. Now save your image. Go to Project -> “Save As Image” and call it “Google-PSY” the PSY indicates it is in the WGS84 Pseudo Mercator Coordinate system.

12. We now need to read the saved image back in and convert it to the correct coordinate system been – MGA zone 55. Using the Warp (Reproject) from the Raster-> Projections menu.
imagery3

13. Specify the “Google-PSY.png” we saved, choose the output file, Make sure you specify the source coordinate system (WGS84 – Psuedo Mercator) and the target coord system (mine is MGA zone 55)
imagery4

14. Export it as a “Geotiff” and call it Google-MGA55 or whatever your coordinate system is. The Geotiff format will contain all the georeferencing information inside the file.
imagery5

15. Now just use MAPIINSERT command (GEOREFIMG lisp for vanilla cad users) to import into CAD. Pow! Imagery. This also works well for stitching bits of imagery together.

Any questions just ask below.

Loading

Should I be using Google Imagery In My Drawings?

It seems to be bubbling up as a hot topic lately. A lot of companies are tightening up and saying no to using Google Earth imagery in drawings and reports.

It is quite a inconvenience for us as drafters, to not have access to this useful capability. Especially with fantastic tools like PlexEarth out there. If you havent seen it check it out here, they offer a free trial.
I believe companies may be disadvantaging themselves for no reason. Google has a online guide to provide users and companies with some basic information on when and how to use content they make available. Its briefly discussed below.
The guide
The simple to follow “content restriction” guide allows users to determine if you can use imagery for any particular purpose. If you can use imagery for the selected purpose, it imposes several small requirements that must be met when doing so, such as attributing sources and restrictions on tiling etc.
The guide can be found here.
Interpretation of the Guide
My menu selections from the guide were…
“Google Earth… Print Distribution … Professional Use”
The first statement made under the section “Using Content for Professional Documents” is…
“You may use Google Maps and Google Earth for reports, presentations, proposals, and related items professional documents. We request you still retain attribution and follow the other guidelines.”
Clearly indicating that it is possible to use Google Imagery in our reports and presentations. However the real issue here is whether we are allowed to use imagery as a background for linework and contours etc.
 
Restriction on using imagery as an underlay
I’m assuming the restriction is based on the section entitled “Ensuring Print Reflects Online”. The section states…
”When using Maps/Earth Content in print, any images used must reflect how they would look on online. For example, you are not allowed to make any changes (e.g. delete, blur, etc.) to our products that would make them look genuinely different. This includes, but is not limited to, adding clouds or other natural elements, altered user-interfaces, and modification that do not appear in the actual product.
However, Google offers a Styled Maps API which allows you to edit the colors of individual map components as well as toggle visibility for each component (i.e. change water to purple and make roads invisible).”
I believe what is trying to be stated here is that the imagery, as an object, should not be modified to appear as if it is genuine. In other words, we should not be fudging the image to look like it has no trees or place fake cloud cover over a tributary.
“not allowed to make changes… that are genuinely different”.
Adding linework and contours on top of Google imagery is not modifying the imagery object. Linework is not only separate from the imagery electronically as an object, but clearly on plan it is not part of the imagery. In no way does it intend to distort the imagery or make it appear as if the imagery genuinely contained the linework.
Google allows a user to import all sorts of linework and shapes as KMZ to be placed on to their imagery. Why would it suddenly be restricted going the other way?
 
Restriction on tiling imagery using PlexScape
Those users of PlexScape out there that are “tiling” or “stitching” images together to make high resolution photos may find themselves in trouble. The guide has a very specific clause against it.
A solution
I believe we can continue to use Google imagery legally. Although we do need to make a few changes to ensure we comply with their content use guide.
I would like to discuss this further so we can potentially remove the restriction on Google imagery use. Please leave your comments.

Loading