A CAD secondary development survey and mapping auxiliary design system
By establishing a standard exploration graphics library and auxiliary design tools, automated auxiliary design of survey and design is realized, which solves the repeatability problems of exploration hole layout and profile connection in survey and design, improves the efficiency and quality of survey and design, and achieves the uniformity and accuracy of drawings.
Patent Information
- Application Number
- CN202211355341.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-11-01
AI Technical Summary
During the survey and design process, the layout of exploration holes and the drawing of profile connections are highly repetitive and labor-intensive, errors in the drawings are difficult to check, and the drawing methods of different survey units are inconsistent, resulting in low design efficiency and difficulty in ensuring quality.
Establish exploration standard graphics library and auxiliary design tools to realize batch automatic hole layout and profile connection of exploration holes, combine drawing error checking function, support data transmission and drawing unification, use AutoLISP language for secondary development, and use ODBC to connect to the database for graphics drawing and checking.
It improves the efficiency and quality of survey and design, realizes the automated auxiliary design of survey CAD drawings, ensures the uniformity and accuracy of drawings, reduces manual intervention, and improves design efficiency and quality.
Smart Images

Figure CN115688209B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drawing design, and in particular to a CAD secondary development survey and drawing auxiliary design system. Background Art
[0002] For a long time, survey and design personnel have relied solely on CAD commands to manually draw all exploration holes and section lines in the survey plan and set the corresponding parameters. This has led to problems such as high drawing repetition, heavy workload, and difficulty in checking drawing errors. Furthermore, the results of CAD drawing design still need to be manually counted and summarized, making the creation and review of survey and construction CAD drawings often a labor-intensive process. Furthermore, due to the wide variety of exploration holes, different survey units sometimes have inconsistent drawing methods, which needs to be standardized.
[0003] AutoLISP is the earliest secondary development language of AutoCAD. The language rules are very simple and easy to learn and use. Engineering professionals who do not have a deep understanding of computers can master this language after only a short period of study. The AutoLISP language is very concise. It is directly targeted at AutoCAD, interpreted and executed, and easy to interact with. The application of AutoLISP to CAD secondary development technology related to survey and mapping has made certain progress in recent years. According to relevant paper inquiries, some survey units have used AutoLISP to realize the automated auxiliary generation of exploration hole layout and section line setting in the survey and design mapping process, and the data exchange between the survey plan layout and the database in the geotechnical engineering survey data processing system software.
[0004] However, with the development of computer technology, CAD programming has become increasingly complex, the code has become increasingly large, and AutoLISP's shortcomings, such as poor comprehensive processing capabilities, slow program running speed, difficulty in ensuring software quality, low development environment integration, and inconsistency with people's thinking, have become increasingly obvious. Summary of the Invention
[0005] In response to the deficiencies of the existing technology, the present invention provides a CAD secondary development survey and drawing auxiliary design system, which overcomes the deficiencies of the existing technology and realizes the rapid batch automated auxiliary design of highly repetitive exploration hole layout and profile connection line drawing, parameter setting and other tasks in the survey plan CAD drawing design process, and realizes the functions of drawing error checking, data transmission between CAD drawings and external files or databases, etc., which plays a significant role in improving the efficiency of survey CAD design and drawing and improving design quality.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0007] A CAD secondary development survey and mapping auxiliary design system includes the following steps:
[0008] Step S1: Establishing a standard exploration graphics library and implementing survey and design drawing auxiliary tools;
[0009] Step S2: Survey project and drawing information setting: according to the needs of system data transmission and drawing drawing function, survey project number and sub-project number are set; drawing parameter unit, scale, hole spacing information is set;
[0010] Step S3: Arrange holes on the plan view, and set a unified hole depth for the selected exploration holes in batches on the CAD drawing; select all exploration holes that need to be set with a hole depth, enter the depth value, and then mark the hole depth in the hole depth text field of all selected exploration holes;
[0011] Step S4: Click holes on the CAD drawing in sequence or select multiple holes in batches to connect the selected holes to the profile line; then select the holes and the profile line, disconnect or connect the selected exploration holes and the profile line, set the calculation points, line coordinates and distances according to the user's selection, reorder the profile line drawing points, and then automatically redraw the profile line;
[0012] Step S5: Export or import the exploration hole, profile, construction coordinates and city coordinate data on the CAD drawing as needed;
[0013] Step S6: Check the drawing errors. Check the contents of the survey CAD drawing according to the survey plan or survey report requirements, and provide prompts directly in text form on the CAD drawing. The system will provide error prompts in the form of pop-up windows to prompt the user to revise the CAD drawing according to the inspection results.
[0014] Preferably, the method for establishing the exploration standard graphic library in step S1 comprises the following steps:
[0015] Step S11: The exploration hole legend and the graphics in the auxiliary graphics library are first drawn using CAD, saved as blocks, and then saved as dwg files;
[0016] Step S12: loading the dwg files of all exploration hole legends and auxiliary graphic blocks into the CAD built-in database;
[0017] Step S13: When the designated legend menu item is clicked, the system connects to the CAD database via ODBC, traverses the database table, and finds the selected legend block file by block name;
[0018] Step S14: Call the CAD block operation command and apply the legend to draw at the user-selected position in the CAD drawing.
[0019] Preferably, the auxiliary drawing tools in step S1 include planned buildings, built buildings, auxiliary circles, and large and small hole layers.
[0020] Preferably, the planar hole arrangement in step S3 includes standard single-point hole arrangement, batch hole arrangement and mid-point hole arrangement;
[0021] Among them, the standard single-point hole arrangement is: select the hole type, click on each position on the CAD drawing, and the single hole can be arranged in sequence;
[0022] Batch hole arrangement: After selecting two points on the CAD drawing, the system automatically configures the hole arrangement type from all hole categories and sets the automatic hole arrangement combination. The system calculates the number of exploration holes that can be arranged based on the preset hole arrangement spacing and the spacing between the two selected points, and calculates the actual hole arrangement spacing. It sets whether to retain or remove the holes at both ends. After confirmation, the system automatically draws exploration holes in batches between the two points on the CAD drawing in sequence using different types of exploration hole legends.
[0023] Midpoint hole layout: After selecting two points and the exploration hole type on the CAD drawing, the system calculates the coordinates of the middle position between the two points and draws the selected exploration hole type at the middle position between the two points.
[0024] Preferably, the specific steps of implementing the batch hole arrangement include:
[0025] Step S31: After the user clicks, the position coordinates (x A ,y A )、(x B ,y B ), calculate the distance between two points by coordinates;
[0026] Step S32: The hole spacing set in the initial stage of the project is retained by default, and a modification interface is provided for the user to manually modify the spacing to obtain the final hole spacing;
[0027] Step S33: Calculate the number of exploration holes between the two points by dividing the distance between the two points by the hole spacing. If the number is not divisible, round the result to the nearest integer. If the number is divisible, subtract 1 from the result. This value is the number of exploration holes to be arranged between the two points.
[0028] Step S34: Calculate the actual spacing between adjacent exploration holes: divide the spacing between the two end points by the number of exploration holes between the two points plus 1 to obtain the spacing between adjacent exploration holes;
[0029] Step S35: Generate a line equation (xx) based on the coordinates of the two end points A ) / (x B -x A )=(yy A ) / (y B -yA ), and then calculate the center position coordinates of each large exploration hole to be laid out according to the actual spacing between adjacent exploration holes calculated in step S34, and put them into an array;
[0030] Step S36: Whether to arrange holes at the two endpoints is selected and set by the user on the interface;
[0031] Step S37: Select exploration hole categories other than small drill holes from all hole categories one by one and place them into an array in sequence. After completion, the array is used as a hole arrangement combination. During automatic hole arrangement, the exploration hole legend block is obtained according to the selected combination order, and is drawn and placed at each coordinate value position in the center coordinate array of each exploration hole to be arranged calculated in step S35. The exploration holes are automatically and repeatedly arranged in sequence.
[0032] Step S38: Select whether to automatically arrange small drill holes, set and obtain the small drill hole spacing;
[0033] Step S39: Calculate the number of small drill holes that should be arranged between two adjacent large exploration holes based on the small drill hole spacing and the actual large exploration hole spacing;
[0034] Step S310: Calculate the center coordinates of each small probe hole to be deployed and put them into an array;
[0035] Step S311: Obtain small drill hole legend blocks, draw them one by one and place them at each coordinate value position in the coordinate array of the center position of the small drill holes to be arranged calculated in step S310.
[0036] Preferably, the manner of selecting the exploration holes in step S3 includes point selection, fence selection and frame selection.
[0037] Preferably, the exploration hole profile connection method includes:
[0038] Step S41: Set a multi-line segment plus two txt text boxes as a group to realize a hatch line instance; the hatch line multi-line segment is pre-set with color, width, and line type according to actual needs;
[0039] Step S42: for the exploration holes selected by point selection or fence selection in batches, the exploration hole blocks are sequentially stored in the exploration hole block array corresponding to the section line according to the selection order;
[0040] Step S43: for the exploration holes selected in batches by the frame selection, the maximum absolute value distance in the x-axis direction and the maximum absolute value distance in the circumferential direction of the exploration holes are calculated based on the minimum and maximum x and y coordinates of the center position coordinates of all the selected exploration holes;
[0041] Step S44: determining the direction with the larger maximum absolute value distance in the x-axis or y-axis direction as the automatic number sorting direction;
[0042] Step S45: sorting the array of exploration hole blocks corresponding to the profile line according to the x-axis value or y-axis value of the exploration hole center position coordinate according to the number sorting direction calculated in step S44;
[0043] Step S46: traverse the array of exploration hole blocks and automatically connect the center positions of the exploration holes with multiple line segments;
[0044] Step S47: For the exploration holes at both ends, draw an extension line of the adjacent line segment with the coordinates of the center position of the endpoint as the starting point, and the length is the same as that of the line segment;
[0045] Step S48: The profile lines are divided into two categories: large profile lines and small profile lines, which are respectively for large exploration holes and small drilling holes. When the two types of profile lines are drawn, the other type of exploration holes is automatically filtered out according to the layer.
[0046] Preferably, the step S5 specifically includes:
[0047] (1) Export of profile data: After selecting the profile line, export the exploration hole design data related to the profile line to Excel, txt file or other database;
[0048] (2) Export of construction coordinates and city coordinates: After selecting the exploration hole on the CAD drawing, export the hole data to Excel, txt file or other system database, including the construction CAD drawing coordinates and city coordinates;
[0049] (3) Importing data from the database of hole depth, elevation and water level: Obtain and import the hole depth, water level and elevation data of the exploration hole from other databases into this system, and automatically update the exploration hole annotation information on the CAD drawing.
[0050] Preferably, the drawing error check in step S6 includes drawing error check in the proposal stage and drawing error check in the report stage.
[0051] The present invention provides a CAD secondary development survey and mapping auxiliary design system. This system has the following beneficial effects: by establishing a professional survey standard graphics library, auxiliary graphics library, and auxiliary tools, and developing a drawing error checking function, it helps to achieve unified survey CAD drawing standards and improve survey and design quality. Furthermore, through computer graphics technology and other means, it enables rapid, batch, automated auxiliary design of highly repetitive tasks such as exploration hole layout, profile line drawing, and parameter setting during the survey plan CAD drawing design process. It also implements drawing error checking and data transfer between CAD drawings and external files or databases. This results in a fully functional survey CAD drawing automated auxiliary design system, improving survey CAD design and mapping efficiency and ensuring survey and mapping quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the prior art.
[0053] Figure 1 Schematic diagram of the system functional modules of the present invention;
[0054] Figure 2 Flow chart of batch automatic hole arrangement operation in the present invention;
[0055] Figure 3 Flowchart of the automatic hatching operation in the present invention;
[0056] Figure 4 Example diagram of the hatching line merging diagram in the present invention;
[0057] Figure 5 Data transmission flow chart in the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention.
[0059] Example
[0060] like Figure 1-5 As shown, the present invention discloses a CAD secondary development survey and mapping auxiliary design system, comprising the following steps:
[0061] Step S1: Establishing a standard exploration graphics library and implementing survey and design drawing auxiliary tools;
[0062] The method for establishing the exploration standard graphics library includes the following steps:
[0063] Step S11: The exploration hole legend and the graphics in the auxiliary graphics library are first drawn using CAD, saved as blocks, and then saved as dwg files;
[0064] Step S12: loading the dwg files of all exploration hole legends and auxiliary graphic blocks into the CAD built-in database;
[0065] This system customizes complete exploration hole legends and commonly used auxiliary graphics for exploration mapping in accordance with relevant national and local standards for exploration, forming a complete legend and auxiliary graphics library.
[0066] This system includes exploration hole legends for the following types: soil sampling boreholes, standard soil penetration holes, static penetration holes with single bridges, small boreholes, and other special holes (wave velocity test holes, cross-plate shear holes, pumping holes, water injection holes, static penetration holes with double bridges, lateral pressure test holes, flat shovel side expansion test holes, standard penetration holes, dynamic penetration holes, light dynamic penetration holes, seismic test holes, resistivity test holes, and long-term groundwater observation holes). Legends are configured according to relevant national and exploration industry standards. This system also includes a library of commonly used auxiliary graphics, including compasses, scales, legends, and frames.
[0067] Step S13: When the designated legend menu item is clicked, the system connects to the CAD database via ODBC, traverses the database table, and finds the selected legend block file by block name;
[0068] Step S14: Call the CAD block operation command and apply the legend to draw at the user-selected position in the CAD drawing.
[0069] Additionally, drawing aids include planned buildings, existing buildings, auxiliary circles, and large and small hole layers. The proposed and existing buildings are created using the polyline command provided by CAD, making building drawing easier. Auxiliary circles display a circle of a certain diameter centered on all exploration holes, providing a visual aid for checking whether the spacing between exploration holes meets design requirements. Auxiliary circles can be enabled or disabled uniformly.
[0070] Auxiliary circle technical solutions include:
[0071] (1) Enable the auxiliary circle function: All exploration holes are judged one by one. The radius of the circle in the exploration hole legend is set to 0.2m. For each exploration hole center, it is judged whether there is a circle with its center and a diameter greater than 0.5m. If so, it is considered that this exploration hole already has an auxiliary circle, and the next exploration hole judgment is carried out. If not, it is determined that this exploration hole does not have an auxiliary circle. With the exploration hole center as the circle center, a circle with the hole spacing (e.g., 35m) as the radius is drawn, and then the next exploration hole judgment is carried out. The judgment and processing of all exploration holes are completed.
[0072] (2) Disable the auxiliary circle function: Similarly, all exploration holes are judged one by one. Whether there is an auxiliary circle in the exploration hole by judging whether there is a circle with the center of the exploration hole as the center and a diameter greater than 0.5m is determined. If there is an auxiliary circle with the center of the exploration hole as the center, the auxiliary circle is determined to exist and deleted, and then the next exploration hole is judged. If not, the auxiliary circle is determined to not exist in the exploration hole, and the next exploration hole is judged directly. The judgment and processing of all exploration holes are completed.
[0073] After completing the exploration hole layout, you can use the Auxiliary Circle (35m diameter) feature to display each exploration hole as an auxiliary circle with a center radius of 35m. During hole layout, you can check whether two adjacent auxiliary circles intersect or are tangent to ensure that the distance between two holes does not exceed 35m. The auxiliary circle can be set to on or off according to application needs.
[0074] The large and small hole layer is used to classify exploration holes by size. The large and small hole layer can be set to be displayed or hidden. The technical solution for implementing the large and small hole layer is to draw the large and small hole layers on different layers. Turning on or off the relevant layers will display or hide the large and small hole layers.
[0075] Step S2: Survey project and drawing information setting: according to the needs of system data transmission and drawing drawing function, survey project number and sub-project number are set; drawing parameter unit, scale, hole spacing information is set;
[0076] Step S3: Arrange holes on the plan view, and set a unified hole depth for the selected exploration holes in batches on the CAD drawing; select all exploration holes that need to be set with a hole depth, enter the depth value, and then mark the hole depth in the hole depth text field of all selected exploration holes;
[0077] In this embodiment, the planar hole layout includes standard single-point hole layout, batch hole layout, and mid-point hole layout;
[0078] Among them, the standard single-point hole arrangement method is: select the hole type and click on each position on the CAD drawing to arrange the single holes in sequence;
[0079] The batch hole arrangement method is as follows: after selecting two points on the CAD drawing, the automatic hole arrangement type is configured from all hole categories, and an automatic hole arrangement combination is set (that is, the exploration hole types included in the combination are selected one by one). The system calculates the number of exploration holes that can be arranged based on the preset hole arrangement spacing and the spacing between the two selected points, and calculates the actual hole arrangement spacing. It sets whether to retain or remove the holes at both ends. After confirmation, the exploration holes are automatically drawn in batches between the two points on the CAD drawing using different exploration hole types.
[0080] The technical solution for implementing the batch hole arrangement program between two points is:
[0081] Step S31: After the user clicks, the position coordinates (x A ,y A )、(x B ,y B ), calculate the distance between two points by coordinates;
[0082] Step S32: The hole spacing set in the initial stage of the project is retained by default, and a modification interface is provided for the user to manually modify the spacing to obtain the final hole spacing;
[0083] Step S33: Calculate the number of exploration holes between the two points by dividing the distance between the two points by the hole spacing. If the number is not divisible, round the result to the nearest integer. If the number is divisible, subtract 1 from the result. This value is the number of exploration holes to be arranged between the two points.
[0084] Step S34: Calculate the actual spacing between adjacent exploration holes: divide the spacing between the two end points by the number of exploration holes between the two points plus 1 to obtain the spacing between adjacent exploration holes;
[0085] Step S35: Generate a line equation (xx) based on the coordinates of the two end points A ) / (x B -x A )=(yy A ) / (y B -y A ), and then calculate the center position coordinates of each large exploration hole to be laid out according to the actual spacing between adjacent exploration holes calculated in step S34, and put them into an array;
[0086] Step S36: Whether to arrange holes at the two endpoints is selected and set by the user on the interface;
[0087] Step S37: Select exploration hole categories other than small drill holes from all hole categories one by one and place them into an array in sequence. After completion, the array is used as a hole arrangement combination. During automatic hole arrangement, the exploration hole legend block is obtained according to the selected combination order, and is drawn and placed at each coordinate value position in the center coordinate array of each exploration hole to be arranged calculated in step S35. The exploration holes are automatically and repeatedly arranged in sequence.
[0088] Step S38: Select whether to automatically arrange small drill holes, set and obtain the small drill hole spacing;
[0089] Step S39: Calculate the number of small drill holes that should be arranged between two adjacent large exploration holes based on the small drill hole spacing and the actual large exploration hole spacing;
[0090] Step S310: Calculate the center coordinates of each small probe hole to be deployed and put them into an array;
[0091] Step S311: Obtain small drill hole legend blocks, draw them one by one and place them at each coordinate value position in the coordinate array of the center position of the small drill holes to be arranged calculated in step S310.
[0092] In this embodiment, automatic batch hole layout only requires the user to input necessary settings, and there is no need to manually draw the exploration holes one by one. The system automatically calculates the hole spacing and exploration hole coordinates, and draws the exploration holes on the CAD drawing according to the standard exploration hole legend, ensuring that the exploration holes are evenly and accurately positioned, greatly improving CAD drawing efficiency, and at the same time improving the quality of exploration hole layout drawing.
[0093] The midpoint hole layout method is: after selecting two points and the exploration hole type on the CAD drawing, the system calculates the coordinates of the middle position between the two points and draws the selected exploration hole type at the middle position between the two points.
[0094] In addition, this system has three ways to select the exploration holes that have been laid out on the map: point selection (the user clicks on the exploration holes one by one to select), bar selection (the user uses the mouse to draw multiple exploration holes on the CAD drawing at one time to select them in batches), and frame selection (the user uses the mouse to specify the diagonal lines of the rectangle on the CAD drawing to select the exploration holes within the rectangular range).
[0095] For point selection and fence selection, the technical solution for automatically setting the exploration hole number in batches is:
[0096] (1) Provide an interactive interface for users to batch select exploration holes that need to be automatically numbered. For exploration holes selected by point selection and bar selection, the system stores the exploration hole blocks in the array in the order selected by the user.
[0097] (2) Provide an interactive interface for the user to enter the first number format. The part after the number should be set to a number, such as "A1".
[0098] (3) The system operates on the exploration hole block numbers in step (1) and automatically sets the content of the hole number text field of each exploration hole block in sequence according to the rule of increasing the last digit of the number.
[0099] For box selection, the technical solution for automatically setting the exploration hole numbers in batches is:
[0100] (1) Provide an interactive interface for users to batch select exploration holes that need to be automatically numbered.
[0101] (2) For the exploration holes selected in batches by box selection, the system calculates the maximum absolute distance in the x-axis direction and the maximum absolute distance in the circumferential direction of the exploration holes based on the minimum and maximum x and y coordinates of the center position coordinates of all selected exploration holes.
[0102] (3) The system determines the direction with the larger maximum absolute value distance in the x-axis or y-axis direction as the automatic sorting direction of the numbers.
[0103] (4) The system sorts the exploration hole block array according to the x-axis value or y-axis value of the exploration hole coordinate based on the number sorting direction calculated in step (3).
[0104] (5) The system automatically sets the content of each exploration hole number text field in the sorted exploration hole block array according to the rule of increasing the last digit of the number.
[0105] Step S4: Click holes on the CAD drawing in sequence or select multiple holes in batches to connect the selected holes to the profile line; then select the holes and the profile line, disconnect or connect the selected exploration holes and the profile line, set the calculation points, line coordinates and distances according to the user's selection, reorder the profile line drawing points, and then automatically redraw the profile line;
[0106] The automatic connection technology solution for exploration hole profiles includes the following steps:
[0107] Step S41: Set a multi-line segment plus two txt text boxes as a group to realize a hatch line instance; pre-set the color, width, line type and other attributes of the hatch line multi-line segment according to actual needs;
[0108] Step S42: for the exploration holes selected by point selection or fence selection in batches, the exploration hole blocks are sequentially stored in the exploration hole block array corresponding to the section line according to the selection order;
[0109] Step S43: for the exploration holes selected in batches by the frame selection, the maximum absolute value distance in the x-axis direction and the maximum absolute value distance in the circumferential direction of the exploration holes are calculated based on the minimum and maximum x and y coordinates of the center position coordinates of all the selected exploration holes;
[0110] Step S44: determining the direction with the larger maximum absolute value distance in the x-axis or y-axis direction as the automatic number sorting direction;
[0111] Step S45: sorting the array of exploration hole blocks corresponding to the profile line according to the x-axis value or y-axis value of the exploration hole center position coordinate according to the number sorting direction calculated in step S44;
[0112] Step S46: traverse the array of exploration hole blocks and automatically connect the center positions of the exploration holes with multiple line segments;
[0113] Step S47: For the exploration holes at both ends, draw an extension line of the adjacent line segment with the coordinates of the center position of the endpoint as the starting point, and the length is the same as that of the line segment;
[0114] Step S48: The profile lines are divided into two categories: large profile lines and small profile lines, which are respectively for large exploration holes and small drilling holes. When the two types of profile lines are drawn, the other type of exploration holes is automatically filtered out according to the layer.
[0115] In addition, the technical solution for separating the exploration hole and the profile line includes the following steps:
[0116] Step S411: The user selects a profile line and an exploration hole to be separated from the profile line. The system calculates the distance between each vertex of the polyline segment and the center of the exploration hole, and compares the distance with a small positive value J close to 0 (for example, 0.1m). If the distance is less than J, the polyline segment vertex is determined to correspond to the selected exploration hole.
[0117] Step S412: If the exploration holes selected for separation are holes at both ends of the profile line, the system deletes the line segment on one side of the multi-line segment vertex determined in step 1), and deletes the adjacent exploration hole block values in the exploration hole block array (which has been sorted automatically or by the system) corresponding to the profile line;
[0118] Step S413: If the selected exploration hole is not a hole at either end of the section line, the system deletes the line segments on either side of the multi-segment vertex identified in step 1). The short segment vertex is searched for by using two adjacent values in the sorted exploration block array, using the same search method as in step 1. The system then connects the two disconnected endpoints of the multi-segment and deletes the corresponding exploration block value from the exploration block array. If either of the disconnected endpoints is a hole at either end of the multi-segment section line, the original section line end extension line is deleted and a new extension line of the adjacent segment is drawn, with the same length as the adjacent segment.
[0119] The technical solution for merging exploration holes when redrawing the section line includes the following steps:
[0120] Step S421: The user selects a profile line and an exploration hole P to be merged with the profile line;
[0121] Step S422: the system calculates the distance between the center position of each exploration hole in the array of exploration holes corresponding to the profile line and the exploration holes to be merged, and finds the two exploration holes in the array that are closest to the exploration holes to be merged, which are represented by H1 and H2.
[0122] Step S423: The system disconnects the multi-segment connection between H1 and H2.
[0123] Step S424: The system finds the polyline vertices corresponding to H1 and H2 according to the method of "the distance between the polyline vertex and the center of the exploration hole is less than the preset minimum positive value", and draws the line segment between the two polyline vertices and the center of the exploration hole P.
[0124] In terms of technical implementation, section lines are selected in batches according to the above-mentioned different selection function items, and the txt text box content of each section line group is operated. The technical implementation scheme for batch selection of section lines is basically the same as the technical scheme for batch selection of exploration holes.
[0125] Step S5: Export or import the exploration hole, profile, construction coordinate, and city coordinate data on the CAD drawing as needed for use in exploration plans, reports, or other analytical processing. The exported data includes exploration hole data (number, hole depth, water level, elevation), profile data, and coordinates (construction coordinate system and city coordinate system). The construction coordinate system used in the CAD drawing has a conversion relationship with the city coordinate system. This system uses coordinate system conversion technology to automatically convert exploration hole coordinates between the two coordinate systems.
[0126] The system also realizes the function of importing data such as hole depth, elevation, water level, etc. from other databases and automatically updating the corresponding annotation information of the exploration hole on the CAD drawing.
[0127] The method for exporting profile data and exploration hole data is as follows:
[0128] Step S511: After selecting the export function, select multiple section lines;
[0129] Step S512: The system obtains the group and exploration hole block array corresponding to the section line according to the section line selected on the CAD drawing;
[0130] Step S513: The system checks whether the hatch line group text box contains content. If so, the system obtains the hatch line number according to the text box content and stores it in an array. Otherwise, the system prompts that the hatch line number is missing.
[0131] Step S514: The system obtains the exploration hole number, hole depth, water level, and elevation data based on the exploration hole block array corresponding to the profile line, calculates the distance between the center positions of adjacent exploration holes and saves it as the hole spacing. The exploration hole data is saved in a multidimensional array.
[0132] Step S515: The system writes each profile line data and its corresponding exploration hole data array data into Excel, txt or other databases through ODBC.
[0133] The method to derive the coordinates of the exploration hole city coordinate system is:
[0134] Since the coordinates of the exploration hole on the CAD drawing are generally the construction coordinate system coordinates, sometimes it is necessary to derive the city coordinate system coordinates. The coordinate system conversion technical solution is:
[0135] Step S521: Take the coordinates of two points at different positions on the CAD drawing, namely (x1, y1) and (x2, y2), and obtain the coordinates of the corresponding points in the city coordinate system, namely (x1', y1') and (x2', y2');
[0136] Step S522: Let θ be the rotation angle between the two coordinate systems.
[0137] x′=k·cosθ·xk·sinθ·y+T x
[0138] y′=k·sinθ·xk·cosθ·y+T y
[0139] Let: θ = tan -1 (b / a), k=a / cosθ
[0140] Obtain: a=k·cosθ, b=k·sinθ
[0141] x′=a·xb·y+T x
[0142] y′=b·xa·y+T y
[0143] x1y1——>x1' y1'
[0144] X2y2——>x2' y2'
[0145] but
[0146] From the above formula, a, b, Tx, Ty can be calculated, and then according to the formula θ=tan -1 (b / a), k = a / cosθ to find θ and k, and then substitute them into the formula to get the formula for the new coordinates;
[0147] Step S523: swap and reverse the x and y values of the city coordinate system obtained by the above method.
[0148] The reason is that the city coordinate system (the measurement used on blueprints) uses the horizontal axis pointing rightward as the positive y-axis, pointing east. The vertical axis pointing upward is the positive x-axis, pointing north. The CAD coordinate system is the same as we're used to: the horizontal axis pointing rightward is the positive x-axis, and the vertical axis pointing upward is the positive y-axis. These two coordinate systems are exactly opposite.
[0149] Step S524: The coordinate conversion process requires data overflow exception processing.
[0150] The technical solution for updating the exploration hole elevation and depth data on the CAD drawing by importing data from an external database includes the following steps:
[0151] Step S531: The system obtains the exploration well number, elevation, hole depth, and water level data from Excel, txt files, or other databases through ODBC open database interconnection, and stores the data into a multidimensional array.
[0152] Step S532: Parse the exploration hole number from the multidimensional array, search all the exploration hole blocks included in the CAD drawing, and find the exploration hole block with the same exploration hole number.
[0153] Step S533: Update the elevation and hole depth data in the exploration hole block text field in the CAD drawing.
[0154] Step S6: Check the drawing errors. Check the contents of the survey CAD drawing according to the survey plan or survey report requirements, and provide prompts directly in text form on the CAD drawing. The system will provide error prompts in the form of pop-up windows to prompt the user to revise the CAD drawing according to the inspection results.
[0155] Drawing error checking is divided into two different stages: the planning stage and the reporting stage. The inspection plans for different stages are somewhat different.
[0156] The technical solution for checking drawing errors at the design stage includes the following steps:
[0157] (1) Get the array of all exploration hole blocks.
[0158] (2) Traverse the array and judge the exploration hole blocks one by one. First, determine whether the hole number and hole depth in the text field are missing. If missing, record them. Then compare the hole number in the exploration hole text field with the subsequent exploration hole numbers in the array to see if there is a repetition. If so, record them.
[0159] (3) After completing the above inspection of all exploration holes, the text content of missing and duplicate records is displayed on the CAD drawing.
[0160] Technical solution for checking drawing errors during the reporting phase:
[0161] Based on the above-mentioned error checking scheme for the drawings in the scheme stage, a check is added to check whether the elevation and water level of the holes in the text field of each exploration hole block are missing.
[0162] In the second embodiment, during the specific operation:
[0163] S1: System Installation
[0164] This system is installed on 64-bit CAD software. The supported AutoCad versions are Autocad2015 and Autocad2019, and the ZWCAD version zwcad2021.
[0165] After the installation is complete, open CAD and the system-related menu items will appear in the menu bar.
[0166] S2: Survey project and drawing information settings
[0167] First open or create a new survey CAD drawing.
[0168] Set the survey project number and sub-project number. (The project number setting here is used for data transmission between other survey system databases. If data transmission is not required, it can be omitted.)
[0169] Set the drawing parameter unit: select mm or m according to the actual size of the drawing. In this example, m is selected. Scale: In this example, it is set to 1:1000. Hole spacing: According to general exploration requirements, it is set to 35m.
[0170] S3: CAD drawing of survey and design scheme
[0171] According to the survey and design plan, all exploration holes and parameter layouts are drawn on the CAD drawing, and the profile lines between the exploration holes are set accordingly.
[0172] Hole arrangement:
[0173] Select different hole placement modes from the system's menu: "Standard Single-Point Hole Placement," "Batch Hole Placement," and "Midpoint Hole Placement." Use the system's standard diagrams for all types of exploration holes to place exploration holes on a CAD plan. These functions improve plan hole placement efficiency, with the "Batch Hole Placement" function significantly improving it. The "Hole Parameter Settings" function allows batch setting of exploration hole numbers, depths, elevations, and water level parameters, as well as hole type settings and modifications.
[0174] The specific operation method of modifying the hole number in this system is: click the "Modify hole number" button in the toolbar, and the command "1. Click (box) to select to set the hole number, 2. Click to set the hole number in sequence, 3. Batch add or delete hole number prefixes, 4. Batch modify the already coded hole numbers" will appear in the command bar. Users can select the corresponding serial number according to their needs and then edit the hole number.
[0175] The specific operation method of batch modifying hole types in this system is: click the "Modify hole type" button in the toolbar, then select the holes that need to be modified, then right-click the mouse or press the space bar, and a hole type selection box will pop up (soil hole, mark hole, mark through hole, static exploration hole, small drilling hole, wave velocity hole, cross hole, pumping hole, water injection hole, double bridge hole, lateral pressure hole, flat shovel hole, dynamic exploration hole, resistivity hole), select the hole type to be modified, choose to change to "control hole" or "virtual hole"), click the OK button to complete the modification.
[0176] profile:
[0177] After the exploration holes are laid out, the exploration hole profiles can be set. Depending on whether the exploration hole is small, the operation is divided into two types: "Large Profile" and "Small Profile." Additionally, you can batch select exploration holes, set profile lines, modify, and edit them. "Section Hole Split and Merge" allows you to separate or merge selected exploration holes and profile lines.
[0178] S4: Assisted graphics drawing
[0179] The standard graphics library of this system has auxiliary graphics such as compass, scale, legend, frame, planned building, built building, etc., which can be selected and then clicked directly on the appropriate position on the CAD drawing to quickly and conveniently draw the above auxiliary graphics.
[0180] S5: Assisted graphics drawing
[0181] Check the exploration holes and section line drawings on the CAD drawings according to the exploration and design rules during the survey plan or report phase. The system will display drawing error information (such as missing exploration holes or section line numbers) in pop-up windows and text annotations directly on the CAD drawings. Users can revise the errors in the drawings according to the error prompts and recheck them until all errors are corrected and the inspection is passed.
[0182] S6: Data Transfer
[0183] The system can export or import data such as exploration holes and profiles on CAD drawings as needed. The specific operations are as follows:
[0184] (1) Export of section data
[0185] After selecting the profile line, export the exploration hole design data (hole number, depth, elevation, hole spacing) related to the profile line to Excel, TXT file or other system database.
[0186] (2) Export of construction coordinates and city coordinates
[0187] You can select an exploration hole on the CAD drawing and export the hole data to Excel, TXT files or other system databases, including the construction CAD drawing coordinates and city coordinates.
[0188] (3) Import database data such as hole depth, elevation, and water level
[0189] The depth, water level and elevation data of the exploration hole can be obtained from other databases and imported into this system, and the exploration hole annotation information can be automatically updated on the CAD drawing.
[0190] The development and operating environment for CAD secondary development used in the present invention is Visual Studio.NET 2019, NET Framework 4.5, with C# communicating with AutoCAD via Active X. By establishing a professional exploration standard graphics library, auxiliary graphics library, and auxiliary tools, and developing a drawing error checking function, this helps to unify exploration CAD drawing standards and improve the quality of survey and design. Furthermore, computer graphics technology is used to achieve rapid, batch, automated auxiliary design of highly repetitive tasks such as exploration hole layout, section line drawing, and parameter setting during the design of survey plan CAD drawings. Furthermore, functions such as drawing error checking and data transfer between CAD drawings and external files or databases are implemented. This results in a fully functional survey CAD drawing automated auxiliary design system, improving the efficiency of survey CAD design and drawing work and ensuring survey and drawing quality.
[0191] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A CAD secondary development survey and mapping auxiliary design system, characterized by: The following steps are involved: Step S1: Establishing a standard exploration graphics library and implementing survey and design drawing auxiliary tools; Step S2: Survey project and drawing information setting: according to the needs of system data transmission and drawing drawing function, survey project number and sub-project number are set; drawing parameter unit, scale, hole spacing information is set; Step S3: Arrange holes on the plan view, and set a unified hole depth for the selected exploration holes in batches on the CAD drawing; select all exploration holes that need to be set with a hole depth, enter the depth value, and then mark the hole depth in the hole depth text field of all selected exploration holes; Step S4: Click holes on the CAD drawing in sequence or select multiple holes in batches to connect the selected holes to the profile line; then select the holes and the profile line, disconnect or connect the selected exploration holes and the profile line, set the calculation points, line coordinates and distances according to the user's selection, reorder the profile line drawing points, and then automatically redraw the profile line; Step S5: Export or import the exploration hole, profile, construction coordinates and city coordinate data on the CAD drawing as needed; Step S6: Check the drawing errors. Check the contents of the survey CAD drawing according to the survey plan or survey report requirements, and provide prompts in the form of text directly on the CAD drawing. The system will also provide an error prompt in the form of a pop-up window, prompting the user to revise the CAD drawing according to the check results. The selection of the exploration hole in step S3 includes point selection, fence selection and frame selection; The exploration hole profile connection methods include: Step S41: Set a multi-line segment plus two txt text boxes as a group to realize a hatch line instance; the hatch line multi-line segment is pre-set with color, width, and line type according to actual needs; Step S42: for the exploration holes selected by point selection or fence selection in batches, the exploration hole blocks are sequentially stored in the exploration hole block array corresponding to the section line according to the selection order; Step S43: for the exploration holes selected in batches by the frame selection, the maximum absolute value distance in the x-axis direction and the maximum absolute value distance in the circumferential direction of the exploration holes are calculated based on the minimum and maximum x and y coordinates of the center position coordinates of all the selected exploration holes; Step S44: determining the direction with the larger maximum absolute value distance in the x-axis or y-axis direction as the automatic number sorting direction; Step S45: sorting the array of exploration hole blocks corresponding to the profile line according to the x-axis value or y-axis value of the exploration hole center position coordinate according to the number sorting direction calculated in step S44; Step S46: traverse the array of exploration hole blocks and automatically connect the center positions of the exploration holes with multiple line segments; Step S47: For the exploration holes at both ends, draw an extension line of the adjacent line segment with the coordinates of the center position of the endpoint as the starting point, and the length is the same as that of the line segment; Step S48: The profile lines are divided into two categories: large profile lines and small profile lines, which are respectively for large exploration holes and small drilling holes. When the two types of profile lines are drawn, the other type of exploration holes is automatically filtered out according to the layer.
2. The CAD secondary development survey and drawing aided design system according to claim 1, characterized in that: The method for establishing the exploration standard graphic library in step S1 includes the following steps: Step S11: The exploration hole legend and the graphics in the auxiliary graphics library are first drawn using CAD, saved as blocks, and then saved as dwg files; Step S12: loading the dwg files of all exploration hole legends and auxiliary graphic blocks into the CAD built-in database; Step S13: When the designated legend menu item is clicked, the system connects to the CAD database via ODBC, traverses the database table, and finds the selected legend block file by block name; Step S14: Call the CAD block operation command and apply the legend to draw at the user-selected position in the CAD drawing.
3. The CAD secondary development survey and drawing aided design system according to claim 1, characterized in that: The auxiliary drawing tools in step S1 include planned buildings, built buildings, auxiliary circles, and large and small hole layers.
4. The CAD secondary development survey and drawing aided design system according to claim 1, characterized in that: The planar hole arrangement in step S3 includes standard single-point hole arrangement, batch hole arrangement and mid-point hole arrangement; Among them, the standard single-point hole arrangement is: select the hole type, click on each position on the CAD drawing, and the single hole can be arranged in sequence; Batch hole arrangement: After selecting two points on the CAD drawing, the system automatically configures the hole arrangement type from all hole categories and sets the automatic hole arrangement combination. The system calculates the number of exploration holes that can be arranged based on the preset hole arrangement spacing and the spacing between the two selected points, and calculates the actual hole arrangement spacing. It sets whether to retain or remove the holes at both ends. After confirmation, the system automatically draws exploration holes in batches between the two points on the CAD drawing in sequence using different types of exploration hole legends. Midpoint hole layout: After selecting two points and the exploration hole type on the CAD drawing, the system calculates the coordinates of the middle position between the two points and draws the selected exploration hole type at the middle position between the two points.
5. The CAD secondary development survey and drawing aided design system according to claim 4, characterized in that: The specific implementation steps of the batch hole arrangement include: Step S31: After the user clicks, the position coordinates (x A ,y A )、(x B ,y B ), calculate the distance between two points by coordinates; Step S32: The hole spacing set in the initial stage of the project is retained by default, and a modification interface is provided for the user to manually modify the spacing to obtain the final hole spacing; Step S33: Calculate the number of exploration holes between the two points by dividing the distance between the two points by the hole spacing. If the number is not divisible, round the result to the nearest integer. If the number is divisible, subtract 1 from the result. This value is the number of exploration holes to be arranged between the two points. Step S34: Calculate the actual spacing between adjacent exploration holes: divide the spacing between the two end points by the number of exploration holes between the two points plus 1 to obtain the spacing between adjacent exploration holes; Step S35: Generate a line equation based on the coordinates of the two end points , then calculate the center position coordinates of each large exploration hole to be laid out based on the actual spacing between adjacent exploration holes calculated in step S34 and put them into an array; Step S36: Whether to arrange holes at the two endpoints is selected and set by the user on the interface; Step S37: Select exploration hole categories other than small drill holes from all hole categories one by one and place them into an array in sequence. After completion, the array is used as a hole arrangement combination. During automatic hole arrangement, the exploration hole legend block is obtained according to the selected combination order, and is drawn and placed at each coordinate value position in the center coordinate array of each exploration hole to be arranged calculated in step S35. The exploration holes are automatically and repeatedly arranged in sequence. Step S38: Select whether to automatically arrange small drill holes, set and obtain the small drill hole spacing; Step S39: Calculate the number of small drill holes that should be arranged between two adjacent large exploration holes based on the small drill hole spacing and the actual large exploration hole spacing; Step S310: Calculate the center coordinates of each small probe hole to be deployed and put them into an array; Step S311: Obtain small drill hole legend blocks, draw them one by one and place them at each coordinate value position in the coordinate array of the center position of the small drill holes to be arranged calculated in step S310.
6. The CAD secondary development survey and drawing aided design system according to claim 1, characterized in that: The step S5 specifically includes: (1) Export profile data: After selecting the profile line, export the exploration hole design data related to the profile line to Excel, txt file or other database; (2) Export of construction coordinates and city coordinates: After selecting the exploration hole on the CAD drawing, export the hole data to Excel, txt file or other system database, including the construction CAD drawing coordinates and city coordinates; (3) Importing data from the database of hole depth, elevation and water level: Obtain and import the hole depth, water level and elevation data of the exploration hole from other databases into this system, and automatically update the exploration hole annotation information on the CAD drawing.
7. The CAD secondary development survey and drawing aided design system according to claim 1, characterized in that: The drawing error check in step S6 includes drawing error check in the scheme stage and drawing error check in the report stage.