Background technology
In today that PC is popularized day by day, CAD electronic drawing is widely used in the numerous areas such as building, design, manufacture, and most typical example is exactly AutoCAD.Such a electronic drawing only have expressed the most general geological information usually, can not meet professional domain demand.For building field, AutoCAD just describes with the additional label character of the geometric graphic elements such as point, line, surface building element (wall, beam, post etc.), does not express the information such as three-dimensional body, reinforcing bar, template required for specialty calculating.So from general electronic drawing to the concrete model of professional domain, centre all needs the process of one " translation " " identification " in other words.Translation is in the past all by manually completing: technician knows figure, while use professional software modeling.If there is software can automatically complete this type of translation, then can greatly raise the efficiency undoubtedly.
Occurred some engineering drawing management schemes in prior art, its core concept is all based on the thinking that CRT technology and human assistance combine.The most frequently used method allows user on electronic drawing, indicate which information to describe model, and such as indicate which pel to represent the geometric configuration of model, which label character describes the character of model.Then computing machine goes the information such as pel, word analyzing user's selection automatically, finally builds out model.This identifying schemes can realize the object of Intelligent Recognition to a certain extent, but all more or less there is certain defect, is mainly reflected in following three aspects:
(1) recognition accuracy is lower.Prior art allows the disposable instruction completing all information of user, then allows the disposable process completing corresponding model of computing machine.For building element shear wall, prior art allows user is disposable chooses current layer all wall line, mark, the shear wall that then computing machine one-off recognition current layer is all.Because mutual rule is single, the prior imformation that software can utilize is not enough, makes recognition result height depend on algorithm; Again because the lack of standard of drawing, cause algorithm to face considerable loss of learning when analysis, last recognition accuracy is difficult to up to standard.
(2) recognition efficiency is on the low side.Because be one-off recognition, period of reservation of number is longer, affects experience.
(3) verification is inconvenient.For the recognition result of mistake, user lacks effective means fast processing, and final recognition result correctness needs a lot of desk checking, and practicality is inadequate.
In fact, current industrial numerous areas (such as building, design, machine-building) has such demand: according to the information of CAD electronic drawing, component goes out the component of professional domain demand, but prior art can not meet these requirements.Thus the present invention is based under mainly solving this type of current demand, propose a kind of completely new approach of the quick identification modeling based on CAD electronic drawing.
Summary of the invention
For problems of the prior art, the object of the present invention is to provide a kind of dynamic component recognition methods based on CAD electronic drawing, it contributes to improving recognition efficiency, accuracy rate, and convenient verification.
For solving above technical matters, technical scheme provided by the invention is: a kind of method of the accurate identification dynamic component based on CAD electronic drawing,
(1) 2-D data of crawl thing on CAD electronic drawing is obtained;
(2) on CAD drawing, a close neighborhood is determined according to the 2-D data capturing thing;
(3) in close neighborhood, all candidate's primitive information are searched;
(3) all primitive information of searching are sorted.
Described crawl thing is determined by the medium for man-machine interaction, and described medium comprises keyboard, mouse and touch-screen.
Described crawl thing is the current position of medium, gets two-dimensional coordinate corresponding on CAD electronic drawing according to the current position of medium.
The sequence of described primitive information is undertaken sorting by candidate's primitive information and the 2-D data that captures thing.
Described crawl thing is the motion track of medium, and the motion track according to capturing thing obtains all two-dimensional coordinates corresponding with medium motion track on CAD electronic drawing.
The sequence of described primitive information is undertaken by the information of candidate's pel and the motion track of medium.
Described close neighborhood is the 2-D data according to capturing on thing place CAD electronic drawing, and CAD electronic drawing around described 2-D data draws gets certain scope to realize.
The mode of searching of described close neighborhood be from inside to outside, from outside to inside, from left to right, from right to left, from top to bottom and from top to bottom search in mode any one.
Described by sorting to candidate's primitive information, all primitive information are presented, for the primitive information that client selects from excellent one by one to difference.
Described by sorting to candidate's primitive information, select optimum result, for feeding back to client.
Compared with prior art, the dynamic component recognition methods that the present invention is based on CAD electronic drawing proposes a kind of dynamic component recognition technology efficiently, it can not only promote the accuracy rate of identification, and What You See Is What You Get, by real time recognition result being fed back to user, user only needs recognition result decision-making, select correct result, ignore the result of mistake, thus can processing and identification result rapidly, bring better experience.Because user verifies in identifying, thus contribute to simplifying down-stream, also contribute to increasing work efficiency.
Embodiment
Core of the present invention is, dynamic component identification, and according to the current location of medium, the information such as the historical track of medium dynamically, identify the component of professional domain in real time.Position is different, and track is different, and recognition result is not identical yet.
In order to make those skilled in the art understand technical scheme of the present invention better, below in conjunction with the drawings and specific embodiments, the present invention is described in further detail.
Based on a method for the accurate identification dynamic component of CAD electronic drawing, include but not limited to following steps:
1, the 2-D data of crawl thing on CAD electronic drawing is obtained;
Described crawl thing determines for the medium of man-machine interaction by comprising keyboard, mouse and touch-screen etc., by data acquisitions such as the current position of medium or motion tracks to the historical information of described crawl thing on CAD electronic drawing, then determine to capture the 2-D data of thing on CAD electronic drawing according to the historical data capturing thing.
2, on CAD electronic drawing, a close neighborhood is determined according to the 2-D data capturing thing;
According to the 2-D data of crawl thing on CAD electronic drawing, then draw around described 2-D data and get certain scope, namely the scope that this stroke is got is close neighborhood, and the drawing of described scope gets that the 2-D data by capturing thing determines in the both sides up and down of its X-axis left and right sides and Y-axis.
3, in close neighborhood, all candidate's primitive information are searched;
Described close neighborhood obtains, then in close neighborhood, search the information of all candidate's pels, described in search mode generally to capture centered by thing, then according to similar graph traversal algorithm, successively expand from inside to outside, until more candidate's pel and text description cannot be found.Described mode of searching also comprises from outside to inside successively expansion, from top to bottom successively expansion, from top to bottom successively expansion, from left to right successively expansion, from right to left successively expansion etc. and searches mode.
4, all primitive information of searching are sorted.
According to the information of all candidate's pels searched, according to candidate's pel and text description, and the historical track information etc. of mouse sorts to all candidate's pels.
See Fig. 1, below the idiographic flow of the dynamic component recognition methods that the present invention is based on CAD electronic drawing is described in detail, specific as follows:
S101, search and capture the historical information of thing:
Described crawl thing determines for the medium of man-machine interaction by comprising keyboard, mouse and touch-screen etc., captures the historical information of thing on CAD electronic drawing by acquisition of informations such as the motion track of medium or current positions.
The 2-D data of S102, acquisition crawl thing:
According to capturing the historical information of thing on CAD electronic drawing, determining and capturing thing position residing on CAD electronic drawing, then according to capturing the position acquisition of thing at CAD electronic drawing to the 2-D data of crawl thing on CAD electronic drawing.
S103, determine to comprise the close neighborhood capturing thing:
According to the 2-D data of crawl thing on CAD electronic drawing, the CAD electronic drawing around described 2-D data is drawn and gets certain scope, this scope is exactly the close neighborhood capturing thing.
S104, the primitive information of searching in close neighborhood:
According to the close neighborhood determined, in close neighborhood, search all candidate's primitive information, till searching less than next primitive information.Describedly search the general similar graph traversal algorithm of mode, from inside to outside successively expand, until more candidate's pel and text description cannot be found, described in mode of searching also comprise from outside to inside successively expand, from top to bottom successively expand, from top to bottom successively expand, from left to right successively expand, from right to left successively expansion etc. search mode.
S105, the primitive information of all candidates to be sorted:
The historical track information etc. of the primitive information finding all candidates according to candidate's pel, text description and medium is sorted to it.
The result of S106, feedback:
Because the above-mentioned primitive information to candidate sorts, then by sequence result feedback to client.The ranking results of described feedback comprises the result of sequence is fed back to client from excellent one by one to difference, primitive information required for customer selecting, only extract primitive information optimum in ranking results further and feed back to client, determined adopt or abandon described recognition result by user.
The described dynamic component recognition methods based on CAD electronic drawing and flow process above, close neighborhood is determined by capturing the 2-D data of thing on CAD electronic drawing, then in neighborhood, search all candidate's primitive information, and all primitive information are sorted, finally by result feedback to user, facilitate user to select.Because sequence is sorted according to the historical track information etc. of candidate pel, text description and medium, thus while improve the accuracy that candidate's pel chooses, improve the discrimination of pel; As long as medium moves by the present invention in addition, the result of sequence so also changes naturally thereupon, and more convenient like this user chooses required primitive information, and school inspection is convenient.
The medium of man-machine interaction common now comprises keyboard, mouse (seeing PC computer) and touch-screen (seeing panel computer).Under the occasion of component identification, user sends prior imformation mainly through mouse and touch-screen to computer, auxiliary engine identification.Because of the method for operating of two kinds of media for this reason similar (mobile, to click), therefore hereafter all unify with mouse to be representative, repeat no more.
Be below an application example utilizing mouse Dynamic Recognition CAD electronic drawing component, it takes full advantage of the information of mouse, comprises mouse current location and mouse historical track, specifically comprises following key step;
1, first obtain 2 dimensions point P (x, y) corresponding on electronic drawing according to mouse current location, as shown in Figure 2, wherein P point is the small particles in Fig. 2.
2, the close neighborhood of appropriate scope as P point is chosen according on CAD electronic drawing around P point of the coordinate of P point, all candidate's pels and text description is searched in described close neighborhood, the similar graph traversal algorithm of described search procedure, from inside to outside successively expand, until more candidate's pel and text description cannot be found.Specifically as shown in Figure 3, wherein progressively expand outwardly in p neighborhood of a point, search candidate's pel and text description, result such as curvilinear frame in Fig. 3 lives part.
3, according to candidate's pel and text description, and the information such as the historical track of mouse, identify optimal result, feed back to user in real time, and determined adopt or abandon recognition result by user.See Fig. 4, identify optimal result as " cross " solid section based on candidate information.
The above-mentioned application example utilizing mouse Dynamic Recognition CAD electronic drawing component, according to the current location of mouse, the information such as mouse historical track dynamically, identify the component of professional domain in real time.Position is different, track is different, recognition result is not identical yet, i.e. dynamic component identification, What You See Is What You Get, feeds back to user recognition result in real time, user only needs to determine to adopt or refuse current recognition result, user only needs recognition result decision-making, thus can processing and identification result rapidly, brings better experience.
In like manner, utilize the media communication of the man-machine interaction such as keyboard and touch-screen, find the 2-D data that described medium is corresponding on CAD electronic drawing, then close neighborhood is determined, and in close neighborhood, search all candidate's primitive information, and all primitive information are sorted, and by ranking results Real-time Feedback to client, carries out confirmation by client and operate.
In sum, dynamic component recognition methods based on CAD electronic drawing of the present invention, the historical information capturing thing is determined by utilizing the medium being used for man-machine interaction, obtain capturing thing 2-D data corresponding on CAD electronic drawing according to the historical information capturing thing, and determine a close neighborhood capturing thing according to described 2-D data at CAD electronic drawing, then in close neighborhood, candidate's primitive information is searched by certain mode, till cannot finding the next one, and all candidate's primitive information are sorted, preferably by sequence result feedback to client, operated accordingly by client.According to the current location capturing thing, capture the information such as thing historical track dynamically, identify the component of professional domain in real time.Position is different, and track is different, and recognition result is not identical yet, i.e. dynamic component identification, What You See Is What You Get, improves the efficiency of pel identification and the inspection of convenient school; In addition described close neighborhood is determined by the 2-D data of crawl thing, and candidate's primitive information finds out in close neighborhood, which enhances the accuracy rate of pel identification.
Below be only the preferred embodiment of the present invention, it should be pointed out that above-mentioned preferred implementation should not be considered as limitation of the present invention, protection scope of the present invention should be as the criterion with claim limited range.For those skilled in the art, without departing from the spirit and scope of the present invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.