Fairing method, system and device for round-arc and straight-line connection corner and storage medium
By employing a method for smoothing the corners where cubic Bézier curves connect to straight lines and circular arcs, the discontinuity of G1 and G2 at the junctions of straight lines and circular arcs is resolved, thereby improving processing quality and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANS LASER TECH IND GRP CO LTD
- Filing Date
- 2023-08-14
- Publication Date
- 2026-08-04
AI Technical Summary
In the existing technology, the machining method for connecting straight lines and arcs at corners has failed to effectively achieve G1 continuity and G2 continuity, resulting in a decrease in machining quality and efficiency.
A method for smoothing the corners of cubic Bézier curves with straight lines and circular arcs is adopted. The coordinates of four control points of the cubic Bézier curve are determined by simple calculation, and the curve is fitted with straight lines and circular arcs to achieve G1 continuity and G2 continuity.
The calculation process was simplified, and the tangential continuity and curvature continuity of the corners connecting straight lines and arcs were achieved, thus improving processing quality and efficiency.
Smart Images

Figure CN117032078B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automation control technology, and in particular to a method, system, device and storage medium for smoothing the corner where an arc and a straight line meet. Background Technology
[0002] In laser cutting systems, CNC programming typically uses a combination of straight line commands (G01) and circular arc commands (G02 / G03) to represent toolpaths. When straight lines and circular arcs connect, if the connecting corner is machined directly along the original trajectory without any processing, the discontinuity in the leading and trailing tangent vectors and curvature at the corner will cause abrupt changes in the tool's machining speed and acceleration. This negatively impacts the workpiece's surface finish and reduces machining efficiency. Therefore, it is essential to study the geometric continuity of connecting corners between straight lines and circular arcs.
[0003] Currently, there are two main methods for handling the corner transitions between straight lines and arcs. 1. Rounding: Adding a transition arc to the corner. This method only ensures G1 continuity (velocity continuity, or tangential continuity) at the junction of the transition arc and the straight line / arc, but the acceleration remains abrupt, offering little improvement in processing efficiency. 2. Adding one or two spline curves to the corner. However, this method only ensures G2 continuity (acceleration continuity, or curvature continuity) at the junction of the transition spline curve and the straight line, but the junction of the spline curve and the arc remains G1 continuity, lacking G2 continuity.
[0004] In related technologies, in order to ensure that the transition curves meet the G1 continuity and G2 continuity requirements at the corners where they connect with straight lines and arcs, a complex solution process is required, which involves a large amount of computation. Summary of the Invention
[0005] This application aims to at least solve one of the technical problems existing in the prior art. To this end, this application proposes a method for smoothing the corner where an arc meets a straight line, which can achieve G1 continuity and G2 continuity at the corner where an arc meets a straight line through simple calculations.
[0006] This application also proposes a machining trajectory corner smoothing system.
[0007] This application also proposes a processing device.
[0008] This application also proposes a computer-readable storage medium.
[0009] The method for smoothing the corner where an arc meets a straight line according to the first aspect of this application includes the following steps:
[0010] Obtain straight lines in the machining trajectory With arc Adjoining sections;
[0011] Based on cubic Bézier curves and straight lines At the connection point continuous, Continuous and Continuity, and cubic Bézier curves and circular arcs At the connection point continuous, Continuous and Calculate the four control points of the cubic Bézier curve to ensure continuity. , , and The coordinates of the control points, where The starting point and control point of the cubic Bézier curve. The coordinates are Control points This is the endpoint of the cubic Bézier curve;
[0012] Insert a cubic Bézier curve so that it intersects the line... arc Fitting.
[0013] The smoothing method for the corner connecting arcs and straight lines according to the embodiments of this application has at least the following beneficial effects: through straight lines... With arc To meet the requirements of tangential continuity and curvature continuity at the connecting corners, and combining the parametric equations and curvature formulas of cubic Bézier curves, it is only necessary to determine its four control points. , , and By determining the coordinates of the given coordinates, a cubic Bézier curve with a defined shape can be obtained. This calculation process is relatively simple, requiring no solution of higher-order equations, which facilitates the use of simple algorithms to achieve straight lines. With arc Tangential continuity and curvature continuity at the connecting corners.
[0014] According to some embodiments of this application, control points are obtained. coordinates The steps include:
[0015] Based on cubic Bézier curves and circular arcs of The requirement of continuity, in an arc Choose one point as the control point ;make| ,in, It is a straight line With arc The intersection, It is a straight line With arc The corner fitting accuracy, | Control points Intersection The distance between them;
[0016] if Then the obtained The requirements are met; if Then, take another point on the arc as... , making ;in, For arc From the control point to the intersection arc length, Let C be the arc length. The coefficient is , and the coefficient is Satisfying the relation: 0.5.
[0017] According to some embodiments of this application, the coefficient The value is 0.4.
[0018] According to some embodiments of this application, control points are obtained. The steps for obtaining coordinates include:
[0019] The parametric equation of a cubic Bézier curve is ,in, As a parameter, and ;
[0020] According to the curve curvature formula It can be seen that the cubic Bézier curve ends at the endpoint The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, that is, the vector norm. The length of the mold, Represents vector The Euclidean norm, also known as the vector norm. The modulus length;
[0021] Based on the cubic Bézier curve and the straight line L To ensure continuity, a point is selected on line L as the control point for the cubic Bézier curve. ;
[0022] Based on the cubic Bézier curve and the straight line L Continuity requirement, cubic Bézier curve at control points Tangent vector at the point The unit vector of a straight line. , where the straight line The starting point is ),starting point Intersection For the same point, a straight line The endpoint is );
[0023] Based on cubic Bézier curves and straight lines At the control point place Continuity requirement, cubic Bézier curve at control points curvature at ;
[0024] Will Substitute into the formula Based on four control points , , and For different points, we can obtain ,Right now , and All three points lie on a straight line. superior;
[0025] Based on cubic Bézier curves and circular arcs At the control point place Continuity requirements, control points Tangent vector The line and the line The intersection point, where the tangent vector For arc At the control point Tangent vector at;
[0026] Determine control points Does it exist, i.e., determine the tangent vector? tangent vector Are they parallel? If This indicates the control point. If it doesn't exist, then reduce the corner fitting accuracy. until ;
[0027] Through the system of equations ,calculate coordinates .
[0028] According to some embodiments of this application, control points are obtained. The steps for obtaining coordinates include:
[0029] According to the curve curvature formula It can be seen that the cubic Bézier curve at the control point The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, also known as the vector norm. The length of the mold, Represents vector The Euclidean norm, also known as the vector norm. The modulus length;
[0030] Based on cubic Bézier curves and circular arcs At the control point place Continuity requirement, cubic Bézier curve at control points The curvature is ,in, For arc radius;
[0031] calculate Angle, ,in, Tangent vector The Euclidean norm, i.e., the tangent vector. The length of the mold, Tangent vector The Euclidean norm, i.e., the tangent vector. The modulus length;
[0032] According to control points and Coordinates, calculate vector Length of the module ;
[0033] vector Length of the module and Substitute the cubic Bézier curve at the control points Curvature formula In the middle, the vector is calculated. Length of the module ;
[0034] According to control points Located on line L, control points can be obtained. Coordinates: .
[0035] According to some embodiments of this application, control points are obtained. The steps for obtaining coordinates include:
[0036] make ,;
[0037] According to control points Located on line L, control points can be obtained. Coordinates: .
[0038] According to some embodiments of this application, inspection control points The coordinates include the following steps:
[0039] if Then control point The requirements are met; if This reduces the corner fitting accuracy. Recalculate the four control points , , and coordinates, until Or, if , will intersect with The distance is And on the line segment The points on the map are designated as control points. Using the steps described above, the control points are derived in reverse. , and The coordinates;
[0040] in, For line segments Length, For line segments Length, The coefficient is , and the coefficient is Satisfying the relation: 0.5.
[0041] A smoothing system for the corner where an arc meets a straight line, according to a second aspect of this application, includes:
[0042] The machining trajectory acquisition module is used to acquire straight lines in the machining trajectory. With arc Adjoining sections;
[0043] The coordinate acquisition module is used to obtain coordinates based on cubic Bézier curves and straight lines. At the connection point continuous, Continuous and Continuity, and cubic Bézier curves and circular arcs At the connection point continuous, Continuous and Calculate the four control points of the cubic Bézier curve to ensure continuity. , , and The coordinates of the control points, where The starting point and control point of the cubic Bézier curve. The coordinates are Control points This is the endpoint of the cubic Bézier curve;
[0044] The fitting module is used to insert cubic Bézier curves, such that the cubic Bézier curves intersect the lines... arc Fitting.
[0045] A processing apparatus according to a third aspect of this application includes:
[0046] Memory, which stores computer programs;
[0047] The processor, when executing the computer program, is capable of implementing the steps of the smoothing method for connecting the corners of arcs and straight lines as described above.
[0048] A computer-readable storage medium according to a fourth aspect of this application stores a computer program that, when executed by a processor, implements the steps of the above-described method for smoothing the corner where an arc and a straight line meet.
[0049] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0050] The present application will be further described below with reference to the accompanying drawings and embodiments, wherein:
[0051] Figure 1 Arcs in embodiments of this application With a straight line A flowchart of the method for smoothing corner connections;
[0052] Figure 2 For arc Connect the straight line Smooth fitting diagram of the externally tangent corner;
[0053] Figure 3 for Figure 2 A graph showing the curvature variation of a cubic Bézier curve;
[0054] Figure 4 For arc Connect the straight line Smooth fitting diagram of the tangent corner;
[0055] Figure 5 for Figure 4 A graph showing the curvature variation of a cubic Bézier curve;
[0056] Figure 6 For arc Connect the straight line Smooth fitting diagram of the inscribed corner;
[0057] Figure 7 for Figure 6 A graph showing the curvature variation of a cubic Bézier curve;
[0058] Figure 8 This is a schematic diagram of the module of the smoothing system for the corner where the arc and the straight line meet, as shown in an embodiment of this application.
[0059] Figure 9 for Figure 8 A schematic diagram of the coordinate acquisition module of the smoothing system for the corner where the arc meets the straight line;
[0060] Figure 10 This is a schematic diagram of the processing equipment according to an embodiment of this application.
[0061] Reference numerals: Smoothing system 100 for the corner where the arc meets the straight line, machining trajectory acquisition module 110, coordinate acquisition module 120, control point Coordinate acquisition module 121, control points Coordinate acquisition module 122, control points Coordinate acquisition module 123, control points Coordinate acquisition module 124, fitting module 130;
[0062] Processing equipment 200, memory 210, processor 220. Detailed Implementation
[0063] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0064] Those skilled in the art will understand that the modules or steps of the present invention described below can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.
[0065] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0066] It is understood that the device embodiments described above are illustrative. For example, the division of modules / units is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0067] Reference Figure 1 and Figure 2 Arc according to the first aspect of this application With a straight line The smoothing method for connecting corners includes the following steps: S100, obtaining straight lines in the processing trajectory. With arc Connecting sections; S200, based on cubic Bézier curves and straight lines At the connection point continuous, Continuous and Continuity, and cubic Bézier curves and circular arcs At the connection point continuous, Continuous and Calculate the four control points of the cubic Bézier curve to ensure continuity. , , and The coordinates of the control points, where The starting point and control point of the cubic Bézier curve. The coordinates are Control points The endpoint of the cubic Bézier curve; S300, insert a cubic Bézier curve so that the cubic Bézier curve intersects the straight line. arc Fitting.
[0068] The smoothing method for the corner connecting arcs and straight lines according to the embodiments of this application has at least the following beneficial effects: through straight lines... With arc To meet the requirements of tangential continuity and curvature continuity at the connecting corners, and combining the parametric equations and curvature formulas of cubic Bézier curves, it is only necessary to determine its four control points. , , and By determining the coordinates of the given coordinates, a cubic Bézier curve with a defined shape can be obtained. This calculation process is relatively simple, requiring no solution of higher-order equations, which facilitates the use of simple algorithms to achieve straight lines. With arc Tangential continuity and curvature continuity at the connecting corners.
[0069] Reference Figure 2 In some embodiments of this application, control points are obtained. The steps for obtaining coordinates include: based on cubic Bézier curves and circular arcs. of The requirement of continuity (positional continuity, i.e., the curve cannot have any breaks) applies to circular arcs. Choose one point as the control point ;make| ,in, It is a straight line With arc The intersection, It is a straight line With arc The corner fitting accuracy, | Control points Intersection The distance between; if Then the obtained The requirements are met; if Then, take another point on the arc as... , making ;in, For arc From the control point to the intersection arc length, Let C be the arc length. The coefficient is , and the coefficient is Satisfying the relation: 0.5.
[0070] It should be noted that if The value exceeds When the arc C is excessively truncated, it may disappear after fitting with a cubic Bézier curve, thus requiring control. The length.
[0071] Specifically, coefficient The value can be 0.3, 0.35, 0.4, 0.45, 0.5 or other values.
[0072] In the improved version of the above embodiments, the coefficient The value is 0.4.
[0073] It should be noted that if the coefficient If the value is greater than 0.5, the arc C is excessively truncated, and arc C may disappear after fitting with a cubic Bézier curve. 0.4 serves as an intermediate value, allowing... The length is controlled within a suitable range.
[0074] Reference Figure 2 In the improved embodiment described above, the control point is obtained. The steps for obtaining coordinates include:
[0075] The parametric equation of a cubic Bézier curve is ,in, As a parameter, and ;
[0076] According to the curve curvature formula It can be seen that the cubic Bézier curve ends at the endpoint The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, also known as the vector norm. The length of the mold, Represents vector The Euclidean norm, also known as the vector norm. The modulus length;
[0077] Based on the cubic Bézier curve and the straight line L To ensure continuity, a point is selected on line L as the control point for the cubic Bézier curve. ;
[0078] Based on the cubic Bézier curve and the straight line L Continuity requirement, cubic Bézier curve at control points Tangent vector at the point The unit vector of a straight line. , where the straight line The starting point is ),starting point Intersection For the same point, a straight line The endpoint is );
[0079] Based on cubic Bézier curves and straight lines At the control point place Continuity requirement, cubic Bézier curve at control points curvature at ;
[0080] Will Substitute into the formula Based on four control points , , and For different points, we can obtain ,Right now , and All three points lie on a straight line. superior;
[0081] Based on cubic Bézier curves and circular arcs At the control point place Continuity requirements, control points Tangent vector The line and the line The intersection point, where the tangent vector For arc At the control point Tangent vector at;
[0082] Determine control points Does it exist, i.e., determine the tangent vector? tangent vector Are they parallel? If This indicates the control point. If it doesn't exist, then reduce the corner fitting accuracy. until ;
[0083] Through the system of equations ,calculate coordinates .
[0084] Therefore, based on the cubic Bézier curve and the straight line L... The requirement of continuity, cubic Bézier curves and straight line L Continuity requirements and cubic Bézier curves and circular arcs of The requirement for continuity can be obtained through calculation. coordinates The entire calculation process utilizes trigonometric functions and solves two linear equations in two variables, making the calculation process simple.
[0085] It should be noted that straight lines It is itself related to cubic Bézier curves. Tangent, straight line With cubic Bézier curves Tangent, therefore the straight line With a straight line They are collinear. This means , and All three points lie on a straight line. superior.
[0086] In the improved embodiment described above, the control point is obtained. The steps for obtaining coordinates include:
[0087] According to the curve curvature formula It can be seen that the cubic Bézier curve at the control point The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, also known as the vector norm. The length of the mold, Represents vector The Euclidean norm, also known as the vector norm. The modulus length;
[0088] Based on cubic Bézier curves and circular arcs At the control point place Continuity requirement, cubic Bézier curve at control points The curvature is ,in, For arc radius;
[0089] calculate Angle, ,in, Tangent vector The Euclidean norm, i.e., the tangent vector. The length of the mold, Tangent vector The Euclidean norm, i.e., the tangent vector. The modulus length;
[0090] According to control points and Coordinates, calculate vector Length of the module ;
[0091] vector Length of the module and Substitute the cubic Bézier curve at the control points Curvature formula In the middle, the vector is calculated. Length of the module ;
[0092] According to control points Located on line L, control points can be obtained. Coordinates: .
[0093] Similarly, based on cubic Bézier curves and circular arcs At the control point place The control points can be obtained by considering the requirement of continuity and the geometric relationships between each control point in the plane. coordinates The calculation process is simple and helps to simplify the circular arc. With a straight line The smoothing process of connecting corners.
[0094] Reference Figure 2 In the improved embodiment described above, the control point is obtained. The steps for obtaining the coordinates include: Let According to control points Located on line L, control points can be obtained. Coordinates: .
[0095] Similarly, according to , and The positional relationship of the three control points can be obtained through simple vector operations. coordinates The calculation is simple and it is beneficial for simplifying circular arcs. With a straight line The smoothing process of connecting corners.
[0096] It should be noted that all the above formulas involve vector operations, i.e. This represents the direction from the origin of the coordinate system to the coordinate point. vector, This represents the direction from the origin of the coordinate system to the coordinate point. vector, This represents the direction from the origin of the coordinate system to the coordinate point. The vector.
[0097] In the improved scheme of the above embodiments, the inspection control point The coordinates include the following steps:
[0098] if Then control point The requirements are met; if This reduces the corner fitting accuracy. Recalculate the four control points , , and coordinates, until Or, if , will intersect with The distance is And on the line segment The points on the map are designated as control points. Using the steps described above, the control points are derived in reverse. , and The coordinates;
[0099] in, For line segments Length, For line segments Length, The coefficient is , and the coefficient is Satisfying the relation: 0.5.
[0100] Similarly, if ,straight line Too much was intercepted, straight line The curve exhibits vanishing behavior after fitting to a cubic Bézier curve, therefore it needs to be controlled. The length.
[0101] Specifically, coefficient The value can be 0.3, 0.35, 0.4, 0.45, 0.5 or other values.
[0102] In the improved version of the above embodiments, the coefficient The value is 0.4.
[0103] It should be noted that if the coefficient The value of is greater than 0.5, and the straight line Too much was intercepted, straight line The curve exhibits a vanishing behavior after fitting to a cubic Bézier curve. 0.4 can be used as an intermediate value to... The length is controlled within a suitable range.
[0104] The following shows three types of arcs. Connect the straight line A smooth embodiment of the connecting corner, a straight line Connecting arcs The method for smoothing the corners is similar.
[0105] First, refer to Figure 2 and Figure 3 , Figure 2 For arc Connect the straight line The smooth fitting diagram of the externally tangent corner. Figure 2 In the diagram, the horizontal axis represents the x-coordinate in mm, the vertical axis represents the y-coordinate in mm, and the solid line represents an arc. Connect the straight line The external tangent corner is represented by the dashed line, which is the constructed cubic Bézier curve. Figure 3 for Figure 2 A graph showing the curvature variation of a cubic Bézier curve. Figure 3 The x-axis represents the arc length of the cubic Bézier curve. The unit is mm. Figure 3 The ordinate represents the curvature of the cubic Bézier curve. The unit is mm. -1 .
[0106] from Figure 2 As can be seen from this, the arc radius Approximately 3mm. From Figure 3 It can be seen that the cubic Bézier curve at the control point curvature The value is approximately 0.33, and the cubic Bézier curve is at the control point. At the arc Curvature continuity; cubic Bézier curve at control points curvature The value is 0, and the cubic Bézier curve is at the control point. at the intersection with the line The curvature is continuous. Furthermore, the curvature of a cubic Bézier curve is... There is only one maximum value.
[0107] Second, refer to Figure 4 and Figure 5 , Figure 4 For arc Connect the straight line The smooth fitting diagram of the tangent corner. Figure 4 In the diagram, the horizontal axis represents the x-coordinate in mm, the vertical axis represents the y-coordinate in mm, and the solid line represents an arc. Connect the straight line The tangent corners are represented by dashed lines, which are the constructed cubic Bézier curves. Figure 5 for Figure 4 A graph showing the curvature variation of a cubic Bézier curve. Figure 5 The x-axis represents the arc length of the cubic Bézier curve. The unit is mm. Figure 5 The ordinate represents the curvature of the cubic Bézier curve. The unit is mm. -1 .
[0108] from Figure 4 As can be seen from this, the arc radius Approximately 3mm. From Figure 5 It can be seen that the cubic Bézier curve at the control point curvature The value is approximately 0.33, and the cubic Bézier curve is at the control point. At the arc Curvature continuity; cubic Bézier curve at control points curvature The value is 0, and the cubic Bézier curve is at the control point. at the intersection with the line The curvature is continuous. Furthermore, the curvature of a cubic Bézier curve is... There is only one maximum value.
[0109] Third, refer to Figure 6 and Figure 7 , Figure 6 For arc Connect the straight line The smooth fitting diagram of the inscribed corner. Figure 6 In the diagram, the horizontal axis represents the x-coordinate in mm, the vertical axis represents the y-coordinate in mm, and the solid line represents an arc. Connect the straight line The inscribed corner is represented by the dashed line, which is the constructed cubic Bézier curve. Figure 7 for Figure 6 A graph showing the curvature variation of a cubic Bézier curve. Figure 7 The x-axis represents the arc length of the cubic Bézier curve. The unit is mm. Figure 7 The ordinate represents the curvature of the cubic Bézier curve. The unit is mm. -1 .
[0110] from Figure 6 As can be seen from this, the arc radius Approximately 3mm. From Figure 7 It can be seen that the cubic Bézier curve at the control point curvature Approximately -0.33 (the sign of curvature k is arbitrarily defined; for example, a point on a cubic Bézier curve is considered positive if the center of curvature is on the left and negative if it is on the right). The cubic Bézier curve at the control point... At the arc Curvature continuity; cubic Bézier curve at control points curvature The value is 0, and the cubic Bézier curve is at the control point. at the intersection with the line The curvature is continuous. Furthermore, the curvature of a cubic Bézier curve is... There is only one maximum value.
[0111] Reference Figure 8 The smoothing system 100 for the corner connecting the arc and the straight line according to the second aspect embodiment of this application includes a machining trajectory acquisition module 110, a coordinate acquisition module 120, and a fitting module 130. The machining trajectory acquisition module 110 is used to acquire the straight line in the machining trajectory. With arc Connecting segments. Coordinate acquisition module 120 is used to determine the coordinates based on cubic Bézier curves and straight lines. At the connection point continuous, Continuous and Continuity, and cubic Bézier curves and circular arcs At the connection point continuous, Continuous and Calculate the four control points of the cubic Bézier curve to ensure continuity. , , and The coordinates of the control points, where The starting point and control point of the cubic Bézier curve. The coordinates are Control points This is the endpoint of the cubic Bézier curve. The fitting module 130 is used to insert the cubic Bézier curve, ensuring that the cubic Bézier curve intersects the straight line... arc Fitting.
[0112] By setting up the machining trajectory acquisition module 110, the coordinate acquisition module 120, and the fitting module 130, a straight line can be obtained. With arc To meet the requirements of tangential continuity and curvature continuity at the connecting corners, and combining the existing parametric equations and curvature formulas of cubic Bézier curves, four control points are determined. , , and The coordinates are used to obtain a cubic Bézier curve with a defined shape. This calculation process is relatively simple, requiring no solution of higher-order equations, which facilitates the use of simple algorithms to achieve straight lines. With arc Tangential continuity and curvature continuity at the connecting corners.
[0113] Reference Figure 9 In the improved embodiment described above, the coordinate acquisition module 120 further includes control points. Coordinate acquisition module 121, control points The coordinate acquisition module 121 is configured to perform the following steps: based on the cubic Bézier curve and the circular arc of The requirement of continuity (positional continuity, i.e., the curve cannot have any breaks) applies to circular arcs. Choose one point as the control point ;make| ,in, It is a straight line With arc The intersection, It is a straight line With arc The corner fitting accuracy, | Control points Intersection The distance between; if Then the obtained The requirements are met; if Then, take another point on the arc as... , making ;in, For arc From the control point to the intersection arc length, Let C be the arc length. The coefficient is , and the coefficient is Satisfying the relation: 0.5.
[0114] Reference Figure 9In the improved embodiment described above, the coordinate acquisition module 120 further includes control points. Coordinate acquisition module 122, control points The coordinate acquisition module 122 is configured to perform the following steps:
[0115] The parametric equation of a cubic Bézier curve is ,in, As a parameter, and ;
[0116] According to the curve curvature formula It can be seen that the cubic Bézier curve ends at the endpoint The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, also known as the vector norm. The length of the mold, Represents vector The Euclidean norm, also known as the vector norm. The modulus length;
[0117] Based on the cubic Bézier curve and the straight line L To ensure continuity, a point is selected on line L as the control point for the cubic Bézier curve. ;
[0118] Based on the cubic Bézier curve and the straight line L Continuity requirement, cubic Bézier curve at control points Tangent vector at the point The unit vector of a straight line. , where the straight line The starting point is ),starting point Intersection For the same point, a straight line The endpoint is );
[0119] Based on cubic Bézier curves and straight lines At the control point place Continuity requirement, cubic Bézier curve at control points curvature at ;
[0120] Will Substitute into the formula Based on four control points , , and For different points, we can obtain ,Right now , and All three points lie on a straight line. superior;
[0121] Based on cubic Bézier curves and circular arcs At the control point place Continuity requirements, control points Tangent vector The line and the line The intersection point, where the tangent vector For arc At the control point Tangent vector at;
[0122] Determine control points Does it exist, i.e., determine the tangent vector? tangent vector Are they parallel? If This indicates the control point. If it doesn't exist, then reduce the corner fitting accuracy. until ;
[0123] Through the system of equations ,calculate coordinates .
[0124] Reference Figure 9 In the improved embodiment described above, the coordinate acquisition module 120 further includes control points. Coordinate acquisition module 123, control points The coordinate acquisition module 123 is configured to perform the following steps:
[0125] According to the curve curvature formula It can be seen that the cubic Bézier curve at the control point The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, also known as the vector norm. The length of the mold, Represents vector The Euclidean norm, also known as the vector norm. The modulus length;
[0126] Based on cubic Bézier curves and circular arcs At the control point place Continuity requirement, cubic Bézier curve at control points The curvature is ,in, For arc radius;
[0127] calculate Angle, ,in, Tangent vector The Euclidean norm, i.e., the tangent vector. The length of the mold, Tangent vector The Euclidean norm, i.e., the tangent vector. The modulus length;
[0128] According to control points and Coordinates, calculate vector Length of the module ;
[0129] vector Length of the module and Substitute the cubic Bézier curve at the control points Curvature formula In the middle, the vector is calculated. Length of the module ;
[0130] According to control points Located on line L, control points can be obtained. Coordinates: .
[0131] Reference Figure 9 In the improved embodiment described above, the coordinate acquisition module 120 further includes control points. Coordinate acquisition module 124, control points The coordinate acquisition module 124 is configured to perform the following steps: Let According to control points Located on line L, control points can be obtained. Coordinates: .
[0132] Reference Figure 10A processing apparatus 200 according to a third aspect embodiment of this application includes a memory 210 and a processor 220. The memory 210 stores a computer program. When the processor 220 executes the computer program, it can implement the steps of the smoothing method for connecting the corner of an arc and a straight line as described above.
[0133] Specifically, the processing equipment 200 can be laser cutting equipment, laser marking equipment, plasma cutting equipment, flame cutting equipment, or other equipment.
[0134] The memory 210 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 210 may be an internal storage unit of the processing equipment 200, such as the hard disk or memory of the processing equipment 200. In other embodiments, the memory 210 may also be an external storage device of the processing equipment 200, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Of course, the memory 210 may include both internal storage units and external storage devices of the processing equipment 200. In this embodiment, the memory 210 is typically used to store the operating system and various application software installed on the processing equipment 200, such as arc... With a straight line The program code for smoothing corner connections, etc. In addition, the memory 210 can also be used to temporarily store various types of data that have been output or will be output.
[0135] In some embodiments, processor 220 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 220 is typically used to control the overall operation of the processing equipment 200. In this embodiment, processor 220 is used to run program code stored in memory 210 or process data, such as running a circular arc. With a straight line The program code for the smoothing method of connecting corners.
[0136] In addition, the processing equipment 200 typically includes a display, a communication interface, and a bus. The memory 210, processor 220, display, and communication interface can communicate with each other via the bus. The display screen is configured to show the user interface preset in the initial setup mode, and can also display a process control window. The communication interface may include a wireless network interface or a wired network interface.
[0137] According to a fourth aspect of this application, a computer-readable storage medium stores a computer program that, when executed by a processor 220, implements the steps of the above-described method for smoothing the corner where an arc and a straight line meet.
[0138] The computer-readable storage medium provided in the embodiments of this application may be a USB flash drive, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific embodiments of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, etc.
[0139] Random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device or magnetic storage device, or any suitable combination thereof.
[0140] In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0141] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0142] Computer programs for executing this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0143] The above are merely specific implementations of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions provided in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions provided in the various embodiments of this application.
Claims
1. A method for smoothing the corner where an arc meets a straight line, characterized in that, Includes the following steps: Obtain straight lines in the machining trajectory With arc Adjoining sections; Based on cubic Bézier curves and straight lines At the connection point continuous, Continuous and Continuity, and cubic Bézier curves and circular arcs At the connection point continuous, Continuous and Calculate the four control points of the cubic Bézier curve to ensure continuity. , , and The coordinates of the control points, where The starting point and control point of the cubic Bézier curve. The coordinates are Control points This is the endpoint of the cubic Bézier curve; Insert a cubic Bézier curve so that it intersects the line... arc Fitting; Among them, control points are obtained. coordinates The steps include: Based on cubic Bézier curves and circular arcs of The requirement of continuity, in an arc Choose one point as the control point ;make| ,in, It is a straight line With arc The intersection, It is a straight line With arc The corner fitting accuracy, | Control points Intersection The distance between them; if Then the obtained The requirements are met; if Then, take another point on the arc as... , making ;in, For arc From the control point to the intersection arc length, Let C be the arc length. The coefficient is , and the coefficient is Satisfying the relation: 0.5; Among them, control points are obtained. The steps for obtaining coordinates include: The parametric equation of a cubic Bézier curve is ,in, As a parameter, and ; According to the curve curvature formula It can be seen that the cubic Bézier curve ends at the endpoint The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, that is, the vector norm. The length of the mold, Represents vector The Euclidean norm, that is, the vector norm. The modulus length; Based on the cubic Bézier curve and the straight line L To ensure continuity, a point is selected on line L as the control point for the cubic Bézier curve. ; Based on the cubic Bézier curve and the straight line L Continuity requirement, cubic Bézier curve at control points Tangent vector at the point The unit vector of a straight line. , where the straight line The starting point is ),starting point Intersection For the same point, a straight line The endpoint is ); Based on cubic Bézier curves and straight lines At the control point place Continuity requirement, cubic Bézier curve at control points curvature at ; Will Substitute into the formula Based on four control points , , and For different points, we can obtain ,Right now , and All three points lie on a straight line. superior; Based on cubic Bézier curves and circular arcs At the control point place Continuity requirements, control points Tangent vector The line and the line The intersection point, where the tangent vector For arc At the control point Tangent vector at; Determine control points Does it exist, i.e., determine the tangent vector? tangent vector Are they parallel? If This indicates the control point. If it doesn't exist, then reduce the corner fitting accuracy. until ; Through the system of equations ,calculate coordinates .
2. The method for smoothing the corner where an arc meets a straight line according to claim 1, characterized in that, coefficient The value is 0.
4.
3. The method for smoothing the corner where an arc meets a straight line according to claim 1, characterized in that, Acquire control points The steps for obtaining coordinates include: According to the curve curvature formula It can be seen that the cubic Bézier curve at the control point The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, that is, the vector norm. The length of the mold, Represents vector The Euclidean norm, that is, the vector norm. The modulus length; Based on cubic Bézier curves and circular arcs At the control point place Continuity requirement, cubic Bézier curve at control points The curvature is ,in, For arc The radius; calculate Angle, ,in, Tangent vector The Euclidean norm, i.e., the tangent vector The length of the mold, Tangent vector The Euclidean norm, i.e., the tangent vector The modulus length; According to control points and Coordinates, calculate vector Length of the module ; vector Length of the module and Substitute the cubic Bézier curve at the control points Curvature formula In the middle, the vector is calculated. Length of the module ; According to control points Located on line L, control points can be obtained. Coordinates: .
4. The method for smoothing the corner where an arc meets a straight line according to claim 3, characterized in that, Acquire control points The steps for obtaining coordinates include: make ; According to control points Located on line L, control points can be obtained. Coordinates: .
5. The method for smoothing the corner where an arc meets a straight line according to claim 4, characterized in that, Inspection control points The coordinates include the following steps: if Then control point The requirements are met; if This reduces the corner fitting accuracy. Recalculate the four control points , , and coordinates until Or, if , will intersect with The distance is And on the line segment The points on the map are designated as control points. Using the steps described above, the control points are derived in reverse. , and The coordinates; in, For line segments Length, For line segments Length, The coefficient is , and the coefficient is Satisfying the relation: 0.
5.
6. A smoothing system for the corner where an arc meets a straight line, characterized in that, include: The machining trajectory acquisition module is used to acquire straight lines in the machining trajectory. With arc Adjoining sections; The coordinate acquisition module is used to obtain coordinates based on cubic Bézier curves and straight lines. At the connection point continuous, Continuous and Continuity, and cubic Bézier curves and circular arcs At the connection point continuous, Continuous and Calculate the four control points of the cubic Bézier curve to ensure continuity. , , and The coordinates of the control points, where The starting point and control point of the cubic Bézier curve. The coordinates are Control points This is the endpoint of the cubic Bézier curve; The fitting module is used to insert cubic Bézier curves, such that the cubic Bézier curves intersect the lines... arc Fitting; Among them, the coordinate acquisition module obtains control points. The steps for obtaining coordinates include: The parametric equation of a cubic Bézier curve is ,in, As a parameter, and ; According to the curve curvature formula It can be seen that the cubic Bézier curve ends at the endpoint The curvature is ,in, express The first derivative, express The second derivative, " represents the cross product of vectors, Represents vector The Euclidean norm, that is, the vector norm. The length of the mold, Represents vector The Euclidean norm, that is, the vector norm. The modulus length; Based on the cubic Bézier curve and the straight line L To ensure continuity, a point is selected on line L as the control point for the cubic Bézier curve. ; Based on the cubic Bézier curve and the straight line L Continuity requirement, cubic Bézier curve at control points Tangent vector at the point The unit vector of a straight line. , where the straight line The starting point is ),starting point Intersection For the same point, a straight line The endpoint is ); Based on cubic Bézier curves and straight lines At the control point place Continuity requirement, cubic Bézier curve at control points curvature at ; Will Substitute into the formula Based on four control points , , and For different points, we can obtain ,Right now , and All three points lie on a straight line. superior; Based on cubic Bézier curves and circular arcs At the control point place Continuity requirements, control points Tangent vector The line and the line The intersection point, where the tangent vector For arc At the control point Tangent vector at; Determine control points Does it exist, i.e., determine the tangent vector? tangent vector Are they parallel? If This indicates the control point. If it doesn't exist, then reduce the corner fitting accuracy. until ; Through the system of equations ,calculate coordinates .
7. A processing equipment, characterized in that, include: Memory, which stores computer programs; A processor, when executing the computer program, is capable of implementing the steps of the smoothing method for connecting the corners of arcs and straight lines as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for smoothing the corner where an arc and a straight line meet as described in any one of claims 1 to 5.