Road layout conversion method and storage medium based on CAD
Through the CAD-based road staking conversion method, the conversion process of surveying and design files to road graphic files is simplified, the problems of complex operation and high threshold are solved, automated conversion is realized, and efficiency is improved.
Patent Information
- Application Number
- CN202010801059.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-11
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-08-11
AI Technical Summary
In the field of surveying and mapping, the process of converting survey design documents into road graphic documents in the prior art is complex and has high operating thresholds, requiring professional knowledge and complex steps.
The road staking conversion method based on CAD is adopted. By obtaining the CAD source file, analyzing multiple line segments, and converting them into elements in the road graphic file according to the preset conversion method, including points, lines, circles and other types, simplifying the conversion process.
Directly convert line segments, points, circles, and splines in the CAD source file into various types of elements in the road graphic file, reducing operational complexity and threshold and improving operational efficiency.
Smart Images

Figure CN112100712B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to road setting out in the surveying and mapping industry, and in particular to a CAD-based road setting out conversion method and a storage medium. Background Art
[0002] At present, in the field of surveying and mapping, the design files in the early stage of surveying and mapping are generally designed by the designer and stored as CAD source files in dxf or dwg format. After the construction party gets the design file, it first parses the design file according to the road algorithm and forms a road graphic file, and then displays the graphic route according to the road graphic file before conducting construction survey. As for the calculation process of converting the design file into a graphic route, the intersection method and the element method are generally used to achieve it. Both methods are professional conversion methods and must be performed by professionals with professional knowledge, with the help of a computer and the installation of corresponding professional software. During the operation process, multiple complex steps are involved, such as data input, data calculation, and software operation, etc., which are complicated and inconvenient to operate. Summary of the invention
[0003] In order to overcome the shortcomings of the prior art, one of the objects of the present invention is to provide a CAD-based road layout conversion method, which can solve the problems of complex operation and high operation threshold in converting survey and design files into road graphic files in the prior art.
[0004] A second object of the present invention is to provide a storage medium that can solve the problems of complex operation and high operation threshold in converting survey and design files into road graphic files in the prior art.
[0005] One of the purposes of the present invention is achieved by the following technical solution:
[0006] A road setting out conversion method based on CAD, the road setting out conversion method comprising:
[0007] Acquisition steps: Acquire the CAD source file of the road design;
[0008] Parsing step: parsing the CAD source file to obtain each polyline segment in the CAD source file; wherein each polyline segment includes one endpoint or a line segment composed of multiple endpoints;
[0009] Conversion step: processing each polyline segment in the CAD source file according to the polyline segment conversion method preset in the system, thereby converting it into an element in the road graphic file;
[0010] Generation steps: Generate road graphics files based on all elements.
[0011] Furthermore, the multi-line segment conversion method includes:
[0012] Selection step: Get all the polyline segments in the CAD source file and select one of the polyline segments as the polyline segment to be converted;
[0013] Traversal step: traverse each endpoint of the polyline segment to be converted in turn, and record the previous endpoint and convexity of each endpoint;
[0014] Processing steps: Calculate the type of the line segment between the current endpoint and the previous endpoint based on the coordinates, convexity, coordinates of each endpoint and system preset rules, and convert it into the corresponding element in the road graphics file based on the type of the line segment.
[0015] Furthermore, convexity indicates the size of the arc of a vertex, and the value of the convexity refers to the tangent of 1 / 4 of the angle contained in the arc from the starting point to the end point; if an arc is clockwise from the starting point to the end point, its convexity is negative, otherwise it is positive; and, when the convexity is 0, the arc from the starting point to the end point is a straight line; when the convexity is 1, the arc from the starting point to the end point is a semicircle.
[0016] Furthermore, the traversal step includes: if the current endpoint is the first endpoint of a multi-line segment, the previous endpoint of the current endpoint is itself, and its convexity is its own convexity; if the current endpoint is not the first endpoint of the multi-line segment, the convexity of the current endpoint is the convexity of the previous endpoint.
[0017] Furthermore, the processing step comprises:
[0018] If the convexity of the current endpoint is 0, it means that the line segment formed by the current endpoint and the previous endpoint is a straight line, and depending on whether the current endpoint is the first endpoint of a multi-line segment, a point type element or a line type element is added to the road graphics file based on the judgment result.
[0019] Furthermore, when the current endpoint is the first endpoint of a multi-line segment, a point type element is added to the road graphic file; when the current endpoint is not the first endpoint of a multi-line segment, a line type element is added to the road graphic file.
[0020] Furthermore, when the convexity of the current endpoint is not 0, it indicates that the line segment formed by the current endpoint and the previous endpoint is a curve, and the starting point coordinates, end point coordinates, arc radius and direction from the starting point to the end point of the arc corresponding to the curve are calculated according to the coordinates of the current endpoint, the coordinates of the previous endpoint and the convexity of the current endpoint, and a circle type element is added to the road graphics file according to the starting point coordinates, end point coordinates, arc radius and direction from the starting point to the end point of the arc; wherein the starting point coordinates of the circle type element are the starting point coordinates of the arc, the end point coordinates are the end point cushion of the arc, the radius is the arc radius, and the rotation direction of the circle is the direction from the starting point to the end point of the arc.
[0021] Furthermore, when the convexity of the current endpoint is not 0, it also includes:
[0022] Get the coordinates of the current endpoint, the coordinates of the previous endpoint, and the convexity of the current endpoint and calculate the starting angle and the ending angle of the arc of the curve;
[0023] The direction angle is calculated based on the coordinates of the current endpoint and the coordinates of the previous endpoint;
[0024] A first difference is obtained by subtracting the direction angle from the starting angle of the arc, and a second difference is obtained by subtracting the ending angle of the arc from the starting angle of the arc;
[0025] Determine the magnitude of the first difference and the second difference, and then determine the direction of the arc from the starting point to the end point;
[0026] Add a "circle" type element to the road element according to the coordinates of the current endpoint, the arc radius, and the direction of the arc from the start point to the end point; when the current endpoint is the first endpoint of the arc, first add a point type element to the road graphic file, and then add a circle type element to the road graphic file.
[0027] Furthermore, if the first difference is greater than the second difference, the direction of the arc of the curve from the starting point to the end point is counterclockwise; if the first difference is less than or equal to the second difference, the direction of the arc of the curve from the starting point to the end point is clockwise.
[0028] The second object of the present invention is achieved by adopting the following technical solution:
[0029] A storage medium is a computer-readable storage medium on which a road setting out conversion program is stored. The road setting out conversion program is a computer program. When the road setting out conversion program is executed by a processor, the steps of using the CAD-based road setting out conversion program are implemented as one of the purposes of the present invention.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] The present invention solves the problems of complicated operation process and high operation threshold of survey and design file conversion in the prior art by directly and automatically converting line segments, points, circles and spline curves in CAD source files into various types of elements in road graphics files. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flow chart of the CAD-based road layout conversion method provided by the present invention;
[0033] Figure 2 is a flow chart of a multi-line segment conversion method;
[0034] Figure 3 for Figure 2 Flow chart of step S33 in FIG.
[0035] Figure 4 This is a module diagram of the CAD-based road layout conversion device provided by the present invention.
[0036] In the figure: 11, memory; 12, processor; 13, communication bus; 14, network interface. DETAILED DESCRIPTION
[0037] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0038] Embodiment 1
[0039] The present invention provides a preferred embodiment, as Figure 1 As shown, the CAD-based road layout conversion method includes the following steps:
[0040] Step S1, obtaining the CAD source file of the road design.
[0041] Generally speaking, the source files of the design files provided by the designer are CAD files, including dxf and dwg. In addition, the designer will provide the straightness and curvature table of the road and the coordinate table of each pile when providing the design files.
[0042] The existing road conversion is generally: when the survey and construction party obtains the design CAD source file, the data in the road straightness table is input into the road conversion software, and the automatic calculation in the road conversion software is clicked, and then the calculated coordinates are compared with the coordinates in the pile-by-pile coordinate table one by one. If the match is successful, it means that the data input of the straightness table is correct; if the match is unsuccessful, it means that the input is wrong. When the match is successful, the next step of road conversion calculation is carried out.
[0043] However, since the data in the straight-curve table is professional, it is generally difficult for many novices or non-professionals to parse the data in the straight-curve table, and therefore, it is impossible to input the data in the straight-curve table into the road conversion software. Therefore, the present invention directly uses the source design file provided by the designer-the CAD source file, and parses the CAD source file to obtain the road layout, that is, converts the CAD source file into a road graphic file.
[0044] Step S2: parse the CAD source file to obtain each polyline segment in the CAD source file, wherein the polyline segment may include two endpoints or multiple endpoints.
[0045] Step S3: convert each polyline segment in the CAD source file into an element in the road graphics file according to a polyline segment conversion method preset in the system.
[0046] Step S4: Generate a road graphic file based on all elements. The road graphic file includes a pile-by-pile coordinate table of the road, so that surveyors can perform actual survey operations based on the road graphic file.
[0047] Preferably, the polyline segment conversion method of the present invention is to convert the polyline segments in the CAD source file into corresponding elements. That is, the present invention uses the coordinates of each end point of the polyline segment and the convexity of the polyline segment to calculate the road data, thereby realizing the conversion between the CAD source file and the road graphic file.
[0048] Preferably, if Figure 2 As shown, the multi-line segment conversion method includes:
[0049] Step S31, obtaining all polyline segments in the CAD source file and selecting a polyline segment in the CAD source file as the polyline segment to be converted.
[0050] Step S32, traverse each endpoint of the polyline segment to be converted in turn, and record the previous endpoint and convexity of each endpoint.
[0051] The convexity indicates the arc size of a vertex, and the convexity value refers to the tangent of 1 / 4 of the angle contained in this arc. If an arc is clockwise from the starting point to the end point, its convexity is negative, and vice versa; and when the convexity is 0, the arc represents a straight line; when the convexity is 1, the arc represents a semicircle.
[0052] In addition, the present invention also stipulates that: if the current endpoint is the first endpoint of a multi-line segment, the previous endpoint of the current endpoint is itself, and its convexity is its own convexity; if the current endpoint is not the first endpoint of the multi-line segment, the convexity of the current endpoint is the convexity of the previous endpoint.
[0053] The present invention also provides a specific method for calculating the convexity, including: firstly calculating a starting point azimuth and an end point azimuth, then subtracting the azimuth of the starting point from the azimuth of the end point to obtain a difference (the difference is the angle of the arc between the starting point and the end point), and then calculating the convexity of each end point according to the difference. At the same time, if the azimuth of the end point is less than the azimuth of the starting point, that is, the difference is less than 0, the difference needs to be corrected.
[0054] The present invention also provides a specific code to illustrate the calculation method of the above convexity:
[0055] double dStartAngle = pArc->startAngle(); / / Azimuth of the starting point
[0056] double dEndAngle = pArc->endAngle(); / / azimuth of the end point
[0057] double dAlfa = dEndAngle - dStartAngle; / / Difference between the azimuth of the starting point and the azimuth of the end point
[0058]
[0059]
[0060] Step S33: After obtaining the previous endpoint and convexity of the current endpoint, convert the arc between the current endpoint and the previous endpoint into an element in the road image file according to the convexity of the current endpoint.
[0061] Specifically: if the convexity of the current endpoint is 0, it means that the line segment formed by the current endpoint and the previous endpoint is a straight line.
[0062] Preferably, when the arc formed by the current endpoint and the previous endpoint is a straight line: determine whether the current endpoint is the first endpoint of a polyline segment, if so, add a "point" type element to the road graphics file; if not, add a "line" type element to the road graphics file.
[0063] When the convexity of the current endpoint is not 0, it means that the line segment formed by the current endpoint and the previous endpoint is a curve.
[0064] Preferably, when the arc formed by the current endpoint and the previous endpoint is a curve: according to the coordinates of the current endpoint, the coordinates of the previous endpoint and the convexity of the current endpoint, the function in the system is called to automatically calculate the center coordinates, radius, starting angle and ending angle of the curve, and then the curve is converted into a "circle" type element in the road graphic file. Among them, the function in the system is pre-set and stored in the system by the engineer.
[0065] Preferably, if Figure 3 As shown, step S33 also includes: step S331, obtaining the coordinates of the current endpoint, the coordinates of the previous endpoint and the convexity of the current endpoint and calculating the starting angle and the end angle of the arc of the curve.
[0066] Preferably, since the angle range in the CAD software is 0 to 360°, when the calculated angle value is greater than 360°, the value of each calculated angle needs to be corrected. For example, when the calculated angle value is greater than 360°, the calculated angle value is subtracted by 360 until the angle value is within the range of 0 to 360°; conversely, when the calculated angle value is less than 0°, the calculated angle value is added by 360 until the angle is within the range of 0 to 360°.
[0067] Step S332: Calculate the direction angle based on the coordinates of the current endpoint and the coordinates of the previous endpoint.
[0068] Step S333, obtain a first difference value by subtracting the direction angle from the starting angle of the arc, and obtain a second difference value by subtracting the ending angle of the arc from the starting angle of the arc.
[0069] Step S334: Determine the magnitude of the first difference and the second difference, and then determine the direction of the arc from the starting point to the end point. If the first difference is greater than the second difference, the direction of the arc from the starting point to the end point is counterclockwise; if the first difference is less than or equal to the second difference, the direction of the arc from the starting point to the end point is clockwise.
[0070] Step S335: Add a "circle" type element to the road element according to the coordinates of the current endpoint, the radius of the arc, and the direction of the arc from the start point to the end point. The starting coordinates of the "circle" type element are the coordinates of the current endpoint, the radius of the circle is the radius of the arc, and the direction of the arc from the start point to the end point is the rotation direction of the circle.
[0071] In addition, if the current endpoint is the first endpoint, first add a "point" type element to the road graphic file, and then add a "circle" type element.
[0072] The present invention can realize direct and automatic conversion of CAD source files into road graphic files, greatly simplifying the operation process of CAD source file stakeout, greatly reducing the operation threshold and improving the operation efficiency.
[0073] Embodiment 2
[0074] The present invention provides a CAD-based road layout conversion device. Figure 4 1 is a schematic diagram of the internal structure of a CAD-based road layout conversion device provided by an embodiment of the present invention.
[0075] In this embodiment, the CAD-based road layout conversion device can be a PC (Personal Computer), or a terminal device such as a smart phone, a tablet computer, a portable computer, etc. The CAD-based road layout conversion device at least includes: a processor 12, a communication bus 13, a network interface 14, and a memory 11.
[0076] The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of a CAD-based road setting out conversion device, such as a hard disk of the CAD-based road setting out conversion device. In other embodiments, the memory 11 may also be an external storage device of a CAD-based road setting out conversion device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the CAD-based road setting out conversion device. Further, the memory 11 may also include both an internal storage unit and an external storage device of a CAD-based road setting out conversion device. The memory 11 may not only be used to store application software and various types of data installed in a CAD-based road setting out conversion device, such as the code of a CAD-based road setting out conversion program, but may also be used to temporarily store data that has been output or is to be output.
[0077] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory 11, such as executing a CAD-based road layout conversion program.
[0078] The communication bus 13 is used to realize the connection and communication between these components.
[0079] The network interface 14 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the CAD-based road stakeout conversion device and other electronic devices.
[0080] Optionally, the CAD-based road layout conversion device may further include a user interface, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the CAD-based road layout conversion device and to display a visual user interface.
[0081] Figure 4 Only the CAD-based road stakeout conversion device having components 11-14 and a CAD-based road stakeout conversion program is shown. It can be understood by those skilled in the art that Figure 4 The structure shown does not constitute a limitation on the CAD-based road stakeout conversion device, and may include fewer or more components than those shown in the figure, or combine certain components, or arrange the components differently.
[0082] exist Figure 4 In the embodiment of the CAD-based road setting out conversion device shown, a CAD-based road setting out conversion program is stored in the memory 11; when the processor 12 executes the CAD-based road setting out conversion program stored in the memory 11, the following steps are implemented:
[0083] Acquisition steps: Acquire the CAD source file of the road design;
[0084] Parsing step: parsing the CAD source file to obtain each polyline segment in the CAD source file; wherein each polyline segment includes one endpoint or a line segment composed of multiple endpoints;
[0085] Conversion step: processing each polyline segment in the CAD source file according to the polyline segment conversion method preset in the system, thereby converting it into an element in the road graphic file;
[0086] Generation steps: Generate road graphics files based on all elements.
[0087] Furthermore, the multi-line segment conversion method includes:
[0088] Selection step: Get all the polyline segments in the CAD source file and select one of the polyline segments as the polyline segment to be converted;
[0089] Traversal step: traverse each endpoint of the polyline segment to be converted in turn, and record the previous endpoint and convexity of each endpoint;
[0090] Processing steps: Calculate the type of the line segment between the current endpoint and the previous endpoint based on the coordinates, convexity, coordinates of each endpoint and system preset rules, and convert it into the corresponding element in the road graphics file based on the type of the line segment.
[0091] Furthermore, convexity indicates the size of the arc of a vertex, and the value of the convexity refers to the tangent of 1 / 4 of the angle contained in the arc from the starting point to the end point; if an arc is clockwise from the starting point to the end point, its convexity is negative, otherwise it is positive; and, when the convexity is 0, the arc from the starting point to the end point is a straight line; when the convexity is 1, the arc from the starting point to the end point is a semicircle.
[0092] Furthermore, the traversal step includes: if the current endpoint is the first endpoint of the multi-line segment, the previous endpoint of the current endpoint is itself, and its convexity is its own convexity; if the current endpoint is not the first endpoint of the multi-line segment, the convexity of the current endpoint is the convexity of the previous endpoint
[0093] Furthermore, the processing step comprises:
[0094] If the convexity of the current endpoint is 0, it means that the line segment formed by the current endpoint and the previous endpoint is a straight line, and depending on whether the current endpoint is the first endpoint of a multi-line segment, a point type element or a line type element is added to the road graphics file based on the judgment result.
[0095] Furthermore, when the current endpoint is the first endpoint of a multi-line segment, a point type element is added to the road graphic file; when the current endpoint is not the first endpoint of a multi-line segment, a line type element is added to the road graphic file.
[0096] Furthermore, when the convexity of the current endpoint is not 0, it indicates that the line segment formed by the current endpoint and the previous endpoint is a curve, and the starting point coordinates, end point coordinates, arc radius and direction from the starting point to the end point of the arc corresponding to the curve are calculated according to the coordinates of the current endpoint, the coordinates of the previous endpoint and the convexity of the current endpoint, and a circle type element is added to the road graphics file according to the starting point coordinates, end point coordinates, arc radius and direction from the starting point to the end point of the arc; wherein the starting point coordinates of the circle type element are the starting point coordinates of the arc, the end point coordinates are the end point cushion of the arc, the radius is the arc radius, and the rotation direction of the circle is the direction from the starting point to the end point of the arc.
[0097] Furthermore, when the convexity of the current endpoint is not 0, it also includes:
[0098] Get the coordinates of the current endpoint, the coordinates of the previous endpoint, and the convexity of the current endpoint and calculate the starting angle and the ending angle of the arc of the curve;
[0099] The direction angle is calculated based on the coordinates of the current endpoint and the coordinates of the previous endpoint;
[0100] A first difference is obtained by subtracting the direction angle from the starting angle of the arc, and a second difference is obtained by subtracting the ending angle of the arc from the starting angle of the arc;
[0101] Determine the magnitude of the first difference and the second difference, and then determine the direction of the arc from the starting point to the end point;
[0102] Add a "circle" type element to the road element according to the coordinates of the current endpoint, the arc radius, and the direction of the arc from the start point to the end point; when the current endpoint is the first endpoint of the arc, first add a point type element to the road graphic file, and then add a circle type element to the road graphic file.
[0103] Furthermore, if the first difference is greater than the second difference, the direction of the arc of the curve from the starting point to the end point is counterclockwise; if the first difference is less than or equal to the second difference, the direction of the arc of the curve from the starting point to the end point is clockwise.
[0104] Embodiment 3
[0105] A storage medium is provided, wherein the storage medium is a computer-readable storage medium, on which a CAD-based road stakeout conversion program is stored. The CAD-based road stakeout conversion program is a computer program. When the CAD-based road stakeout conversion program is executed by a processor, the steps of the CAD-based road stakeout conversion method adopted in the first embodiment provided by the present invention are implemented.
[0106] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A CAD-based road layout conversion method, characterized in that: The road setting out conversion method comprises: Acquisition steps: Acquire the CAD source file of the road design; Parsing step: parsing the CAD source file to obtain each polyline segment in the CAD source file; wherein each polyline segment includes a line segment composed of multiple endpoints; Conversion step: processing each polyline segment in the CAD source file according to the polyline segment conversion method preset in the system, thereby converting it into an element in the road graphic file; The multi-line segment conversion method comprises: Selection step: Get all the polyline segments in the CAD source file and select one of the polyline segments as the polyline segment to be converted; Traversal step: traverse each endpoint of the polyline segment to be converted in turn, and record the previous endpoint and convexity of each endpoint; If the current endpoint is the first endpoint of a polyline segment, the previous endpoint of the current endpoint is itself, and its convexity is its own convexity; if the current endpoint is not the first endpoint of a polyline segment, the convexity of the current endpoint is the convexity of the previous endpoint; Processing steps: Calculate the type of the line segment between the current endpoint and the previous endpoint based on the coordinates, convexity, coordinates of the previous endpoint and system preset rules of each endpoint, and convert it into a corresponding element in the road graphic file based on the type of the line segment; The specific convexity calculation method includes: firstly calculating a starting point azimuth and an end point azimuth, then subtracting the azimuth of the starting point from the azimuth of the end point to obtain a difference, and then calculating the convexity of each endpoint according to the difference; if the azimuth of the end point is less than the azimuth of the starting point, that is, the difference is less than 0, the difference needs to be corrected, and when the calculated angle value is greater than 360°, the value of each calculated angle needs to be corrected, and when the calculated angle value is greater than 360°, the calculated angle value is subtracted by 360 until the angle value is within the range of 0 to 360°; conversely, when the calculated angle value is less than 0°, the calculated angle value is added by 360 until the angle is within the range of 0 to 360°; If the convexity of the current endpoint is 0, it means that the line segment formed by the current endpoint and the previous endpoint is a straight line, and according to whether the current endpoint is the first endpoint of a multi-line segment, a point type element or a line type element is added to the road graphic file according to the judgment result; when the current endpoint is the first endpoint of a multi-line segment, a point type element is added to the road graphic file; when the current endpoint is not the first endpoint of a multi-line segment, a line type element is added to the road graphic file; When the convexity of the current endpoint is not 0, it means that the line segment formed by the current endpoint and the previous endpoint is a curve. The starting point coordinates, end point coordinates, arc radius and direction from the starting point to the end point of the arc corresponding to the curve are calculated according to the coordinates of the current endpoint, the coordinates of the previous endpoint and the convexity of the current endpoint. In addition, according to the starting point coordinates, end point coordinates, arc radius and direction from the starting point to the end point of the arc, a circle type element is added to the road graphic file; wherein, the starting point coordinates of the circle type element are the starting point coordinates of the arc, the end point coordinates are the end point cushion of the arc, the radius is the arc radius, and the rotation direction of the circle is the direction from the starting point to the end point of the arc; if the current endpoint is the first endpoint, first add a point type element to the road graphic file, and then add a circle type element; Generation steps: Generate road graphics files based on all elements.
2. The CAD-based road layout conversion method according to claim 1, characterized in that: Convexity indicates the size of the arc of a vertex. The value of the convexity refers to the tangent of 1 / 4 of the angle contained in the arc from the starting point to the end point. If an arc is clockwise from the starting point to the end point, its convexity is negative, otherwise it is positive. In addition, when the convexity is 0, the arc from the starting point to the end point is a straight line; when the convexity is 1, the arc from the starting point to the end point is a semicircle.
3. The CAD-based road layout conversion method according to claim 1, characterized in that: When the convexity of the current endpoint is not 0, it also includes: Get the coordinates of the current endpoint, the coordinates of the previous endpoint, and the convexity of the current endpoint and calculate the starting angle and the ending angle of the arc of the curve; The direction angle is calculated based on the coordinates of the current endpoint and the coordinates of the previous endpoint; The first difference angle1 is obtained by subtracting the direction angle from the starting angle of the arc, and the second difference angle is obtained by subtracting the ending angle of the arc from the starting angle of the arc. Determine the magnitude of the first difference and the second difference, and then determine the direction of the arc from the starting point to the end point; Add a "circle" type element to the road element according to the coordinates of the current endpoint, the arc radius, and the direction of the arc from the start point to the end point; when the current endpoint is the first endpoint of the arc, first add a point type element to the road graphic file, and then add a circle type element to the road graphic file.
4. The CAD-based road layout conversion method according to claim 3, characterized in that: If the first difference is greater than the second difference, the direction of the arc of the curve from the starting point to the end point is counterclockwise; if the first difference is less than or equal to the second difference, the direction of the arc of the curve from the starting point to the end point is clockwise.
5. A computer-readable storage medium having a road stakeout conversion program stored thereon, wherein the road stakeout conversion program is a computer program, and when the road stakeout conversion program is executed by a processor, the steps of the CAD-based road stakeout conversion program according to any one of claims 1 to 4 are implemented.