Embodiment
Describe the specific embodiment of the present invention in detail below in conjunction with accompanying drawing, the content of embodiment is not as the restriction to protection scope of the present invention.
Unified Modeling platform of the present invention can provide a unified communication interface (namely Modeling engine calls in interface) and development environment for different Engineering Modeling software, avoid the repetition modeling caused because Engineering Modeling software is different, improve product versatility, reduce manpower requirement.
Fig. 1 shows the schematic diagram of unified Modeling platform of the present invention.As shown in Figure 1, unified Modeling platform of the present invention comprises unified Modeling engine and unified interactive interface.Wherein, described unified Modeling engine comprises modeling functions storehouse, modeling process register and drives parser.Described modeling functions storehouse comprises modeling various functions used.In the present invention, described modeling functions storehouse comprises multiple total function and multiple non-shared function.
Described total function refers to the function all in all kinds of Engineering Modeling software with the function corresponding with its title.Such as, at all kinds of Engineering Modeling software, in such as CATIA, UG, Pro/E etc., all comprise the function, the function of establishment line, the function etc. in establishment face that create point, the total function in so described modeling functions storehouse just comprises the function etc. in the function creating point, the function creating line, establishment face.For the function that this all kinds of Engineering Modeling software all comprises, corresponding total function is formed in the present invention by the respective function of all kinds of Engineering Modeling software of encapsulation, such as, the function of the total function " establishment point " in modeling functions storehouse namely encapsulate the establishment point of CATIA function, also encapsulate the function of the establishment point of UG, also encapsulate the function etc. of the establishment point of PRO/E; The function of the total function " establishment line " in modeling functions storehouse namely encapsulate the establishment line of CATIA function, also encapsulate the function of the establishment line of UG, also encapsulate the function etc. of the establishment line of PRO/E; The function of the total function " establishment face " in modeling functions storehouse namely encapsulate the establishment face of CATIA function, also encapsulate the function in the establishment face of UG, also encapsulate the function etc. in the establishment face of PRO/E.When concrete modeling, if it is CATIA that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " point " in interface is called in by clicking follow-up described Modeling engine, during the function of " establishment point " in the modeling functions storehouse of calling in described unified Modeling engine, can the function of establishment point of Automatically invoked CATIA as shown in Figure 3.If it is UG that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " point " in interface is called in by clicking follow-up described Modeling engine, during the function of " establishment point " in the modeling functions storehouse of calling in described unified Modeling engine, can the function of establishment point of Automatically invoked UG as shown in Figure 4.In like manner, if it is PRO/E that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " point " in interface is called in by clicking follow-up described Modeling engine, during the function of " establishment point " in the modeling functions storehouse of calling in described unified Modeling engine, can the function of establishment point of Automatically invoked PRO/E.In order to simplify, no longer list the function of the establishment point of PRO/E in the present invention.
Described non-shared function refers in a part of Engineering Modeling software to have the function corresponding to its title, does not have the function of the function corresponding to its title in another part Engineering Modeling software.Such as, comprise the function creating body at UG, only need call in the function creating body when user creates body in UG, and input the establishment that length can realize body.In CATIA and PRO/E etc., then there is not the function creating body, when user creates body in CATIA and PRO/E etc., need first skeletonizing, and then stretch.Therefore, the function creating body just belongs to non-shared function.Have for this part of Engineering Modeling software but the function that do not have of another part Engineering Modeling software, in the present invention, for the function of Engineering Modeling software with the function corresponding to its title, described non-shared function encapsulates it; For the Engineering Modeling software without the function corresponding to its title, carry out secondary development to its modeling process, thus form secondary development function, described non-shared function encapsulates described secondary development function.Such as, namely the function of the establishment body in modeling functions storehouse encapsulates the function of the establishment body of UG, also encapsulates the secondary development function of the establishment body developed into CATIA and PRO/E etc.When concrete modeling, if it is UG that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " body " in interface is called in by clicking follow-up described Modeling engine, during the function of " establishment body " in the modeling functions storehouse of calling in described unified Modeling engine, can the function of establishment body of Automatically invoked UG as shown in Figure 5.In the function shown in Fig. 5, represent and create the square that length, width and height are respectively 100mm.Certainly, if create the body of other size, the numeral in the function shown in Fig. 5 only need be changed.If it is CATIA that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " body " in interface is called in by clicking follow-up described Modeling engine, during the function of " establishment body " in the modeling functions storehouse of calling in described unified Modeling engine, can Automatically invoked as shown in Fig. 6 .1-6.3 the secondary development function of the establishment body developed for CATIA.Wherein, because the code of the secondary development function of establishment body developed for CATIA is longer, therefore shown by Fig. 6 .1-Fig. 6 .3 in the accompanying drawings, the content that these three accompanying drawings are shown is the complete code of the secondary development function of establishment body for CATIA exploitation.In like manner, if it is PRO/E that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " body " in interface is called in by clicking follow-up described Modeling engine, during the function of " establishment body " in the modeling functions storehouse of calling in described unified Modeling engine, can Automatically invoked be the secondary development function of the establishment body of PRO/E exploitation.In order to simplify, be no longer listed as the secondary development function of the establishment body of PRO/E exploitation in the present invention.
In addition, in order to improve the efficiency of modeling, in the present invention, described modeling functions storehouse comprises multiple modularization function further.The function that described modularization function does not comprise for all kinds of Engineering Modeling software itself, it obtains by developing, can realize the secondary development function of the modeling of the figure of given shape.Such as, at all kinds of Engineering Modeling software, the function of establishment multilayer stretched body as shown in Figure 7 is not comprised in such as CATIA, UG, PRO/E etc., and this multilayer stretched body in certain industry, right and wrong are usually, in order to improve modeling efficiency, can develop for CATIA, UG, PRO/E etc. the secondary development function creating multilayer stretched body respectively.For this all kinds of Engineering Modeling software function all not to be covered, in the present invention, respectively for all kinds of Engineering Modeling software, the modeling process of such as CATIA, UG, PRO/E etc. carries out secondary development, form secondary development function, described modularization function encapsulates described secondary development function.Such as, the function of the multilayer stretched body of establishment in modeling functions storehouse encapsulates the secondary development function of the multilayer stretched body of establishment developed into CATIA, UG and PRO/E etc.When concrete modeling, if it is UG that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " multilayer stretched body " in interface is called in by clicking follow-up described Modeling engine, during the function of " creating multilayer stretched body " in the modeling functions storehouse of calling in described unified Modeling engine, can Automatically invoked be the secondary development function of the multilayer stretched body of establishment of UG exploitation.If it is CATIA that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " multilayer stretched body " in interface is called in by clicking follow-up described Modeling engine, during the function of " creating multilayer stretched body " in the modeling functions storehouse of calling in described unified Modeling engine, can Automatically invoked be the secondary development function of the multilayer stretched body of establishment of CATIA exploitation.In like manner, if it is PRO/E that user configures modeling Engineering Modeling software used by " software merit rating option " described later, " multilayer stretched body " in interface is called in by clicking follow-up described Modeling engine, during the function of " creating multilayer stretched body " in the modeling functions storehouse of calling in described unified Modeling engine, can Automatically invoked be the secondary development function of the multilayer stretched body of establishment of PRO/E exploitation.Because the secondary development function of the multilayer stretched body of establishment developed for CATIA, UG and PRO/E is long, in order to simplify, be no longer listed as the secondary development function of the establishment polylayer forest of CATIA, UG and PRO/E exploitation in the present invention.But those skilled in the art, according to the shape of described multilayer stretched body, by language such as C, just can develop described function easily.The particular content of secondary development function and how specifically to work out secondary development function be not emphasis place of the present invention.
In addition, in order to make described unified Modeling platform have opening, being convenient to different users and carrying out secondary development to this Modeling Platform, thus make this unified Modeling platform more meet the demand of user, described unified Modeling engine comprises com interface further.User can utilize different development languages by described com interface, and such as VBS, Python etc. operate the function in described modeling functions storehouse, such as each non-shared function, and modularization function etc., and carries out secondary development on this basis; Or user can directly with the modularization function needed for various different development languages exploitation oneself, thus make unified Modeling platform more meet the demand of user.
Basic model unit in described modeling process recorder trace modeling process and the relation between described basic model unit thus form neutral model file.Particularly, described neutral model file is the file of form of described unified Modeling platform oneself regulation, is used for description model.Described neutral model file comprises the content of two types, the basic model unit related in the content record modeling process of a type, such as point, line, surface, node, body etc.; Relation between basic model unit involved in the content record modeling process of another kind of type, namely records the lineage relationships between described basic model, and such as certain point is the starting point of certain line, and another point is terminal of this line etc.Fig. 8 shows a kind of exemplary neutral model file.In the neutral model file shown in Fig. 8, wherein, the Configure in " Configure:CATIA " represents the information of configuration, and the key word configured here is CATIA, and the Engineering Modeling software namely configured by " software merit rating option " described later is CATIA.What the Model in " Model:TestModel1 " represented is model, and the name of model is called " TestModel1 "." Geometry " represents set graphical-set, and point, line, surface described below are all here preserved.Point in " Point:start1100,200 " represents a little, and the name of point is called start1, has numeral 100 and 200 to represent two coordinates of this point below.Line in " Line:line1 start1, end1 " represents line, and the name of line is called line1, is represented two coordinate points forming this line below by two point start1 and end1.Surface presentation surface in " Surface:sur1 start1, end1, plane1 ", the name in face is called sur1, and three somes start1, end1 and plane1 below represent three points determined required for this face.In this neutral model file, the basic model unit recorded comprises some start1, end1 and plane1, line line1 and face sur1.The starting point of to be a start1 be the pass between the described basic model unit recorded line line1, some end1 are the terminal of line line1; Point start1, end1 and plane1 are three points determining face sur1.In the present invention, the data in neutral model file are preserved with the form of object class, is saved in object-oriented database, and neutral file is a binary file.
Described driving parser is for resolving described neutral model file and performing described neutral model file based on the function in described modeling functions storehouse in the Modeling interface of the Engineering Modeling software of configuration.Particularly, such as, after employing CATIA creates certain model, need if follow-up to use UG to show above-mentioned model, now, do not need to re-create described model in UG, and only need configure UG by " the software merit rating option " in unified interactive interface, and open the neutral model file shown in Fig. 7 by the open button in unified interactive interface described later.So, described driving parser can according to the such UG shown in described neutral model file Automatically invoked Fig. 9 in create the function in point, line and face, thus show above-mentioned model in the Modeling interface being loaded in the UG in " graphical display area ".Like this, the model set up in a kind of Engineering Modeling software, can use in different Engineering Modeling software, and do not need to carry out repetition modeling in often kind of Engineering Modeling software, alleviate workload, reduce cost, improve the versatility of unified Modeling platform simultaneously.
Multiple method can be adopted to develop described driving parser.Such as, use Python the script such as TCL develop described driving parser, due to Python the script such as TCL inherently there is resolver, so the advantage of this kind of method to write resolver, but its shortcoming be various Engineering Modeling software interface to Python the support of TCL more weak.In addition, can also use document analysis+COM method, the method Consumer's Experience is good, allows to adopt different tool software to do.In a word, multiple existing method can be adopted to develop described driving parser, which kind of method of concrete selection and how to develop described driving parser be that the technology that those skilled in the art grasp according to oneself is selectable, is not here described in detail.
Fig. 2 shows the schematic diagram of the unified interactive interface of unified Modeling platform of the present invention.As shown in Figure 2, described unified interactive interface comprises software merit rating option, Modeling engine calls in interface and graphical display area.Wherein, described software merit rating option for configuring modeling Engineering Modeling software used, such as, user according to oneself familiarity to various Engineering Modeling software, can the software such as option and installment CATIA, UG, PRO/E as oneself Engineering Modeling software.Described graphical display area for loading the Modeling interface of configured Engineering Modeling software, such as, if user by described software merit rating option configuration CATIA, will the Modeling interface of CATIA be loaded in so described graphical display area; If user is UG by described software merit rating option configuration, in so described graphical display area, will the Modeling interface of UG be loaded into, etc.Described Modeling engine calls in interface for connecting with each function in the modeling functions storehouse of described unified Modeling engine, realizes calling each function.Interface is called in by clicking described Modeling engine, can call in and call in the corresponding function of interface to described Modeling engine in the modeling functions storehouse of described unified Modeling engine, such as, interface " point " is called in by clicking Modeling engine, according to the Engineering Modeling software that user configures, correspondingly can call in the function of the establishment point of the Engineering Modeling softwares such as CATIA, UG or PRO/E, and create a little on corresponding Modeling interface; Equally, calling in interface " line " by clicking Modeling engine, according to the Engineering Modeling software that user configures, correspondingly can call in the function of the establishment line of the Engineering Modeling softwares such as CATIA, UG or PRO/E, and create line on corresponding Modeling interface; Etc..
In the present invention, as shown in Figure 2, unify interactive interface and be divided into menu bar and key frame.Described menu bar is provided with the button such as " software merit rating option ", " newly-built ", " preservation " and " opening ".By described " newly-built ", " preservation " and open button, can realize file newly-built, preserve and open.Meanwhile, key frame is partitioned into left and right two parts.Left-hand component is that Modeling engine calls in interface, calling in interface, can call in corresponding modeling functions easily by clicking these Modeling engine, thus creates out the model oneself needed easily.The right is graphical display area, and the Modeling interface of the Engineering Modeling software of its load configurations, facilitates user modeling and observation.
In the present invention, the design of whole unified interactive interface uses Microsoft Visual Studio.The menu bar control that menu bar uses software to carry, configures some push button function oneself needed to menu bar, such as newly-built, opens, preserves etc.Key frame selects one to split control, and picture is divided into two parts, and the left side uses a tree control to show that Modeling engine calls in interface, and the right uses a container to embed the Modeling interface of (loading) Engineering Modeling software.The embedding of the Modeling interface of the Engineering Modeling software of configuration just can be completed in container on the right in time having configured.
In " software merit rating option ", select Engineering Modeling software, such as CATIA, UG or PRO/E etc., can be configured to the start-up routine of corresponding software in software.Operating software configurator when needs embed time, after wait routine has started, software handle is obtained by software process, software child form is obtained by software handle, the parent form handle of child form is set to the software embedded part of modeling software, the Modeling interface of the Engineering Modeling software of configuration just can be embedded in graphical display area by adjustment position.
Concrete use unified Modeling platform model of creation of the present invention time, user according to oneself to the familiarity of various Engineering Modeling software by described " software merit rating option " select oneself the Engineering Modeling software be familiar with.Due to the Modeling interface used in modeling be user itself the Modeling interface of Engineering Modeling software be familiar with, the modeling functions major part used be all user itself the function of Engineering Modeling software be familiar with, therefore, user uses easily, there is not user and be familiar with CATIA, and use the Modeling interface of UG or other Engineering Modeling software and the problem of modeling functions, and convenient for users to use, reduce the requirement that can use various engineering modeling software to user.
After having created model, described unified Modeling platform can produce two kinds of destination files, and a kind of is the destination file of configuration software, such as, if that configuration is CATIA, the modeling result software of CATIA is so produced, if that configuration is UG, so produce the modeling result software of UG.Another kind is neutral model file, and neutral model file is the file of form of unified Modeling platform oneself regulation, is used for description model.If when needing the model using another kind of type later, only need open described neutral model file, and not need modeling again, expand the versatility of model.
The use procedure of unified Modeling platform of the present invention is described below in detail with an example.
In this example embodiment, we suppose that user can use CATIA, and will set up the model that a name is called TestModel1.Described model comprises three somes start1, end1, plane1, a line line1, and a face sur1.Wherein, two coordinates of some start1 are respectively 100 and 200, two coordinates of some end1 are respectively 200 and 200, two coordinates of some plane1 are respectively 300 and 300, the starting point of line line1 is a start1, terminal is some end1, determines that three points of described sur1 are respectively a start1, some end1 and put plane1.
Now, user brings into use unified Modeling platform of the present invention to create above-mentioned model.User, when using unified Modeling platform of the present invention to create above-mentioned model TestModel1, first selects CATIA by described " software merit rating option " on unified interactive interface.By selecting CATIA, the Modeling interface of CATIA automatically can be loaded in described graphical display area.
Then, user's Modeling engine clicked on unified interactive interface calls in interface " point ", automatically the function of the establishment point of CATIA can be called in, user only need in the user interface of this function the title " start1 " of input point and two coordinates 100 and 200, just can complete the establishment of first some start1; Then, user continues the Modeling engine clicked on unified interactive interface and calls in interface " point ", automatically the function of the establishment point of CATIA can be called in, user only need in the user interface of this function the title " end1 " of input point and two coordinates 200 and 200, just can complete the establishment of second some end1; In like manner, user continues the Modeling engine clicked on unified interactive interface and calls in interface " point ", automatically the function of the establishment point of CATIA can be called in, user only need in the user interface of this function the title " plane1 " of input point and two coordinates 300 and 300, just can complete the establishment of the 3rd some plane1.So far, the establishment of three somes start1, end1 and plane1 is completed.
Next, user's Modeling engine clicked on unified interactive interface calls in interface " line ", automatically the function of the establishment line of CATIA can be called in, user only need in the user interface of this function the title " line1 " of input line and starting point start1 and terminal end1, just can complete the establishment of line line1.
Finally, user's Modeling engine clicked on unified interactive interface calls in interface " face ", automatically the function in the establishment face of CATIA can be called in, user only need in the user interface of this function input face title " sur1 " and determine three coordinate points start1, end1 and plane1 of described, just can complete the establishment of described sur1.So far, the establishment of whole model is completed.
After having created above-mentioned model, described unified Modeling platform can produce two kinds of destination files, a kind of is the destination file of configuration software, the result software of the above-mentioned model of the establishment namely produced by CATIA, it is produced by CATIA software itself, can open in CATIA software later, show described model by the Modeling interface of CATIA.Another kind be by the modeling process recorder trace of unified Modeling platform, the neutral model file that describes of form specified according to unified Modeling platform oneself as shown in Figure 8.
If follow-up cae analysis instrument needs the model using UG form, now, do not need to use UG again to set up above-mentioned model.User selects UG by described " the software merit rating option " on unified interactive interface.By selecting UG, the Modeling interface of UG automatically can be loaded in described graphical display area.Then, the neutral model file shown in Fig. 8 is opened by described open button, now, described driving parser can resolve described neutral model file automatically, and according to creating the function in point, line and face in the such UG shown in described neutral model file Automatically invoked Fig. 9, thus show above-mentioned model in the Modeling interface of the UG loaded in " graphical display area ".Owing to being the above-mentioned model opened in UG, so above-mentioned model can be saved as the file of UG form by UG, thus be convenient to follow-up cae analysis instrument use.
In the present invention, by encapsulation and the secondary development of the function to different Engineering Modeling software, a unified communication interface (namely Modeling engine calls in interface) and development environment can be provided for different Engineering Modeling software, avoid the repetition modeling caused because Engineering Modeling software is different, improve product versatility, reduce manpower requirement.Meanwhile, by the record of modeling process and to the parsing of the neutral model file of record and execution, the automatic conversion of isomery model can be realized, thus improve the versatility of model.And, isomery model conversion according to being neutral model file and non-source modeling result file, and only have recorded the relation between basic modeling unit and basic modeling unit due to neutral model file, so there is not the problem of distortion in the automatic conversion process of isomery model, thus the correctness of the analysis result of follow-up cae analysis instrument can be ensured.
The content of embodiment is understood for the ease of those skilled in the art and uses the present invention and describe, and does not form restriction the present invention being protected to content.Those skilled in the art, after having read content of the present invention, can carry out suitable amendment to the present invention.Protection content of the present invention is as the criterion with the content of claim.When not departing from flesh and blood and the protection domain of claim, the various amendments carried out the present invention, change and replacement etc. are all within protection scope of the present invention.