Intelligent CAD Drawing Sheet Formatting Method, System and Readable Storage Medium
Through the intelligent CAD drawing web partition method, the range of web partitions is automatically divided and boundary lines are marked, which solves the problem of low artificial web partition efficiency in the existing technology, and achieves efficient and accurate web partitions of CAD drawings.
Patent Information
- Application Number
- CN202210576351.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-05-25
AI Technical Summary
In the prior art, CAD drawing partitioning requires manual operation, which is inefficient and wastes human resources.
An intelligent CAD drawing partitioning method is proposed. By setting the partitioning scale, selecting reference marks, dividing the partitioning range and marking boundary lines, the CAD drawings are automatically cut to improve the partitioning efficiency.
The automation of CAD drawings partitioning has been realized, which significantly improves the partitioning efficiency and accuracy, and reduces human resources investment.
Smart Images

Figure CN114911433B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CAD automatic sheet division, and more specifically, it relates to an intelligent CAD drawing sheet division method, system and readable storage medium. Background Art
[0002] In the construction of municipal roads, CAD (Computer Aided Design) has become one of the commonly used drawing tools for people, and the drawing result of CAD can be called a CAD drawing. Since in the process of municipal road planning, the CAD drawing is drawn along the extension direction of the road, which includes a lot of graphic data, such as the graphic of municipal facility signs set on the municipal road, the graphic of building signs on both sides of the road, etc., and it cannot be printed on a piece of paper of A4 or A3 size. Therefore, it is necessary to divide the entire original CAD drawing (CAD engineering drawing) into sheets, so that it can be divided into multiple printable and viewable CAD drawings according to the set scale requirements.
[0003] In the prior art, it is necessary to manually divide the CAD engineering drawing to complete the sheet division. Since a CAD engineering drawing often needs to be divided into hundreds of CAD drawings, if manual sheet division is adopted, the efficiency of the entire sheet division work is very low, wasting human resources.
[0004] Therefore, how to improve the efficiency of CAD drawing sheet division on the basis of reducing the input of human resources is an urgent problem to be solved at present. Summary of the Invention
[0005] Aiming at the problem of low efficiency in manually dividing the original CAD drawing in practical applications, the first object of this application is to propose an intelligent CAD drawing sheet division method, which can automatically lock the division range and automatically output the divided sheets according to requirements, effectively improving the efficiency of CAD sheet division. The second object of this application is to provide an intelligent CAD drawing sheet division system, and the third object is to propose a readable storage medium storing a computer program for implementing the above method. The specific solutions are as follows:
[0006] An intelligent CAD drawing sheet division method includes:
[0007] Setting a sheet division scale based on the CAD engineering drawing and the required size of the CAD drawing;
[0008] Selecting a reference identifier for sheet division on the CAD engineering drawing;
[0009] Dividing the division range based on the reference identifier and marking the division boundary line;
[0010] Cutting the CAD engineering drawing based on the above boundary line to generate and output CAD drawings.
[0011] Through the above technical solution, automatic sheet division can be realized based on the reference identifiers in the CAD engineering drawing, which can greatly improve the efficiency of sheet division.
[0012] Further, the reference identifiers include graphic marks drawn on the CAD engineering drawing, graphic loci, marking lines extending along a set direction, or virtual references generated based on the above graphic marks, graphic loci, and marking lines.
[0013] Through the above technical solution, the references during CAD engineering drawing sheet division can be diversified, which is convenient for improving the efficiency of sheet division.
[0014] Further, dividing the sheet division range based on the reference identifiers and marking the sheet division boundary lines includes:
[0015] S301, based on the sheet division scale, calculate the corresponding length value and width value of the CAD drawing in the CAD engineering drawing according to the size of the CAD drawing to be exported;
[0016] S302, detect the graphic contour lines in the CAD engineering drawing, and generate a graphic center line based on the above graphic contour lines;
[0017] S303, select one end point of the graphic center line as the starting point, generate a virtual circle with the starting point as the center and the length value as the radius, and search for and output the intersection points of the above virtual circle and the graphic center line;
[0018] S04, set the above intersection point as the end point, generate a virtual line with the starting point and the end point, and draw a first marking line and a second marking line perpendicular to the virtual line through the starting point and the end point;
[0019] S305, set the starting point and the end point as the midpoints of the first marking line and the second marking line, and configure the lengths of the first marking line and the second marking line to be equal to the width value. Take the end points on the same side of the virtual line of the first marking line and the second marking line as the starting points, and generate a third marking line and a fourth marking line respectively;
[0020] S306, select the first marking line, the second marking line, the third marking line, and the fourth marking line as the sheet division boundary lines;
[0021] S307, set the intersection point as the new starting point;
[0022] S308, repeat the above steps S303 - S307 until the other end point of the graphic center line falls into the virtual circle generated with the starting point as the center and the length value as the radius.
[0023] Through the above technical solution, the direction of sheet division can be determined based on the graphic contour lines in the CAD drawing, and then automatic sheet division can be carried out along the above direction according to the set parameters, which is fast and efficient.
[0024] Further, dividing the sheet range based on the reference identifier and marking the sheet boundary line includes:
[0025] Based on the sheet scale, calculate the corresponding length value and width value of the CAD drawing in the CAD engineering drawing according to the size of the CAD drawing to be exported;
[0026] Detect the set graphic mark in the CAD engineering drawing. If the number of the set graphic marks is 1, select a sheet vector, use the graphic mark as the center point, and use the length value and width value as the boundary length and width to generate a rectangle with a fixed center position. The rectangle boundary is the sheet boundary line;
[0027] Detect the set graphic marks in the CAD engineering drawing. If the number of the set graphic marks is multiple, generate a virtual closed polygon with the multiple graphic marks, calculate and use the center point of the virtual closed polygon and the length value and width value as the boundary length and width to generate multiple virtual rectangles with fixed center positions. Calculate the number of the set graphic marks in the virtual rectangles, and take the boundary of the virtual rectangle containing the most graphic mark data as the sheet boundary line.
[0028] Through the above technical solution, the set reference identifier in the CAD drawing can be used as the main basis for sheet division, so that each generated CAD drawing includes the corresponding reference identifier.
[0029] Further, detect the positions of the graphic marks in the CAD engineering drawing. If they are included in the area enclosed by the above sheet boundary line, enhance the display of the graphic marks.
[0030] Through the above technical solution, it is convenient for the user to clearly and intuitively know the content of the graphic marks included in the CAD drawing to be generated before sheet division, so as to determine whether it is necessary to modify the sheet division method.
[0031] Further, in the step S307, set a point on the center line of the graphic, which is between the starting point and the intersection point and the linear distance from the intersection point is a set value, as the new starting point.
[0032] Through the above technical solution, there is partial overlap at the edges of two adjacent CAD engineering drawings after sheet division, which avoids the loss of graphics in the CAD engineering drawing after sheet division and is also convenient for splicing the CAD drawings later.
[0033] Further, in step S302, detecting the graphic contour lines in the CAD engineering drawing includes enhancing the display of the graphic contour lines in the CAD engineering drawing or calibrating the layer where the graphic contour lines are located, and automatically generating virtual graphic contour lines based on image recognition or instruction information, or retrieving and generating the virtual graphic contour lines from a self-set layer.
[0034] Through the above technical solution, the user can more clearly see the effect after the CAD engineering drawing is divided into sheets during the sheet division process, clarify the position of a specific graphic in the CAD drawing after sheet division, and facilitate the adjustment of the sheet division parameters.
[0035] An intelligent CAD drawing sheet division system includes:
[0036] A sheet division ratio generation unit configured to set a sheet division scale based on the CAD engineering drawing and the required size of the CAD drawing.
[0037] A reference mark confirmation unit configured to select a reference mark for sheet division on the CAD engineering drawing.
[0038] A sheet division boundary line generation unit configured to divide the sheet division range and mark the sheet division boundary line based on the reference mark and according to the intelligent CAD drawing sheet division method described above.
[0039] A drawing generation unit configured to cut the CAD engineering drawing based on the boundary line, generate and output CAD drawings.
[0040] Through the above technical solution, the sheet division process of the CAD engineering drawing can be quickly and accurately achieved, greatly improving the efficiency of sheet division.
[0041] Further, the reference mark confirmation unit includes:
[0042] An interaction component configured to receive the operation instructions or data information of the user, specify the reference mark or clarify the marked graphic information.
[0043] An image recognition component configured to be data-connected to the interaction component, search and identify the graphic matching the marked graphic information in the CAD engineering drawing based on a set image recognition algorithm, and generate the reference mark.
[0044] Through the above technical solution, the reference mark for sheet division is directly or indirectly selected based on the operation instructions or data information input by the user, which is beneficial to improving the efficiency of sheet division.
[0045] A computer-readable storage medium loaded with a computer program module for implementing the intelligent CAD drawing sheet division method described above.
[0046] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0047] (1) By automatically dividing the sheet range based on a set reference identifier and thus performing sheet division, the efficiency and accuracy of CAD engineering drawing sheet division can be greatly improved, and the important graphic features in the CAD engineering drawing can be clearly displayed in the divided CAD drawings.
[0048] (2) For CAD engineering drawings with clear display of graphic size and orientation, during the sheet division process, sheet division is performed according to the center line orientation of the graphics, and the sheet division efficiency and accuracy are higher. Description of the Drawings
[0049] Figure 1 It is a schematic diagram of the overall process of the intelligent CAD drawing sheet division method of the present invention;
[0050] Figure 2 It is a schematic diagram of the method for dividing the sheet range based on the reference identifier and marking the sheet boundary line;
[0051] Figure 3 It is a schematic diagram of the functional modules of the system of the present invention.
[0052] Reference numerals: 1. Sheet division ratio generation unit; 2. Reference identifier confirmation unit; 3. Sheet boundary line generation unit; 4. Drawing generation unit; 5. Interaction component. Detailed Embodiments
[0053] In municipal engineering construction, such as road paving, manhole construction, etc., CAD engineering drawings usually need to be drawn, and the completed CAD engineering drawings need to be printed and given to on-site construction or supervision personnel. However, since the CAD engineering drawing is very long and has a large format, it needs to be sheet-divided. The traditional manual sheet division is inefficient. For this reason, this application proposes an intelligent CAD drawing sheet division method and system.
[0054] The following further details the present application in conjunction with the embodiments and the drawings, but the embodiments of the present invention are not limited thereto.
[0055] An intelligent CAD drawing sheet division method, as Figure 1 shown, mainly includes the following steps:
[0056] S100, set the sheet division scale based on the CAD engineering drawing and the required size of the CAD drawing;
[0057] S200, select the reference identifier for sheet division on the CAD engineering drawing;
[0058] S300, divide the sheet range based on the reference identifier and mark the sheet boundary line;
[0059] S400. Crop the CAD engineering drawing based on the above boundary line, generate and output the CAD drawing.
[0060] In the above step S100, according to the display requirements of the CAD drawing, determine the required size of the graphics in the CAD drawing, and then set the proportional relationship according to the size of the CAD engineering drawing. For example, if the required scale of the CAD drawing is 1:300 and the scale in the CAD engineering drawing is 1:600, then theoretically, two unit lengths of the CAD drawing can be divided in one unit length of the CAD engineering drawing.
[0061] In step S200, the reference identifiers include graphic marks, graphic loci, marking lines extending along the set direction drawn on the CAD engineering drawing, or virtual references generated based on the above graphic marks, graphic loci, and marking lines. The above graphic marks can be the inherent structure of the graphics in the CAD engineering drawing, such as the graphic of a manhole, or can be graphics separately set for the sheet division operation.
[0062] In one embodiment, as Figure 2 shown, the step S300 further includes:
[0063] S301. Based on the sheet division scale, calculate the corresponding length value and width value of the CAD drawing in the CAD engineering drawing according to the size of the CAD drawing to be exported;
[0064] S302. Detect the graphic contour line in the CAD engineering drawing and generate a graphic median line based on the above graphic contour line;
[0065] S303. Select one end point of the graphic median line as the starting point, generate a virtual circle with the starting point as the center and the length value as the radius, and search for and output the intersection points of the above virtual circle and the graphic median line;
[0066] S304. Set the above intersection point as the end point, generate a virtual straight line with the starting point and the end point, and draw a first marking line and a second marking line perpendicular to the virtual straight line through the starting point and the end point;
[0067] S305. Set the starting point and the end point as the midpoints of the first marking line and the second marking line, and configure the lengths of the first marking line and the second marking line to be equal to the width value. Take the end points on the same side of the virtual straight line of the first marking line and the second marking line as the starting points, and generate a third marking line and a fourth marking line respectively;
[0068] S306. Select the first marking line, the second marking line, the third marking line, and the fourth marking line as the sheet division boundary lines;
[0069] S307. Set the intersection point as the new starting point;
[0070] S308. Repeat the above steps S303 - S307 until the other end point of the line in the figure falls into the virtual circle generated with the starting point as the center and the length value as the radius.
[0071] In practical applications, since municipal roads can usually be regarded as straight lines or curves with a small bending amplitude within a short length range, the center line of the road can be quickly generated based on the boundaries on both sides of the road. Using the above center line as a reference for sub - mapping can make the division of the sub - mapping area more accurate.
[0072] In another embodiment, the step S300 further includes:
[0073] S310. Based on the sub - mapping scale, calculate the corresponding length value and width value of the CAD drawing in the CAD engineering drawing according to the size of the CAD drawing to be exported.
[0074] S3101. Detect the set graphic marks in the CAD engineering drawing. If the number of set graphic marks is 1, select a sub - mapping vector. Taking this graphic mark as the center point and the length value and width value as the boundary length and width, generate a rectangle with a fixed center position. The rectangle boundary is the sub - mapping boundary line.
[0075] S3102. Detect the set graphic marks in the CAD engineering drawing. If the number of set graphic marks is multiple, generate a virtual closed polygon with multiple said graphic marks. Calculate and take the center point of the virtual closed polygon and the length value and width value as the boundary length and width to generate multiple virtual rectangles with fixed center positions. Calculate the number of set graphic marks in the virtual rectangles, and take the boundary of the virtual rectangle containing the most graphic mark data as the sub - mapping boundary line.
[0076] In the above step S3101, the sub - mapping vector refers to a line segment with a specific direction and length.
[0077] Based on the above technical solution, the set reference marks in the CAD drawing can be used as the main basis for sub - mapping, such as the engineering components that need to be separately presented and highlighted in the CAD engineering drawing, so that each generated CAD drawing includes the corresponding reference marks.
[0078] In order to facilitate the user to clearly and intuitively know the content of the graphic marks contained in the CAD drawing to be generated before sub - mapping, and thus determine whether it is necessary to modify the sub - mapping method. In the embodiment of the present application, further, detect the positions of the graphic marks in the CAD engineering drawing. If they are included in the area enclosed by the above sub - mapping boundary line, perform enhanced display on the above graphic marks. The above enhanced display methods include but are not limited to: highlighting the graphic lines, thickening the graphic lines or converting them to a more prominent color.
[0079] In step S302, detecting the graphic contour lines in the CAD engineering drawing includes enhancing the display of the graphic contour lines in the CAD engineering drawing or calibrating the layer where the graphic contour lines are located, automatically generating virtual graphic contour lines based on image recognition or instruction information, or retrieving and generating the virtual graphic contour lines from a self-set layer. Based on the above technical solution, the user can more clearly see the effect after the CAD engineering drawing is divided into sheets during the sheet division process, clarify the position of a specific graphic in the CAD drawing after sheet division, and facilitate adjusting the parameters of sheet division.
[0080] Further optimized, in step S307, a point on the center line of the graphic, which is between the starting point and the intersection point and whose straight-line distance from the intersection point is a set value, is set as the new starting point. Based on the above technical solution, there is partial overlap between the edges of two adjacent CAD engineering drawings after sheet division, avoiding the loss of graphics in the CAD engineering drawing after sheet division and facilitating the subsequent splicing of CAD drawings.
[0081] To implement the above intelligent CAD drawing sheet division method, the present application also proposes an intelligent CAD drawing sheet division system, as Figure 3 shown, mainly including a sheet division ratio generation unit 1, a reference mark confirmation unit 2, a sheet division boundary line generation unit 3, and a drawing generation unit 4.
[0082] The sheet division ratio generation unit 1 is configured to set the sheet division scale based on the CAD engineering drawing and the required size of the CAD drawing. The required size of the CAD drawing is directly input by the user, and then the system automatically calculates the sheet division scale according to the scale in the CAD engineering drawing.
[0083] The reference mark confirmation unit 2 is configured to select a reference mark for sheet division on the CAD engineering drawing. In the embodiments of the present application, there are mainly two ways to select the reference mark for sheet division. One is directly specified by the user, and the other is automatically recognized by the system according to the data information input by the user, that is, the graphic information. For this reason, the reference mark confirmation unit 2 includes: an interaction component 5 and an image recognition component. The interaction component 5 is configured to receive the operation instructions or data information of the user, specify the reference mark or clarify the graphic information. In practical applications, the above reference mark can be directly specified by the user based on the CAD software interaction interface. The image recognition component is configured to be data-connected to the interaction component 5, receive the data information input by the user, search and recognize the graphic matching the marked graphic information in the CAD engineering drawing based on a set image recognition algorithm, and generate the reference mark.
[0084] The sheet boundary line generation unit 3 is configured to divide the sheet range and mark the sheet boundary line based on the reference identifier and according to the intelligent CAD drawing sheet division method described above. In practical applications, in order to highlight the above-mentioned reference identifier and the sheet boundary line, an image enhancement component is also configured in the system, which is configured to perform display enhancement processing on the CAD graphics and reference identifier falling within the sheet boundary line. The above-mentioned enhanced display methods include, but are not limited to: highlighting the graphic lines, thickening the graphic lines, or converting them into more prominent colors.
[0085] The drawing generation unit 4 is configured to cut the CAD engineering drawing based on the boundary line, and generate and output a CAD drawing. In practical applications, the above-mentioned drawing generation unit 4 can be configured to be directly connected to an editor software such as PDF for data connection, and the generated CAD drawing can be directly printed out after data conversion.
[0086] A computer-readable storage medium, on which a computer program module for implementing the intelligent CAD drawing sheet division method described above is loaded.
[0087] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program module can be stored in a computer-readable storage medium. When the program module is executed, it executes the steps of the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disc that can store program codes.
[0088] The above is only the preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, several improvements and refinements made without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An intelligent CAD drawing sheet division method, characterized in that, Including: Set the sheet division scale based on the CAD engineering drawing and the size of the CAD drawing to be exported; Select a reference identifier for sheet division on the CAD engineering drawing; the reference identifier includes a graphic mark, a graphic locus, a marking line extending along a set direction, or a virtual reference generated based on the graphic mark, the graphic locus, and the marking line, drawn on the CAD engineering drawing; Divide the sheet division range based on the reference identifier and mark the sheet division boundary line, including: S301, Based on the sheet division scale, calculate the corresponding length value and width value of the CAD drawing in the CAD engineering drawing according to the size of the CAD drawing to be exported; S302, Detect the graphic outline in the CAD engineering drawing and generate a graphic center line based on the above graphic outline; S303, Select one end point of the graphic center line as the starting point, generate a virtual circle with the starting point as the center and the length value as the radius, and search for and output the intersection point of the virtual circle and the graphic center line; S304, Set the above intersection point as the end point, generate a virtual straight line with the starting point and the end point, and draw a first marking line and a second marking line perpendicular to the virtual straight line through the starting point and the end point; S305, Set the starting point and the end point as the midpoints of the first marking line and the second marking line, and configure the lengths of the first marking line and the second marking line to be equal to the width value. Take the end points on the same side of the virtual straight line of the first marking line and the second marking line as the starting points, and generate a third marking line and a fourth marking line respectively; S306, Select the first marking line, the second marking line, the third marking line, and the fourth marking line as the sheet division boundary line; S307, Set the intersection point as the new starting point; S308, Repeat steps S303 - S307 until the other end point of the graphic center line falls into the virtual circle generated with the starting point as the center and the length value as the radius; Crop the CAD engineering drawing based on the above boundary line, generate and output the CAD drawing.
2. The intelligent CAD drawing sheet division method according to claim 1, wherein Detect the positions of the graphic marks in the CAD engineering drawing. If they are included in the area enclosed by the above sheet division boundary line, enhance the display of the above graphic marks.
3. The intelligent CAD drawing sheet division method according to claim 1, wherein In step S307, set a point on the graphic center line between the starting point and the intersection point and at a set straight-line distance from the intersection point as the new starting point.
4. The intelligent CAD drawing sheet division method according to claim 1, characterized in that In step S302, detecting the graphic outline in the CAD engineering drawing includes enhancing the display of the graphic outline in the CAD engineering drawing or calibrating the layer where the graphic outline is located, automatically generating a virtual graphic outline based on image recognition or instruction information, or retrieving and generating a virtual graphic outline from a set layer based on image recognition or instruction information.
5. An intelligent CAD drawing sheet division system, characterized in that, Including: A sheet division ratio generation unit (1), configured to set the sheet division scale based on the CAD engineering drawing and the size of the CAD drawing to be exported; A reference identifier confirmation unit (2), configured to select a reference identifier for sheet division on the CAD engineering drawing; The reference identifier confirmation unit (2) includes: An interaction component (5), configured to receive the operation instructions or data information of the user, specify the reference identifier, or clarify the graphic information; An image recognition component, configured to be connected to the interaction component (5) for data connection, search and recognize a graphic matching the identification graphic information in the CAD engineering drawing based on a set image recognition algorithm, and generate the reference identification; A sheet boundary line generation unit (3), configured to divide the sheet range and mark the sheet boundary line based on the reference identification and according to the intelligent CAD drawing sheet division method described in claim 1 or 2; A drawing generation unit (4), configured to cut the CAD engineering drawing based on the boundary line, and generate and output a CAD drawing.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium is loaded with a computer program module for implementing the intelligent CAD drawing sheet division method described in any one of claims 1-4.