Rocscience International Conference 2025 is going to take place in Sydney, Australia Read more

Search Results

Import DXF

Boundaries , bolts and polyline or polygon drawing tools can be imported into RS2 from a DXF file (AutoCAD Drawing Exchange File), using the Import DXF option in the Import sub-menu of the File menu. This allows users to import drawings created in AutoCAD, for example, into RS2.

Importing boundaries or support from a DXF file is equivalent to adding boundaries or support using the options within RS2 (e.g. Add Excavation, Add Material, Add Bolt etc). That is, all the same rules apply, and boundaries/bolts will be automatically checked for validity, intersected with existing entities if necessary, etc.

To import boundaries from a DXF file:

  1. Select Import DXF Import DXF icon from the Import sub-menu of the File menu.
  2. In the DXF Options dialog, select the entities you would like to import, using the checkboxes provided.
  3. At the bottom of the dialog you will notice the Run Geometry Cleanup after import check box. If this check box is selected, the Geometry Cleanup option will be automatically run after the boundaries have been imported. This check box is on by default. In general the Geometry Cleanup option is recommended, particularly after importing geometry from a DXF file.
  4. Select the Import button, and you will see an Open File dialog. Select the required DXF file and select [OK], and all entities you selected in the DXF Options dialog will be imported into the current RS2 document.

If boundaries already exist in your current RS2 document when you use Import DXF, you may see a warning message if the imported boundaries are not compatible with existing boundaries. For example, if you try to import an Excavation which is outside of the existing External boundary. So always be aware of what is in your DXF file when you try to import entities.

NOTE: if you are having problems trying to import a DXF file into RS2, make sure you read all of the information below.

Layer and Entity Types

If you are using AutoCAD to create DXF files for import into RS2, use the following conventions for layering and entity type:

RS2 Object

Layer Name

AutoCAD Entity Type

Excavation Boundary

EXCAVATION

Closed LINE / POLYLINE

External Boundary

EXTERNAL

Closed LINE / POLYLINE

Material Boundary

MATERIAL

LINE / POLYLINE

Stage Boundary

STAGE

LINE / POLYLINE

Joint Boundary (both ends open)*

JOINT_FREE

LINE / POLYLINE

Joint Boundary (both ends closed)*

JOINT_BOTH_CLOSED

LINE / POLYLINE

Joint Boundary (first end closed)*

JOINT_FIRST_CLOSED

LINE / POLYLINE

Joint Boundary (second end closed)*

JOINT_SECOND_CLOSED

LINE / POLYLINE

Structural Boundary (both ends open)*

STRUCTURAL_FREE

LINE / POLYLINE

Structural Boundary (both ends closed)*

STRUCTURAL_BOTH_CLOSED

LINE / POLYLINE

Structural Boundary (first end closed)*

STRUCTURAL_FIRST_CLOSED

LINE / POLYLINE

Structural Boundary (second end closed)*

STRUCTURAL_SECOND_CLOSED

LINE / POLYLINE

Piezometric Line

PIEZO

LINE / POLYLINE

Bolts

BOLT

LINE

Polyline drawing tool

POLYLINE_TOOLS

LINE / POLYLINE

Polygon drawing tool

POLYGON_TOOLS

Closed LINE / POLYLINE

NOTE: For an explanation of "open" and "closed" Joint or Structural Interface boundaries, see the Add Joint topic, and read the Joint End Condition description.

Importing Arcs from DXF Files

True circular arcs CANNOT be used to define boundaries in RS2. All boundaries in RS2 are made up of linear segments connected by vertices.

However, if you import a DXF file which uses true arcs to define boundaries, RS2 will automatically convert arcs into a series of linear segments, which approximate the arc.

By default, RS2 will convert an arc from a DXF file into 40 line segments. This value can be customized by the user if desired, in the Preferences dialog. Select File > Preferences, enter a new value for DXF arc discretizations and select [OK]. This value in the Preferences dialog will always be used to convert arcs read from DXF files.

DXF Epsilon

When you import a DXF file with multiple lines or polylines of the same layer type (e.g. MATERIAL entities), RS2 will automatically attempt to "piece together" individual entities to form larger polylines, if vertices overlap or are within a certain distance of each other. If two vertices are very close to each other, but have slightly different coordinates, RS2 will automatically join the entities at that location, if the vertices are sufficiently close together.

The parameter which controls this automatic merging of vertices is the DXF Epsilon. The DXF Epsilon option can be found in the Preferences dialog in the File menu. The DXF Epsilon is a relative value, which defines the critical distance between vertices, as a fraction of the maximum extent of the model. If the distance between two vertices is less than the DXF Epsilon (multiplied by the maximum extent of the model), then the two entities will be merged at that location.

A default value of DXF Epsilon is automatically in effect, however, the value can be adjusted by the user, if the DXF file is not importing correctly. In some cases, this may help, although this should be considered an advanced option which is not commonly used. Before you adjust the DXF Epsilon value, you should go through all of the troubleshooting tips listed below.

Troubleshooting Problems with DXF Import

If you are having problems trying to import a DXF file into RS2, this may be due to one or more of the following issues:

LAYER NAMES

Check that you are using the correct layer name for each entity. A summary of layer names for the various RS2 entities is given in the table above.

LAYER ASSIGNMENT

Check that entities in the DXF file are assigned to the correct layer.

EXTERNAL OR EXCAVATION POLYLINE NOT CLOSED

In RS2 the External boundary and Excavation boundaries must be CLOSED (i.e. they must form a closed polygon with the first vertex equal to the last vertex). If these boundaries are not properly closed, you will not be able to import them into RS2 as the desired entity.

    • Carefully examine your coordinate values to determine if this is the problem. Sometimes the coordinates of two vertices are very nearly equal, but are slightly different in the last decimal places. Check all vertex coordinates and make appropriate modifications to ensure that External or Excavation boundaries are continuous and closed.
    • If your model includes a ground surface, remember that you must close the ground surface polyline, by defining the "sides" and/or "bottom", as required, so that an External polyline is created which encompasses all of the model geometry. RS2 will NOT automatically close an open-ended ground surface polyline, it is up to the user to define the "sides" and "bottom" of the model, and join these to the ground surface to create the External boundary.
    • If an External or Excavation boundary in a DXF file consist of multiple lines/plines, it is best to convert it into a single, closed polyline, before you try to import into RS2. Although RS2 does attempt to join segments in a DXF file into larger polylines (see the DXF Epsilon discussion above), it is better if the user does this manually, rather than relying on the automatic capability of RS2.

COORDINATES MUST BE 2-DIMENSIONAL AND IN THE XY PLANE

RS2 does NOT support the import of 3-dimensional geometry. All lines/polylines must be 2-dimensional and in the XY plane (Z=0). If you have 3-dimensional (x,y,z) coordinates or if you have 2D coordinates which are not in the XY plane (e.g. XZ or YZ), then you will have to apply appropriate conversions and/or rotations to obtain the desired 2D geometry.

USER COORDINATES

RS2 does NOT support the import of entities defined by User Coordinate Systems (UCS). The DXF file reader will only read coordinates in the World Coordinate System (WCS) with the 2D geometry (polylines, lines) on the XY plane (Z=0).

VERY LARGE COORDINATES

If the absolute value of X and/or Y coordinates are very large, relative to the extents of the model, this may cause problems with DXF import due to numerical precision issues. Furthermore, even if the DXF import is successful, very large coordinates can lead to modeling difficulties and/or incorrect analysis results. If the X and/or Y coordinates in your DXF file are extremely large, then you should translate the entire model to the origin (0,0), to avoid potential problems. For example, if the Y coordinates of your model are around 100,000, then apply a translation which shifts the entire model by -100,000 on the Y-axis.

As a general guideline, the ratio of the maximum model coordinates divided by the maximum model dimensions (e.g. maximum X-coordinate divided by maximum horizontal extent), should be less than approximately 10,000. If this ratio is greater than 10,000, then numerical precision issues may occur, and the model should be translated closer to the origin (0,0).

MEASUREMENT UNITS

Make sure that your measurement units are either meters or feet, according to whether you are using metric or imperial units in RS2.

IMPORTING ARCS

Importing arcs from DXF files was introduced in Phase2 version 6. If you are using Phase2 version 5 or earlier versions, arcs will NOT be read from DXF files.

TOO MANY CLOSELY SPACED VERTICES

It often occurs that DXF polylines have a large number of unnecessary vertices (i.e. the geometry could be accurately defined with a much smaller number of vertices). Also, vertices are often located very close to each other, due to automatic creation of 2D sections from 3D geometry, or due to manual digitizing procedures.

Although there is no limit to the number of vertices which can be imported from a DXF file, it is a good idea to simplify the geometry as much as possible, by deleting unnecessary vertices, so that the geometry is accurately defined by a smaller number of vertices, and vertices are not extremely close to each other.

This situation does not necessarily cause problems with the import of the DXF file. The geometry may import correctly. However, closely spaced vertices can cause modeling problems in RS2, particularly with the finite element mesh. When vertices are nearly coincident, this will usually result in a poor quality finite element mesh at that location (e.g. long thin "sliver" elements). This can create problems with the numerical analysis, and in the worst case, can lead to incorrect analysis results, or a model which does not compute at all.

NOTE: After importing boundaries from a DXF file, you may want to use the Geometry Cleanup option and/or the Simplify Boundary option, to improve the model geometry by merging or removing unnecessary vertices.

RECOMMENDED DXF IMPORT PROCEDURE

If you have gone through the troubleshooting tips (above) and you are still having problems with trying to import DXF geometry into RS2, the following procedure is recommended.

    1. In AutoCAD, save each boundary entity from the main DXF file, into its own separate DXF file, by using the dxf export option in AutoCAD to pick each entity you want to export.
    2. Import the DXF files into RS2 one at a time, starting with the External boundary, then excavation, material, stage boundaries etc. Only have one box checked (e.g. excavations) in the DXF Import dialog in RS2.
    3. If you follow this simple procedure, this will often allow you to successfully import the DXF geometry into RS2, and identify the source of any problems.
    4. You might want to practice this procedure, by starting simple just to get the process down. For example: draw a simple external boundary in AutoCAD, export it. Draw a simple excavation, export it. Draw a couple of material boundaries, export them. Now bring them into RS2 in the same order, one at a time.

SAVE AS DXF VERSION 12

In some cases, it may help if you save the DXF file as (AutoCAD) version 12 or 13. However, this is not recommended unless you have tried all of the above options first.

Rocscience logo, click here to return to the homepage Portal Account Portal Account Log In Log Out Home Shopping Cart icon Click here to search our site Click here to close Learning Tech Support Documentation Info Chevron Delete Back to Top View More" Previous Next PDF File Calendar Location Language Fees Video Click here to visit Rocscience's LinkedIn page Click here to visit Rocscience's YouTube page Click here to visit Rocscience's X page Click here to visit Rocscience's Facebook page Click here to visit Rocscience's Instagram page Click here to visit Rocscience's Reddit page Bookmark Network Scroll down for more Checkmark Download Print Back to top Single User Multiple Users RSLog RocFall3 CPillar Dips EX3 RocFall RocPlane RocSlope3 RocSupport RocTopple RS2 RS3 RSData RSPile Settle3 Slide2 Slide3 SWedge UnWedge RocTunnel RocSlope2 Commercial License Education License Trial License Shop safe & secure Money-back guarantee