Summary of the invention
In order to solve the above technical problems, the present invention provides a kind of method of CAD diagram paper modeling underworkings three-dimensional scenic,
Include:
By being read out to the data in CAD diagram paper, the data type read is distinguished in analysis, by different types of data format
It turns to and draws the 3-D graphic basic data that scene needs;
By graphics engine rendering three-dimensional graphics basic data, tunnel threedimensional model is obtained, is realized by graphic editor to three
Tie up the editor of Roadway model.
It wherein, is binary system arrow by the Data Format Transform of CAD diagram paper before being read out to the data in CAD diagram paper
Measure data format.
Wherein, when the data type read is distinguished in analysis, the data type is included at least and is read out from CAD diagram paper
Vertex type, the line style of type and the text type come.
Wherein, when data format to be turned to the 3-D graphic basic data for drawing scene needs, the 3-D graphic base
Plinth data refer to the graph data that graphics engine is needed in modeling, include pattern classes, dimension of picture, figure coordinate.
Wherein, when graphics engine rendering circular foundation data obtain tunnel threedimensional model, the graphics engine is that can incite somebody to action
Basic data automatically processes into the code packet of graphical model, has the characteristics that cross-platform cross browser execution.
Wherein, when graphic editor realizes the editor to three-dimensional roadway model, graphic editor is that front end scripting language is opened
The graphical authoring tools of hair have the function of drawing importing, scene editor, graphic elements deployment, save data.
It is different from the prior art, the method for CAD diagram paper modeling underworkings three-dimensional scenic provided by the invention is by CAD diagram
Paper carries out underworkings three-dimensional modeling, the purpose is to improve modeling speed, reduces modeling work amount;The present invention is by by CAD diagram
Roadway model in paper is plotted as single-line model, and CAD diagram paper is converted to vector graphics format, in drawing lines data and
Node data is read out and stores;The node of storage, lines data information are formatted as 3-D graphic basic data;By lattice
3-D graphic basic data after formulaization is good is rendered to underworkings model by three dimentional graph display;Pass through graphic editor reality
Now to the editor of scene modeling.By means of the invention it is possible to the complicated processes that manual drawing tunnel is carried out using modeling software are avoided,
Achieve the purpose that improve modeling speed, reduce modeling work amount.
Specific embodiment
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention.But the present invention can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to intension of the present invention the case where
Under do similar popularization, therefore the present invention is not limited to the specific embodiments disclosed below.
Secondly, the present invention is described in detail using schematic diagram, when describing the embodiments of the present invention, for purposes of illustration only, showing
It is intended to be example, the scope of protection of the invention should not be limited herein.
Refering to fig. 1, Fig. 1 is a kind of process of the method for CAD diagram paper modeling underworkings three-dimensional scenic provided by the invention
Schematic diagram.The step of this method includes:
By being read out to the data in CAD diagram paper, the data type read is distinguished in analysis, by different types of data format
It turns to and draws the 3-D graphic basic data that scene needs.
By graphics engine rendering three-dimensional graphics basic data, tunnel threedimensional model is obtained, is realized by graphic editor
To the editor of three-dimensional roadway model.
It wherein, is binary system arrow by the Data Format Transform of CAD diagram paper before being read out to the data in CAD diagram paper
Measure data format.
Wherein, when the data type read is distinguished in analysis, the data type is included at least and is read out from CAD diagram paper
Vertex type, the line style of type and the text type come.
Wherein, when data format to be turned to the 3-D graphic basic data for drawing scene needs, the 3-D graphic base
Plinth data refer to the graph data that graphics engine is needed in modeling, include pattern classes, dimension of picture, figure coordinate.
Wherein, when graphics engine rendering circular foundation data obtain tunnel threedimensional model, the graphics engine is that can incite somebody to action
Basic data automatically processes into the code packet of graphical model, has the characteristics that cross-platform cross browser execution.
Wherein, when graphic editor realizes the editor to three-dimensional roadway model, graphic editor is that front end scripting language is opened
The graphical authoring tools of hair have the function of drawing importing, scene editor, graphic elements deployment, save data.
Exemplary, in terms of the call format of CAD diagram paper, the preservation format of common CAD diagram paper is generally dwg format, needs
It is converted into vector data form.CAD diagram paper is opened using CAD software for editing, saves as the vector data using dxf as suffix name
Format.It is required that establishing single line Roadway model, if drawing is two-wire Roadway model, need using the line tool in CAD editing machine
Along tunnel, trend establishes single line Roadway model figure layer, and single line tunnel figure layer is saved as vector data form.
In terms of handling drawing data, the drawing of vector data form is to carry out tissue in the form of text, passes through file
System reads data and is transferred in the running memory of browser in a text form.Scanning is read in browser execution memory
Drawing text data, navigate to content area, take out content part, the sweep object in content part will scan a little pair
As, lines object, text object classification storage in memory.By the data of classification storage, by corresponding transcode, by point pair
As, the attribute information in lines object, text object, is converted according to fixed format, obtain 3-D graphic basic data.
It in terms of rendering three-dimensional graphics basic data obtains tunnel threedimensional model, is rendered using graphics engine, figure
Engine reads the pattern classes in 3 D graphic data, dimension of picture, figure coordinate, the X-Y scheme in graphic editor respectively
Shape editing area and 3-D graphic editing area draw out nodal analysis method and Roadway model.
In terms of graphic editor editor's scene modeling, the graphic element in left side is dragged to the X-Y scheme of middle column
Editing area, after mouse release, code automatically records the attribute datas such as the type, size, coordinate position of figure element, these are belonged to
Property data Block block form tissue storage, be inserted into former drawing data with text formatting, it is defeated to recall file system
Out into text file, the addition and edit operation to graphic element are realized.
The method that the present invention proposes parsing mining CAD drawing carries out three-dimensional graphical modelling to underworkings.By to CAD diagram
Point data, lines data in paper, text data such as are read out, store, analyzing, formatting at the processing, and CAD diagram paper data are turned
Circular foundation data are turned to, graphics engine rendering circular foundation data is reused and obtains three-dimensional roadway model.It avoids with modeling
The complicated processes in software manual drawing tunnel have achieved the purpose that improve modeling speed, have reduced modeling work amount.
It is different from the prior art, the method for CAD diagram paper modeling underworkings three-dimensional scenic provided by the invention is by CAD diagram
Paper carries out underworkings three-dimensional modeling, the purpose is to improve modeling speed, reduces modeling work amount;The present invention is by by CAD diagram
Roadway model in paper is plotted as single-line model, and CAD diagram paper is converted to vector graphics format, in drawing lines data and
Node data is read out and stores;The node of storage, lines data information are formatted as 3-D graphic basic data;By lattice
3-D graphic basic data after formulaization is good is rendered to underworkings model by three dimentional graph display;Pass through graphic editor reality
Now to the editor of scene modeling.By means of the invention it is possible to the complicated processes that manual drawing tunnel is carried out using modeling software are avoided,
Achieve the purpose that improve modeling speed, reduce modeling work amount.
Although the invention has been described by way of example and in terms of the preferred embodiments, but it is not for limiting the present invention, any this field
Technical staff without departing from the spirit and scope of the present invention, may be by the methods and technical content of the disclosure above to this hair
Bright technical solution makes possible variation and modification, therefore, anything that does not depart from the technical scheme of the invention, and according to the present invention
Technical spirit any simple modifications, equivalents, and modifications to the above embodiments, belong to technical solution of the present invention
Protection scope.