Method and device for deriving gradient curvature based on CAD (Computer Aided Design)
By reconstructing CAD drawing data and extracting slope and curvature data, and exporting it to Excel table, the problems of low efficiency and poor accuracy of drawing data processing in the prior art are solved, and efficient and accurate data extraction and output are achieved.
Patent Information
- Application Number
- CN202411341904.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, drawing data is huge and complex, and manual generation of related data is huge and inefficient, and errors are prone to occur and difficult to check.
By reconstructing CAD drawing data and designing logically extracting slope and curvature data, exporting it to Excel table files, reducing manual calculations and improving the output speed and accuracy of the data.
It has achieved the reduction of manual workload, improved data accuracy and output speed, reduced manual data errors, and can identify the differences in CAD drawings provided by different design institutes to accurately extract the required information.
Smart Images

Figure CN119443047A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit data processing, and more specifically, to a method and device for deriving slope curvature based on CAD. Background Art
[0002] The existing technology has the following technical problems: the drawing data is huge and complex, the manual generation of relevant data is labor-intensive and inefficient, and errors are not easy to detect.
[0003] In order to improve the conversion efficiency of CAD drawing information, reduce human resource investment and ensure the accuracy of information data, a stable method for extracting data is provided for different projects and different data. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method and device for deriving slope curvature based on CAD, thereby reducing manual calculations and improving data output speed and accuracy.
[0005] The object of the present invention is achieved through the following solutions:
[0006] A method and device for deriving slope curvature based on CAD, comprising the following steps:
[0007] The data is reconstructed based on the CAD drawing data and configuration, and the slope and curvature are extracted by design logic and exported to a table file.
[0008] Furthermore, the table file includes an Excel table.
[0009] Furthermore, the data is reconstructed based on the CAD drawing data and configuration, and the slope curvature is extracted by redesigning the logic and a table file is exported according to the template format, which specifically includes the following sub-steps:
[0010] S1, read CAD drawings;
[0011] S2, based on the configuration operation, reads the slope data and the curvature data from the read CAD drawing data, and processes them respectively;
[0012] S3, outputting the processing log data formed in step S2;
[0013] S4, export table file.
[0014] Further, in step S2, the configuration-based operation reads the slope data and the curvature data from the read CAD drawing data and processes them respectively, specifically including the sub-steps:
[0015] S31, selecting the type of exported data according to actual needs, including extracting two types of data, namely slope and curvature, and setting the two types of data to distinguish between left and right lines and up and down lines; after the settings are completed, importing the drawing;
[0016] S32, obtaining drawing information, confirming the layer where the exported data is located, so as to avoid redundant data in the corresponding layer;
[0017] S33, providing more detailed search conditions based on the filtered drawing data, generating data after all the search conditions are set, and finally selecting a save path and setting a file name.
[0018] Further, in step S31, the setting of the two types of data specifically includes distinguishing left and right lines and up and down lines for the two types of data.
[0019] Further, in step S31, the importing drawings specifically includes importing dxf format drawings.
[0020] Furthermore, in step S32, a sub-step is also included: limiting the range of the exported data.
[0021] Furthermore, in step S33, more detailed search conditions are provided based on the filtered drawing data, which specifically also includes a sub-step: manual configuration according to requirements.
[0022] Further, in step S4, the exporting of the spreadsheet file specifically includes exporting an Excel file according to a template format.
[0023] A device for deriving CAD-based slope curvature comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, any of the above methods is executed.
[0024] The beneficial effects of the present invention include:
[0025] The present invention proposes a method for converting a longitudinal section CAD drawing into a dxf format, extracting the slope curvature related data of the drawing and exporting it to an Excel table. The invention aims to reduce manual workload and improve data accuracy, and reduce errors in manual data. In bids or projects in different regions, the CAD longitudinal sections provided by different design institutes are slightly different. The device can identify the differences in the drawings and accurately extract the required information in CAD. The interface and key data can be configured if necessary, such as selecting the generation direction, start and end kilometer marks, left and right lines, and other functions. The output content is output to Excel in the format of "Configuration Structure Table_Line Information Table". At the same time, the device has a self-check error reporting function and will output the corresponding operation log.
[0026] The present invention converts manual thinking and judgment into tool processing logic based on full analysis and verification of data. Specifically, complex and large data are converted into tool processing, and slope curvature data are generated according to corresponding logic, which reduces manual calculations and improves data output speed and accuracy. The logic design of the data processing rules and the calculation rules of intermediate values of the present invention is specifically disclosed. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0028] Figure 1 A flowchart of the steps of an embodiment of the present invention;
[0029] Figure 2 A schematic diagram of distinguishing left and right lines and up and down lines in a method according to an embodiment of the present invention;
[0030] Figure 3 A schematic diagram of a limited range in a method according to an embodiment of the present invention;
[0031] Figure 4 A schematic diagram of the configuration of the search conditions in the method of the embodiment of the present invention;
[0032] Figure 5 A schematic diagram of a data generation process in a method according to an embodiment of the present invention;
[0033] Figure 6 A schematic diagram of selecting a save path and setting a file name in a method according to an embodiment of the present invention;
[0034] Figure 7 The figure is a flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION
[0035] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.
[0036] In view of the problems in the background, the inventor of the present invention further analyzed and believed that: in the prior art, the data processing logic has certain standards, and the line scenes of each project are different, and special scenes need to be processed separately. Therefore, if unexpected scenes occur, the data generated may be wrong. Therefore, a tool should be designed to solve the problems in the background. The tool should realize the function of converting the CAD longitudinal section drawing into dxf format, identifying the longitudinal section drawing type, extracting valid data (slope, mileage, vertical curve, curvature) and automatically exporting the slope curve Excel table.
[0037] At the same time, the tool should have the following characteristics: the exported table data is highly consistent with the longitudinal section data; the input is simplified; the interface and key data can be configured when necessary; good stability; and self-checking / error reporting is possible.
[0038] At the same time, the tool should have the following system performance requirements: In bids or projects in different regions, the CAD longitudinal sections provided by different design institutes are slightly different, and the tool is required to be able to identify the differences and accurately extract the required information in CAD.
[0039] At the same time, the tool should meet the following interface requirements: usability: button names should be easy to understand, the words should be accurate, and different buttons in the interface should be easy to distinguish; rationality: the position where the screen diagonals intersect is where the user looks directly, and the quarter directly above is the position that easily attracts the user's attention. When placing the form, pay attention to using these two positions; beauty and coordination: the interface should be of a size suitable for aesthetic points of view, feel coordinated and comfortable, and be able to attract the user's attention within an effective range; menu position: the menu is the most important element on the interface, and the menu position is organized by function; help facilities: the system should provide detailed and reliable help documents so that users can seek solutions themselves when they are confused. The help document needs to describe the external input files required for the tool to implement a certain function; system resources: the software should not only have complete functions, but also occupy the minimum resources as much as possible; input requirements and input information: data input information: CAD longitudinal section; interface input information: the system has interface information function, and you can choose to generate direction, start and end kilometer marks, left and right line selection on the interface; output requirements and output results: according to the longitudinal section, automatically generate an EXCEL of the slope information in the "Configuration Structure Table_Line Information Table", and the software needs to generate a corresponding operation log.
[0040] The specific implementation process of the present invention is as follows: In the conception of the present invention, the data is reconstructed based on the CAD drawing data and manual configuration, and then the slope curvature is extracted according to the relevant logic and exported to the Excel file in the template format. The drawing data is huge and complex, and the manual generation of relevant data is a huge workload and inefficient, and errors are not easy to detect, and the present invention aims to solve this technical problem.
[0041] In a further specific implementation, the present invention provides an operation interface to facilitate adding restrictions to the extracted data. The overall process is as follows: Figure 1 First, you need to select the type of data to be exported based on actual needs. The tool supports extracting two types of data: slope and curvature. At the same time, these two types of data need to distinguish between left and right lines and up and down lines, such as Figure 2 After configuring the import of DXF drawings, the drawing information will be obtained. Here, you need to confirm the layer where the exported data is located to avoid redundant data in the corresponding layer. You can also limit the range, such as Figure 3 The next step is to provide more detailed search conditions based on the filtered drawing data, which can be manually configured according to needs, such as Figure 4 Once all search conditions are set, data generation can be performed. The generation process is as follows: Figure 5 After successful generation, you can select the save path and set the file name. The tool will export the Excel file according to the template format, such as Figure 6 .
[0042] In summary, the present invention proposes a method for converting the longitudinal section CAD drawing into a dxf format, extracting the slope curvature related data of the drawing and exporting it to an Excel table. The invention aims to reduce manual workload and improve data accuracy, and reduce the error of manual data. In bids or projects in different regions, the CAD longitudinal sections provided by different design institutes are slightly different. The device can identify the differences in the drawings and accurately extract the required information in CAD. And the interface and key data can be configured if necessary, such as selecting the generation direction, start and end kilometer marks, left line and right line and other functions. The output content is output to Excel in the format of "Configuration Structure Table_Line Information Table". At the same time, the device has a self-check error reporting function and will output the corresponding operation log.
[0043] It should be noted that within the scope of protection defined in the claims of the present invention, the following embodiments can be combined and / or expanded or replaced in any logical way from the above specific implementation methods, such as disclosed technical principles, disclosed technical features or implicitly disclosed technical features.
[0044] Example 1
[0045] A method for exporting slope curvature based on CAD, comprising the following steps:
[0046] The data is reconstructed based on the CAD drawing data and configuration, and the slope and curvature are extracted by design logic and exported to a table file.
[0047] Example 2
[0048] Based on Example 1, the table file includes an Excel table.
[0049] Example 3
[0050] On the basis of Example 1, the data is reconstructed based on the CAD drawing data and configuration, and the slope curvature is extracted by redesigning the logic and a table file is exported according to the template format, which specifically includes the following sub-steps:
[0051] S1, read CAD drawings;
[0052] S2, based on the configuration operation, reads the slope data and the curvature data from the read CAD drawing data, and processes them respectively;
[0053] S3, outputting the processing log data formed in step S2;
[0054] S4, export table file.
[0055] Example 4
[0056] On the basis of Example 3, Figure 7 As shown, in step S2, the configuration-based operation reads the slope data and the curvature data from the read CAD drawing data and processes them respectively, specifically including the sub-steps:
[0057] S31, selecting the type of exported data according to actual needs, including extracting two types of data, namely slope and curvature, and setting the two types of data to distinguish between left and right lines and up and down lines; after the settings are completed, importing the drawing;
[0058] S32, obtaining drawing information, confirming the layer where the exported data is located, so as to avoid redundant data in the corresponding layer;
[0059] S33, providing more detailed search conditions based on the filtered drawing data, generating data after all the search conditions are set, and finally selecting a save path and setting a file name.
[0060] Example 5
[0061] On the basis of Embodiment 4, in step S31, the setting of the two types of data specifically includes distinguishing between left and right lines and up and down lines for the two types of data.
[0062] Example 6
[0063] Based on Example 4, in step S31, the importing drawings specifically includes importing dxf format drawings.
[0064] Example 7
[0065] Based on the embodiment 4, step S32 further includes a sub-step of limiting the range of the exported data.
[0066] Example 8
[0067] On the basis of Example 4, in step S33, more detailed search conditions are provided based on the filtered drawing data, and specifically also include a sub-step: manual configuration according to requirements.
[0068] Example 9
[0069] Based on Example 4, in step S4, the exporting of the table file specifically includes exporting an Excel file according to a template format.
[0070] Example 10
[0071] A device for deriving CAD slope curvature comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, a method as described in any one of Examples 1 to 9 is executed.
[0072] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0073] According to one aspect of an embodiment of the present invention, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above various optional implementations.
[0074] As another aspect, an embodiment of the present invention further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
Claims
1. A method for deriving slope curvature based on CAD, characterized in that: The following steps are involved: The data is reconstructed based on the CAD drawing data and configuration, and the slope and curvature are extracted by design logic and exported to a table file.
2. The method for deriving the slope curvature based on CAD according to claim 1, characterized in that: The table file includes an Excel table.
3. The method for deriving the slope curvature based on CAD according to claim 1, characterized in that: The data is reconstructed based on the CAD drawing data and configuration, and the slope curvature is extracted by redesigning the logic and exporting the table file according to the template format, which specifically includes the following sub-steps: S1, read CAD drawings; S2, based on the configuration operation, reads the slope data and the curvature data from the read CAD drawing data, and processes them respectively; S3, outputting the processing log data formed in step S2; S4, export table file.
4. The method for deriving the slope curvature based on CAD according to claim 3, characterized in that: In step S2, the configuration-based operation reads the slope data and the curvature data from the read CAD drawing data and processes them respectively, which specifically includes the following sub-steps: S31, selecting the type of exported data according to actual needs, including extracting two types of data, namely slope and curvature, and setting the two types of data to distinguish between left and right lines and up and down lines; after the settings are completed, importing the drawing; S32, obtaining drawing information, confirming the layer where the exported data is located, so as to avoid redundant data in the corresponding layer; S33, providing more detailed search conditions based on the filtered drawing data, generating data after all the search conditions are set, and finally selecting the saving path and setting the file name.
5. The method for deriving the slope curvature based on CAD according to claim 4, characterized in that: In step S31, the setting of the two types of data specifically includes distinguishing left and right lines and up and down lines for the two types of data.
6. The method for deriving the slope curvature based on CAD according to claim 4, characterized in that: In step S31, the importing drawings specifically includes importing dxf format drawings.
7. The method for deriving the slope curvature based on CAD according to claim 4, characterized in that: In step S32, a sub-step is also included: limiting the range of the exported data.
8. The method for deriving the slope curvature based on CAD according to claim 4, characterized in that: In step S33, more detailed search conditions are provided based on the filtered drawing data, which specifically also includes a sub-step: manual configuration according to requirements.
9. The method for deriving the slope curvature based on CAD according to claim 4, characterized in that: In step S4, the exporting of the table file specifically includes exporting an Excel file according to a template format.
10. A device for deriving slope curvature based on CAD, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, the method according to any one of claims 1 to 9 is executed.