Exterior3D - FAQ: Import Drawing

Exterior 3D FAQ: Import Drawing

Exterior3D Frequently Asked Questions (FAQ)
Import Drawing
January 28, 2004

As more people have been using or trying Exterior3D, we realize the need to give clearer information and instructions regarding the importing of drawing files into Exterior3D.

The purpose of this document is to assist in the process of creating a terrain model from data in an imported drawing.


This document is based upon Exterior3D version 1.0.1a6 (January 28, 2004). If you have an older version, you may acquire a newer one at no additional charge, either by asking us, or by downloading from our web site (demo only).

Exterior3D's main purpose is to create a digital terrain model (DTM). The typical source of data for Exterior3D is a CAD drawing, which is usually in either the DWG or DXF format.

QUESTIONS AND SOLUTIONS:

COMMON QUESTIONS AND PROBLEMS

1) How do I get a drawing file into Exterior3D?
2) How do I get a paper contour map into Exterior3D?
3) How do I get a scanned image into Exterior3D?
4) How should I trace a map?
5) Why doesn't the topographic data appear after I import a file into Exterior3D?
6) Why does too much information appear after I import a file into Exterior3D?
7) Why is all the topographic data at elevation zero after I import a file into Exterior3D?
8) How do I make a model after importing a drawing into Exterior3D?
9) Why does each contour line appear to have hundreds or thousands of vertices (points) along its length
?

SOLUTIONS
1) How do I get a drawing file into Exterior3D?
If the file is a DWG file (such as from AutoCAD), or a binary DXF file, you will definitely have to prep the file. If the file is a text DXF file, but contains information other than topographic data, you will also have to prep the file. If the file is in some other format, you probably have a means to export it from the original program in DXF format. Once the file is ready to be imported, you choose File > Import DXF... (See instructions below.)


2) How do I get a paper contour map into Exterior3D?
You would typically have to trace or scan it, though tracing will probably give better results. To trace, you would probably need to use a tablet onto which you place the paper, along with some software which can make use of the tablet (some CAD programs can do this). (See the question on tracing a map.) Or you can scan the map; see the question on getting a scanned image into Exterior3D. (See instructions below.)


3) How do I get a scanned image into Exterior3D?
A scanned image is sometimes referred to as a bitmap, a PICT file, a JPEG file, etc. Import the scanned image into a program, such as Adobe Illustrator or some CAD programs, in which you can display the scanned image in the background while you trace over the contour lines. See the question on tracing a map. (See instructions below.)


4) How should I trace a map?
When tracing, you will probably get better results if you create polygons by moving the cursor along each contour line, clicking only where the contours curve and at the ends of straight sections. Fewer clicks make for a simpler model. If you trace by just moving the cursor along a line while the software adds vertices, you may end up with an excessive number of vertices, especially along straighter segments. Some programs can automatically trace lines in an image, but results may vary greatly depending upon many factors. Some programs will allow you to assign elevations as you trace. Converting from an image into a collection of polygons is sometimes referred to as vectorizing: getting from a raster image (such as a bitmap) into a vector format (a collection of coordinates). (See instructions below.)


5) Why doesn't the topographic data appear after I import a file into Exterior3D?
Topographic data is usually represented by polylines and/or points in a DXF file. Sometimes, however, other entities are used in the original drawing file. Exterior3D can utilize the following entities: POLYLINE, LWPOLYLINE, 3DFACE, LINE, and POINT. You may be able to convert your data types inside of a CAD program. (See instructions below.)


6) Why does too much information appear after I import a file into Exterior3D?
Most drawings are organized into layers, and most CAD programs allow you to hide layers so that only the desired information appears. Exterior3D does not yet have any system of layers, so all information which it understands when importing will be displayed. If the non-topographic information is separated geographically from the topo data, or if the non-topo information can be separately selected, then it may be simple enough to delete this information. Or you may be able to select only the topographic data, and create a DTM from only it. But in most cases the topo data will overlap other information. You should prep the file so that only the topo data will be in the DXF file. (See instructions below.)


7) Why is all the topographic data at elevation zero after I import a file into Exterior3D?
You can select polys and points in Exterior3D and set their elevations by choosing Object > Change Elevation.... If you traced contours from an image, you may be able to easily assign elevations as you trace. If you expected the DXF file to contain non-zero elevation information, then perhaps the information was lost in translation. Some programs have options you can choose from when exporting which will determine whether elevation information is exported along with x and y coordinates, or whether polygons should be exported as 2D objects or 3D objects (you should choose 3D). (See instructions below.)


8) How do I make a model after importing a drawing into Exterior3D?
Select the data which you want included in the model, then choose DTM > Create DTM. When you import a file, all imported objects are automatically selected. If the file which you imported contains only topographic data, then you don't have to bother selecting or deselecting anything. (See instructions below.)


9) Why does each contour line appear to have hundreds or thousands of vertices (points) along its length?
Try to clean this up at its source. Some programs which automatically trace or allow you to trace contours will place unnecessary vertices, even along straight lines. Exterior3D doesn't yet have a means to filter polys, but your CAD or tracing program may. See the question on tracing a map. (See instructions below.)

These solutions refer to the following information where detailed instructions are given, such as prepping a file. It is essential that you take a few minutes to prep your file. If something is missing or not clear in this document, please contact us.


REFERENCE SECTION

DWG AND DXF:
DWG is AutoCAD's native format; DXF (Data Interchange Format) is the most common industry-standard for transferring between CAD and similar programs. DXF was created by Autodesk, the maker of AutoCAD. DXF files can be either binary or text (ASCII). Exterior3D can only read a text DXF file. You can use any text editor, word processor, or even a spreadsheet program to determine which kind a DXF file is: open the file; if the text is readable, and starts with a zero in the first line and the word "SECTION" in the second line, then it is (apparently) a valid text DXF file.

There have been various versions of DWG and DXF over the years. Exterior3D can read text DXF of any version created in the past decade, starting with AutoCAD Release 14 (or even Release 11). The typical version which appears nowadays is from AutoCAD 2000.


FILENAME SUFFIX:
The filename of a DWG file typically has a suffix of dwg (e.g., MyFile.dwg), while a DXF file is typically named something like MyFile.dxf. This system of filename suffices is used by both Windows and Macintosh. In Mac OS X, the suffices are often hidden from view in the Finder. But if you select a file in the Finder, then choose File > Get Info, you can see the full filename and also choose whether the suffix should be hidden or not.


DRAWING FILE CONTENTS:
The biggest issue has been that these drawings typically contain a lot more than just topographic data. We've been sent files with over a hundred layers, only one or two of which have topographic data. Exterior3D doesn't do layers yet, and so all of the data goes into one big pot.


RECOMMENDED PROCEDURE:
Here are the general steps which you should probably take in order to get data from a drawing into Exterior3D. Specifics will be dealt with in their own sections below.

* If the file is not a text DXF file, prep the file before importing into Exterior3D.
* If the file is a text DXF file, but contains more than just topographic data, prep the file before importing into Exterior3D.
* Import the file into Exterior3D. A sheet will appear during this process to indicate progress.
* Note that a sheet drops down to summarize how many DXF entities have been read, and how many objects have been created.
* Note that, after you dismiss the sheet, all data in the drawing will be displayed in the window, and all the data which you just imported will be selected.
* If you don't want to create a DTM from all the imported data, then you'll need to either deselect some data, or deselect all and then select only that data from which you want to create a DTM. You may also want to delete some data.
* Choose DTM > Create DTM to create a DTM from the selected data.


PREPPING BEFORE IMPORTING:
There are various steps which you may or may not need to do in order to prep a drawing file for importing into Exterior3D. Skip whatever step doesn't apply to you.

* Choose a program to use, such as SketchUp, VectorWorks, etc. The program must be able to import your drawing file, and must be able to export a text DXF file.
* Import the file.
* Ascertain which layer(s) contain the topographic data. The data may be in the form of contour lines, in which case there may be two layers: one for index contours and one for interval contours. Or the data may be in the form of points. Or it may be in both forms, and you'd have to choose which type to use to avoid duplication.

Now the instructions depend upon which program you are using. We are not experts in these other programs; if these instructions appear incorrect, please inform us.

If using SketchUp to prep:
* Bring all data into view, such as by clicking the Zoom to Extents tool in the tool palette.
* Hide the layer(s) containing the topographic data.
* Delete all other data in the drawing.
* Delete all layers other than the ones containing the topographic data. (This step is optional. You cannot delete Layer0.)
* Make all layers visible again.
* Check that the only data which appears is data which you want to import into Exterior3D.
* When choosing to export a DXF file, export the model, not the image, and export edges, not faces.
* The exported DXF file will be a text DXF file.

If using VectorWorks to prep:
* Hide all layers other than the one(s) in which the desired topographic data appears.
* When exporting the file in DXF format, ensure that you are exporting a text DXF file.
* Choose appropriate options so that the exported data retains its 3D nature; you don't want points or polygon vertices to lose their z values. Export only the contents of the visible layers.


REVIEWING BEFORE IMPORTING:
You may want to review your DXF file before importing into Exterior3D. You can review it by importing into a modeling or CAD program, or into a text editor or similar program.

If you import into a modeling or CAD program:
* Scan over the data to ensure that you see all that you expect, and nothing else.
* Rotate the view, if possible, to see that the data is at various elevations (unless the terrain is supposed to be horizontal).

If you import into a text editor, look for the following:
* The text is human-readable.
* The text comes in pairs of lines. The odd-numbered lines should each contain only an integer, typically no larger than 100. This is the group code. The even-numbered lines may contain numbers or text, typically only one word if text. This is the value string.
* Find the word ENTITIES (all capital letters).
* Soon after the word ENTITIES you should find the actual graphic entities which Exterior3D will process. These may be some combination of POLYLINE, LWPOLYLINE, 3DFACE, LINE, and POINT. Each of the first two should contain two or more VERTEX entities.
* Each of the entities of interest should contain x, y, and z values. A group code of 10, 11, 12, or 13 means that the next line contains the x value. A code of 20, 21, 22, or 23 gives the y value. And the codes 30, 31, 32, and 33 refer to z values. If the z values are not there, or are all zero, then Exterior3D will view everything as being at elevation zero.


CONTACT US FOR ASSISTANCE:
If you are having any difficulty or have any questions or comments, don't hesitate to contact us.

COMPUneering Inc., 113 McCabe Crescent, Thornhill ON L4J 2S6 CANADA
Tel.: 905-738-4601; fax: 905-738-5207; support@compuneering.com; www.compuneering.com