Summary of the invention
The object of the invention is: for the problems referred to above existed in existing City scenarios three-dimensional modeling process, provide a kind of urban three-dimensional modeling method of sing on web, can reduce the technical threshold of user, improves modeling efficiency, reduce model maintenance cost.
A kind of urban three-dimensional modeling method of sing on web, system involved by the method comprises: parameter management module, parameter set can be imported from site for service, parameter set is managed concentratedly and edits, the AutoCAD pel and parameter set that represent city atural object can also be associated with the form of attribute block, and as required these attribute blocks be managed and edited.Site for service module, provides that style library inquiry and editor, project source document are uploaded, project status and progress queries, three-dimensional model file download function.Automatic modeling module, utilizes file format converter tools and CGA rule base, automatically and quickly generating three-dimensional models.
Parameter management and parametric modeling can be separated by the method, reduce user's technical threshold, improve modeling efficiency, and reduce modeling cost, it comprises the following steps:
At described parametrization administration module, to select from site for service according to city type of ground objects and import parameter set, parameter set is managed concentratedly and edits, and the AutoCAD pel and parameter set that represent city atural object are associated with the form of attribute block, can manage these attribute blocks and edit, after completing, save as DXF formatted file; In described site for service module, DXF formatted file is uploaded onto the server with the form of project source document, project name, rise time, treatment state and progress, source document download link and model file download link information can be checked; In described automatic modeling module, obtain the original DXF file of project that user uploads onto the server, DXF format conversion is become SHP form, and imported to CityEngine platform, read the style coding of SHP pel, retrieve and assign CGA rule file, then other parameter informations of reading SHP pel automatic modeling, derive three-dimensional model file afterwards to server, cleaning project document; Last at described site for service, user is downloaded by link and obtains final city three-dimensional model file.
The beneficial effect that the present invention has is:
1) parameter management and parametric modeling are separated by the present invention, centre is connected by Web, make user need only carry out simple parameter management operations in the AutoCAD software platform be familiar with, the parametric modeling process of complexity is then completed automatically by the automatic modeling module being positioned at service end, reduces the technical threshold of user.
2) the present invention is the cybercity construction system based on parametric technology, the high efficiency of parametric technology and dirigibility, make this system can adapt to different scale, different accuracy and dissimilar City scenarios modeling requirement, improve modeling efficiency, reduce model maintenance cost.
Embodiment
Refer to Fig. 1, the embodiment of the present invention provides a kind of functional block diagram of cybercity construction system 100.Described cybercity construction system is used for setting up, safeguard and upgrade digitized city three-dimensional model fast.
Described city three-dimensional model comprises nature in certain area coverage and space-artifact key element, as building, road, plot, greening, landscape effect, pedestrian, automobile, massif and water system.
The cybercity construction system 100 of described a kind of sing on web is realized by three modules, is parameter management module 10, site for service module 20 and automatic modeling module 30 respectively.
Described parameter management module 10 is embedded in AutoCAD software platform with the form of plug-in unit.Parameter set can be imported from site for service, parameter set is managed concentratedly and edits, the AutoCAD pel and parameter set that represent city atural object are associated with the form of attribute block, and can manage these attribute blocks and edit.
Comprise following three submodules: parameter organization and administration submodule, mainly in the form of a list parameter set is managed, can import, derive, preserve and separately deposit parameter set, can increase in lists, delete parameter and parameter is sorted, all right editing parameter value; Parameter association submodule, parameter set in AutoCAD pel and list can be associated together with the form of attribute block, and can the correlation form of parameters collection and multiple pel, the locator meams of parameter set in pel, parameter set text importing size and select whether display parameter collection; Attribute block management submodule, can revert to common pel by the attribute block of associated errors, can to list, copy property set to another attribute block, and dynamically check parameter set with mouse from an attribute block by extracting parameter collection in dependency block.
Described parameter set is the set of multiple different parameters, and each parameter comprises again parameter name, prompt text and parameter value three contents.
The process that described pel associates with parameter set is: the parameter set got parms in organization and administration submodule, generates an attribute defining objects to each parameter wherein; Determine coordinate and the display font size size of attribute defining objects; Attribute defining objects and pel are added current choice set simultaneously, and create attribute block thus.Each parameter now in parameter set becomes one and depends on pel and value can by the attribute edited in attribute block, thus achieves associating of parameter and pel.
The correlation form of described parameter set and multiple pel comprises: stand alone type, and namely each pel is associated with one group of parameter set separately, forms multiple attribute block; Monoblock type, namely multiple pel is associated with one group of parameter set jointly, forms an attribute block.
The locator meams of described parameter set in pel comprises: self-action, namely with the geometric center of pel for original point position parameter set; Hand, namely adopts the mode of man-machine interactively manually to determine the coordinate in pel of parameter set.
Described site for service module 20 can be managed concentratedly style storehouse and project library, is the intermediate medium contacted between parameter management module and automatic modeling module.
Comprise following two submodules: style library management submodule, user can browse style storehouse and inquire about, create the style storehouse of oneself, and directly can copy genre parameters collection to Installed System Memory from style storehouse, conveniently parameter set is imported to parameter management module.Keeper can create style, edit, delete and query manipulation, and can increase, deletes and revise style storehouse classification; Project library management submodule, user can newly-built, suspend, stop, inquiry and restoration project, can queried for items state and progress, and downloaded the three-dimensional model file finally handled well by the link in project.Keeper can suspend, stop, inquire about and restoration project, renewal item state and progress, and can the precedence of adjusted iterm process.
Described style is a kind of special style of city space key element.Each style in style storehouse, comprises style picture, style numbering, collection number of times, genre category, keyword, parameter set and remark information.Described style numbering is with the string representation uniquely indicated.
Described style, must comprise one for identifying the parameter of this style in its parameter set, this parameter value is the style numbering of this style.
Described project status, comprise pending, process in, complete, paused Four types.Project library management submodule comprises above-mentioned one of four states list, each list storage and all items under managing corresponding state.
Described automatic modeling module 30 utilizes file format converter tools and CGA(Computer Generated Architecture) rule base, automatically and quickly generating three-dimensional models.
Described generating three-dimensional models process: obtain the original DXF file of project that need process, according to the type of graphics primitive object in DXF file, the attribute block object of all wire is converted to the SHP formatted file of Polyline type, the attribute block object of all planars is converted to the SHP formatted file of Polygon type, then SHP formatted file is imported CityEngine platform, the style coding of each SHP pel is obtained from the attribute field of file, CGA rule file of the same name is retrieved accordingly from CGA rule base, and be assigned to this SHP pel, read other parameter values of SHP pel, substitute into CGA rule file and carry out automatic modeling, finally the three-dimensional model file of generation is exported to server, cleaning project document, for next project is prepared.
Described CGA rule file is the computer script of a kind of definition and driven object generative process.Style one_to_one corresponding in rule file in CGA rule base and style storehouse, and the filename of CGA rule file is encoded consistent with the style of corresponding style, to facilitate the rule of later stage in CGA rule base oppositely needed for retrieval.
Refer to Fig. 2, be the modeling method process flow diagram described in cybercity construction system 100 of the present invention, described modeling method comprises the following steps:
Step 1: on the pc machine of access services website, WWW browser can be used and input correct reference address (as http: // 192.168.3.212/login.aspx) and can login interface be shown at any one.The username and password of system default is client.
Step 2: first will enter interface, style storehouse behind login service website.Can retrieve satisfactory style by search box, click the details that arbitrary style icon can check this style, style can be added in the style storehouse of oneself by user as required.Afterwards the parameter set of required style is imported in the parameter management module of AutoCAD, and this parameter set is associated with the form of attribute block with the AutoCAD pel representing city atural object.
The details of described style comprise: style picture, style numbering, collection number of times, genre category, keyword, parameter set and remark information.
Step 3: constantly repeat previous step, treats that until all the pel of modeling is all associated with relevant parameter collection.Can modify to these attribute blocks as required afterwards, inquire about, copy and recovery operation.Finally preserve into DXF formatted file.
Step 4: Sign-On services website again, enters project library interface.A newly-built project, uploads above-mentioned DXF formatted file as project source document, cuit title, project overview and remark information.Now this project just enters the pending list of project library, waiting for server process.User can inquire about the details of this project, state and progress.
Step 5: automatic modeling module obtains the original DXF file of project of server end, DXF format conversion is become SHP form, imports to CityEngine platform afterwards, to go forward side by side line parameter modeling, again three-dimensional model is exported to server, finally clear up project document, for next project is prepared.
Described parametric modeling process: the style coding obtaining each SHP pel from the attribute field of SHP formatted file, CGA rule file of the same name is retrieved accordingly from CGA rule base, and be assigned to this SHP pel, read other parameter values of SHP pel, substitute into CGA rule file and carry out automatic modeling.
Step 6: user's Sign-On services Website Module, enters project library interface, finds respective items object download link completing in list, downloads the city three-dimensional model file generated.
Segment each functional module below, explain concrete function of the present invention.
Refer to Fig. 3, be the parameter management module 10 of a kind of cybercity construction system 100 of the present invention, comprise following submodule flow process: 1) parameter organization and administration, can import, derive, preserve parameter set, can edit content of parameter; 2) parameter association, associates the AutoCAD pel representing city atural object with the form of attribute block with parameter set; 3) attribute block management, can to attribute block modify parameter value, dynamic queries, copy parameter set and revert to common primitive operation.
Refer to Fig. 4, for the site for service module 20 of a kind of cybercity construction system 100 of the present invention, comprise following submodule flow process: 1) project library management, user's new project, upload project source document, afterwards can the state of queried for items and progress, city three-dimensional model can be downloaded to eventually through link after band service end process completes, keeper can queried for items details, edit item state and progress, searching user's information and management three-dimensional model file; Style library management, user can inquire about style storehouse, browses the details of style, derives the parameter set of style, manage the style storehouse of oneself; Keeper can add new style, edit style details and style of management storehouse type.
Described style, have unique style coding, its naming rule can only comprise: 0-9, a-z, A-Z, _.
Refer to Fig. 5, be the automatic modeling module 30 of a kind of cybercity construction system 100 of the present invention, comprise the following steps: 1) import a project source document; 2) convert file formats, becomes SHP formatted file by DXF file transform; 3) SHP formatted file is imported CityEngine software platform; 4) the style coding of SHP pel is obtained; 5) retrieve and assign CGA rule file; 6) read other parameter values and substitute into CGA rule file; 6) automatic modeling; 7) reduced model file is to server; 8) project document is cleared up.
Described CGA rule file, its filename is encoded consistent with the style of style corresponding in site for service.
Described retrieval also assigns CGA rule file process: from SHP pel, 1) read the parameter value representing style coding; 2) according to this parameter value, from CGA rule base, CGA rule file of the same name is searched for; 3) the rule file parameter of this pel is appointed as this CGA rule file, thus makes this pel can carry out automatic modeling with reference to this rule file.
In a word, the implementation method of the cybercity construction system of sing on web can by parameter management and parametric modeling separated, centre is connected by Web, domestic consumer is enable to be absorbed in conceptual design and parameter management, the parametric modeling of complexity is then encapsulated in service end that is increasingly automated, procedure, thus reduce the technical threshold of user, improve cybercity construction efficiency, reduce model maintenance cost.