Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained.
The most critical design of the present invention is: determining every figure according to axis symbol by identifying the axis symbol in two-dimentional drawing
Coordinate range.
Please refer to Fig. 1 to Fig. 2, a kind of drawing dividing method, comprising steps of
S1, identify that the axis in two-dimentional drawing accords with;
S2, the coordinate range for determining every figure is accorded with according to the axis.
Wherein, the axis on architectural drawing refers to the important components such as main wall column and roof beam structure position baseline, horizontally away from
From crying " standard width of a room in an old-style house ", fore-and-aft distance is " depth ", using the lower left corner as starting point coordinate on drawing.For indicating that the symbol of axis is referred to as
Axis net.
As can be seen from the above description, the beneficial effects of the present invention are: by identifying the axis symbol in two-dimentional drawing, accorded with according to axis
The coordinate range of every figure is determined, to realize the automatic segmentation of drawing;Since axis accords with for other opposite lines, feature
Obviously, identification is high, so recognition efficiency and accuracy are higher during drawing segmentation;Meanwhile axis symbol is in every figure
Edge placement, define the coordinate range of every figure whereby, it is simple and effective so that segmentation efficiency is higher higher with accuracy;
In addition, axis symbol can also be used to judge axis and marking line, building element is judged by axis, is provided with subsequent overmolded
It is convenient.
Further, the step S1 specifically: identify circle all in two-dimentional drawing, judge it is described it is round it is interior whether
There are English character or Arabic characters, and if it exists, the circle comprising English character or Arabic character is then determined as axis symbol.
Wherein, the main composition of axis symbol includes round and number.When axis symbol, which is used to, indicates that transverse plane positions cabling, i.e.,
Arabic characters are waited including 1,2,3 ... in inside for lateral shaft symbol, lateral shaft symbol, when axis symbol is used to indicate that fore-and-aft plane positioning is walked
When line, as longitudinal axis is accorded with, and the inside of longitudinal axis symbol includes that A, B, C ... wait capitalization English character.
As can be seen from the above description, judging that axis accords with, and can rapidly and effectively determine all axis by round and number
Symbol.
Further, the step S2 specifically:
S21, all axis are identified according to axis symbol, if executing step according to the unidentified axis out of axis symbol
Rapid S22;
S22, all marking lines are identified according to axis symbol, axis is generated according to the marking line;
S23, the axis with overlapping relation is formed into an axis net, determines the coordinate range of each axis net;
S24, the coordinate range of each axis net is expanded into the first numerical value outward, to obtain the coordinate range of every figure, institute
Stating the first numerical value is any value in [500 millimeters, 3000 millimeters].
Wherein, in the two-dimentional drawing of architectural engineering, axis primarily serves the effect of positioning.For structure chart, base
All there is axis in the drawing in sheet;For architectural drawing, axis is all not present in drawing substantially.
As can be seen from the above description, after determining axis symbol, in order to further identify building element and more clearly define
The coordinate range of every figure needs to identify the axis in figure, and for the figure for having axis, axis is identified by axis symbol i.e.
Can, and for the figure of not axis, above-mentioned technical proposal generates axis by marking line, to be conducive to subsequent structure
Part identifies and more clearly defines the coordinate range of every figure.
Further, all axis are identified according to axis symbol in the step S21 specifically:
S211, each axis symbol using itself as the center of circle, with (0,1000 millimeter] in any value be radius, referred to
Lead screens range, and all line segments intersected with index wire screening range are put into index wire set to be confirmed;
S212, a line segment is selected from the index wire set to be confirmed as the first line segment, judges first line segment
It whether is unique one line segment intersected with corresponding first axle symbol, if so, first line segment is that first axle accords with index wire,
Otherwise continue to select a line segment from index wire set to be confirmed and be judged, until obtaining first axle symbol index wire;
S213, from the index wire set to be confirmed, index wire will be accorded with the first axle and be in same figure layer and extremely
It is few to accord with index wire labeled as axis in the parallel all line segments of any line segment of same figure layer;
S214, in the index wire set to be confirmed with the first axle symbol index wire be not at same figure layer or with institute
Not parallel other line segments of all line segments for stating index wire set to be confirmed successively execute step S212 and step S213, until
All line segments of the index wire set to be confirmed judge to finish, and obtain axis symbol index wire set;
S215, the line segment conllinear with any axis symbol index wire in axis symbol index wire set is labeled as axis.
Wherein, axis symbol index wire is the line that axis symbol is extended for indicating axis, and under normal circumstances, axis symbol is accorded with axis
Index wire is directly connected to, but there is also be not directly connected between the two.
As can be seen from the above description, axis symbol needs to expand certain range to screen shaft symbol index wire, to avoid omission;It is right
Intersection line segment therein is judged that Rule of judgment is that figure layer adds structure, it is ensured that it belongs to axis symbol index wire;Pass through
Wherein one intersection line segment is judged, then other line segments are directly determined by same figure layer and parallel relation, so as to
Improve recognition efficiency;And and be marked as axis symbol index wire be not at same figure layer or other phases not parallel with all line segments
Intersection section is then judged, to avoid omitting.
Further, the step S22 specifically:
S221, each axis symbol using itself as the center of circle, with (0,1000 millimeter] in any value be radius, marked
It infuses line and screens range, will intersect with marking line screening range and there is Arabic character on the vertical two sides of line segment direction
All line segments be labeled as marking line, obtain marking line set, and record marking line and axis symbol corresponding relationship;
S222, longest first marking line of length is found out from the corresponding marking line of each axis symbol, from all the
Longest second marking line of length is found out in one marking line, and the identical axis symbol of first marking line is connected in series, is obtained
Line is accorded with to same row's axis;
S223, vertical point will be accorded in the first marking line with respective shaft as starting point, accords with place towards with respective shaft
Extend auxiliary segment with the perpendicular and direction far from respective shaft symbol in the direction of row's axis symbol line, the auxiliary segment encounter from
Termination when other auxiliary segments extended in other first marking lines, and the length of the auxiliary segment is less than or equal to the second mark
Line.
Wherein, respective shaft symbol refers to the corresponding relationship accorded with from the step S221 marking line just recorded and axis, i.e., for each
For a first marking line, respective shaft symbol may be it is multiple, multiple respective shafts symbol requires to extend auxiliary segment.While length is most
The first long marking line is that the axis symbol accorded on line in head and the tail both ends with row's axis is attached, i.e., with all axis on row's axis symbol line
Symbol requires to extend auxiliary segment along vertical with the first marking line and far from oneself direction, at this point, auxiliary segment is exactly
The line segment extended from each axis symbol, as axis.
As can be seen from the above description, axis is determined by marking line, it is all to guarantee by the longest marking line of length
Axis symbol can be extended out axis corresponding with oneself, to can also generate axis by marking line on the figure of no axis
Line, to form axis net;The length for limiting auxiliary segment, extends in other figures to avoid auxiliary segment.
Further, the step S24 specifically:
Maximum abscissa the first numerical value of increase of each axis net is to obtain upper limit abscissa, each described axis net
Minimum abscissa subtract the first numerical value to obtain lower limit abscissa, the maximum ordinate of each axis net increases by the first number
Value is to obtain upper limit ordinate;The minimum ordinate of each axis net subtracts the first numerical value to obtain lower limit ordinate, often
The coordinate range for opening figure includes upper limit abscissa, lower limit abscissa, upper limit ordinate and the lower limit ordinate of corresponding axis net.
As can be seen from the above description, expanding a certain range by axis net to define the coordinate range of figure, it is partitioned into guarantee
The integrality of every figure.
Further, after the step S2 further include:
S3, all texts are filtered out in the coordinate range of every figure, judge whether the lower section of the text is provided with one
To two lines and whether include preset kind title, a word marking to two lines and comprising preset kind title will be provided with
For the map title, and record the coordinate range of every figure and the corresponding relationship of the map title.
Wherein, preset kind title such as floor information and building element information etc..
As can be seen from the above description, being judged by preset kind title and one to the two features of two lines, record is every
The coordinate range of figure and the corresponding relationship of the map title are opened, in order to subsequent modeling.
Further, after the step S3 further include:
S4, extract floor information from the map title, by the coordinate range of every figure, the map title, floor information and including
The element type of axis symbol, which is imported into tree control and XML, to be stored and is shown.
As can be seen from the above description, drawing segmentation of the invention refers to the coordinate range that every figure has been determined on software and right
One whole Zhang Erwei drawing is divided into independent figure by the information answered on software, and these figures are further through the map title, floor information
And the information such as axis symbol are corresponded to each other, in order to subsequent modeling.
As shown in figure 3, a kind of electronic equipment, including memory, processor and it is stored on the memory and can be
The computer program run on processor, the processor realize a kind of above-mentioned drawing segmentation side when executing the computer program
The step of method.
As can be seen from the above description, the beneficial effects of the present invention are: by identifying the axis symbol in two-dimentional drawing, accorded with according to axis
The coordinate range of every figure is determined, to realize the automatic segmentation of drawing;Since axis accords with for other opposite lines, feature
Obviously, identification is high, so recognition efficiency and accuracy are higher during drawing segmentation;Meanwhile axis symbol is in every figure
Edge placement, define the coordinate range of every figure whereby, it is simple and effective so that segmentation efficiency is higher higher with accuracy;
In addition, axis symbol can also be used to judge axis and marking line, building element is judged by axis, is provided with subsequent overmolded
It is convenient.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of a kind of above-mentioned drawing dividing method is realized when row.
As can be seen from the above description, the beneficial effects of the present invention are: by identifying the axis symbol in two-dimentional drawing, accorded with according to axis
The coordinate range of every figure is determined, to realize the automatic segmentation of drawing;Since axis accords with for other opposite lines, feature
Obviously, identification is high, so recognition efficiency and accuracy are higher during drawing segmentation;Meanwhile axis symbol is in every figure
Edge placement, define the coordinate range of every figure whereby, it is simple and effective so that segmentation efficiency is higher higher with accuracy;
In addition, axis symbol can also be used to judge axis and marking line, building element is judged by axis, is provided with subsequent overmolded
It is convenient.
Please refer to Fig. 1 and Fig. 2, the embodiment of the present invention one are as follows:
A kind of drawing dividing method, comprising steps of
S1, identify that the axis in two-dimentional drawing accords with 4;
S2, the coordinate range that every figure is determined according to axis symbol 4.
Please refer to Fig. 1 and Fig. 2, the embodiment of the present invention two are as follows:
A kind of drawing dividing method, on the basis of the above embodiment 1, step S1 specifically: identify institute in two-dimentional drawing
Some circles judge in circle with the presence or absence of English character or Arabic character, and if it exists, then will comprising English character or I
The circle of primary character is determined as axis symbol 4.
As shown in Fig. 2, respectively including 1-1,1-15,1-A and 1-E in circle, wherein 1 and 15 be Arabic character, A
It is English character with E, then can determines that round plus 1-1, round plus 1-15, round plus 1-A and round plus 1-E pel are axis
Symbol 4.
Please refer to Fig. 1 and Fig. 2, the embodiment of the present invention three are as follows:
A kind of drawing dividing method, on the basis of the above embodiment 1, step S2 specifically:
S21, all axis 5 are identified according to axis symbol 4, if thening follow the steps according to the unidentified axis 5 out of axis symbol 4
S22;
S22, all marking lines 6 are identified according to axis symbol 4, axis 5 is generated according to marking line 6;
S23, the axis 5 with overlapping relation is formed into an axis net, the coordinate range of each axis net is determined, in this reality
It applies in example, as shown in Fig. 2, if axis 5 will not intersect not in same figure, so can determine with overlapping relation
Axis 5 is scheduled on same figure;
S24, the coordinate range of each axis net is expanded into the first numerical value outward, to obtain the coordinate range of every figure, the
One numerical value is any value in [500 millimeters, 3000 millimeters].
It should be noted that in actual architectural drawing, due to that can be carried out by features such as figure layer and colors
Different line segments are distinguished, and in the present embodiment, for ease of description, the axis symbol index wire 7 in Fig. 2 is just arranged to dotted line;Separately
Outside, two lines section collinearly refers to that two lines section is located on the same line.
Wherein, all axis 5 are identified according to axis symbol 4 in step S21 specifically:
S211, each axis symbol 4 using itself as the center of circle, with (0,1000 millimeter] in any value for radius, obtain
Index wire screens range, and all line segments intersected with index wire screening range are put into index wire set to be confirmed;
S212, a line segment is selected from index wire set to be confirmed as the first line segment, judges whether the first line segment is only
One by one item and corresponding first axle symbol intersection line segment, if so, the first line segment be first axle accord with index wire, otherwise continue to
It selects a line segment in confirmation index wire set to be judged, until obtaining first axle symbol index wire;
S213, from index wire set to be confirmed, will with first axle accord with index wire be in same figure layer and at least be in
The parallel all line segments of any line segment of same figure layer accord with index wire 7 labeled as axis;
S214, in index wire set to be confirmed with first axle symbol index wire be not at same figure layer or with guide to be confirmed
Other not parallel line segments of all line segments of line set successively execute step S212 and step S213, until index wire to be confirmed
All line segments of set judge to finish, and obtain axis symbol index wire set;
S215, the line segment conllinear with any axis symbol index wire 7 in axis symbol index wire set is labeled as axis 5, such as Fig. 2 institute
Show, in the present embodiment, axis symbol index wire 7 is used to connect axis 5 and axis symbol 4.
Wherein, step S22 specifically:
S221, each axis symbol 4 using itself as the center of circle, with (0,1000 millimeter] in any value for radius, obtain
Marking line screens range, will intersect with marking line screening range and has Arabic character on the vertical two sides of line segment direction
All line segments are labeled as marking line 6, obtain marking line set, and record the corresponding relationship of marking line 6 and axis symbol 4;In this implementation
In example, as shown in Fig. 2, the marking line 6 that distance is X1 is respectively 1-1 with number, the axis symbol 4 that number is 1-15 has corresponding close
System, the axis symbol 4 that the marking line 6 that distance is Y1 is respectively 1-E with number, number is 1-A have corresponding relationship;
S222, longest first marking line of length is found out in marking line 6 corresponding to each axis symbol 4, from all
Longest second marking line of length is found out in first marking line, and the identical axis symbol 4 of the first marking line is connected in series, is obtained
Line is accorded with row's axis;
S223,4 vertical points will be accorded in the first marking line with respective shaft as starting point, will be accorded with where 4 towards with respective shaft
The direction perpendicular and far from respective shaft symbol 4 in direction of same row's axis symbol line extend auxiliary segment, auxiliary segment encounter from
Termination when other auxiliary segments extended in other first marking lines, and the length of auxiliary segment is less than or equal to the second marking line.
Wherein, step S24 specifically:
The maximum abscissa of each axis net increases by the first numerical value to obtain upper limit abscissa, and the minimum of each axis net is horizontal
Coordinate subtracts the first numerical value to obtain lower limit abscissa, and the maximum ordinate of each axis net increases by the first numerical value to obtain the upper limit
Ordinate;The minimum ordinate of each axis net subtracts the first numerical value to obtain lower limit ordinate, the coordinate range packet of every figure
Include upper limit abscissa, lower limit abscissa, upper limit ordinate and the lower limit ordinate of corresponding axis net.
Please refer to Fig. 1 and Fig. 2, the embodiment of the present invention four are as follows:
A kind of drawing dividing method, on the basis of the above embodiment 1, after step S2 further include:
S3, all texts are filtered out in the coordinate range of every figure, judge whether the lower section of text is provided with one to two
Bar line and whether include preset kind title will be provided with one to two lines and be figure comprising the word marking of preset kind title
Name 8, and record the coordinate range of every figure and the corresponding relationship of the map title 8;
S4, floor information is extracted from the map title, by the coordinate range of every figure, the map title, floor information and including axis accord with
Element type imported into tree control and XML and stored and shown.
In the present embodiment, as shown in Fig. 2, the map title of first figure is five-ten three layers of flat method construction drawing of column, wherein five-
13 layers are floor information, and column is preset kind title, and the map title of first figure is expressed as the column of layer 5 to the 13rd layer
Body figure.
Referring to figure 3., the embodiment of the present invention five are as follows:
A kind of electronic equipment 1, including memory 3, processor 2 and be stored on memory 3 and can be transported on processor 2
Capable computer program, processor 2 realize a kind of drawing segmentation side any in embodiment one to four when executing computer program
The step of method.
The present invention is embodiment six are as follows:
A kind of computer readable storage medium is stored thereon with computer program, when computer program is executed by processor
The step of realizing a kind of drawing dividing method any in embodiment one to four.
In conclusion a kind of drawing dividing method, electronic equipment and storage medium provided by the invention, pass through identification two
The axis symbol in drawing is tieed up, axis and marking line are determined by axis symbol, axis is generated by marking line in the case where no axis
Line, to form independent axis net one by one, each independent axis net just represents each and every one each independent figure, to realize
The automatic segmentation of drawing.Wherein, for the identification of axis symbol, identify axis and marking line by axis symbol, feature is obvious, distinguishes
Knowledge and magnanimity are high, so as to effectively improving recognition efficiency and accuracy;Meanwhile axis symbol is in the edge placement of every figure, axis covers
The middle position for having covered every figure determines the coordinate range of every figure by this axis net expanded scope, simple and effective, makes score
It is higher higher with accuracy to cut efficiency;In addition, axis can be used to judge building element, provide convenience for subsequent overmolded,
I.e. it is more accurate and be convenient for the technical solution of subsequent overmolded to provide a kind of more efficient, segmentation effect by the present invention.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include
In scope of patent protection of the invention.