SBM Integral s.r.o. (c)2017 En Sk

Case study of creating a 3D model of underground mine from a basic mining map

Ing. Ján Supuka, SBM Integral s.r.o. sbmintegral@sbmintegral.sk
Erik Pravda terixik@azet.sk
Tomáš Mikula, SBM Integral s.r.o. tomasho.mikula@gmail.com
Matej Supuka, expert english translation spuky@centrum.sk


WIP Work In Progress. Work still in progress.
If you would like to support this project, please donate.
We recommend using a modenrn browser with HTML5, SVG, WebGL support to view this page and other linked pages.
Google Chrome version min. 62. was used to develop this project.

ABSTRACT

The authors have developed an easy-to-use visualization of underground mines using a standard modern web browser to implement features that are otherwise available in relatively expensive software solutions
Developed tools allow users to quickly build their own visualizations and include the loading and analysis of the basic mining map geometry as well as structural and other spatially related data of the map.
Users can browse the mine from a 1st person perspective and use transparent settings, to display functions outside the open mining work in which they are virtually located. The application also provides a fly mode to control the exterior from any perspective.
The development and presentation environment used - the web browser allows you to use the application on any device that runs a modern browser with support for SVG, WebGL, Javascript.
This article discusses the methods used to create this visualization tool and plans for its future development.

INTRODUCTION

Modern web browsers incorporate a variety of technologies, suited for building well enough sophisticated applications. HTML5 components , WWW standards for 2D graphics - SVG, and WebGL for high-quality 3D rendering with the use of graphics card speed, coupled with powerful javascript core, create a platform on which 2D and 3D applications can be built until recently only with expensive specialized software packages.

This page describes the idea of ​​creating a 3D interactive underground mine from a basic mining map of 2D in AutoCAD DXF format, only the tools of a web browser, with the effort to use as many and as much information as possible on the map.
Presentation and work in a web browser is meant to show

Describing the procedure is a decoder, analyzer, and DXF format converter into the SVG 2D graphics of a web browser are prezented, they are functional enough for target needs.
To manipulate the basic mining map in SVG format, it is presented javascript SVGpzr object with PAN ZOOM ROTATE image options with other options for user-definable creation features and interactive interface in SVG graphics.
For the processing of geometric information obtained from the basic mining map are presented geometric-analytical procedures in the quest for calculation and identification turning points, crossroads and elevation points, as a superstructure over DXF to SVG converted model.
Subsequently, the WebGl 3D model generation system is presented open mines - passages from a properly arranged definition of points and links between them.
The user interface allows both movement and idealization of objects in the 2D SVG Map Map, on the other hand, the visualization and movement created by the rendered 3D model as a whole, as well as entering the 3D model in the form of a virtual walk through the bulwark.

RESOURCES

The basis for the work was the basic mine map in the AutoCAD DXF format. Initial attempts to convert to SVG using online converters did not come to the desired result, since they have lost precise geometric and textual information by converting text to SVG path elements and transferring hatch and patterned lines to separate lines.
As best came up, ACME DWG to SVG Converter MX although he also converted with these shortcomings, but at least provided the opportunity to insert to the SVG additional entity information, which served as a reference for creating your own DXF to SVG converter.

Used technologies and methods

DXF analysis

We were trying to use open source codes DXF2SVG for DXF reading and analysis, written in C ++, but after long attempts with problematic debugging, we decided to create our own DXF converter directly in browser's JavaScript dxf2tbl2svg converter . The converter loads the selected DXF file, divides the text into rows and creates pairs (tuples) by section (example):

sections : {
	BLOCKS : {offset: 18659, list: Array(240004)}
	CLASSES : {offset: 562, list: Array(241)}
	ENTITIES : {offset: 258665, list: Array(588272)}
	HEADER : {offset: 1, list: Array(559)}
	OBJECTS : {offset: 846939, list: Array(66116)}
	TABLES : {offset: 805, list: Array(17852)}
	THUMBNAILIMAGE : {offset: 913057, list: Array(167)}
}

Subsequently, it will perform a partial analysis, resulting in object fields
a_HEADER, a_BLOCKS, a_ENTITIES, a_CLASSES, a_OBJECTS, a_TABLES, a_THUMBNAILIMAGE
of which for the (identified) needs we create only marked ones.
The used base banner map is processed fairly sophisticated and for the intended purpose suitably, since the axes of open mines (OS_BD) are precisely indicated, and the measure points are grouped into blocks (INSERT) in the structure: The great advantage of such a breakthrough is the need to generate an axis of mine workings based on geometric calculations from the edges of mine workings (layer KRAJ_BD), as well as simplifying and accurately altering altitude on the basis of search the proximity of the measuring point to the mining axis, and then searching for text information in the appropriate block (i.e., it is not necessary to rely on the calculation of the proximity to the line)

converson DXF to SVG

Theoretically, the tables produced by the DXF converter could be performed geometric-analytical calculations needed for final destination - creation of 3D model, but as better to see once more how to lose in the tables, we added to the DXF converter the SVG image generation functionality, although in a limited (yet) but available version.

The SVG image can also be geometrically accurate according to the SXF converter setting information as in the DXF original, but it is preferable to use rounding. In our case of the basic mining map (3 x 4 km), we used rounding to 1 meter due to the unnecessary high precision of AutoCAD drawing (thousands of millimeters) partly due to the smaller SVG resultant code.
The SVG image can be stored independently, and can also be easily opened without need re-perform the conversion. It contains all the essential information, necessary for further processing phases.

conversion process from 2D to 3D

1st phase - loading lines of the mines

In the source DXF file, the axes were nicely plotted in a separate OS_BD layer, and were converted to the SVG file into path and line elements. Their loading into the array of lines did not cause any major problems and the result is shown by inserting a separate layer into SVG with semi-transparency for illustration created list of mining axle segments.
However, there are also inconsistencies in the DXF model - specifically forgotten axis mining corridors. We have decided not to do this by automating, but to keep adding and then repeating the entire procedure.

2nd phase - assigning points of measurement to a line segment of the mining corridors

Mine measurement points, stored in the SVG file in the BO_BANSKY_4, VB_BANSKY_4 CB_BANSKY_4 have the interconnectedness of the information, so that the geometric-information structure {x, y, height, point_number, point_tag} of a particular measurement point in the SVG image, has a unique data-inserter attribute.
Practically it means that for the correct assignment of the measuring points by the segment of the line of the axes mining corridor are enough to work with the geometry of the measuring point rings, the co-ax text information is clearly identifiable.
To measure the point on a line segment, we chose 2 meters (DISTANCE_BOD_CIARA),
When assigning points of measurement, the segments of the axis of the mines are automatically divided at the point of measurement and at the same time they are assigned the correct height-identification information.

           (S) 
             / x1,y1 segment
            / ItoS
   point o I  
          /
         / ItoE
   x2,y2/ segment
      (E)

3rd phase - Dividing Segments - Search for Intersections of the Mine Corridor Axis Lines

Although at first glance the lines of the mines' axes are nicely linked, in detail it does not, so it is necessary to find their intersections, split segments at the point of crossing to autonomous segments.

             (D) 
      (C)    / x1,y1 segment1
   x1,y1\   / DtoX
    CtoX \ /
          X x,y resu intersection
    AtoX / \  BtoX
   x2,y2/   \ x2,y2  segment2
      (A)    \
             (B)

4th phase - joining segments - searching for unattached ends of mines corridors

There was inaccuracies in the drawing of the basic mining map as well line to a point of crossing with another axis. To identify non-touch, we chose 6 meters (DISTANCE_CIARA_CIARA) and therefore geometrically if any free end of a segment is within 6 meters from another segment, we consider these segments as linked and modify x, y of the segments' coordinates.
At the same time, segments with a free end, less than 6 meters are removed at this stage.

   x1,y1    / distS
 segment1  /\ x1,y1
    distE /  \ segment2
   x2,y2 /    \ x2,y2

5th phase - generating 3D mining corridors

By the described procedure, we have obtained a substantially graphical structure - a set of nodes, ends and crossings, and the segments of mines' axes.
This information base is sufficient to automatically generate a 3D model of mining corridors using a specific WebGl engine developed for these purposes, and demonstrations of which are presented here WebGL engine references
Inconsistencies in the DXF model - incorrectly specified altitudes - are evident physically non-existent peeks in a 3D model. We have also decided this shortcoming do not try to automate, but keep the DXF fix and then repeat the whole procedure.

The inside of the model can be accessed and passed through the various mining corridors. In 1st person, the object collision detection is provided, so the avatar when moving does not penetrate the walls of the corridors.

User interface development

The SVG image of the base mining map has the following controls ready: With selectors, you can switch the visibility of layers in the SVG image, as well as search where text information is located using automatic centering on the element found. The SVG image manipulation function is provided by the developed driver SVGpzr enabling:

A simple, extensible interface is available to view the 3D model with the ability to switch the visibility of the selected image components, as well as the ability to choose a location in the area (Go to) where to transfer, either OUT (OUT) or IN (IN).
Manipulation with the entire 3D model is simple


Handling 3D in-car corridors is easy (though unconventional)

Future work

List of ideas and ideas (to date) to improve the project and achieve the form of implementation, which would be sufficient to justify not only the visual but also the technical sense of the 3D presentation the mining pit follows.

To perform the work in the list of suggested and possible additional proposals we will work according to financial and time possibilities.

Closures up to this time

Work on converting a basic mining map in a 2D graphical format into a 3D model, that the basic intention to implement all the steps only by the means of the standard (modern) The web browser is fully feasible.
For completeness, we provide a small statistic:
ItemValue
Size of DXF file14 MB
Conversion time DXF TBL SVGapp. 40 seconds
Size of generated SVG file5.2 MB
SVG file load time and 3D model generationmax. 20 seconds
Number of segments - graph edgesapp. 1900
Number of points - graph nodesapp. 1400
Due to the speed of web browser work we do not consider it necessary to think over transferring generation to server side, on the contrary, as much more advantageous we see generating a user-adjustable 3D model and image directly on the client's browser.
The basis of generation can also be pre-prepared instead of the SVG image a data structure presenting the chart with additional technological information, retrieved from the server database, but generating itself by user choice and manipulation of 2D and 3D images will be performed by the browser itself.

References

  1. ACME DWG TOOL (2017)
    ACME DWG to SVG Converter MX
  2. dxf to svg (for inkscape) converter (2013)
    dxf2svg C++ source code
  3. AutoCAD 2012 (2011)
    DXF reference
  4. Ján Supuka, supipd dxf2tbl2svg (2017)
    dxf2tbl2svg converter
  5. Ján Supuka, supipd dxf2tbl2svg (2017)
    SVGpzr handler SVG canvas
  6. Erik Pravda, (2016)
    WebGL engine
    WebGL VR tour of the mine
    animated WebGL underground mine model
  7. Timothy J. Orr1, Brendan D. Macdonald, Stephen R. Iverson, & William R. Hammond (2016)
    Development of a Generic Mine Visualization Tool Using Unity