A method of based on CAD topographic map Fast Drawing sectional view
Technical field
The present invention relates to engineering drawing field, especially it is a kind of can quick obtaining hatching and a series of contours intersection point
And elevation, and quickly generate a kind of method based on CAD topographic map Fast Drawing sectional view of sectional view.
Background technique
Topographic map refers to the perspective view of surface relief form and geographical location, shape in the horizontal plane.Specifically, will
Atural object and landforms on ground press the method (along plumb line direction projection to horizontal plane) of floor projection, and according to a certain percentage
Ruler contracting is drawn on drawing, and this figure is known as topographic map.A hatching is drawn on topographic map, draws out the hatching and institute's phase
The obtained figure of the orthographic projection of the contour of friendship is sectional view.
Sectional view has extensively in water conservancy project ring geology, Highway Municipal engineering, railway, coal mining geology class engineering design Report workout
General application, and in the mineral deposit reconnoitred, when ore body by a series of sections (section) it is crosscutting be several blocks, then with this
It can be evaluated whether the nugget reserves between adjacent two section and the reserves in entire mineral deposit based on a little sectional views, it can be seen that, section
Figure suffers from important application in multiple industry fields.
Engineers and technicians need to measure one by one in profiling the intersection point distance and elevation for calculating hatching and contour,
Then plotting is on drawing, in drawing process, intricate operation and heavy workload, when largely occupying the work of technical staff
Between, efficiency is extremely low, and numerous workloads are difficult to ensure the accuracy of drawing result.
Summary of the invention
It can quick obtaining hatching in view of this, it is an object of the invention to overcome the deficiencies of the prior art and provide one kind
With the intersection point and elevation of a series of contours, a kind of based on CAD topographic map Fast Drawing sectional view of sectional view is quickly generated
Method.
The present invention solves its technical problem institute using technical solution: the following steps are included:
Step 1: drawing a hatching.The CAD landform map file of profiling will be needed to open in CAD, in CAD
It needs the position of profiling to draw a hatching on shape figure, sets 0 for the elevation of the hatching or Z value;
Step 2: judging the type of hatching.The type of the hatching includes straight line and multi-section-line.
If hatching is straight line, the starting point coordinate and terminal point coordinate of record section line;
If hatching is multi-section-line, starting point coordinate, the inflection point coordinate, terminal point coordinate of record section line.
Step 3: establishing the choice set of a contour and carry out intersection point acquisition and sequence.It is sat according to the starting point of hatching
Mark, inflection point coordinate, terminal point coordinate create a choice set first, include all contours intersected with hatching in choice set,
Then to acquisition and the sequence of each contour and hatching progress intersection point in choice set.
Step 4: seeking coordinate, elevation and the profiling of hatching Yu each contour intersection point.Seek hatching and each
The coordinate of i-th intersection point and elevation are recorded in an array, according in array by the coordinate and elevation of the i-th intersection point of contour
Data are depicted as sectional view.
Further, for the present invention is better achieved, following setting structures are especially used: being belonged in step 2 by name
Property read the title of hatching to identify the type of hatching.
Further, for the present invention is better achieved, following setting structures are especially used: in the step 2,
If hatching is straight line, the starting point coordinate and terminal point coordinate of this straight line are read, (x is denoted as1, y1),(x2,y2);
If hatching multi-section-line, starting point coordinate, the inflection point coordinate, end of multi-section-line are obtained by coordinates attribute
Point coordinate, and record, starting point coordinate is (x1, y1), terminal point coordinate is (xn,yn), inflection point from the left side be (x2,y2)…
(xn-1, yn-1), program can be defaulted suitable according to the drafting of multi-section-line each point in the starting point, inflection point and terminal point coordinate for reading multi-section-line
Sequence is read, so that continuously starting point, inflection point, terminal point coordinate can be recorded in array in order.
Further, for the present invention is better achieved, following setting structures are especially used: in step 3,
Firstly, starting point when starting point coordinate, terminal point coordinate or the hatching when being straight line according to hatching are multi-section-line
Coordinate, inflection point coordinate, terminal point coordinate obtain the extreme value in the region X and the region Y that hatching is occupied, respectively xmin, ymin,
xmax, ymax;
Then, drawing a lower-left angular coordinate is (xmin, ymin), upper right angular coordinate is (xmax, ymax) rectangle frame;
It is last: will to be located in the rectangle frame and across all contour of the rectangle frame by SelectByPolygon method
Line defines a new choice set.
Further, for the present invention is better achieved, following setting structures are especially used: in step 3,
If hatching is straight line, the item number in choice set is read by count attribute, then traverses each of choice set
Object acquires the intersection point of each object and hatching;
If hatching is multi-section-line, the item number in choice set is read by count attribute, is then traversed every in choice set
A object, multi-section-line is according to starting point, inflection point, the sequence of terminal, per adjacent two o'clock as a line segment, successively and in choice set
Each object seeks intersection point.
Further, for the present invention is better achieved, following setting structures are especially used: in step 3,
It is followed the steps below if hatching is straight line:
Step 3.1: reading first object in choice set, and the height value of the object or Z value are recorded in variable h
In;
Step 3.2: setting 0 for the height value of first object in choice set or Z value, contour is guaranteed with this and is cutd open
Upper thread is placed in XOY plane simultaneously;
Step 3.3: seeking the intersection value of object and hatching in choice set using IntersectWith method, and will hand over
Point coordinate record has just obtained (x, y) coordinate of intersection point in the first array at this time, except a contour and hatching have one
Except in the case of intersection point, the case where contour and hatching also have two or more intersection points, IntersectWith method is obtained
Take when intersection point can by contour and hatching there are two or the case where multiple intersection points can be sequentially recorded in the first array;
Step 3.4: the Z value of all intersection points is set as h in the first array, which is in choice set described in step 3.2
The elevation of object;
Step 3.5: the height value of object in choice set or Z value are re-set as h;
Step 3.6: identifying the number of the object Yu hatching intersection point, and by X, Y, Z of intersection point all in the first array
Value is recorded in a new two-dimensional array sCJ (a, b), and a dimension in array sCJ (a, b) is 3, that is, respectively represents X, Y, Z
Value, the dimension of b increase with the increase of intersection point number, i.e., the number of all intersection points of object in representative profile line and choice set;
Step 3.7: the first array is emptied;
Step 3.8: return step 3.1 obtains the intersection point of next object and hatching in choice set.
Step 3.9: in choice set after all objects traversal, that is, having acquired all contours intersected with hatching
Or have the intersection point of elevation object, X, Y, Z value of all intersection points are recorded in sCJ (a, b);
If hatching is multi-section-line, there is n coordinate by coordinates attribute acquisition multi-section-line according to aforementioned, then know
Multi-section-line is made of n-1 line segment, by starting point, inflection point, terminal, is successively linked to be straight line, and every straight line is successively executed step
3.1- step 3.9, then can be obtained the array of n-1 record intersection point, i.e. sCJ1 (a, b), sCJ2 (a, b) ... ..., sCJn-1 (a,
b)。
Further, for the present invention is better achieved, following setting structures is especially used: passing through following step in step 3
Suddenly the intersection point of acquisition is ranked up:
If it is straight line:
Compare the x of hatching1With x2Size or y1With y2Size, then according to determining direction to sCJ (a, b)
In intersection point be ranked up, then the intersection point in sCJ (a, b) is all intersection points along hatching direction after sequence.
If it is multi-section-line:
Compare hatching x1, x2... ..., xn-1,xnOr y1, y2... ..., yn-1,ynPer adjacent two o'clock abscissa or ordinate
Size, it is contemplated that the drafting direction of multi-section-line then needs the coordinate size of two consecutive points of comparison from left to right, if xk<
xk+1Or yk<yk+1(k ∈ N, and 1≤k≤n-1), then according to sequence from left to right to the intersection point in corresponding sCJk (a, b) into
Row sequence (conversely, then the intersection point in corresponding sCJk (a, b) is ranked up according to from the sequence that the right side is turned left), by n-1 array
All then the intersection point in sCJk (a, b) is all intersection points that direction is drawn along hatching (multi-section-line) after sequence.
Further, for the present invention is better achieved, following setting structures is especially used: passing through following step in step 4
Suddenly i-th coordinate and the elevation on hatching are sought:
If hatching is straight line:
(the x of the intersection point and hatching in sCJ (a, b) is sought with the range formula of point-to-point transmission1, y1) distance (if it is from
(x2, y2) end starts sequence, the then x in following formula1With y1Replace with x2With y2):
The x coordinate that the sCJ (0, i) is i-th point in sCJ (a, b);
The y-coordinate that the sCJ (1, i) is i-th point in sCJ (a, b);
The d acquirediAs hatching reaction i-th point of x coordinate on XOY two-dimensional surface, to should b=i when, sCJ
Z value (i.e. sCJ (2, i)) in (a, i) is that hatching reacts the elevation on XOY two-dimensional surface, i.e. hatching reaction is in XOY bis-
Y-coordinate on dimensional plane.
If hatching is multi-section-line:
(the x of the intersection point and hatching in kth line segment in sCJk (a, b) is sought with the range formula of point-to-point transmissionk, yk) away from
From:
The X-coordinate that the sCJk (0, i) is i-th point in sCJk (a, b);
The Y coordinate that the sCJk (1, i) is i-th point in sCJk (a, b);
The dk acquirediAs hatching kth line segment reaction on XOY two-dimensional surface i-th point relative to xkX coordinate,
To should b=i when, the z value (i.e. sCJk (2, i)) in sCJk (a, i) is that hatching reacts the elevation on XOY two-dimensional surface,
I.e. hatching reacts the y-coordinate on XOY two-dimensional surface.
Further, for the present invention is better achieved, following setting structures are especially used: in step 4,
If hatching is straight line:
The d that claim 8 is soughtiAs x coordinate, sCJ (2, i) is recorded in a new array sPM as y-coordinate
In (a, b), the dimension of a is 2 in array sPM (a, b), i.e. x coordinate and y of the representative profile line reaction on XOY two-dimensional surface is sat
Mark, the dimension of b are equal to the number of intersection point.
If hatching is multi-section-line:
It is identical as the method for straight line for first line segment, but from kth line segment, it need to be by dkiIn addition front institute is wired
The length of section is used as x coordinate, correspondence sCJk (2, i) is recorded in as y-coordinate included front segment data array sPM
In (a, b), and, the dimension of b should also increase as the number of line segment and intersection point increases.The dimension of a in final array sPM (a, b)
Number is 2, i.e., representative profile line reacts x coordinate and y-coordinate on XOY two-dimensional surface, and the dimension of b is equal to whole multi-section-line intersection point
Number.
Further, for the present invention is better achieved, following setting structures are especially used: in step 4, according to array
The scale bar that data and combination in sPM (a, b) need can draw out the sectional view for the topographic map cut by hatching, then
Slightly complete sectional view can be obtained in modification.
The beneficial effects of the present invention are: a kind of method based on CAD topographic map Fast Drawing sectional view of the invention, user
Only need to contour topographic map basis on, voluntarily draw a hatching, through the above steps can quick obtaining cut open
The intersection point and elevation of upper thread and contour, the number of intersection point can achieve unlimited, and then can quickly generate hatching, not only fit
For CAD topographic map, this method is equally applicable on the topographic map of all softwares, and is suitable for the contour of any line style.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of a kind of flow diagram of method based on CAD topographic map Fast Drawing sectional view of the invention.
Fig. 2 is the topographic map in the case that 1 section line of embodiment is straight line.
Fig. 3 is 1 section line of embodiment obtained sectional view when being straight line.
Fig. 4 is the topographic map in the case that 2 section line of embodiment is multi-section-line.
Fig. 5 is 2 section line of embodiment obtained sectional view when being multi-section-line.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, technical solution of the present invention will be carried out below
Detailed description.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than comprehensive embodiment.Base
Embodiment in the present invention, those of ordinary skill in the art are obtained all without making creative work
Other embodiment belongs to the range that the present invention is protected.
A kind of most common situation of method based on CAD topographic map Fast Drawing sectional view of the invention includes two kinds, i.e.,
Hatching is straight line and hatching is two kinds of situations of multi-section-line.In water conservancy project ring geology, coal mining geology or when calculating ore deposit reserve,
The drafting of sectional view is carried out as hatching usually using straight line;In the industries such as highway, railway, tunnel, because of road complications, therefore
Common multi-section-line carries out the drafting of sectional view as hatching.
Further details of retouch now is carried out to the present invention in the form of specific embodiment and in conjunction with attached drawing according to two kinds of situations
It states.
Embodiment 1:
According to Fig. 1, Fig. 2, when hatching is straight line, the method based on CAD topographic map Fast Drawing sectional view includes following
Step:
Step 1: as shown in Fig. 2, the position of profiling is needed to draw a hatching, the reality on CAD topographic map
The hatching for applying example drafting is then straight line sets 0 for the elevation of hatching or Z value;
Step 2: judging the type of hatching.The hatching that this embodiment is drawn is straight line, therefore through judging hatching
Type is straight line, then the starting point coordinate and terminal point coordinate of record section line.
Step 3: establishing the choice set of a contour and carry out intersection point acquisition and sequence.It is sat according to the starting point of hatching
Mark, terminal point coordinate create a choice set first, include all contours intersected with hatching in choice set, then to choosing
The each contour and hatching of selecting concentration carry out acquisition and the sequence of intersection point.
Step 4: seeking coordinate, elevation and the profiling of hatching Yu each contour intersection point.Seek hatching and each
The coordinate of i-th intersection point and elevation are recorded in an array, according in array by the coordinate and elevation of the i-th intersection point of contour
Data are depicted as sectional view.
The specific implementation process of each step described in detail below:
1, the title of hatching is read to identify the type of hatching by name attribute in step 2.In the embodiment,
According to entitled " AcDbLine " of the hatching that name attribute is read, therefore judged the type of hatching for straight line.
2, the starting point coordinate and terminal point coordinate for reading this straight line, are denoted as (x1, y1),(x2,y2);
3, the choice set of contour in step 3, is established by following steps:
Firstly, obtaining the extreme value in the region X and the region Y that hatching is occupied, respectively xmin, ymin, xmax, ymax;This
X in embodimentmin=x1, ymin=y1, xmax=x2, ymax=y2。
Then, drawing a lower-left angular coordinate is (x1, y1), upper right angular coordinate is (x2, y2) rectangle frame;
It is last: will to be located in the rectangle frame and across all contour of the rectangle frame by SelectByPolygon method
Line defines a new choice set.
4, the item number in choice set in step 3, is read by count method, it is right then to traverse each of choice set
As acquiring the intersection point of each object and hatching;
5, it in step 3, is acquired by intersection point of the following steps to all contours and hatching in choice set:
Step 3.1: reading first object in choice set, and the height value of the object or Z value are recorded in variable h
In;
Step 3.2: setting 0 for the height value of first object in choice set or Z value, contour is guaranteed with this and is cutd open
Upper thread is placed in XOY plane simultaneously;
Step 3.3: seeking the intersection value of object and hatching in choice set using IntersectWith method, and will hand over
Point coordinate record has just obtained (x, y) coordinate of intersection point in the first array at this time, except a contour and hatching have one
Except in the case of intersection point, the case where contour and hatching also have two or more intersection points, IntersectWith method is obtained
Take when intersection point can by contour and hatching there are two or the case where multiple intersection points can be sequentially recorded in the first array;
Step 3.4: the Z value of all intersection points is set as h in the first array, which is in choice set described in step 3.2
The elevation of object;
Step 3.5: the height value of object in choice set or Z value are re-set as h;
Step 3.6: identifying the number of the object Yu hatching intersection point, and by X, Y, Z of intersection point all in the first array
Value is recorded in a new two-dimensional array sCJ (a, b), and a dimension in array sCJ (a, b) is 3, that is, respectively represents X, Y, Z
Value, the dimension of b increase with the increase of intersection point number, i.e., the number of all intersection points of object in representative profile line and choice set;
Step 3.7: the first array is emptied;
Step 3.8: return step 3.1 obtains the intersection point of next object and hatching in choice set.
Step 3.9: in choice set after all objects traversal, that is, having acquired all contours intersected with hatching
Or have the intersection point of elevation object, X, Y, Z value of all intersection points are recorded in sCJ (a, b);
6, it in step 3, is ranked up by intersection point of the following steps to acquisition.
Compare the x of hatching1With x2Size or y1With y2Size, then according to determining direction to sCJ (a, b)
In intersection point be ranked up, then the intersection point in sCJ (a, b) is all intersection points along hatching direction after sequence.
7, i-th coordinate and the elevation on hatching are sought by following steps in step 4:
(the x of the intersection point and hatching in sCJ (a, b) is sought with the range formula of point-to-point transmission1, y1) distance (if it is from
(x2, y2) end starts sequence, the then x in following formula1With y1Replace with x2With y2):
The x coordinate that the sCJ (0, i) is i-th point in sCJ (a, b);
The y-coordinate that the sCJ (1, i) is i-th point in sCJ (a, b);
The d acquirediAs hatching reaction i-th point of x coordinate on XOY two-dimensional surface, to should b=i when, sCJ
Z value (i.e. sCJ (2, i)) in (a, i) is that hatching reacts the elevation on XOY two-dimensional surface, i.e. hatching reaction is in XOY bis-
Y-coordinate on dimensional plane.
8, in step 4, by diAs x coordinate, by sCJ (2, i) as y-coordinate be recorded in a new array sPM (a,
B) in, the dimension of a is 2 in array sPM (a, b), i.e. representative profile line reacts x coordinate and y-coordinate on XOY two-dimensional surface, b
Dimension be equal to intersection point number.
9, finally, in step 4, according to the data in array sPM (a, b) and combining the scale bar needed that can draw out
The sectional view for the topographic map cut by hatching, then slightly complete sectional view can be obtained in modification (see Fig. 3).
Embodiment 2:
According to Fig. 1, Fig. 4, when hatching is multi-section-line, the method based on CAD topographic map Fast Drawing sectional view include with
Lower step:
Step 1: as shown in figure 4, the position of profiling is needed to draw a hatching, the reality on CAD topographic map
The hatching for applying example drafting is then multi-section-line sets 0 for the elevation of hatching or Z value;
Step 2: judging the type of hatching.The hatching that this embodiment is drawn is multi-section-line, therefore through judging hatching
Type be multi-section-line, the then starting point coordinate of record section line, inflection point coordinate, terminal point coordinate.
Step 3: establishing the choice set of a contour and carry out intersection point acquisition and sequence.It is sat according to the starting point of hatching
Mark, inflection point coordinate, terminal point coordinate create a choice set first, include all contours intersected with hatching in choice set,
Then to acquisition and the sequence of each contour and hatching progress intersection point in choice set.
Step 4: seeking coordinate, elevation and the profiling of hatching Yu each contour intersection point.Seek hatching and each
The coordinate of i-th intersection point and elevation are recorded in an array, according in array by the coordinate and elevation of the i-th intersection point of contour
Data are depicted as sectional view.
The specific implementation process of each step described in detail below:
1, the title of hatching is read to identify the type of hatching by name attribute in step 2.In the embodiment,
According to entitled " AcDbPolyline " of the hatching that name attribute is read, therefore judged the type of hatching for multi-section-line.
2, starting point coordinate, the inflection point coordinate, terminal point coordinate of multi-section-line are obtained by coordinates attribute, and are recorded
Come, according to Fig. 4, there are also 2 inflection points in addition to the start and the end points only for the embodiment multi-section-line, then starting point coordinate is (x1, y1), terminal is sat
It is designated as (x4,y4), inflection point from the left side be (x2,y2)、(x3,y3), program is when reading the starting point of multi-section-line, terminal and inflection point coordinate
The drawing order reading according to multi-section-line each point can be defaulted, to can continuously in order record starting point, inflection point, terminal point coordinate
Into array, the record sequence of coordinate is (x in the embodiment1, y1)、(x2,y2)、(x3,y3)、(x4,y4)。
3, the choice set of contour in step 3, is established by following steps:
Firstly, obtaining the extreme value in the region X and the region Y that hatching is occupied, respectively xmin, ymin, xmax, ymax;This
X in embodimentmin=x1, ymin=y1, xmax=x4, ymax=y2。
Then, drawing a lower-left angular coordinate is (x1, y1), upper right angular coordinate is (x4, y2) rectangle frame;
It is last: will to be located in the rectangle frame and across all contour of the rectangle frame by SelectByPolygon method
Line defines a new choice set.
4, the item number in choice set in step 3, is read by count attribute, it is right then to traverse each of choice set
As, multi-section-line is according to starting point, inflection point, the sequence of terminal, per adjacent two o'clock as a line segment, this embodiment section line by
Three line segment compositions, respectively line segment AB, line segment BC, line segment CD, according to the sequence of line segment AB, BC, CD successively and in choice set
Each object seek intersection point;
5, it in step 3, is acquired by intersection point of the following steps to all contours and hatching in choice set:
Step 3.1: reading first object in choice set, and the height value of the object or Z value are recorded in variable h
In;
Step 3.2: setting 0 for the height value of first object in choice set or Z value, contour is guaranteed with this and is cutd open
Upper thread is placed in XOY plane simultaneously;
Step 3.3: seeking the intersection value of object and line segment AB in choice set using IntersectWith method, and will hand over
Point coordinate record has just obtained (x, y) coordinate of intersection point in the first array at this time, except a contour and line segment AB have one
Except in the case of intersection point, the case where contour and line segment AB also have two or more intersection points, IntersectWith method is obtained
Take when intersection point can by contour and line segment AB there are two or the case where multiple intersection points can be sequentially recorded in the first array;
Step 3.4: the Z value of all intersection points is set as h in the first array, which is in choice set described in step 3.2
The elevation of object;
Step 3.5: the height value of object in choice set or Z value are re-set as h;
Step 3.6: identifying the number of the object Yu line segment AB intersection point, and by X, Y, Z of intersection point all in the first array
Value is recorded in a new two-dimensional array sCJ (a, b), and a dimension in array sCJ (a, b) is 3, that is, respectively represents X, Y, Z
Value, the dimension of b increase with the increase of intersection point number, i.e., the number of all intersection points of object in representative profile line and choice set;
Step 3.7: the first array is emptied;
Step 3.8: return step 3.1 obtains the intersection point of next object and line segment AB in choice set.
Step 3.9: in choice set after all objects traversal, that is, having acquired all contours intersected with line segment AB
Or have the intersection point of elevation object, X, Y, Z value of all intersection points are recorded in sCJ1 (a, b);
Then step 3.1 is returned again to, the intersection point of all contours and line segment BC and line segment CD in choice set is adopted
Collection, after then can be obtained 3 record intersection points array, i.e. sCJ1 (a, b), sCJ2 (a, b), sCJ3 (a, b).
6, it in step 3, is ranked up by intersection point of the following steps to acquisition.
Compare hatching x1, x2... ..., xn-1,xnOr y1, y2... ..., yn-1,ynPer adjacent two o'clock abscissa or ordinate
Size, it is contemplated that the drafting direction of multi-section-line then needs the coordinate size of two consecutive points of comparison from left to right, if xk<
xk+1Or yk<yk+1(k ∈ N, and 1≤k≤n-1), then according to sequence from left to right to the intersection point in corresponding sCJk (a, b) into
Row sequence (conversely, then the intersection point in corresponding sCJk (a, b) is ranked up according to from the sequence that the right side is turned left), by n-1 array
All then the intersection point in sCJk (a, b) is all intersection points that direction is drawn along hatching (multi-section-line) after sequence.
In the present embodiment for comparing x coordinate, by comparing the size of adjacent two o'clock it is found that x1<x2, x2>x3, x3<x4,
Then line segment AB should be ranked up the intersection point in sCJ1 (a, b) according to sequence from left to right, it should be according to for line segment BC
The sequence turned left from the right side is ranked up the intersection point in sCJ2 (a, b), should be right according to sequence from left to right for line segment CD
Intersection point in sCJ3 (a, b) is ranked up, by 3 arrays all sequence after, then sCJ1 (a, b), sCJ2 (a, b), sCJ3
Intersection point in (a, b) is that multi-section-line draws direction i.e. all intersection points in the direction ABCD.
7, i-th coordinate and the elevation on hatching are sought by following steps in step 4:
(the x of the intersection point and hatching in kth line segment in sCJk (a, b) is sought with the range formula of point-to-point transmissionk, yk) away from
From:
The X-coordinate that the sCJk (0, i) is i-th point in sCJk (a, b);
The Y coordinate that the sCJk (1, i) is i-th point in sCJk (a, b);
The dk acquirediAs hatching kth line segment reaction on XOY two-dimensional surface i-th point relative to xkX coordinate,
To should b=i when, the z value (i.e. sCJk (2, i)) in sCJk (a, i) is that hatching reacts the elevation on XOY two-dimensional surface,
I.e. hatching reacts the y-coordinate on XOY two-dimensional surface.
8, identical as the method for straight line in step 4, for first line segment (i.e. line segment AB), for the 2nd article of line segment
(i.e. line segment BC), need to be by d2iIn addition the length of first line segment (i.e. line segment AB) is as x coordinate, it is corresponding by sCJ2 (2, i) conduct
It has included in the array sPM (a, b) of front line segment (i.e. line segment AB) data, for Article 3 line segment (i.e. line segment that y-coordinate, which is recorded in,
It CD), need to be by d3iIn addition the sum of the length of first line segment (i.e. line segment AB) and Article 2 line segment (i.e. line segment BC) is as x coordinate,
It is corresponding sCJ2 (2, i) is recorded in as y-coordinate included front line segment (i.e. line segment AB and first point BC) data array sPM
In (a, b), and, the dimension of b should also increase as the number of line segment and intersection point increases.The dimension of a in final array sPM (a, b)
Number is 2, i.e., representative profile line reacts x coordinate and y-coordinate on XOY two-dimensional surface, and the dimension of b is equal to whole multi-section-line (i.e.
Line segment AB, line segment BC, line segment CD) intersection point number.
9, finally, in step 4, according to the data in array sPM (a, b) and combining the scale bar needed that can draw out
The sectional view for the topographic map cut by hatching, then slightly complete sectional view can be obtained in modification (see Fig. 5).
A kind of method based on CAD topographic map Fast Drawing sectional view through the invention, user is with contour
On topographic map basis, a hatching is voluntarily drawn by user, it through the above steps can quick obtaining hatching and contour
Intersection point, that is, elevation, the number of intersection point can achieve unlimited, and then can quickly generate hatching.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.