Method of Drawing Highway Section Vector Diagram Based on VB
Through a combination of VB and EXCEL, highway section vector diagrams are quickly generated, which solves the problem of low efficiency of traditional manual drawing, and realizes efficient and low-cost as-build drawing, which is suitable for multiple projects.
Patent Information
- Application Number
- CN202211340696.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-29
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-10-29
AI Technical Summary
Traditional manual drawing of road completion drawings is inefficient, prone to errors and requires a lot of manpower, making it difficult to meet project progress requirements.
Using a combination of VB and EXCEL, a highway section vector diagram is generated by recording the original data, using VB to read and process the data, and the data is encoded and sent to CAD to draw the as-built diagram.
It realizes rapid drawing of road completion drawings, saves manpower consumption, improves drawing efficiency, reduces costs, and has universal applicability.
Smart Images

Figure CN115564867B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of highway completion drawing calculation, and in particular relates to a highway section vector drawing method based on VB. Background Art
[0002] As-built drawings are essential documentation for highway project acceptance. Redrawing construction blueprints using traditional manual methods is not only labor-intensive and inefficient, but also prone to errors and omissions.
[0003] The present invention is undertaken for the Kitwe-Chingela Highway Project in Zambia, which is located between Kitwe and Chingela in the Copperbelt Province of Zambia.
[0004] The characteristics of the highway involved in the project are as follows: the main road is a two-way four-lane asphalt concrete road, divided into a south section and a north section (45.5km long each, a total of 91km); the Qinggla municipal road is 16km long, with a total of 14 roads, two-way two-lane double-layer asphalt concrete roads. The total investment of the highway project is 1.35 billion local kwacha, equivalent to US$120 million.
[0005] According to the contract, the project can hand over the road in sections, and submit the relevant completion data of the drawings of each section, mainly including: measurement data, that is, the horizontal distance and corresponding elevation measured along the center line of the road to both sides. This data will be used to calculate the volume of fill and cut and the amount of road surface layer for the final payment. All sections are considered to be vertical surfaces;
[0006] The completion drawings generated from the above data include the road horizontal curve (including road ancillary facilities), longitudinal curve (including road curve parameters, except those modified on site), cross section (every 20 meters) and corresponding fill and cut section area.
[0007] At present, the highway project has entered the final stage of construction. During the entire construction process, the highway design has changed a lot, basically the entire line has been changed. The consulting unit has not provided new design drawings and has only provided design data.
[0008] Due to the significant project changes, the original design drawings used at the start of the project were essentially unusable. Unilateral modifications would have involved a significant workload. This would have consumed significant human resources, and given the long length of the highway, with a combined double-lane length exceeding 90km, plus the addition of 21km of municipal roads, manual mapping would have required tight timelines and a shortage of staff, hindering the project's continued progress.
[0009] To solve the above problems, a scientific research group was established in the project. It is hoped that through the research of the scientific research group, a faster method can be found to generate completion drawings to promote the subsequent progress of the project and provide a template for future projects that can be undertaken.
[0010] The research team's initial attempts to manually draw directly in AutoCAD graphics or to copy data from Excel and then paste it into AutoCAD resulted in less than ideal results. The main issues were: 1. The scale of each section was unstable, inefficient, and consumed a significant amount of the Chinese draftsman's time; 2. The required number of technicians was high, inconsistent with the project's actual needs; and 3. Technicians were limited in their ability to oversee on-site construction, collect as-built drawings, and coordinate on-site. Consequently, this conventional method was detrimental to the successful completion of the as-built drawings.
[0011] Based on the above problems, the research team discovered a method of drawing completion drawings by combining VB and EXCEL, which greatly improved the drawing speed and effect of the completion drawings and solved the urgent needs of the current project team. Summary of the Invention
[0012] The present invention aims to provide a method for drawing a highway section vector diagram based on VB, which has a fast drawing speed and reduces manpower consumption.
[0013] To solve the above technical problems, the present invention provides the following technical solution: a method for drawing a highway cross-section vector diagram based on VB, the method comprising the following steps in sequence:
[0014] (1) Record original data;
[0015] (2) Use VB to read the recorded raw data;
[0016] (3) Process the original data to generate original ground lines, design lines, elevation scales, annotation columns, and center lines;
[0017] The original ground line is generated as follows:
[0018] Step 1: Extract the original data with the n-1th pile number as X n-1 , and the corresponding ground elevation is Y n-1 The point formed is the n-1th point (X n-1 , Y n-1 ); the nth pile number is X n , and the point formed by the corresponding ground elevation Yn is the nth point (X n , Y n );
[0019] Step 2: The n-1th point (X n-1 , Y n-1 ), the nth point (X n , Y n ) Connect the two to get the original ground line;
[0020] The method to obtain the design line is:
[0021] y-y0=slope gradient×(x-x0) Formula 1
[0022] y-y2=(y3-y2) / (x3-x2)×(x-x2) Formula 2
[0023] Among them, (x0, y0) is the coordinate of the edge stake; (x2, y2) and (x3, y3) are points on the original ground line, and the line segment formed by (x2, y2) and (x3, y3) intersects with the slope line;
[0024] Combine Formula 1 and Formula 2 to obtain (x, y). (x, y) is the design point on the design line. The end point of the design line is: the endpoint of the original ground line. The point in the middle of the design line is: starting from the design point, draw a perpendicular line to the center stake, and the perpendicular point is the point in the middle of the design line. Connect the end points of the design line, the design point on the design line, and the point in the middle of the design line in order from left to right to obtain the design line.
[0025] (4) Encode the processed original ground line, design line, elevation scale, and annotation column data in DXF format and write them into DXF file using DXF file reading and writing module;
[0026] (5) Send the dxf file to CAD and generate a cross-sectional vector diagram in CAD.
[0027] The original data include pile number, offset, ground elevation, centerline elevation, shoulder width, side pile offset, side pile elevation, side pile offset, side pile elevation, wearing layer thickness, base layer thickness, subbase layer thickness and cushion layer thickness.
[0028] The method of obtaining the elevation scale is as follows: search each ground elevation in the original data record and find the original minimum elevation (h min ) and the original maximum elevation (h max ), original minimum elevation (h min ) is rounded to get the minimum elevation; the original maximum elevation (h max ) and add 1 to obtain the maximum elevation.
[0029] The method of selecting two points (x2, y2) and (x3, y3) on the original ground line is as follows: Step 1: Search for two adjacent points (X n-1 , Y n-1 ) and (X n , Y n ) connected line segments; search for each line segment of the slope line; find the point where the slope line intersects with the original ground line. The coordinate value of the line segment on the original ground at the intersection point is (x2, y2) on the left side of the line segment, and the coordinate value of the right end of the line segment is (x3, y3).
[0030] The slope of the left side slope line is: left slope, a point on the left side slope line is the left side stake (x 0左 ,y 0左 ); the slope of the right side slope line is: right slope, a point on the right side slope line is the right side stake (x 0右 ,y 0右 ).
[0031] The method for generating the annotation column is as follows: Step 1: read the offset in the original data, and the design elevation and ground elevation corresponding to the offset; Step 2: encode the read data in dxf format.
[0032] The method for generating the center line is as follows: Step 1: Read the pile number and spacing in the original data, calculate the total length of the highway as L, then the center line equation is (L / 2, Y x ), x is a variable.
[0033] The method of sending the dxf file to CAD is: using the COM communication interface of CAD to send the dxf file to CAD; when using VB to read the recorded original data, the EXCEL table is in the open running state.
[0034] The steps also include generating structural layer lines, which include wear layer lines, base layer lines, sub-base layer lines, and cushion layer lines; the method for generating the structural layer lines is: first, reading the wear layer thickness, base layer thickness, sub-base layer thickness, and cushion layer thickness in the original data; according to the original ground line generated in step 3, offsetting the original ground line downward by the wear layer thickness to generate a wear layer line, offsetting the wear layer line downward by the base layer thickness to generate a base layer line, offsetting the base layer line downward by the sub-base layer thickness to generate a sub-base layer line, and offsetting the sub-base layer line downward by the cushion layer thickness to generate a cushion layer line; second, encoding the generated wear layer line, base layer line, sub-base layer line, and cushion layer line data in dxf format, and writing them into a dxf file using a dxf file reading and writing module.
[0035] Through the above technical scheme, the technical effects of the present invention are as follows: 1. It realizes the rapid drawing of highway completion drawings. It only needs to record the original data to quickly generate the completion drawings, which saves manpower consumption, avoids the impact of the completion drawings on construction speed, and increases economic benefits; 2. The drawing method used has universal applicability. In other projects, it only needs to change the original data to use it in various projects; 3. EXCEL and AUTOCAD are connected through VB language, with fast running speed and high stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is the cross-section vector diagram generated using this method. DETAILED DESCRIPTION
[0037] A method for drawing a highway cross-section vector diagram based on VB, the method comprising the following steps in sequence:
[0038] (1) Record the original data, original data,
[0039] The original data include: pile number, offset, elevation, centerline elevation, shoulder width, side pile offset, side pile elevation, side pile offset, side pile elevation, wearing layer thickness, base layer thickness, subbase layer thickness and cushion layer thickness.
[0040] When recording data, the original data needs to be recorded in an EXCEL table. The EXCEL table used for recording is as follows:
[0041] Table 1 Original data record table
[0042]
[0043] During the construction process, one of the forms recorded is as follows:
[0044] Table 2 Record Example
[0045]
[0046] In this embodiment, the data can be normalized and formatted according to the table, and is no longer a pile of disorganized data, making it easier for the program to read the data.
[0047] (2) Use VB to read the original data of the record. When using VB to read the original data of the record, the EXCEL table is in the open running state.
[0048] (3) Process the original data to generate original ground lines, design lines, elevation scales, annotation columns, and center lines;
[0049] First, the method for generating the original ground line is:
[0050] Step 1: Extract the n-1th pile number from the original data as X n-1 , and the corresponding ground elevation is Y n-1 The point formed is the n-1th point (X n-1 , Y n-1 ); the nth pile number is X n , and the point formed by the corresponding ground elevation Yn is the nth point (X n , Y n );
[0051] Step 2: The n-1th point (X n-1 , Y n-1 ), the nth point (X n , Y n) Connect the two to get the original ground line.
[0052] For example, if the coordinate values of the pile number and ground elevation are (-15, 1630.98) and (20, 1629.12) respectively, then the original ground line between these two coordinates is (-15, 1630.98) to (20, 1629.12).
[0053] Second, the method for obtaining the design line is:
[0054] The design line includes the left design line and the right design line:
[0055] The method to obtain the design line on the left is:
[0056] The starting point of the left design line is: the starting point of the original ground line;
[0057] The design point on the left design line is: Combined formula 1 and formula 2:
[0058] yy 0左 = slope gradient × (xx 0左 ) Formula 1
[0059] yy 21 =(y 31 -y 21 ) / (x 31 -x 21 )×(xx 21 ) Formula 2
[0060] Among them, (x 0左 ,y 0左 ) is the coordinate of the left side pile; (x 21 ,y 21 ), (x 31 ,y 31 ) is a point on the original ground line, and (x 21 ,y 21 ), (x 31 ,y 31 )The line segment formed by the two intersects with the left slope line.
[0061] Combining Formula 1 and Formula 2, we can obtain (x, y), where (x, y) is the design point on the left design line.
[0062] In this step, two points (x 21 ,y 21 ) and (x 31 ,y 31 ) selection method is as follows: Step 1: Search for each line segment of the original ground line (X n-1 , Y n-1 ) and (X n, Y n ) connected line segments; search for each line segment of the slope line; Step 2: find the intersection of the two equations, the intersection is located on the line segment of the original ground line, the coordinate value on the left is (x 21 ,y 21 ), the coordinate value on the right is (x 31 ,y 31 ).
[0063] At the same time, the method for obtaining the left side slope line is: the slope of the left side slope line is known: the slope of the left side slope, the point on the left side slope line (x 0左 ,y 0左 ).
[0064] The coordinates of the end point on the left design line are (x 中桩 , y);
[0065] Connect the starting point of the left design line, the design point of the left design line and the end point on the left design line in sequence to obtain the left design line;
[0066] The method to obtain the design line on the right is:
[0067] The starting point of the right design line is: the right starting point of the original ground line;
[0068] The design points on the right design line are:
[0069] Combining Equation 1 and Equation 2:
[0070] yy 0右 = slope gradient × (xx 0右 ) Formula 1
[0071] yy 22 =(y 32 -y 22 ) / (x 32 -x 22 )×(xx 22 ) Formula 2
[0072] Among them, (x 0右 ,y 0右 ) is the coordinate of the right side pile; (x 22 ,y 22 ), (x 32 ,y 32 ) is a point on the original ground line, and (x 22 ,y 22 ), (x 32 ,y 32 )The line segment formed by the two intersects with the right side slope line.
[0073] Combining Formula 1 and Formula 2, we can obtain (x, y), where (x, y) is the design point on the design line on the right.
[0074] In this step, two points (x 22 ,y 22 ) and (x 32 ,y 32 ) selection method is as follows: Step 1: Search for each line segment of the original ground line (X n-1 , Y n-1 ) and (X n , Y n ) connected segments; search for each segment of the slope line; Step 2: find the intersection of the two equations, the intersection is located on the segment of the original ground line, the coordinate value on the right is (x 22 ,y 22 ), the coordinate value on the right is (x 32 ,y 32 ).
[0075] At the same time, the method for obtaining the right side slope line is: the slope of the right side slope line is known: the slope of the right side slope, the point on the right side slope line (x 0右 ,y 0右 ).
[0076] The coordinates of the end point on the right design line are (x 中桩 , y);
[0077] The right design line is obtained by sequentially connecting the starting point of the right design line, the design point of the right design line and the end point on the right design line.
[0078] Third, the method for obtaining the elevation scale is: search each ground elevation in the original data record and find the original minimum elevation (h min ) and the original maximum elevation (h max ), original minimum elevation (h min ) is rounded to get the minimum elevation; the original maximum elevation (h max ) and add 1 to obtain the maximum elevation.
[0079] Fourth, the method for generating the annotation column is: Step 1: read the offset in the original data, and the design elevation and ground elevation corresponding to the offset; Step 2: encode the read data in dxf format.
[0080] Fifth, the method for generating the center line is as follows: Step 1: Read the pile number and spacing in the original data, calculate the total length of the highway as L, then the center line equation is (L / 2, Y x ), x is a variable.
[0081] In addition, this step also includes generating structural layer lines, which include: a wear layer line, a base layer line, a subbase layer line, and a cushion layer line. The method for generating the structural layer lines is as follows: First, read the wear layer thickness, base layer thickness, subbase layer thickness, and cushion layer thickness in the original data; based on the original ground line generated in step 3, offset the original ground line downward by the wear layer thickness to generate a wear layer line, offset the wear layer line downward by the base layer thickness to generate a base layer line, offset the base layer line downward by the subbase layer thickness to generate a subbase layer line, and offset the subbase layer line downward by the cushion layer thickness to generate a cushion layer line.
[0082] This step also includes generating gutter lines, reading the gutter style from the original data, where the gutter style includes: gutter depth, gutter width, and the distance between the gutter and the roadside; based on the read gutter style, offset the design point on the design line inward by the distance from the slope to the roadside, and at the same time, offset the design line downward by the slope depth to obtain the gutter line; encode the gutter line in dxf format, write it into a dxf file using a dxf file reading and writing module, and then transfer it to CAD.
[0083] (4) The processed original ground lines, design lines, elevation scale, annotation column data, wearing layer lines, base layer lines, subbase layer lines, and cushion layer lines are encoded in DXF format and written into a DXF file using a DXF file reading and writing module. In this embodiment, the data is not directly transferred to CAD, but first transferred to DXF, which greatly improves the running speed of CAD.
[0084] (5) Send the dxf file to CAD and generate the cross-section drawing in CAD, such as Figure 1 In this embodiment, the method of sending the dxf file to the CAD is: using the COM communication interface of the CAD to send the dxf file to the CAD.
[0085] This technical solution will undoubtedly greatly increase the economic benefits of the project in the process of promotion and utilization. Compared with the traditional as-built drawing method, this solution saves 382,000 yuan in project costs and generates the following economic benefits:
[0086] The following is a comparative analysis of the efficiency of manual drawing and the drawing of this technical solution (assuming: the total amount of earthwork drawings is 1200 pages, and the total amount of structural drawings is 500 pages)
[0087] First: Manual drawing consumes man-days (total: 360 man-days); earthwork drawing: 2 man-days * 120 man-days = 240 man-days; structural drawing: 1 man-day * 120 man-days = 120 man-days; drawing printing: 2 man-days * 15 days = 30 man-days
[0088] Second: The number of working days consumed by using this plan (minimum: a total of 16 working days); earthwork drawings: original data preparation: 1 man-hour * 7 days = 7 working days; as-built drawing generation: 1 man-hour * 1 day = 1 working day; as-built drawing printing: 1 man-hour * 1 day = 1 working day; structural drawings: original data preparation: 1 man-hour * 7 days = 7 working days; as-built drawing generation: 1 man-hour * 1 day = 1 working day; as-built drawing printing: 1 man-hour * 1 day = 1 working day.
[0089] The average labor cost of Chinese technicians for this project is about RMB 1,000 per day. The total cost of manual drawing is approximately: (240 + 120 + 30) x 1,000 = RMB 390,000; the labor cost of computer programming drawing is approximately: (7 + 1 + 1 + 7 + 1 + 1) x 1,000 = RMB 18,000. The cost savings for the project is RMB 390,000 - RMB 18,000 = RMB 382,000.
[0090] From the above analysis, it can be seen that, purely from the perspective of economic indicators, this solution is far superior to manual mapping, and can be promoted and applied in future projects, which will undoubtedly save costs and improve efficiency.
Claims
1. A method for drawing a highway cross-section vector diagram based on VB, characterized by: The method comprises the following steps in sequence: (1) Record original data; (2) Use VB to read the recorded raw data; (3) Process the original data to generate original ground lines, design lines, elevation scales, annotation columns, and center lines; The original ground line is generated as follows: Step 1: Extract the original data with the n-1th pile number as X n-1 , and the corresponding ground elevation is Y n-1 The point formed is the n-1th point (X n-1 , Y n-1 ); the nth pile number is X n , and the corresponding ground elevation is Y n The point formed is the nth point (X n , Y n ); Step 2: The n-1th point (X n-1 , Y n-1 ), the nth point (X n , Y n ) Connect the two to get the original ground line; The method to obtain the design line is: y-y0=slope gradient×(x-x0) Formula 1 y-y2=(y3-y2) / (x3-x2)×(x-x2) Formula 2 Among them, (x0, y0) is the coordinate of the edge stake; (x2, y2) and (x3, y3) are points on the original ground line, and the line segment formed by (x2, y2) and (x3, y3) intersects with the slope line; Combine Formula 1 and Formula 2 to obtain (x, y). (x, y) is the design point on the design line. The end point of the design line is: the endpoint of the original ground line. The point in the middle of the design line is: starting from the design point, draw a perpendicular line to the center stake, and the perpendicular point is the point in the middle of the design line. Connect the end points of the design line, the design point on the design line, and the point in the middle of the design line in order from left to right to obtain the design line. (4) Encode the processed original ground line, design line, elevation scale, and annotation column data in DXF format and write them into DXF file using DXF file reading and writing module; (5) Send the dxf file to CAD and generate a cross-sectional vector diagram in CAD.
2. The method for drawing a highway cross-section vector diagram based on VB as claimed in claim 1, characterized in that: The original data include pile number, offset, ground elevation, centerline elevation, shoulder width, side pile offset, side pile elevation, side pile offset, side pile elevation, wearing layer thickness, base layer thickness, subbase layer thickness and cushion layer thickness.
3. The method for drawing a highway cross-section vector diagram based on VB as claimed in claim 2, characterized in that: The method of obtaining the elevation scale is as follows: search each ground elevation in the original data record and find the original minimum elevation (h min ) and the original maximum elevation (h max ), original minimum elevation (h min ) is rounded to get the minimum elevation; the original maximum elevation (h max ) and add 1 to obtain the maximum elevation.
4. The method for drawing a highway cross-section vector diagram based on VB as claimed in claim 3, characterized in that: The method of selecting two points (x2, y2) and (x3, y3) on the original ground line is as follows: Step 1: Search for two adjacent points (X n-1 , Y n-1 ) and (X n , Y n ) connected line segments; search for each line segment of the slope line; find the point where the slope line intersects with the original ground line. The coordinate value of the line segment on the original ground at the intersection point is (x2, y2) on the left side of the line segment, and the coordinate value of the right end of the line segment is (x3, y3).
5. The method for drawing a highway cross-section vector diagram based on VB as claimed in claim 4, characterized in that: The slope of the left side slope line is: left slope, a point on the left side slope line is the left side stake (x 0左 ,y 0左 ); the slope of the right side slope line is: right slope, a point on the right side slope line is the right side stake (x 0右 ,y 0右 ).
6. The method for drawing a highway section vector diagram based on VB as claimed in claim 4, characterized in that: The method for generating the annotation column is as follows: Step 1: read the offset in the original data, and the design elevation and ground elevation corresponding to the offset; Step 2: encode the read data in dxf format.
7. The method for drawing a highway cross-section vector diagram based on VB as claimed in claim 5, characterized in that: The method for generating the center line is as follows: Step 1: Read the pile number and spacing in the original data, calculate the total length of the highway as L, then the center line equation is (L / 2, Y x ), x is a variable.
8. The method for drawing a highway cross-section vector diagram based on VB as claimed in claim 7, characterized in that: The method to send dxf files to CAD is: use the COM communication interface of CAD to send the dxf files to CAD.
9. The method for drawing a highway cross-section vector diagram based on VB according to any one of claims 1 to 8, characterized in that: When using VB to read the recorded original data, the EXCEL table is in the open and running state.
10. The method for drawing a highway section vector diagram based on VB as claimed in claim 9, characterized in that: The steps also include generating structural layer lines, which include wear layer lines, base layer lines, sub-base layer lines, and cushion layer lines; the method for generating the structural layer lines is: first, reading the wear layer thickness, base layer thickness, sub-base layer thickness, and cushion layer thickness in the original data; according to the original ground line generated in step 3, offsetting the original ground line downward by the wear layer thickness to generate a wear layer line, offsetting the wear layer line downward by the base layer thickness to generate a base layer line, offsetting the base layer line downward by the sub-base layer thickness to generate a sub-base layer line, and offsetting the sub-base layer line downward by the cushion layer thickness to generate a cushion layer line; second, encoding the generated wear layer line, base layer line, sub-base layer line, and cushion layer line data in dxf format, and writing them into a dxf file using a dxf file reading and writing module.
Citation Information
Patent Citations
Cross section automatic plotting system and method based on DTM data models
CN104931015A
Road cross section line batch generation method
CN113486430A