Method and device for drawing steel bar sketch in segmented zooming mode and electronic equipment

Through the segmented scaling method, the problem of inefficiency caused by manual intervention in the drawing of steel bars in the prior art is solved, and efficient and accurate automatic drawing of complex steel bar shapes is achieved, and a simplified steel bar diagram with high accuracy is generated.

CN120147467APending Publication Date: 2025-06-13WATER TRANSPORT PLANNING & DESIGN INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510212718.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing steel bar simplified drawing strategy has limitations when dealing with complex steel bar shapes. It depends on the preset steel bar shape library, and it is impossible to effectively and automatically draw non-standard or free-form steel bar graphics, and it is easy to introduce human errors, resulting in inefficient drawing.

Method used

Using the segmented scaling method, by rotating the steel bar pattern, determining the target rectangular enclosure box and scale factor set, traversing all steel bar segments of the steel bar pattern, selecting the scale factor according to the included angle for scaling, and finally generating a simple steel bar diagram.

Benefits of technology

It realizes efficient, accurate and automated sketch drawing of complex steel bar shapes, avoids manual intervention, improves drawing efficiency, and outputs a simple steel bar diagram with high accuracy and close to the hand-painted effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147467A_ABST
    Figure CN120147467A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for drawing a steel bar sketch in a segmented zooming mode and electronic equipment, and relates to the technical field of architectural drawing or other related fields, the method comprises the steps that a target rectangular bounding box is determined based on coordinates of turning points in a rotated steel bar graph, and the target rectangular bounding box is obtained based on the edge lengths of the target rectangular bounding box and a target cell on the x axis and the y axis; calculating a scale factor set of the target rectangular bounding box and the target cell on the x-axis and the y-axis, traversing steel bar sections of the steel bar graph, determining included angles between the steel bar sections and the x-axis and the y-axis, selecting a target scale factor from the scale factor set based on the included angles, scaling the steel bar sections, and determining a steel bar sketch of the steel bar graph based on all the scaled steel bar sections. The technical problem that drawing of the steel bar sketch depends on manual intervention in the prior art, and consequently the drawing efficiency is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of architectural drawing or other related fields. Specifically, it relates to a method and device for drawing a simplified steel bar diagram with segmented scaling, and an electronic device. Background Art

[0002] In the fields of building construction and civil engineering, reinforced concrete structures have become an indispensable part of modern buildings due to their excellent load-bearing capacity and durability. With the increasing complexity of engineering design, the layout and shape of steel bars have become increasingly diversified. From simple straight lines to complex curve combinations, the types and shapes of steel bars show great diversity. Against this background, the simplified steel bar diagram, as an important part of construction drawings, plays a crucial role in the rapid understanding and construction of construction workers. The simplified steel bar diagram needs to maintain the main shape characteristics of the steel bar while facilitating the positioning and installation of the steel bar by construction workers through simplified graphic expressions. Therefore, the accurate drawing and efficient output of the simplified steel bar diagram have become a key link in the automated processing of construction drawings.

[0003] In the related art, the existing strategies for drawing simplified steel bar diagrams have limitations in dealing with complex steel bar shapes. The existing strategies for drawing simplified steel bar diagrams rely on a preset steel bar shape library, and their automated drawing ability is limited for non-standard or free-form steel bar graphics. In addition, the existing strategies for drawing simplified steel bar diagrams usually require users to manually draw the shape of the simplified steel bar, or can only convert and output the simplified steel bar diagram of the preset shape. This drawing method is not only inefficient but also prone to human errors. Especially when dealing with complex steel bar graphics including straight line segments and arc segments, the existing strategies for drawing simplified steel bar diagrams are difficult to achieve the fine and beautiful degree of manual drawing, and at the same time, they cannot maximize the use of the space of the drawing cell, affecting the clear transmission of information and the overall layout of the drawing. Therefore, the existing strategies for drawing simplified steel bar diagrams are difficult to provide an efficient, accurate, and automated solution for drawing simplified diagrams when facing non-standardized and complex steel bar graphics.

[0004] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of the present invention provide a method and device for drawing a simplified steel bar diagram with segmented scaling, and an electronic device, so as to at least solve the technical problem in the related art that the drawing of the simplified steel bar diagram depends on manual intervention, resulting in low drawing efficiency.

[0006] According to one aspect of an embodiment of the present invention, a method for drawing a segmented scaled steel bar sketch is provided, including: rotating the steel bar graphic, determining a target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graphic, and calculating a set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the target rectangular bounding box and the side lengths of the target cell on the x-axis and y-axis; traversing all steel bar segments of the steel bar graphic, determining the angles between the steel bar segments and the x-axis and y-axis, selecting a target scale factor from the set of scale factors based on the angles, and scaling the steel bar segments based on the target scale factor; and determining the steel bar sketch of the steel bar graphic based on all the scaled steel bar segments.

[0007] Optionally, the step of rotating the steel bar graphic includes: when it is detected that the steel bar graphic has one or more symmetry axes, comparing the side lengths of the target cell on the x-axis and y-axis of the coordinate system; when the side length on the x-axis is greater than the side length on the y-axis, determining the symmetry axis with the shortest length among the multiple symmetry axes as the target symmetry axis; when the side length on the x-axis is not greater than the side length on the y-axis, determining the symmetry axis with the longest length among the multiple symmetry axes as the target symmetry axis; and rotating the steel bar graphic so that the target symmetry axis is parallel to the y-axis of the coordinate system.

[0008] Optionally, the step of rotating the steel bar graphic further includes: when it is detected that the steel bar graphic has no symmetry axis, obtaining all the arc edges of the steel bar graphic, and for each arc edge, connecting the starting point and the ending point of the arc edge to obtain a transformed arc edge; obtaining all the straight edges of the steel bar graphic; determining the longest edge among all the transformed arc edges and all the straight edges as the target axis; and rotating the steel bar graphic so that the target axis is parallel to the coordinate axis where the long side of the target cell is located, where the long side of the target cell is the side with the longest length after comparing the x-axis length and the y-axis length of the target cell.

[0009] Optionally, the step of calculating the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis includes: determining the x-axis coordinates and y-axis coordinates of each turning point in the rotated steel bar graphic; determining the target rectangular bounding box based on the minimum x-axis coordinate, the minimum y-axis coordinate, the maximum x-axis coordinate, and the maximum y-axis coordinate among all the turning point coordinates; calculating the side lengths of the target rectangular bounding box on the x-axis and y-axis, and obtaining the side lengths of the target cell on the x-axis and y-axis; determining a first type of scale factor of the target rectangular bounding box and the target cell on the x-axis based on the side length of the target rectangular bounding box and the target cell on the x-axis; determining a second type of scale factor of the target rectangular bounding box and the target cell on the y-axis based on the side length of the target rectangular bounding box and the target cell on the y-axis; and combining the first type of scale factor and the second type of scale factor to obtain the set of scale factors.

[0010] Optionally, the step of traversing all the steel bar segments of the steel bar pattern and determining the angles between the steel bar segments and the x-axis and y-axis includes: in the case where the steel bar segment is a straight steel bar segment, determining the angles between the straight steel bar segment and the x-axis and y-axis; in the case where the steel bar segment is an arc steel bar segment, for each arc steel bar segment, connecting the starting point and the ending point of the arc steel bar segment to obtain a transformed straight steel bar segment, determining the angles between the transformed straight steel bar segment and the x-axis and y-axis, and determining the angles between the transformed straight steel bar segment and the x-axis and y-axis as the angles between the arc steel bar segment and the x-axis and y-axis.

[0011] Optionally, the step of selecting a target scale factor from the set of scale factors based on the angles includes: for each steel bar segment, in the case where the angle between the steel bar segment and the x-axis is less than the angle between the steel bar segment and the y-axis, determining the first type of scale factor between the target rectangular bounding box and the target cell on the x-axis as the target scale factor; or, in the case where the angle between the steel bar segment and the x-axis is greater than the angle between the steel bar segment and the y-axis, determining the second type of scale factor between the target rectangular bounding box and the target cell on the y-axis as the target scale factor.

[0012] Optionally, the step of determining the steel bar sketch of the steel bar pattern based on all the scaled steel bar segments includes: splicing the scaled steel bar segments based on the head-to-tail connection order of the steel bar segments in the steel bar pattern to obtain the steel bar sketch of the steel bar pattern; obtaining the actual lengths of all the steel bar segments in the steel bar pattern, the actual angles between the steel bar segments, and the actual radian of the arc steel bar segments, and writing the actual lengths, actual angles, and actual radian into the steel bar sketch.

[0013] According to another aspect of the embodiments of the present invention, there is also provided a device for drawing a segmented scaled steel bar sketch, including: a rotation unit for rotating the steel bar pattern, determining a target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar pattern, and calculating a set of scale factors between the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and y-axis; a scaling unit for traversing all the steel bar segments of the steel bar pattern, determining the angles between the steel bar segments and the x-axis and y-axis, selecting a target scale factor from the set of scale factors based on the angles, and scaling the steel bar segments based on the target scale factor; a determining unit for determining the steel bar sketch of the steel bar pattern based on all the scaled steel bar segments.

[0014] Optionally, the rotation unit includes: a first determination module configured to, when detecting that there is one or more symmetry axes in the steel bar pattern, compare the side lengths of the target cell on the x-axis and y-axis of the coordinate system, and when the side length on the x-axis is greater than the side length on the y-axis, determine the symmetry axis with the shortest length among the multiple symmetry axes as the target symmetry axis, and when the side length on the x-axis is not greater than the side length on the y-axis, determine the symmetry axis with the longest length among the multiple symmetry axes as the target symmetry axis, and rotate the steel bar pattern so that the target symmetry axis is parallel to the y-axis of the coordinate system.

[0015] Optionally, the rotation unit further includes: a first acquisition module configured to, when detecting that there is no symmetry axis in the steel bar pattern, acquire all the arc edges of the steel bar pattern, and for each arc edge, connect the starting point and the ending point of the arc edge to obtain a transformed arc edge; a second determination module configured to acquire all the straight edges of the steel bar pattern; a second determination module configured to determine the longest edge among all the transformed arc edges and all the straight edges as the target axis; a rotation module configured to rotate the steel bar pattern so that the target axis is parallel to the coordinate axis where the long side of the target cell is located, where the long side of the target cell is the side with the longest length after comparing the x-axis length and the y-axis length of the target cell.

[0016] Optionally, the rotation unit includes: a third determination module configured to determine the x-axis coordinate and y-axis coordinate of each turning point in the rotated steel bar pattern; a fourth determination module configured to determine a target rectangular bounding box based on the minimum x-axis coordinate, the minimum y-axis coordinate, the maximum x-axis coordinate, and the maximum y-axis coordinate among all the turning point coordinates; a calculation module configured to calculate the side lengths of the target rectangular bounding box on the x-axis and y-axis, and acquire the side lengths of the target cell on the x-axis and y-axis; a fifth determination module configured to determine a first type of scale factor of the target rectangular bounding box and the target cell on the x-axis based on the side lengths of the target rectangular bounding box and the target cell on the x-axis; a sixth determination module configured to determine a second type of scale factor of the target rectangular bounding box and the target cell on the y-axis based on the side lengths of the target rectangular bounding box and the target cell on the y-axis; a seventh determination module configured to synthesize the first type of scale factor and the second type of scale factor to obtain a set of scale factors.

[0017] Optionally, the scaling unit includes: an eighth determination module configured to, when the steel bar segment is a straight steel bar segment, determine the angles between the straight steel bar segment and the x-axis and y-axis; a ninth determination module configured to, when the steel bar segment is an arc steel bar segment, for each arc steel bar segment, connect the starting point and the ending point of the arc steel bar segment to obtain a transformed straight steel bar segment, determine the angles between the transformed straight steel bar segment and the x-axis and y-axis, and determine the angles between the arc steel bar segment and the x-axis and y-axis as the angles between the transformed straight steel bar segment and the x-axis and y-axis.

[0018] Optionally, the scaling unit further includes: a tenth determination module, which, for each steel bar segment, determines the first type of scale factor between the target rectangular bounding box and the target cell on the x-axis as the target scale factor when the angle between the steel bar segment and the x-axis is less than the angle between the steel bar segment and the y-axis; an eleventh determination module, which, when the angle between the steel bar segment and the x-axis is greater than the angle between the steel bar segment and the y-axis, determines the second type of scale factor between the target rectangular bounding box and the target cell on the y-axis as the target scale factor.

[0019] Optionally, the determination unit includes: a connection module, which splices the scaled steel bar segments based on the head-to-tail connection order of the steel bar segments in the steel bar pattern to obtain a simplified steel bar diagram of the steel bar pattern; a writing module, which is used to obtain the actual lengths of all the steel bar segments in the steel bar pattern, the actual angles between the steel bar segments, and the actual radian of the arc steel bar segments, and write the actual lengths, actual angles, and actual radian into the simplified steel bar diagram.

[0020] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, which includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the method for drawing a simplified steel bar diagram with segmented scaling according to any one of the above.

[0021] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for drawing a simplified steel bar diagram with segmented scaling according to any one of the above.

[0022] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the method for drawing a simplified steel bar diagram with segmented scaling according to any one of the above.

[0023] In the present disclosure, a target rectangular bounding box is determined based on the coordinates of each turning point in the rotated steel bar graph. Based on the target rectangular bounding box and the side lengths of the target cell on the x-axis and y-axis of the coordinate system, a set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis is calculated. Then, all steel bar segments of the steel bar graph are traversed to determine the angles between the steel bar segments and the x-axis and y-axis. Based on the angles, target scale factors are selected from the set of scale factors, and the steel bar segments are scaled based on the target scale factors. Finally, based on all the scaled steel bar segments, a simplified steel bar graph of the steel bar graph is determined. The present disclosure can automatically output a simplified steel bar graph based on the steel bar graph, without relying on any manual operations, and output a simplified steel bar graph with high accuracy and close to the hand-drawn effect, thereby solving the technical problem in the related art that the drawing of the simplified steel bar graph depends on manual intervention, resulting in low drawing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 is a flowchart of an optional method for drawing a simplified steel bar graph with segmented scaling according to an embodiment of the present invention;

[0026] Figure 2 is a schematic diagram of an optional steel bar graph according to an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of an optional target rectangular bounding box according to an embodiment of the present invention;

[0028] Figure 4 is a schematic diagram of an optional angle of a steel bar segment according to an embodiment of the present invention;

[0029] Figure 5 is a schematic diagram of an optional simplified steel bar graph according to an embodiment of the present invention;

[0030] Figure 6 is a schematic diagram of an optional device for drawing a simplified steel bar graph with segmented scaling according to an embodiment of the present invention;

[0031] Figure 7 is a hardware structure block diagram of an electronic device (or mobile device) for executing a method for drawing a simplified steel bar graph with segmented scaling according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0034] It should be noted that the method and device for drawing a segmented scaled steel bar sketch in the present disclosure can be used in the field of architectural drawing technology when drawing a segmented scaled steel bar sketch, and can also be used in any field other than the architectural drawing technology when drawing a segmented scaled steel bar sketch. The application field of the method and device for drawing a segmented scaled steel bar sketch in the present disclosure is not limited.

[0035] The following embodiments of the present invention can be applied to various systems / applications / devices for drawing segmented scaled steel bar sketches. The present invention can determine a target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graph, calculate a set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the target rectangular bounding box and the side lengths of the target cell on the x-axis and y-axis, then traverse all steel bar segments of the steel bar graph to determine the angles between the steel bar segments and the x-axis and y-axis, select a target scale factor from the set of scale factors based on the angles, scale the steel bar segments based on the target scale factor, and finally determine a steel bar sketch with high accuracy and close to the hand-drawn effect based on all the scaled steel bar segments.

[0036] The present invention will be described in detail below in conjunction with each embodiment.

[0037] Embodiment 1

[0038] According to an embodiment of the present invention, an embodiment of a method for drawing a segmented scaled steel bar sketch is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0039] Figure 1 FIG. is a flowchart of an optional method for drawing a segmented scaled steel bar sketch according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:

[0040] Step S101, rotate the steel bar graph, determine the target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graph, and calculate the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system.

[0041] In the embodiment of the present invention, two schemes for rotating the steel bar graph are provided. The first is the case with a symmetry axis, and the second is the case without a symmetry axis. The following will be described in combination with different embodiments respectively.

[0042] First, in the case of having a symmetry axis, how to rotate the steel bar graph.

[0043] Optionally, the step of rotating the steel bar graph includes: in the case where one or more symmetry axes of the steel bar graph are detected, comparing the side lengths of the target cell on the x-axis and y-axis of the coordinate system; in the case where the side length on the x-axis is greater than the side length on the y-axis, determining the shortest symmetry axis among the multiple symmetry axes as the target symmetry axis; in the case where the side length on the x-axis is not greater than the side length on the y-axis, determining the longest symmetry axis among the multiple symmetry axes as the target symmetry axis; rotating the steel bar graph so that the target symmetry axis is parallel to the y-axis of the coordinate system.

[0044] In the case where a symmetry axis already exists in the detected steel bar graph, first determine an optimal target symmetry axis. When determining the target symmetry axis, first detect one or more symmetry axes existing in the steel bar graph, then compare the side lengths of the target cell on the x-axis and y-axis of the coordinate system, and determine the target symmetry axis according to the comparison result.

[0045] When the side length of the target cell on the x-axis of the coordinate system is greater than the side length on the y-axis, the shortest axis of symmetry among multiple axes of symmetry is determined as the target axis of symmetry; when the side length of the target cell on the x-axis of the coordinate system is not greater than the side length on the y-axis, the longest axis of symmetry among multiple axes of symmetry is determined as the target axis of symmetry. After determining the target axis of symmetry, the steel bar pattern is rotated so that the target axis of symmetry is parallel to the y-axis of the coordinate system. By determining the target axis of symmetry in this way and then rotating the steel bar pattern, the resulting steel bar sketch can be made more beautiful.

[0046] Second, in the case of no axis of symmetry, how to rotate the steel bar pattern.

[0047] Optionally, the step of rotating the steel bar pattern further includes: when it is detected that the steel bar pattern has no axis of symmetry, obtaining all the arc edges of the steel bar pattern, and for each arc edge, connecting the starting point and the ending point of the arc edge to obtain a transformed arc edge; obtaining all the straight edges of the steel bar pattern; determining the longest edge among all the transformed arc edges and all the straight edges as the target axis; rotating the steel bar pattern so that the target axis is parallel to the coordinate axis where the long side of the target cell is located, where the long side of the target cell is the side with the longest length after comparing the x-axis length and the y-axis length of the target cell.

[0048] When it is detected that the steel bar pattern has no axis of symmetry, the embodiment of the present invention adopts a flexible strategy to ensure that even in an asymmetric steel bar pattern, a clear reference axis can be found for subsequent scaling and drawing operations. The core of this strategy lies in analyzing the arc edges and straight edges in the steel bar pattern, constructing a "target axis" that can best reflect the structural characteristics of the steel bar, and performing rotation and adjustment accordingly to achieve the best graphic adaptation and visual presentation.

[0049] First, for each arc edge in the steel bar pattern, the embodiment of the present invention transforms the arc edge into a straight edge (i.e., a transformed arc edge) by connecting its starting point and ending point. The purpose of this transformation is to simplify the complex curve features into straight line segments that are easy to process, so that the steel bar pattern can be scaled and drawn through a unified processing flow.

[0050] Next, the embodiment of the present invention comprehensively considers all the transformed arc edges (existing in the form of straight edges, called "transformed arc edges") and all the straight edges originally existing in the steel bar pattern. The longest edge among these transformed arc edges and straight edges is determined and designated as the "target axis". The longest straight edge usually can represent the main direction or structural characteristics of the steel bar pattern. Selecting it as the target axis can ensure that subsequent rotation and scaling operations are more accurate. At the same time, it can also make the best use of the available space of the target cell to draw a steel bar sketch that is both beautiful and rich in information.

[0051] After determining the target axis, in the embodiments of the present invention, the steel bar pattern is rotated. It should be noted that here the target axis is made parallel to the coordinate axis where the short side of the target cell is located. Here, if the target cell is vertical and the length of the x-axis < the length of the y-axis, then the target axis should be rotated to be parallel to the x-axis. If the target cell is horizontal and the length of the x-axis > the length of the y-axis, then the target axis should be rotated to be parallel to the y-axis. After that, operations such as determining the target rectangular bounding box can be carried out.

[0052] In the embodiments of the present invention, first, a coordinate system is determined based on the target cell. The target cell refers to the area where the final drawn steel bar sketch is placed, which can be a cell in an Excel table. The determined coordinate system is usually located at the lower left corner of the target cell. The x-axis is along the long side direction of the target cell, and the y-axis is along the short side direction of the target cell, forming a two-dimensional rectangular coordinate system that matches the geometric characteristics of the target cell.

[0053] Next, by analyzing the geometric characteristics of the steel bar pattern to identify its symmetry, the axis of symmetry of the steel bar pattern, that is, the target axis of symmetry, is determined. Then, the steel bar pattern is rotated so that the target axis of symmetry of the steel bar pattern is parallel to the x-axis of the coordinate system.

[0054] When the steel bar pattern is adjusted to the aligned state with the coordinate system of the target cell through rotation operations, the next key step is to determine an accurate target rectangular bounding box to ensure that each steel bar segment of the steel bar pattern can be properly included in the target cell in subsequent scaling processing.

[0055] The determination of the target rectangular bounding box is based on the coordinate information of each turning point in the steel bar pattern. Figure 2 It is a schematic diagram of an optional steel bar pattern according to the embodiments of the present invention, as Figure 2 shown. The turning points of this steel bar pattern include: two vertices of the four arc corners and two vertices of the two inclined straight lines.

[0056] By determining the x-axis coordinates and y-axis coordinates of all turning points, the minimum values of the x-axis coordinates and y-axis coordinates are respectively taken as the lower left corner point PointMinXY(Xmin, Ymin) of the target rectangular bounding box, and the maximum values of the x-axis coordinates and y-axis coordinates are respectively taken as the upper right corner point PointMaxXY(Xmax, Ymax) of the target rectangular bounding box. The target rectangular bounding box is constructed through the lower left corner point and the upper right corner point. Figure 3 It is a schematic diagram of an optional target rectangular bounding box according to the embodiments of the present invention, as Figure 3 shown. The bold rectangle is Figure 2The target rectangular bounding box corresponding to the shown rebar graphic. RebarW refers to the side length of the target rectangular bounding box on the y-axis, and RebarL refers to the side length of the target rectangular bounding box on the x-axis.

[0057] To ensure that the rebar graphic can be accurately scaled and drawn within the target cell, the embodiments of the present invention further analyze the relative size relationship between the target rectangular bounding box and the target cell. Since the length and width dimensions of the target cell are known, and the rebar sketch needs to be drawn within the area defined by the length and width, therefore, by comparing the side lengths of the target rectangular bounding box and the target cell on the x-axis and y-axis, two sets of scale factors can be calculated: one set is the scale factor of the width of the target rectangular bounding box to the width of the target cell (denoted as RatioX), and the other set is the scale factor of the height of the target rectangular bounding box to the height of the target cell (denoted as RatioY). These two sets of scale factors form a set of scale factors, which are the key parameters for realizing the scaling of the rebar graphic.

[0058] Step S102, traverse all rebar segments of the rebar graphic, determine the angles between the rebar segments and the x-axis and y-axis, select the target scale factor from the set of scale factors based on the angles, and scale the rebar segments based on the target scale factor.

[0059] After obtaining the set of scale factors, next, each rebar segment in the rebar graphic is accurately scaled to ensure that it can be drawn beautifully and accurately within the target cell.

[0060] The embodiments of the present invention will traverse all rebar segments in the entire rebar graphic. For each straight segment or arc segment after straightening processing, through the coordinate information of the starting point and ending point of the rebar segment, the angles between the rebar segment and the x-axis and y-axis can be calculated. Figure 4 It is a schematic diagram of an optional rebar segment angle according to an embodiment of the present invention. For an inclined straight segment in the rebar graphic, its angle with the y-axis is Ay, and its angle with the x-axis is Ax.

[0061] Based on the obtained angles, the embodiments of the present invention select the most appropriate scaling ratio from the previously constructed set of scale factors. That is, for each rebar segment, if its angle with the x-axis is less than its angle with the y-axis, then RatioX is selected as the target scale factor; conversely, if its angle with the y-axis is smaller, then RatioY is selected as the target scale factor. The purpose of this strategy is to ensure that during the scaling process, the rebar segment can be scaled as much as possible along its main direction (i.e., the direction with a smaller angle with the coordinate axes), so as to maximize the display of the shape characteristics of the rebar graphic within the limited cell size.

[0062] Finally, after selecting the target scale factor, the embodiment of the present invention performs a scaling process on the selected steel bar segments. This scaling operation is synchronized and in the same proportion on the x-axis and y-axis to ensure that the scaled steel bar segments still maintain their original shape ratio.

[0063] Step S103: Based on all the scaled steel bar segments, determine the simplified steel bar diagram of the steel bar pattern.

[0064] When the precise scaling process of all the steel bar segments in the steel bar pattern is completed, integrate all the scaled steel bar segments to form the final simplified steel bar diagram of the steel bar pattern. This process is to splice the scaled steel bar segments based on the head-to-tail connection order of the steel bar segments in the steel bar pattern to obtain the simplified steel bar diagram of the steel bar pattern. Figure 5 It is a schematic diagram of an optional simplified steel bar diagram according to an embodiment of the present invention, as Figure 5 shown. The thickened rectangle on the periphery is the target cell. CellL is the width of the target cell, CellW is the height of the target cell. Inside is the simplified steel bar diagram, and the numbers 2900, 1024, and 659 are the actual lengths of the steel bar pattern.

[0065] Optionally, the step of calculating the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis includes: determining the x-axis coordinate and y-axis coordinate of each turning point in the rotated steel bar pattern; based on the minimum x-axis coordinate, minimum y-axis coordinate, maximum x-axis coordinate, and maximum y-axis coordinate among all the turning point coordinates, determining the target rectangular bounding box; calculating the side lengths of the target rectangular bounding box on the x-axis and y-axis, and obtaining the side lengths of the target cell on the x-axis and y-axis; based on the side lengths of the target rectangular bounding box and the target cell on the x-axis, determining the first type of scale factor of the target rectangular bounding box and the target cell on the x-axis; based on the side lengths of the target rectangular bounding box and the target cell on the y-axis, determining the second type of scale factor of the target rectangular bounding box and the target cell on the y-axis; integrating the first type of scale factor and the second type of scale factor to obtain the set of scale factors.

[0066] When calculating the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis, first, based on the coordinate system, the embodiments of the present invention perform detailed coordinate point capture on the rotated steel bar graph to determine the exact coordinate values of each turning point on the x-axis and y-axis. Next, find the minimum x-axis coordinate, the minimum y-axis coordinate, the maximum x-axis coordinate, and the maximum y-axis coordinate among all the turning point coordinates. These four coordinate values define the outer boundary of the steel bar graph in the coordinate system. Take the minimum values of the x-axis coordinate and the y-axis coordinate as the lower left corner point PointMinXY(Xmin, Ymin) of the target rectangular bounding box, and take the maximum values of the x-axis coordinate and the y-axis coordinate as the upper right corner point PointMaxXY(Xmax, Ymax) of the target rectangular bounding box, and construct the target rectangular bounding box through the lower left corner point and the upper right corner point.

[0067] After determining the target rectangular bounding box, further calculate the side lengths of the target rectangular bounding box on the x-axis and y-axis. The calculation of the side lengths is directly based on the above four coordinate values and is obtained by the difference between the maximum coordinate value and the minimum coordinate value.

[0068] Then obtain the side lengths of the target cell on the x-axis and y-axis. These side lengths define the size of the target cell, that is, the drawing area available in the sketch drawing. By comparing the side lengths of the target rectangular bounding box and the side lengths of the target cell, the scale factors on the x-axis and y-axis can be calculated respectively. Specifically, the first type of scale factor (the scale factor on the x-axis) is obtained by calculating the ratio of the width of the target cell to the width of the target rectangular bounding box, and the formula is: RatioX = width of the target cell / width of the target rectangular bounding box. The second type of scale factor (the scale factor on the y-axis) is obtained by calculating the ratio of the height of the target cell to the height of the target rectangular bounding box, and the formula is: RatioY = height of the target cell / height of the target rectangular bounding box. Finally, by synthesizing the first type of scale factor and the second type of scale factor, the set of scale factors is obtained.

[0069] Optionally, the steps of traversing all the steel bar segments of the steel bar graph and determining the angles between the steel bar segments and the x-axis and y-axis include: in the case where the steel bar segment is a straight steel bar segment, determining the angles between the straight steel bar segment and the x-axis and y-axis; in the case where the steel bar segment is an arc steel bar segment, for each arc steel bar segment, connect the starting point and the ending point of the arc steel bar segment to obtain a transformed straight steel bar segment, determine the angles between the transformed straight steel bar segment and the x-axis and y-axis, and determine the angles between the arc steel bar segment and the x-axis and y-axis as the angles between the transformed straight steel bar segment and the x-axis and y-axis.

[0070] When traversing all the steel bar segments of the steel bar pattern and determining the angles between the steel bar segments and the x-axis and y-axis, when dealing with the arc-shaped steel bar segments in the steel bar pattern, in the embodiments of the present invention, endpoint capture is first performed on each arc segment, that is, the coordinate information of its starting point and ending point is accurately recorded. Subsequently, by connecting the starting point and the ending point, the arc segment is transformed into a virtual straight steel bar segment, which is called the "transformed straight steel bar segment" in the embodiments of the present invention.

[0071] Then, determine the angles between the transformed straight steel bar segment and the x-axis and y-axis, and determine the angles between the transformed straight steel bar segment and the x-axis and y-axis as the angles between the arc-shaped steel bar segment and the x-axis and y-axis for use in the subsequent selection of the target scale factor.

[0072] For the steel bar segments that are originally straight segments, no additional processing is required, and directly determine the angles between the straight steel bar segments and the x-axis and y-axis for use in the subsequent selection of the target scale factor.

[0073] Optionally, the step of selecting the target scale factor from the scale factor set based on the angle includes: for each steel bar segment, in the case where the angle between the steel bar segment and the x-axis is less than the angle between the steel bar segment and the y-axis, determine the first type of scale factor between the target rectangular bounding box and the target cell on the x-axis as the target scale factor; or, in the case where the angle between the steel bar segment and the x-axis is greater than the angle between the steel bar segment and the y-axis, determine the second type of scale factor between the target rectangular bounding box and the target cell on the y-axis as the target scale factor.

[0074] Precisely selecting the target scale factor from the scale factor set based on the angle between the steel bar segment and the coordinate axis is a crucial step in the embodiments of the present invention, which ensures that during the scaling and drawing process, the steel bar segment can be adjusted with the optimal scale, so as to obtain a beautiful and information-accurate steel bar sketch within the target cell.

[0075] In this embodiment, first judge the angle relationship between the steel bar segment and the x-axis and y-axis, and then select the most suitable scale factor. Specifically, in the case where the angle between the steel bar segment and the x-axis is less than the angle between the steel bar segment and the y-axis, determine the first type of scale factor between the target rectangular bounding box and the target cell on the x-axis as the target scale factor. In the case where the angle between the steel bar segment and the x-axis is greater than the angle between the steel bar segment and the y-axis, determine the second type of scale factor between the target rectangular bounding box and the target cell on the y-axis as the target scale factor. Subsequently, scale the steel bar segment based on the selected target scale factor.

[0076] Optionally, the steps of determining the steel bar sketch of the steel bar pattern based on all the scaled steel bar segments include: splicing the scaled steel bar segments based on the head-to-tail connection order of the steel bar segments in the steel bar pattern to obtain the steel bar sketch of the steel bar pattern; obtaining the actual lengths of all the steel bar segments in the steel bar pattern, the actual angles between the steel bar segments, and the actual radian of the arc steel bar segments, and writing the actual lengths, actual angles, and actual radian into the steel bar sketch.

[0077] After the scaling process is completed, the embodiment of the present invention will accurately splice the scaled steel bar segments according to the head-to-tail connection order of the steel bar segments in the original steel bar pattern. This splicing process strictly follows the original structure of the steel bar pattern to ensure that each part after scaling can be seamlessly docked to form a complete and coherent steel bar sketch.

[0078] Subsequently, the embodiment of the present invention will extract the actual lengths of all the steel bar segments, the actual angles between the steel bar segments, and the actual radian information of the arc steel bar segments from the original steel bar pattern, and write these actual information into the steel bar sketch. Figure 5 The shown steel bar sketch only shows the actual lengths of the steel bar segments.

[0079] The steps provided by the above method for drawing the steel bar sketch with segmented scaling can be as follows: rotate the steel bar pattern, then determine the target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar pattern, calculate the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and y-axis, then traverse all the steel bar segments of the steel bar pattern to determine the angles between the steel bar segments and the x-axis and y-axis, select the target scale factor from the set of scale factors based on the angles, scale the steel bar segments based on the target scale factor, and finally determine the steel bar sketch of the steel bar pattern based on all the scaled steel bar segments.

[0080] The embodiment of the present invention automatically outputs the steel bar sketch based on the steel bar pattern, without relying on any manual operation, and outputs a steel bar sketch with high accuracy and close to the hand-drawn effect, thereby solving the technical problem in the related art that the drawing of the steel bar sketch depends on manual intervention, resulting in low drawing efficiency.

[0081] The following will be described in detail with another embodiment.

[0082] Embodiment 2

[0083] A device for drawing a steel bar sketch with segmented scaling provided in this embodiment includes a plurality of implementation units, and each implementation unit corresponds to each implementation step in Embodiment 1 above.

[0084] Figure 6 is a schematic diagram of an optional device for drawing a steel bar sketch with segmented scaling according to an embodiment of the present invention, as Figure 6As shown, the device for drawing a segmented and scaled steel bar sketch can include: a rotation unit 61, a scaling unit 62, and a determination unit 63.

[0085] Among them, the rotation unit 61 is used to rotate the steel bar graph, determine the target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graph, and calculate the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system.

[0086] The scaling unit 62 is used to traverse all the steel bar segments of the steel bar graph, determine the angles between the steel bar segments and the x-axis and y-axis, select the target scale factor from the set of scale factors based on the angles, and scale the steel bar segments based on the target scale factor.

[0087] The determination unit 63 determines the steel bar sketch of the steel bar graph based on all the scaled steel bar segments.

[0088] The above device for drawing a segmented and scaled steel bar sketch can rotate the steel bar graph through the rotation unit 61, then determine the target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graph, calculate the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and y-axis of the coordinate system, then the scaling unit 62 traverses all the steel bar segments of the steel bar graph, determines the angles between the steel bar segments and the x-axis and y-axis, selects the target scale factor from the set of scale factors based on the angles, scales the steel bar segments based on the target scale factor, and finally the determination unit 63 determines the steel bar sketch of the steel bar graph based on all the scaled steel bar segments. In the embodiment of the present invention, the steel bar sketch is automatically output based on the steel bar graph, without relying on any manual operation, and the output steel bar sketch has high accuracy and is close to the hand-drawn effect, thereby solving the technical problem in the related art that the drawing of the steel bar sketch depends on manual intervention, resulting in low drawing efficiency.

[0089] Optionally, the rotation unit 61 includes: a first determination module, which is used to compare the side lengths of the target cell on the x-axis and y-axis of the coordinate system when it is detected that the steel bar graph has one or more axes of symmetry. When the side length on the x-axis is greater than the side length on the y-axis, the axis of symmetry with the shortest length among the multiple axes of symmetry is determined as the target axis of symmetry. When the side length on the x-axis is not greater than the side length on the y-axis, the axis of symmetry with the longest length among the multiple axes of symmetry is determined as the target axis of symmetry, and the steel bar graph is rotated so that the target axis of symmetry is parallel to the y-axis of the coordinate system.

[0090] Optionally, the rotation unit 61 further includes: a first acquisition module, configured to, when it is detected that the steel bar pattern has no axis of symmetry, acquire all the arc edges of the steel bar pattern, and for each arc edge, connect the starting point and the ending point of the arc edge to obtain a transformed arc edge; a second determination module, configured to acquire all the straight edges of the steel bar pattern; a second determination module, configured to determine the longest edge among all the transformed arc edges and all the straight edges as the target axis; a rotation module, configured to rotate the steel bar pattern so that the target axis is parallel to the coordinate axis where the long side of the target cell is located, where the long side of the target cell is the side with the longest length after comparing the x-axis length and the y-axis length of the target cell.

[0091] Optionally, the rotation unit 61 includes: a third determination module, configured to determine the x-axis coordinate and the y-axis coordinate of each turning point in the rotated steel bar pattern; a fourth determination module, configured to determine a target rectangular bounding box based on the minimum x-axis coordinate, the minimum y-axis coordinate, the maximum x-axis coordinate, and the maximum y-axis coordinate among all the turning point coordinates; a calculation module, configured to calculate the side lengths of the target rectangular bounding box on the x-axis and the y-axis, and acquire the side lengths of the target cell on the x-axis and the y-axis; a fifth determination module, configured to determine a first type of scale factor of the target rectangular bounding box and the target cell on the x-axis based on the side lengths of the target rectangular bounding box and the target cell on the x-axis; a sixth determination module, configured to determine a second type of scale factor of the target rectangular bounding box and the target cell on the y-axis based on the side lengths of the target rectangular bounding box and the target cell on the y-axis; a seventh determination module, configured to synthesize the first type of scale factor and the second type of scale factor to obtain a set of scale factors.

[0092] Optionally, the scaling unit 63 includes: an eighth determination module, configured to determine the angles between the straight steel bar segment and the x-axis and the y-axis when the steel bar segment is a straight steel bar segment; a ninth determination module, configured to, when the steel bar segment is an arc steel bar segment, for each arc steel bar segment, connect the starting point and the ending point of the arc steel bar segment to obtain a transformed straight steel bar segment, determine the angles between the transformed straight steel bar segment and the x-axis and the y-axis, and determine the angles between the arc steel bar segment and the x-axis and the y-axis as the angles between the transformed straight steel bar segment and the x-axis and the y-axis.

[0093] Optionally, the scaling unit 63 further includes: a tenth determination module, configured to, for each steel bar segment, when the angle between the steel bar segment and the x-axis is less than the angle between the steel bar segment and the y-axis, determine the first type of scale factor of the target rectangular bounding box and the target cell on the x-axis as the target scale factor; an eleventh determination module, configured to, when the angle between the steel bar segment and the x-axis is greater than the angle between the steel bar segment and the y-axis, determine the second type of scale factor of the target rectangular bounding box and the target cell on the y-axis as the target scale factor.

[0094] Optionally, the determination unit 64 includes: a connection module that splices the scaled steel bar segments based on the head-to-tail connection order of the steel bar segments in the steel bar pattern to obtain a simplified steel bar diagram of the steel bar pattern; a writing module that is used to obtain the actual lengths of all the steel bar segments in the steel bar pattern, the actual angles between the steel bar segments, and the actual radian of the arc steel bar segments, and write the actual lengths, actual angles, and actual radian into the simplified steel bar diagram.

[0095] The above-described segmented scaling steel bar simplified diagram drawing device may further include a processor and a memory. The above-described rotation unit 61, scaling unit 62, determination unit 63, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.

[0096] The above processor includes a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and the segmented scaling drawing of the steel bar simplified diagram is performed by adjusting the kernel parameters.

[0097] The above memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash RAM (flash RAM), and the memory includes at least one storage chip.

[0098] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium. The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the segmented scaling steel bar simplified diagram drawing method in any one of the above Embodiment 1.

[0099] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory. The memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the segmented scaling steel bar simplified diagram drawing method in any one of the above Embodiment 1.

[0100] The present application also provides a computer program product, including a computer program, and the steps of the segmented scaling steel bar simplified diagram drawing method described in each embodiment of the present application are implemented when the computer program is executed by a processor.

[0101] The present application also provides a computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and the steps of the segmented scaling steel bar simplified diagram drawing method described in each embodiment of the present application are implemented when the computer program is executed by a processor.

[0102] Figure 7It is a hardware structure block diagram of an electronic device (or mobile device) for a steel bar sketch drawing method for performing segmented scaling according to an embodiment of the present invention. As Figure 7 shown, the electronic device may include one or more ( Figure 7 illustrated as 702a, 702b,..., 702n in Figure 7 ) processors 702 (the processor 702 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 704 for storing data. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 7 the structure shown in Figure 7 is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components than

[0103] shown in

[0104] , or have a different configuration from

[0105] shown in

[0106] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] In addition, in each embodiment of the present invention, the functional units may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0108] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0109] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for drawing a steel bar diagram with segmented scaling, characterized in that: include: Rotate the steel bar graphic, determine the target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graphic, and calculate the set of scale factors of the target rectangular bounding box and the target cell on the x-axis and the y-axis based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and the y-axis of the coordinate system; Traversing all the steel bar segments of the steel bar graphic, determining the angles between the steel bar segment and the x-axis and the y-axis, selecting a target scale factor from the scale factor set based on the angles, and scaling the steel bar segment based on the target scale factor; Based on all scaled steel bar segments, a steel bar schematic diagram of the steel bar graphic is determined.

2. The drawing method according to claim 1, characterized in that: The steps to rotate a reinforcement graphic include: When it is detected that the steel bar graphic has one or more axes of symmetry, comparing the side lengths of the target cell on the x-axis and y-axis of the coordinate system; When the length of the side on the x-axis is greater than the length of the side on the y-axis, determining the shortest axis of symmetry among the multiple axes of symmetry as the target axis of symmetry; When the length of the side on the x-axis is not greater than the length of the side on the y-axis, determining the longest axis of symmetry among the multiple axes of symmetry as the target axis of symmetry; The steel bar graphic is rotated so that the target symmetry axis is parallel to the y-axis of the coordinate system.

3. The drawing method according to claim 2, characterized in that: The steps of rotating the steel bar graphics also include: When it is detected that the steel bar pattern does not have a symmetry axis, all arc edges of the steel bar pattern are obtained, and for each arc edge, the starting point and the end point of the arc edge are connected to obtain a transformed arc edge; Obtain all straight edges of the steel bar graphic; Determine the longest side among all the transformed arc sides and all the straight side as the target axis; The steel bar graphic is rotated so that the target axis is parallel to the coordinate axis where the long side of the target cell is located, wherein the long side of the target cell is the side with the longest length after comparing the x-axis length and the y-axis length of the target cell.

4. The drawing method according to claim 2 or 3, characterized in that: The step of calculating a set of scale factors of the target rectangular bounding box and the target cell on the x-axis and the y-axis comprises: Determine the x-axis coordinate and the y-axis coordinate of each turning point in the rotated steel bar graph; Determine the target rectangular bounding box based on the smallest x-axis coordinate, the smallest y-axis coordinate, the largest x-axis coordinate and the largest y-axis coordinate of all turning point coordinates; Calculate the side lengths of the target rectangular bounding box on the x-axis and the y-axis, and obtain the side lengths of the target cell on the x-axis and the y-axis; Determine a first type of proportionality factor between the target rectangular bounding box and the target cell on the x-axis based on the side lengths of the target rectangular bounding box and the target cell on the x-axis; Determine a second type of proportionality factor between the target rectangular bounding box and the target cell on the y-axis based on the side lengths of the target rectangular bounding box and the target cell on the y-axis; The first type of scaling factors and the second type of scaling factors are combined to obtain the scaling factor set.

5. The drawing method according to claim 1, characterized in that: The step of traversing all the steel bar segments of the steel bar graph and determining the angles between the steel bar segments and the x-axis and the y-axis comprises: When the steel bar segment is a straight steel bar segment, determining the angles between the straight steel bar segment and the x-axis and the y-axis; In the case where the steel bar segment is an arc steel bar segment, for each of the arc steel bar segments, the starting point and the end point of the arc steel bar segment are connected to obtain a transformed straight steel bar segment, and the angles between the transformed straight steel bar segment and the x-axis and the y-axis are determined, and the angles between the transformed straight steel bar segment and the x-axis and the y-axis are determined as the angles between the arc steel bar segment and the x-axis and the y-axis.

6. The drawing method according to claim 1, characterized in that: The step of selecting the target scale factor from the scale factor set based on the included angle comprises: For each of the steel bar segments, when the angle between the steel bar segment and the x-axis is smaller than the angle between the steel bar segment and the y-axis, a first type of proportional factor between the target rectangular bounding box and the target cell on the x-axis is determined as the target proportional factor; or When the angle between the steel bar segment and the x-axis is greater than the angle between the steel bar segment and the y-axis, the second type of proportional factor between the target rectangular bounding box and the target cell on the y-axis is determined as the target proportional factor.

7. The drawing method according to claim 1, characterized in that: The step of determining a steel bar diagram of the steel bar graphic based on all scaled steel bar segments comprises: Based on the head-to-tail connection sequence of the steel bar segments in the steel bar graphic, the scaled steel bar segments are spliced ​​to obtain a steel bar schematic diagram of the steel bar graphic; The actual lengths of all steel bar segments in the steel bar graph, the actual angles between the steel bar segments, and the actual curvature of the arc steel bar segments are obtained, and the actual lengths, the actual angles, and the actual curvature are written into the steel bar diagram.

8. A device for drawing a steel bar diagram with segmented scaling, characterized in that: include: A rotation unit, used to rotate the steel bar graphic, determine a target rectangular bounding box based on the coordinates of each turning point in the rotated steel bar graphic, and calculate a set of proportional factors of the target rectangular bounding box and the target cell on the x-axis and the y-axis based on the side lengths of the target rectangular bounding box and the target cell on the x-axis and the y-axis of the coordinate system; A scaling unit, configured to traverse all steel bar segments of the steel bar graphic, determine the angles between the steel bar segment and the x-axis and the y-axis, select a target scale factor from the scale factor set based on the angles, and scale the steel bar segment based on the target scale factor; A unit is determined, and a steel bar diagram of the steel bar graphic is determined based on all scaled steel bar segments.

9. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the segmented scaled steel bar diagram drawing method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for drawing a segmented and scaled steel bar diagram as described in any one of claims 1 to 7 are implemented.