Sketchup having problems reading heights from DWG file

I’m having problems when I import DWG files that contains 3d lines such as contours.
Many of the lines end up with 0-elevation, but not all.

First off you’d be better to limit the layers in CAD to just what you want - like the contours.
Then import those into a SKP.
If they are flat in the CAD version they will be in the SKP.
Just because the CAD author includes a height text tag in the CAD version it doesn’t mean the contour is at that height in 3d.
Some CAD makers flatten their contours making them not very useful for 3d work.
If it’s a survey ask the maker for true 3d data.

Otherwise, moving contours up/down in 3d in CAD [or SKP] is needed.

This is basically the same as what @TIG wrote: make sure your source is a 3D contour model, not a 2D contour map.

I made the CAD drawing myself and as you can see in the image below the contours has an assigned elevation. The position is basicly the same as in the first image.
For some reason these heights doesn’t go into SketchUp when i import the file. But some of the other elevation properties do.

By the way I had no problems doing it this way in previous versions of SketchUp.

That is strange, since so far as I know the dwg importer wasn’t changed in 2017 from previous versions…something else is coming into play.

Well it actually started occuring around 2015.

Can you share a sample DWG file with the contours?

Sorry, but we can’t see that those contours have an ‘elevation’.
The screenshot looks like an iso-view, but if it’s viewed ‘side on’, then what is seen in CAD ?
The buildings’ footprints seem to be different to the contours’ z[s] ?

If you select one of the contours what does its properties report show in terms of ‘elevation’ ?

SketchUp imports the geometry from the CAD file exactly as it is.
It will not adjust any lines’ ‘z’ values…

The problem doesn’t appear when i save as dxf file
This might be a solution but the file size increases 10x

What are you using to make the DWG file ?
A DXF is a text-file so it will always be a lot bigger than a DWG - although it can be ZIPped more to reduce its size…

It might be easier to see the elevation of the contours in this image.
As you can see in the properties to the left the selected contour has an elevation of 41 meters.
I purposely make some of the geometry at z=0 so I can use the “make faces” plugin.

I’m using a autocad plugin that reads the .sos file format which is a standardized Norwegian map format

OK, so the contours are elevated in 3d in CAD.
Can you let us have a version of the DWG - perhaps cut down to just the contours themselves and ZIPped.

So the plugin, does it use proxies ?

test.dwg (942.3 KB)
Here is an example

I confirm that your contours do indeed have elevations [1m increments] in the DWG.
But when imported into a SKP they are all flat at z=0 !
I tested on PC v2017.

However, I have tested it with my own DWG with some elevated LINES and they all import into a SKP correctly.
But LWPOLYLINEs as used for your contours in the DWG all import without their elevation.

I also saved these ‘faulty’ DWGs as DXFs and then they import just fine with the correct elevations for LWPOLYLINEs !

Also if I filter to select all of the LWPOLYLINES on the contours’ layer and Explode them into lines, then that DWG imports into a SKP correctly too !

So in conclusion, the DXF importer works properly and keeps imported LWPOLYLINEs’ elevations, BUT the DWG importer is faulty and imports LWPOLYLINEs with their elevation at z=0 irrespective of their true elevations !!!

This is a mega-bug !

I’ll ping someone to get a bug-reported: @ChrisFullmer

When I imported your unmodified file, what happened was just as TIG said. I then opened it in AutoCAD and moved everything near the origin (it was located more than 300 kilometers away). When I imported this, the contours were up in space just as they should. So the issue is about model extents.

I knew it was not about LWPOLYLINES, as practically no one has used the old style POLYLINE entity since the former were introduced more than 20 years ago, and unless you change a system variable, these is what AutoCad produces by default.

I tested it also with SketchUp 2016,2015 and 2014 with the same results.



Well spotted, I didn’t look at the CAD DWG file’s ‘extents’ !

So to recap…
If the CAD DWG data is many kilometers away from the origin you get the issue with the contours’ LWPOLYLINE elevations being ignored - even if you ignore the CAD origin in the SKP import.

But this does beg the question…
Why does saving the DWG as a DXF create a file that then imports into a SKP with not issues - the ‘extents’ of the geometry are still huge !
So it seems that the DWG importer is suspect compared to the DWF importer

Although moving the DWG’s origin to a less ridiculous location sidesteps the issue, it should not happen anyway - and does not happen with a DXF that is in all other respects equivalent…

I think that what is ignored is the elevation of polylines that are “flat”, that is, all vertices have the same Z value. The features that follow the terrain. like roads (I think), that are 3D import correctly.

Obviously this is a bug, too. I wonder if it has to do with some tolerance issue - the height differences amount to something like 1/20 000 of the extents of the whole file.