Background technology
In mechanical manufacturing field, the processing of parts and assembling need to use substantial amounts of two-dimensional engineering graphic, and these are two-dimentional
Drawing is not ensured that.It is frequently necessary to not conformed to according to the machining accuracy occurred in the course of processing
Suitable, existing processing conditionss can't process and come or the problems such as client proposes new demand, be timely fed back to designer, in original
Modify on some X-Y scheme paper substrate plinth.This will certainly cause the quantity of the two-dimentional drawing related with same parts drastically to increase
Plus, particularly former two dimension drawing may have different editions, it is difficult to distinguish, and this is to the management of two dimension drawing and using bringing pole
The earth is challenged.
The manner of comparison of existing two-dimentional drawing, has following several:
1st, the drawing of the different editions that control is printed, manually visually carries out paper drawing comparison;
2nd, same for the two-dimentional sheet template of different editions two dimensional drafting software, carried out manually by switching different editions view
Relatively, or be input in two graphics software softwares, carry out manpower comparing compared with;
3rd, the comparison of PDF drawings, there is provided have different promptings, lacks the technique of expression of discrepancy;
4th, there is the comparison instrument of the code based on text formatting, the comparison of plain text content can only be realized.
The manner of comparison of above-mentioned two-dimentional drawing, there are the following problems:
1st, the two-dimentional drawing that print different editions is needed, and some of which version drawing is unusable, and may break in comparison procedure
The integrity of the drawing required for bad, this can cause drawing to waste, and increase cost;For or having been carried out Paperless production
The enterprise of processing, is compared by printing drawing, it is clear that be not inconsistent with development of company theory;
When the 2nd, manually carrying out drawing and compare, the parts drawing of the restriction of view window or complexity can all cause relative efficiency low
Under, and need a number of engineering staff to participate in, can cause waste of human resource, and manpower comparing compared with uncertainty very
Greatly, it is difficult to avoid the occurrence of careless omission, and then produce wrong comparative result, this is likely to result in great processing or assembling accident;
3rd, the technique of expression that accurately compare, lack discrepancy cannot be realized.
In mechanical manufacturing field, the processing of parts and assembling need to use substantial amounts of two-dimensional engineering graphic, and these are two-dimentional
Drawing is not ensured that.It is frequently necessary to not conformed to according to the machining accuracy occurred in the course of processing
Suitable, existing processing conditionss can't process and come or the problems such as client proposes new demand, and timely Feedback Design personnel, original
X-Y scheme paper substrate plinth on modify.This will certainly cause the quantity of the two-dimentional drawing related with same parts drastically to increase
Plus, particularly former two dimension drawing may have different editions, it is difficult to distinguish, and this is to the management of two dimension drawing and using bringing pole
The earth is challenged.
Content of the invention
It is contemplated that at least solving one of technical problem present in prior art.For this purpose, one object of the present invention
It is to provide a kind of two-dimentional drawing intelligence comparative approach, realizes that the difference of engineering drawing represents, helps reviewer quick, accurately fixed
The difference of the engineering drawing of position different editions;Further object is that a kind of two-dimentional drawing intelligence comparison means is provided,
The device is the comparison instrument of a two-dimensional engineering graphic, and the two-dimensional engineering graphic also includes the output of the three-dimensional softwares such as UG, CATIA
The two-dimensional engineering graphic of the two dimensional drafting such as two-dimensional engineering graphic and AutoCAD software output.
In a first aspect of the present invention, the present invention proposes a kind of two-dimentional drawing intelligence comparative approach.According to the present invention's
Embodiment, methods described step include:
S1:Input PDF needs the drawing for comparing, and enters modular converter;
S2:The drawing amplitude size of PDF is obtained, and is compared with the amplitude peak conversion critical value for limiting;If less than critical
Value, arranges mode bit Flag1=0;If more than marginal value, arranging mode bit Flag1=1;
S3:Differentiate the value of mode bit Flag1, if mode bit Flag1=0, whole PDF drawings are converted to BMP pictures in good time, hold
Row step 4;If mode bit Flag1=1, PDF drawings are divided the several parts less than conversion critical value, is changed in good time respectively
For BMP pictures;
S4:The BMP pictures for obtaining are input in comparison module;
S5:The size of BMP pictures is compared with contrast marginal value, if less than marginal value, arranging mode bit Flag2=0;If be more than facing
Dividing value, arranges mode bit Flag2=1;
S6:Differentiate the value of mode bit Flag2, if Flag2=0, execution step S7;If mode bit Flag2=1, obtained
BMP picture editings are less than several parts of contrast marginal value, execution step S7;
S7:BMP pictures are divided into grid and are identified with corresponding global variable, grid is carried out by the corresponding relation of BMP pictures
Middle individual element contrast;
S8:The global variable of the grid in the corresponding BMP pictures of scanning by contrast, and judge pixel;
S9:Acquiescence enters tiling browse mode, can select transparent overlay browse mode, dislocation browse mode, mark as needed
Note browse mode;
S10:Medial view under output comparative result view or other browse modes.
According to some embodiments of the present invention, described in step S7 using global object member variable Record Comparison result
Including pixel whether identical, whether be background colour, and whether pass through contrast.
According to some embodiments of the present invention, the step of judge pixel in step S8 it is:
If the rgb value of pixel is identical, and is background colour, in comparative result view and new, old two view, the pixel is constant;If
The rgb value of pixel is identical, but is not background colour, and in comparative result view and new, old two view, the pixel is set to Lycoperdon polymorphum Vitt;
If the rgb value of pixel is different, the part of new figure is existed only in, in comparative result view and Xin Tu, pixel is given tacit consent to
It is set to blueness;The part of old figure is existed only in, in comparative result view and old figure, pixel default setting is cyan;
Or
Required color is selected independently as needed, realize that different grids or partial coloring are highlighted and map declination heterolabeling;
And
In comparative result view and new, old view, the different pixels point for recording is refreshed with certain frequency, realize in step S7
The highlighted flickering display of difference.
According to some embodiments of the present invention, when step S6 needs that local intelligence is trickle to be compared, according to manually chosen
Reference point, obtains the grid mark of surrounding, again execution step S7, S8, and combines zoom button, realize that local difference represents.
In a second aspect of the present invention, the present invention proposes a kind of two-dimentional drawing intelligence comparison means.Reality according to the present invention
Example is applied, described device includes:
Input block, for being loaded into the picture for needing the pdf document for comparing;
Modular converter, the drawing size for obtaining PDF is compared with the conversion critical value given in modular converter, is set
The BMP pictures of size;
The BMP pictures obtained in modular converter are input to comparison module by communication unit;
Comparison module, the size for BMP pictures are compared with contrast marginal value, and BMP pictures are divided into grid and with corresponding
Global variable is identified;
Output unit, exports comparative result view.
According to some embodiments of the present invention, zoom button, rotary knob in the comparison module, is provided with.
According to some embodiments of the present invention, the output comparative result view acquiescence tiling browse mode of the output unit
View, or select transparent overlay browse mode view, dislocation browse mode view, labelling browse mode view.
The invention has the beneficial effects as follows:The present invention is the comparison instrument of a two-dimensional engineering graphic, towards with similarity
Figure, size in parts design figure and the comparison of word change, have the characteristics that:
1st, the pdf document carrier that selection overwhelming majority CAX systems can be exported is input file;
2nd, the comparative approach based on pixel, calculates the difference of drawing;
The 3rd, static state is provided, dynamically represents means;
The 4th, accurately comparing and label range prompting for local figure be provided.
The inventive method and device realize that the difference of engineering drawing represents, and help reviewer is quick, be accurately positioned different versions
The difference of this engineering drawing, the such as adjustment of processing dimension and fitted position, the change of component structural, roughness requirements are not
The differences such as the change of same, technical requirements or title bar, and exportable comparative result.
The two-dimentional drawing of the present invention intelligently compares instrument, incorporation engineering figure Vector enlarging be accurate to being compared to for Pixel-level
All over the body, there is provided dynamic difference visual effect, the coloring of different piece such as highlight at the technique of expression, and local intelligence is accurate
Relatively etc. compare means, as follows the characteristics of mainly compare display effect.
The different visual processes effects of difference section:In the Documents Comparison result of PDF, new, old drawing same section is adopted
Reduction color treatments are taken, different piece takes the method accent color that color is strengthened to process so that it is poor that user is easier discovery
Different part.
Difference section dynamic blinking visual effect:For the pdf document of the different editions of input, the system automatically generates ratio
Compared with result view, and two width figure transparency overlays be provided show, and soon, in, the difference section dynamic flicker of the multi-frequency such as slow, shape
Into strong discrepancy visual effect.Current PDF comparison softwares, its static, single display mode and are not based on a coordinate body
The comparison of system, it is difficult to substantially identify difference.
Whole figure comparison in difference and grid mark based on pixel:The contrast of whole image element, by the labelling of grid section, no
With coloring shows, identical melt show, it is possible to as needed partial enlargement, rotation, adjust grid mark size and refer to
Determine the coloring of grid so as to accurately and fast navigate to differential site.Change exhibition methods of the current PDF using original graph, solution
Its comparative result of having determined is difficult the drawbacks of finding differences.
Compare difference section local:Constant for parts drawing overall structure, some little places of parts are only changed,
Such as:Make a call to an aperture, and fully rely on the comparison of view picture figure, be it is difficult to find fine distinction, at this moment need to choose one
Individual reference point, the artificial intention of program meeting automatic identification, carries out reference point surrounding retrieval, finds similarity more than 80%, automatically
Absorption, then carries out secondary comparison, shows difference, helps find fine distinction.
Display under multiple browse modes:Two-dimentional drawing intelligently compares instrument and supports tiling browse mode, each view list
Only browse mode, transparent overlay browse mode, dislocation browse mode and labelling browse mode.Wherein, under transparent overlay pattern, newly
Figure and old figure alternately show with certain frequency that in same position difference section therein is highlighted aobvious with different marker colors respectively
Show.Under dislocation pattern, new, old figure shows in same position perspective, can quick position disparity part, therein a certain regard can be dragged
Figure, realizes the trickle comparison to new, old drawing diverse location component structural.Under various patterns variant flicker be highlighted,
Difference labelling such as shows at the technique of expression.
The inventive method and device can select different browse modes as needed, and combine the users such as scaling, rotation
Interface, to reach different user's requests and export comparative result.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not considered as limiting the invention.
A kind of two-dimentional drawing intelligence comparison means, described device include:
Input block, for being loaded into the picture for needing the pdf document for comparing;
Modular converter, the drawing size for obtaining PDF is compared with the conversion critical value given in modular converter, is set
The BMP pictures of size;
The BMP pictures obtained in modular converter are input to comparison module by communication unit;
Comparison module, the size for BMP pictures are compared with contrast marginal value, and BMP pictures are divided into grid and with corresponding
Global variable is identified;
Output unit, exports comparative result view.
A kind of detailed execution step of two-dimentional drawing intelligence comparative approach is as follows.
1st, the drawing 1 of input PDF, drawing 2, enter modular converter.
2nd, the drawing amplitude size of PDF is obtained, and is compared with the conversion critical value for setting.If being less than marginal value, if
Configuration state position Flag1=0;If more than marginal value, arranging mode bit Flag1=1.
3rd, differentiate the value of mode bit Flag1, if mode bit Flag1=0, whole PDF drawings are converted to BMP figures in good time
Piece, execution step 4;If mode bit Flag1=1, PDF drawings are divided the several parts less than conversion critical value, is fitted respectively
When be converted to BMP pictures.
4th, the BMP pictures for obtaining are input in comparison module.
5th, the size of BMP pictures is compared with contrast marginal value, if less than marginal value, arranging mode bit Flag2=0;If big
In marginal value, mode bit Flag2=1 is set.
6th, the value of mode bit Flag2, if Flag2=0, execution step 7 are differentiated;If mode bit Flag2=1, obtaining
BMP picture editings be less than contrast marginal value several parts.
7th, BMP pictures are divided into grid and are identified with corresponding global variable, net is carried out by the corresponding relation of BMP pictures
Individual element contrast in lattice.Using pixel in the member variable Record Comparison result of global object whether identical, whether be the back of the body
Scenery and whether pass through contrast.
8th, the global variable of the grid in corresponding BMP pictures by contrast is scanned, and judges pixel, concrete steps are such as
Under.
1) if the rgb value of pixel is identical, and be background colour, the pixel in comparative result view and new, old two view
Constant.
If 2) rgb value of pixel is identical, but is not background colour, the pixel in comparative result view and new, old two view
Point is set to Lycoperdon polymorphum Vitt.
3) if the rgb value of pixel is different, the part of new figure is existed only in, in comparative result view and Xin Tu, pixel
Point default setting is blueness;The part of old figure is existed only in, in comparative result view and old figure, pixel default setting is green grass or young crops
Color;Required color can independently be selected as needed, realize that different grids or partial coloring are highlighted and map declination heterolabeling.
And in comparative result view and new, old view, the different pixels point recorded in step 7 is refreshed with certain frequency, it is poor to realize
Different highlighted flickering display.
Local intelligence is trickle when comparing, and according to the reference point that manually chooses, obtains the grid mark of surrounding, executes step again
Rapid 7,8, and zoom button is combined, realize that local difference represents.
9th, acquiescence enter tiling browse mode, can select as needed transparent overlay browse mode, dislocation browse mode,
Multiple browse modes such as labelling browse mode.
10th, comparative result view or medial view other browse mode under are exported.
Although an embodiment of the present invention has been shown and described, it will be understood by those skilled in the art that:Not
These embodiments can be carried out with multiple changes, modification, replacement and modification in the case of the principle and objective that depart from the present invention, this
The scope of invention is limited by claim and its equivalent.