CN109035364A - Method for rapidly drawing profile map based on CAD topographic map - Google Patents

Method for rapidly drawing profile map based on CAD topographic map Download PDF

Info

Publication number
CN109035364A
CN109035364A CN201810810469.XA CN201810810469A CN109035364A CN 109035364 A CN109035364 A CN 109035364A CN 201810810469 A CN201810810469 A CN 201810810469A CN 109035364 A CN109035364 A CN 109035364A
Authority
CN
China
Prior art keywords
hatching
coordinate
point
line
section
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810810469.XA
Other languages
Chinese (zh)
Other versions
CN109035364B (en
Inventor
徐飞
唐丽伟
周绍智
赵新村
焦玉国
陈伟清
魏凯
王延岭
夏学生
吴亚楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fifth Geological Brigade of Shandong Provincial Bureua of Geology and Mineral Resources of Fifth Geological and Mineral Exploration Institute of Shandong Province
Original Assignee
Fifth Geological Brigade of Shandong Provincial Bureua of Geology and Mineral Resources of Fifth Geological and Mineral Exploration Institute of Shandong Province
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fifth Geological Brigade of Shandong Provincial Bureua of Geology and Mineral Resources of Fifth Geological and Mineral Exploration Institute of Shandong Province filed Critical Fifth Geological Brigade of Shandong Provincial Bureua of Geology and Mineral Resources of Fifth Geological and Mineral Exploration Institute of Shandong Province
Priority to CN201810810469.XA priority Critical patent/CN109035364B/en
Publication of CN109035364A publication Critical patent/CN109035364A/en
Application granted granted Critical
Publication of CN109035364B publication Critical patent/CN109035364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the field of engineering drawing, in particular to a method for quickly drawing a section map based on a CAD topographic map, which can quickly acquire intersections and elevations of section lines and a series of contour lines and quickly generate the section map. The method comprises the following steps: step 1: drawing a section line; step 2: judging the type of the section line; and step 3: establishing a selection set of contour lines and carrying out intersection point acquisition and sequencing; and 4, step 4: and (5) obtaining coordinates and elevations of the intersection points of the section lines and the contour lines and drawing a profile diagram. According to the method for rapidly drawing the section map based on the CAD topographic map, a user draws a section line on the basis of the topographic map with contour lines, the intersection points and elevations of the section line and a series of contour lines can be rapidly obtained through the steps, the number of the intersection points can reach infinity, and the section map can be rapidly generated.

Description

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.

Claims (10)

1. a kind of method based on CAD topographic map Fast Drawing sectional view, it is characterised in that 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 topographic map On need profiling position draw a hatching, set 0 for the elevation of the hatching or Z value;
Step 2: judge 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, the 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, according to the starting point coordinate of hatching, turn Point coordinate, terminal point coordinate create a choice set first, include all contours intersected with hatching in choice set, then Acquisition and sequence to each contour and hatching progress intersection point in choice set;
Step 4: seek coordinate, elevation and the profiling of hatching Yu each contour intersection point, seek hatching with it is each contour The coordinate of i-th intersection point and elevation are recorded in an array, according to the data in array by the coordinate and elevation of the i-th intersection point of line It is depicted as sectional view.
2. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 1, it is characterised in that: In step 2, the title of hatching is read by name attribute to identify the type of hatching.
3. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 1, it is characterised in that: In 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 is multi-section-line, starting point coordinate, the inflection point coordinate, terminal of multi-section-line are obtained by coordinates attribute 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 default the drawing order reading according to multi-section-line each point in the starting point, inflection point and terminal point coordinate for reading multi-section-line It takes, so that continuously starting point, inflection point, terminal point coordinate can be recorded in array in order.
4. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 3, it is characterised in that: 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 is sat Mark, 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 by SelectByPolygon method and determined across all contours of the rectangle frame An adopted new choice set.
5. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 4, it is characterised in that: In step 3,
If hatching is straight line, the item number in choice set is read by count attribute, it is right then to traverse each of choice set As acquiring 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, 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, successively each of with choice set Object seeks intersection point.
6. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 5, it is characterised in that: 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;
Step 3.2: setting 0 for the height value of first object in choice set or Z value, contour and hatching are guaranteed with this It is placed in XOY plane simultaneously;
Step 3.3: seeking the intersection value of object and hatching in choice set using IntersectWith method, and intersection point is sat Mark is recorded in the first array, has just obtained (x, y) coordinate of intersection point at this time, except a contour and hatching have an intersection point Except in the case of, the case where contour and hatching also have two or more intersection points, IntersectWith method, which obtains, to be handed over When 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 object in choice set described in step 3.2 Elevation;
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 X, Y, Z value of intersection point all in the first array are remembered In a new two-dimensional array sCJ (a, b), a dimension in array sCJ (a, b) is 3 for record, that is, respectively represents X, Y, Z value, b's Dimension increases 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 object traversals, that is, acquired all contours intersected with hatching or There is 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, and aforementioned right 3, obtaining multi-section-line by coordinates attribute in step 2 has n coordinate, Multi-section-line known to then is made of n-1 line segment, by starting point, inflection point, terminal, is successively linked to be straight line, every straight line is successively held Row 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).
7. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 6, it is characterised in that: In step 3,
If it is straight line:
Compare the x of hatching1With x2Size or y1With y2Size, then according to determining direction in sCJ (a, b) Intersection point is ranked up, and 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,ynIt is big per adjacent two o'clock abscissa or ordinate It is small, 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) is then ranked up the intersection point in corresponding sCJk (a, b) according to sequence from left to right (anti- It, then be ranked up the intersection point in corresponding sCJk (a, b) according to from the sequence that the right side is turned left), by n-1 array, all sequence is tied Then the intersection point in sCJk (a, b) is all intersection points that direction is drawn along hatching (multi-section-line) after beam.
8. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 7, it is characterised in that: In step 4,
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, then the 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 (a, i) In z value (i.e. sCJ (2, i)) be that hatching reacts elevation on XOY two-dimensional surface, i.e. hatching reaction is flat in XOY two dimension Y-coordinate on face;
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) distance:
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, it is corresponding As b=i, the z value (i.e. sCJk (2, i)) in sCJk (a, i) is that hatching reacts the elevation on XOY two-dimensional surface, that is, is cutd open Upper thread reacts the y-coordinate on XOY two-dimensional surface.
9. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 8, it is characterised in that: 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 (a, b) as y-coordinate 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's Dimension is 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 all line segments in front Length as x coordinate, it is corresponding sCJk (2, i) is recorded in as y-coordinate included front segment data array sPM (a, b) In, and, the dimension of b should also increase as the number of line segment and intersection point increases, and the dimension of a is 2 in final array sPM (a, b), I.e. representative profile line reacts x coordinate and y-coordinate on XOY two-dimensional surface, and the dimension of b is equal to of whole multi-section-line intersection point Number.
10. a kind of method based on CAD topographic map Fast Drawing sectional view according to claim 9, it is characterised in that: In step 4, according to the data in array sPM (a, b) and combine the scale bar needed that can draw out the ground cut by hatching The sectional view of shape figure, then slightly complete sectional view can be obtained in modification.
CN201810810469.XA 2018-07-23 2018-07-23 Method for rapidly drawing section based on CAD topographic map Active CN109035364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810810469.XA CN109035364B (en) 2018-07-23 2018-07-23 Method for rapidly drawing section based on CAD topographic map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810810469.XA CN109035364B (en) 2018-07-23 2018-07-23 Method for rapidly drawing section based on CAD topographic map

Publications (2)

Publication Number Publication Date
CN109035364A true CN109035364A (en) 2018-12-18
CN109035364B CN109035364B (en) 2023-12-05

Family

ID=64645107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810810469.XA Active CN109035364B (en) 2018-07-23 2018-07-23 Method for rapidly drawing section based on CAD topographic map

Country Status (1)

Country Link
CN (1) CN109035364B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741453A (en) * 2019-03-29 2019-05-10 长江岩土工程总公司(武汉) Based on CATIA engineering drawing log sheet grid DEM method
CN110503727A (en) * 2019-08-09 2019-11-26 长江水利委员会长江科学院 A kind of quick joining method of any multi-section-line batch of CAD
CN111159800A (en) * 2019-12-13 2020-05-15 佛山欧神诺云商科技有限公司 Method and device for automatically generating 3D model based on CAD file
CN111259555A (en) * 2020-01-20 2020-06-09 西北工业大学 Petroleum pipeline equidistant line generation method based on thread pool
CN111553836A (en) * 2020-04-23 2020-08-18 深圳市秉睦科技有限公司 Method for automatically generating closed filling surface by scattered multiple lines
CN112132927A (en) * 2020-09-15 2020-12-25 成都工具研究所有限公司 Drawing system and method for generating two-dimensional and three-dimensional models on webpage interface
CN116910887A (en) * 2023-09-07 2023-10-20 长江水利委员会长江科学院 Automatic drawing method for batch river section diagrams
CN117670660A (en) * 2024-02-01 2024-03-08 中国电建集团西北勘测设计研究院有限公司 Method for quickly generating sectional view based on CATIA V6
CN118334169A (en) * 2024-06-12 2024-07-12 中国人民解放军海军航空大学 Quick analysis drawing method for T-LnP diagram

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930570A (en) * 2012-10-08 2013-02-13 长江勘测规划设计研究有限责任公司 Method for acquiring topographic profile information according to topographic map
CN106600661A (en) * 2016-12-20 2017-04-26 黄河勘测规划设计有限公司 Method of accurately producing arc geological section
CN107590833A (en) * 2017-08-23 2018-01-16 华南理工大学 A kind of enhancing of human ear contour feature and physiological parameter extracting method based on contour

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930570A (en) * 2012-10-08 2013-02-13 长江勘测规划设计研究有限责任公司 Method for acquiring topographic profile information according to topographic map
CN106600661A (en) * 2016-12-20 2017-04-26 黄河勘测规划设计有限公司 Method of accurately producing arc geological section
CN107590833A (en) * 2017-08-23 2018-01-16 华南理工大学 A kind of enhancing of human ear contour feature and physiological parameter extracting method based on contour

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邸鹏浩: "基于AutoCAD的露天矿矿床地质模型及其更新技术的研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741453A (en) * 2019-03-29 2019-05-10 长江岩土工程总公司(武汉) Based on CATIA engineering drawing log sheet grid DEM method
CN109741453B (en) * 2019-03-29 2023-08-22 长江岩土工程有限公司 Geological section map elevation calculation method based on CATIA engineering drawing
CN110503727A (en) * 2019-08-09 2019-11-26 长江水利委员会长江科学院 A kind of quick joining method of any multi-section-line batch of CAD
CN110503727B (en) * 2019-08-09 2023-07-18 长江水利委员会长江科学院 Batch rapid splicing method for CAD arbitrary multi-section lines
CN111159800B (en) * 2019-12-13 2023-02-17 佛山欧神诺云商科技有限公司 Method and device for automatically generating 3D model based on CAD file
CN111159800A (en) * 2019-12-13 2020-05-15 佛山欧神诺云商科技有限公司 Method and device for automatically generating 3D model based on CAD file
CN111259555A (en) * 2020-01-20 2020-06-09 西北工业大学 Petroleum pipeline equidistant line generation method based on thread pool
CN111553836A (en) * 2020-04-23 2020-08-18 深圳市秉睦科技有限公司 Method for automatically generating closed filling surface by scattered multiple lines
CN112132927A (en) * 2020-09-15 2020-12-25 成都工具研究所有限公司 Drawing system and method for generating two-dimensional and three-dimensional models on webpage interface
CN112132927B (en) * 2020-09-15 2023-10-20 成都工具研究所有限公司 Drawing system and method for generating two-dimensional and three-dimensional models on webpage interface
CN116910887A (en) * 2023-09-07 2023-10-20 长江水利委员会长江科学院 Automatic drawing method for batch river section diagrams
CN116910887B (en) * 2023-09-07 2023-12-08 长江水利委员会长江科学院 Automatic drawing method for batch river section diagrams
CN117670660A (en) * 2024-02-01 2024-03-08 中国电建集团西北勘测设计研究院有限公司 Method for quickly generating sectional view based on CATIA V6
CN117670660B (en) * 2024-02-01 2024-04-30 中国电建集团西北勘测设计研究院有限公司 Method for quickly generating sectional view based on CATIA V6
CN118334169A (en) * 2024-06-12 2024-07-12 中国人民解放军海军航空大学 Quick analysis drawing method for T-LnP diagram

Also Published As

Publication number Publication date
CN109035364B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN109035364A (en) Method for rapidly drawing profile map based on CAD topographic map
CN106600661B (en) The method for accurately generating segmental arc geologic section
CN102385067B (en) Drawing method for isoline containing reverse fault
CN102521878B (en) Programmable three-dimensional human body modeling and human body measurement system and method thereof
CN104008252B (en) Buried cable pipeline plane cross section automatic generation method
CN106202265B (en) Large scale Complex River magnanimity fine regular grid in basin draws volume method
CN106097450A (en) A kind of contour lines creation method and device
CN104548597A (en) Navigation grid automatic-generation method and navigation grid automatic-generation device
CN108256218A (en) A kind of subterranean communication tunnel fine modeling method based on actual measurement stringcourse data
CN106156245B (en) Line element merging method and device in electronic map
CN107369373B (en) A method of composite mapping is carried out using multi-scale line feature map
CN103268633A (en) Contour surface construction method for raster data
CN104376084A (en) Method and device for calculating path similarity
CN102467754A (en) Construction method of coal mine geological three-dimensional model and system thereof
CN104331389A (en) Eight-point method-based contour-line tracing algorithm
CN115375872B (en) Automatic sketching method for GNSS measurement linear ground objects
CN101144711A (en) Automatic positioning method for global coordinate system under multiple-association engineering chart environment
CN116228998A (en) Automatic generation method of cut geological profile based on geological space database
CN102254093A (en) Connected domain statistical correlation algorithm based on Thiessen polygon
CN114758104A (en) Automatic interference-dispersion-resistant bar arrangement marking method suitable for three-dimensional design steel bar drawing
CN103714494B (en) Power circuit method for building up and device
CN110751896A (en) Method and device for drawing contour line notes on mine contour line related thematic map
Kennie et al. Digital terrain modelling
JP3755002B2 (en) Topographic data processing program
CN100476349C (en) Automatic calculation method for global coordinate system under multiple-association engineering chart environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Xu Fei

Inventor after: Chen Weiqing

Inventor after: Tang Liwei

Inventor after: Jiao Yuguo

Inventor after: Wei Kai

Inventor after: Wu Yanan

Inventor after: Zhao Xincun

Inventor after: Wang Yanling

Inventor after: Xia Xuesheng

Inventor after: Zhou Shaozhi

Inventor before: Xu Fei

Inventor before: Wu Yanan

Inventor before: Tang Liwei

Inventor before: Zhou Shaozhi

Inventor before: Zhao Xincun

Inventor before: Jiao Yuguo

Inventor before: Chen Weiqing

Inventor before: Wei Kai

Inventor before: Wang Yanling

Inventor before: Xia Xuesheng

GR01 Patent grant
GR01 Patent grant