A micro-line segment global fairing method based on contour constraint

By employing a contour-constrained global smoothing method for micro-segments and utilizing NURBS curve fitting and adaptive iteration techniques, the problems of frequent acceleration and deceleration of micro-segment tool trajectories and machine tool vibration in CNC machining were solved, achieving efficient and high-precision machining of complex curved surfaces.

CN116661376BActive Publication Date: 2026-02-17TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310615087.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-29
Publication Date
2026-02-17
Estimated Expiration
2043-05-29

AI Technical Summary

Technical Problem

Existing CNC machining methods for micro-line segment tool trajectories of complex curved surface parts suffer from frequent acceleration and deceleration, machine tool vibration, and low machining efficiency, making it difficult to achieve high-precision and high-efficiency machining.

Method used

A micro-segment global smoothing method based on contour constraints is adopted. By extracting the main feature points of the tool trajectory, NURBS curve fitting is used, combined with least squares method and adaptive iterative fitting, to optimize the tool trajectory to meet the requirements of point-line fitting and contour constraints.

Benefits of technology

It achieves smoothing of tool path, reduces acceleration and speed fluctuations, improves machining quality and efficiency, and meets the high-precision machining requirements of complex curved surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116661376B_ABST
    Figure CN116661376B_ABST
Patent Text Reader

Abstract

The application discloses a micro-line segment global fairing method based on contour constraint, and the method comprises the following steps: acquiring discrete tool position points, extracting main feature points from the tool position points and replacing original tool position points to perform approximation fitting, solving initial control points to obtain initial NURBS fitting curve; secondly, acquiring point-line fitting error, based on the local support of the NURBS curve and the point-line fitting error threshold, adaptively selecting tool position points to add the main feature points to the main feature point set, re-fitting the curve and repeatedly until the point-line fitting precision requirement is met; finally, taking the maximum contour distance from the continuous micro-line segment to the fitting curve as the contour error, and based on the contour constraint, adaptively selecting or constructing auxiliary points in the tool position points, adding the auxiliary points to the main feature point set to perform iterative fitting until the NURBS curve is smooth and meets the contour constraint. The application adopts cubic NURBS curve fitting to continuously fit the micro-line segment tool path, so that the tool path is smoother, the data amount is compressed, and the fitting curve contour precision is strictly controlled.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of numerical control technology in mechanical manufacturing engineering technology, and particularly relates to a micro-line segment global smoothing method based on contour constraint. BACKGROUND

[0002] With the rapid development of manufacturing industry, complex curved surface parts are widely used in aerospace, automobile and die and other industrial product manufacturing. In the numerical control machining process, the CAM system usually discretizes these complex curved surfaces into a large number of continuous micro straight line segments as tool paths to approximate the curved surface, and then machining is carried out.

[0003] In the numerical control machining process of complex curved surface parts, most of the tool paths generated by computer aided manufacturing software are composed of continuous small line segments. Due to the first-order discontinuity of the small line segment tool path, the feed speed is required to be reduced to zero at the connection of adjacent line segments. This will lead to frequent acceleration and deceleration of the related shaft, not only affecting the machining efficiency, but also easily exciting the high-frequency vibration of the machine tool, damaging the surface quality. Therefore, it is of great significance to realize the smoothing of small line segment tool path through geometric and motion smoothing.

[0004] This machining method not only can conveniently and accurately describe the complex curved surface, but also is easy to interpolate, and can meet the requirements of machining precision to some extent, and thus is widely used in numerical control system. However, it also has obvious disadvantages, for example, the tool position points are too many, the program amount is large, the acceleration and deceleration are frequent, the machining efficiency is reduced, the machine tool vibration is caused, and the machining quality is reduced, etc. These also become the key factors hindering high-speed and high-precision machining. NURBS interpolation has become the development trend of modern numerical control machining due to its small code transmission amount, fast machining speed, high machining precision and other advantages. Therefore, it is of great significance to perform global smoothing processing on the tool path of micro line segment, that is, to fit the tool path with NURBS curve, so as to achieve ideal smoothing effect, reduce acceleration and speed fluctuation, and improve the machining quality of complex curved surface. SUMMARY

[0005] The present application provides a micro-line segment global smoothing method based on contour constraint to solve the technical problems in the prior art.

[0006] According to the first aspect of the present application, the present application claims a micro-line segment global smoothing method based on contour constraint, characterized in that it comprises the following steps:

[0007] S101, extracting a plurality of main feature points of the tool path to construct a main feature point set;

[0008] S201, solving the initial control point based on the least square method to obtain a NURBS fitting curve;

[0009] S301, judging whether the NURBS fitting curve meets the point-line fitting error requirement, when meeting, executing step S401, when not meeting, executing step S501;

[0010] S401, judging whether the NURBS fitting curve meets the contour constraint requirement based on the contour constraint method, when meeting, ending the fairing process, when not meeting, executing step S601;

[0011] S501, completing adaptive fitting based on the point-line error, adaptively selecting tool position to join the main feature point set, re-fitting the NURBS fitting curve, and continuing to execute step S301;

[0012] S601, adaptively selecting or constructing auxiliary points in the tool position based on the contour constraint, joining the main feature point set for iterative fitting, and continuing to execute step S401.

[0013] Further, the step S101 comprises:

[0014] S102, acquiring discrete tool positions of the tool path through CAD or CAM software;

[0015] S103, extracting inflection points, curvature extreme points and length mutation points from the discrete tool positions as main feature points;

[0016] S104, replacing the original tool positions with the main feature points as the main feature point set.

[0017] Further, the step S201 comprises:

[0018] S202, performing approximation fitting according to the main feature point set;

[0019] S203, solving initial control points based on the least square method to obtain the NURBS fitting curve.

[0020] Further, the step S301 comprises:

[0021] S302, acquiring distances from the discrete tool positions to the NURBS fitting curve, and adopting a point-line fitting error threshold value;

[0022] S303, judging whether the NURBS fitting curve meets the point-line fitting error threshold value requirement, when meeting, executing step S401, when not meeting, executing step S501.

[0023] Further, the step S401 comprises:

[0024] S402, setting a profile error threshold, calculating the fitting profile error of the NURBS fitting curve relative to the continuous micro-straight line segment, if the fitting profile error of the NURBS fitting curve relative to the continuous micro-straight line segment in the region is not greater than the profile error threshold, the NURBS fitting curve meets the profile constraint requirement, otherwise it is determined that it does not meet the profile constraint requirement.

[0025] Further, the step S501 comprises:

[0026] S502, based on the local support of NURBS, the NURBS fitting curve is divided into multiple sub-intervals by the main feature points;

[0027] S503, selecting the first error point with the largest error from the point line fitting error threshold and the unmarked points, adding it to the main feature point set, and adding the corresponding parameters to the fitting parameter set;

[0028] S504, marking the interval where the first error point is located and its left and right k+1 intervals, this iteration will not select points in the marked interval to join the main feature point set;

[0029] S505, repeating S503 and S504 operations on the remaining intervals until all intervals are marked, finally obtaining a new main feature point set, re-fitting, and continuously iterating until the NURBS curve meets the point line fitting error requirement.

[0030] Further, the step S601 comprises:

[0031] S602, finding the NURBS curve micro-line segment corresponding to the maximum profile error in the NURBS curve;

[0032] S603, judging whether the two endpoints of the NURBS curve micro-line segment are in the main feature point set, if both are in the main feature point set, constructing an auxiliary point, if not, selecting one as an auxiliary point, then using the local support of NURBS curve to continue to adaptively construct or add auxiliary points, and adding them to the main feature point set, and adding the corresponding parameters to the fitting parameter set, re-fitting to obtain a new fitting curve, and finally continuously iterating until the profile constraint is met.

[0033] The application discloses a micro-segment global fairing method based on contour constraint, and the method comprises the following steps: acquiring discrete tool position points, extracting main feature points from the tool position points and replacing original tool position points to perform approximation fitting, solving initial control points to obtain an initial NURBS fitting curve; secondly, acquiring point-line fitting error, adaptively selecting tool position points to add to a main feature point set based on local support of the NURBS curve and a point-line fitting error threshold, re-fitting the curve and repeatedly until the point-line fitting precision requirement is met; finally, taking the maximum contour distance from a continuous micro-segment to the fitting curve as a contour error, and adaptively selecting or constructing auxiliary points in the tool position points based on the contour constraint, adding the auxiliary points to the main feature point set to perform iterative fitting until the NURBS curve is smooth and the contour constraint is met. The application adopts a cubic NURBS curve to fit the continuous micro-segment tool path, so that the tool path is smoother, the data amount is compressed, and the fitting curve contour precision is strictly controlled. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 A workflow diagram of the micro-segment global fairing method based on contour constraint;

[0035] Figure 2 An inflection point extraction schematic diagram of the micro-segment global fairing method based on contour constraint;

[0036] Figure 3 A point-line fitting error solving schematic diagram of the micro-segment global fairing method based on contour constraint;

[0037] Figure 4 A contour error solving schematic diagram of the micro-segment global fairing method based on contour constraint;

[0038] Figure 5 An auxiliary point construction schematic diagram of the micro-segment global fairing method based on contour constraint. DETAILED DESCRIPTION

[0039] Exemplary embodiments of the present disclosure will be described in detail with reference to the drawings. It can be understood that the terms "first", "second", etc. used in the present application can be used to describe various elements in the text, but unless specifically stated, these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0040] According to the first aspect of the present application, the present application claims a micro-segment global fairing method based on contour constraint, characterized in that comprising the steps of:

[0041] S101, extracting a plurality of main feature points of the tool path, and constructing a main feature point set;

[0042] S201, solving initial control points based on least square method, and obtaining a NURBS fitting curve;

[0043] S301, judging whether the NURBS fitting curve meets the point-line fitting error requirement or not, when meeting, executing step S401, when not meeting, executing step S501;

[0044] S401, judging whether the NURBS fitting curve meets the contour constraint requirement or not based on the contour constraint method, when meeting, ending the fairing process, when not meeting, executing step S601;

[0045] S501, completing adaptive fitting based on point-line error, adaptively selecting tool position points to join the main feature point set, re-fitting the NURBS fitting curve, and continuing to execute step S301;

[0046] S601, adaptively selecting or constructing auxiliary points in the tool position points based on the contour constraint, joining the main feature point set for iterative fitting, and continuing to execute step S401.

[0047] Further, the step S101 comprises:

[0048] S102, acquiring discrete tool position points of the tool path through CAD or CAM software;

[0049] S103, extracting inflection points, curvature extreme points and length mutation points from the discrete tool position points as main feature points;

[0050] S104, replacing the original tool position points with the main feature points as the main feature point set.

[0051] In this embodiment, the inflection points, curvature extreme points and length mutation points are selected from the discrete tool position points as tool position main feature points to basically reflect the basic shape of the tool path. The inflection points and curvature extreme points reflect the concave-convex and smoothness of the tool path respectively, but cannot represent the shape characteristics of the curvature gentle area, so that the curve fitting may cause larger contour error in the curvature gentle area, and the addition of the length mutation points can alleviate this problem to a certain extent. Since the number of main feature points is greatly reduced compared with the original tool position points, the main feature point set M={M i |i=0,1,···,s,0≤s≤m} is used to replace the original tool position points Q={Q iCurve fitting to the sequence |i=0,1,···,m} not only reflects the basic shape of the tool path but also significantly compresses the data volume and simplifies the calculation process. To ensure the integrity of the tool path, the first and last tool positions are extracted as the principal feature points, i.e., M0=Q0,M s =Q m .

[0052] Specifically, refer to Figure 2 The extraction of the inflection points includes:

[0053] With four consecutive cutter sites Q i-1 Q i Q i+1 Q i+2 For example, Figure 1 As shown, first calculate vector Q. i-1 Q i With Q i Q i+1 normal vector V i Vector Q i Q i+1 With Q i+1 Q i+2 normal vector V i+1 Next, calculate the angle θ between the two normal vectors. The calculation formula is as follows:

[0054]

[0055]

[0056] For two-dimensional data points, when θ is π, then Q i+1 That is, the inflection point; and for three-dimensional data points, if the value of θ is a large value (e.g., close to π), then Q i+1 This refers to the inflection point. Therefore, a reference threshold θ can be set. max When θ > θ max Extract Q i+1 It is the inflection point.

[0057] The extraction of the curvature extrema includes:

[0058] First, iterate through all tool points and calculate the curvature k at each point. i The formula is:

[0059]

[0060] Among them, Q i-1 Q i Q i+1 For three consecutive cutter sites, k i For Q i The calculated value of curvature.

[0061] Meanwhile, to avoid the influence of noise, the average curvature k is defined. aver The curvature threshold is used as the basis for extraction of curvature extreme points. When the curvature of a point is greater than the average curvature and is a curvature extreme point, the point is extracted as a feature point.

[0062] The specific extraction expression is as follows:

[0063]

[0064] The extraction of the length mutation points includes:

[0065] First, iterate through each principal feature point, calculate the length of the line segment connecting adjacent principal feature points, and set a threshold λ for the ratio of adjacent line segment lengths. lim If the ratio of the lengths of two adjacent line segments (the ratio of the longer segment to the shorter segment) is greater than λ lim Then, the middle knife point between the two endpoints of the long line segment is selected as the main feature point. If there is no knife point between the two endpoints, it is not added. Finally, the process is continuously iterated until the ratio of the lengths of the line segments connected by adjacent main feature points is less than λ. lim .

[0066] Further, step S201 includes:

[0067] S202, perform approximation fitting based on the set of main feature points;

[0068] S203, the initial control points are solved using the least squares method to obtain the NURBS fitting curve.

[0069] In this embodiment, a p-th order NURBS curve is defined as:

[0070]

[0071] In the formula, u is a parameter variable; P i Represents control points, the number of which is n+1; ω i N represents the weight factor corresponding to the control point; i,p (u) is a p-th order B-spline basis function defined on the nodal vector U, where the nodal vector U is defined as:

[0072] U = [u0, u1, ..., u p ,u p+1 ,…,u n ,u n+1 ,…,u n+p+1 ];

[0073] And N i,k (u) can be calculated using the deBoor-Cox recursive formula:

[0074]

[0075] Step S203 specifically includes:

[0076] First, the parameter values ​​of the original tool position are calculated using the cumulative chord length parameterization method, as follows:

[0077]

[0078] in, From the parameter set of the original tool position Extract the parameters of the main feature points and form a fitting parameter set.

[0079] Then, for the configuration of node vectors, a unified averaging technique is used, and its calculation method is as follows:

[0080]

[0081] Finally, given the feature point parameters and node vectors, the principal feature points are approximated using NURBS curves based on the least squares method, ensuring that the sum of squared errors f on the parameter curves corresponding to the feature points is minimized. The initial control points can then be solved using the following formula:

[0082]

[0083] in,

[0084]

[0085] To minimize the sum of squared errors f, let f be relative to the control point P. i With partial derivatives equal to 0, we can simplify to:

[0086] This further yields a system of linear equations containing n-1 unknowns:

[0087] (N T N)P = R;

[0088] in:

[0089]

[0090]

[0091] P is solved by Gaussian elimination, and then the first and last control points are added to obtain the initial control point set, thus completing the initial NURBS fitting.

[0092] Furthermore, step S301 includes:

[0093] S302, obtain the distance from the discrete tool point to the NURBS fitting curve, and use it as the point-line fitting error threshold;

[0094] S303, determine whether the NURBS fitting curve meets the requirements of the point-line fitting error threshold. If it meets the requirements, proceed to step S401; otherwise, proceed to step S501.

[0095] In this embodiment, to ensure the accuracy of point-line fitting, an adaptive iterative fitting method based on point-line fitting error is further adopted. In each iteration, the unique local support of NURBS is used to select an appropriate tool point to add to the set of main feature points, and the fitting is refitted until the point-line fitting error requirement is met.

[0096] The point-to-line fitting error refers to the minimum distance from the cutter point to the fitted curve, such as... Figure 3 As shown, the solution can be obtained using the Newton iteration method, and the specific solution is as follows:

[0097] The minimum distance from the tool point Q to the fitted curve C(u) is found directly using the dot product f2(u). The dot product f2(u) is defined as:

[0098]

[0099] When f2(u) = 0, this distance is minimized. Then, the equation is solved to obtain the parameter u. Finally, the distance from the point on the fitted curve corresponding to parameter u to the tool position point is calculated, which is the point-line fitting error. The solution for u can be obtained using the Newton iteration method, as shown in the following formula:

[0100]

[0101] In the formula u i Let ui represent the parameter value in the i-th Newton iteration. Let the initial iteration value, u0, be the tool position parameter corresponding to Q. The iteration termination condition is |ui|0. i+1 -u i | < ε or the number of iterations is greater than the maximum allowed number of iterations.

[0102] Further, step S401 includes:

[0103] S402, Set a contour error threshold, calculate the fitting contour error of the NURBS fitting curve relative to the continuous micro-straight line segment. If the fitting contour error of the NURBS fitting curve relative to the continuous micro-straight line segment in a region is not greater than the contour error threshold, then the NURBS fitting curve meets the contour constraint requirements; otherwise, it is considered not to meet the contour constraint requirements.

[0104] In this embodiment, the obtained fitted curve only meets the point-line fitting accuracy. To further optimize the contour accuracy, a contour error threshold is set, and the maximum contour error of each micro-line segment relative to the fitted curve is calculated. If the contour constraint requirement is not met, the line segment corresponding to the maximum contour error is found, and it is determined whether its two endpoints are in the main feature set. If they are, an auxiliary point is constructed. If they are not, one is selected as an auxiliary point and added to the main feature set. The fitting is then repeated until the contour constraint requirement is met. Finally, the algorithm ends, and the degree, weight factor, node vector, and control points of the NURBS curve are output.

[0105] Contour error such as Figure 4 As shown, this represents the minimum distance between a point on the fitted curve and a micro-straight line segment. Firstly, through the aforementioned Newton...

[0106] Iterate, calculating the parameters of the point on the fitted curve that minimizes the distance from each cutter point to the fitted curve. by The fitted curve is divided into multiple segments with boundaries, so each fitted curve segment corresponds to a micro-straight line segment. N points are sampled from each segment of the fitted curve, and the minimum distance from each point to the corresponding straight line segment is calculated, which is the contour error of the sampled points of the fitted curve. The maximum value is the maximum contour error.

[0107] Further, step S501 includes:

[0108] S502, based on the local support of NURBS, the NURBS fitting curve is divided into multiple sub-intervals by the main feature points;

[0109] S503, Select the first error point with the largest point-line error from the unmarked points that are greater than the point-line fitting error threshold, add it to the main feature point set, and add the corresponding parameters to the fitting parameter set;

[0110] S504, mark the interval where the first error point is located and its left and right (k+1) intervals. In this iteration, points that cannot be selected within the marked intervals will be added to the main feature point set.

[0111] S505, repeat S503 and S504 operations on the remaining intervals until all intervals are marked, and finally obtain a new set of principal feature points. Refit the NURBS curve and iterate until the NURBS curve meets the point-line fitting error requirements.

[0112] Furthermore, step S601 includes:

[0113] S602, find the NURBS curve micro-segment corresponding to the maximum profile error in the NURBS curve;

[0114] S603, determine whether both endpoints of the NURBS curve micro-segment are in the main feature point set. If they are, construct auxiliary points. If they are not, select one as an auxiliary point. Then, using the local support of the NURBS curve, continue to adaptively construct or add auxiliary points and add them to the main feature set. Add the corresponding parameters to the fitting parameter set and refit to obtain a new fitting curve. Finally, iterate continuously until the contour constraint is satisfied.

[0115] In this embodiment, the set of main feature points is divided into multiple intervals. The corresponding straight line segment with the maximum value and greater than the contour threshold is found by the contour error of each point. It is determined whether both ends of the straight line segment are in the set of main feature points. If not, one of the endpoints is selected as an auxiliary point and directly added to the set of main feature points.

[0116] If all points are present, construct auxiliary points and add them to the main feature point set. However, the interval containing the auxiliary point and its k+1 adjacent intervals will be marked. In this fitting process, points within the marked intervals cannot be selected as auxiliary points or auxiliary points can be constructed within the intervals. This process is repeated for the remaining intervals until all intervals are marked. Finally, the auxiliary points are added to the main feature point set, and the corresponding parameters are added to the fitting parameter set. The fitting is then performed again to obtain a new fitting curve. Finally, the process is iterated until the contour constraints are satisfied, at which point the algorithm terminates.

[0117] by Figure 5 For example, the specific process for constructing auxiliary points is as follows:

[0118] Obtain the point N corresponding to the maximum contour error, and its corresponding parameter u. N and its corresponding micro-segment Q i Q i+1 ;

[0119] Draw a small line segment Q through that point. i Q i+1 The perpendicular line L intersects Q i Q i+1 At point P;

[0120] On the vertical line L, a point M is drawn at a distance h from point P; this is the auxiliary point. To minimize contour error and ensure the basic shape of the fitted curve, h is generally taken as half of the contour threshold, and the parameter corresponding to point M is taken as u. N .

[0121] Those skilled in the art will understand that the contents disclosed herein can be varied and modified in many ways. For example, the various devices or components described above can be implemented in hardware, or in software, firmware, or a combination of some or all of the three.

[0122] This disclosure uses flowcharts to illustrate the steps of a method according to embodiments of this disclosure. It should be understood that the preceding or following steps are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes.

[0123] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiments can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiments can be implemented in hardware or as a software functional module. This disclosure is not limited to any particular combination of hardware and software.

[0124] Unless otherwise defined, all terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. It should also be understood that terms such as those defined in a common dictionary should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.

[0125] The foregoing description is intended to illustrate the present disclosure and should not be construed as limiting it. While several exemplary embodiments of the present disclosure have been described, those skilled in the art will readily understand that many modifications may be made to the exemplary embodiments without departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined by the claims. It should be understood that the foregoing description is intended to illustrate the present disclosure and should not be construed as limiting it to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

[0126] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0127] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for global fairing of micro-segments based on contour constraints, characterized in that, The method comprises the steps of: S101, extracting a plurality of main feature points of a tool path, and constructing a main feature point set; comprising: S102, acquiring discrete tool position points of the tool path through CAD or CAM software; S103, extracting inflection points, curvature extreme points and length mutation points from the discrete tool position points as main feature points; S104, replacing the original tool position points with the main feature points as the main feature point set; S201, solving initial control points based on the least square method to obtain a NURBS fitting curve; S301, judging whether the NURBS fitting curve meets the point-line fitting error requirement, when meeting, executing step S401, when not meeting, executing step S501; S401, judging whether the NURBS fitting curve meets the contour constraint requirement based on the contour constraint method, when meeting, ending the fairing process, when not meeting, executing step S601; S501, completing adaptive fitting based on the point-line error, adaptively selecting tool position points to add to the main feature point set, re-fitting the NURBS fitting curve, and continuing to execute step S301; The step S501 comprises: S502, dividing the NURBS fitting curve into a plurality of sub-intervals through the main feature points based on the local support of the NURBS; S503, selecting a first error point with the largest point-line error from the points greater than the point-line fitting error threshold and not marked, adding the first error point to the main feature point set, and adding the corresponding parameter to the fitting parameter set; S504, marking the interval where the first error point is located and the left and right k+1 intervals, and this iteration will not select points in the marked interval to add to the main feature point set; S505, repeating the operations of S503 and S504 on the remaining intervals until all intervals are marked, finally obtaining a new main feature point set, re-fitting, and continuously iterating until the NURBS curve meets the point-line fitting error requirement; S601, adaptively selecting or constructing auxiliary points in the tool position points based on the contour constraint, adding the auxiliary points to the main feature point set for iterative fitting, and continuing to execute step S401; The extraction of the inflection point comprises: With the continuous four knife position points Q i-1 , Q i , Q i+1 , Q i+2 As an example, first calculate the normal vector V i of the vector Q i-1 Q i and Q i Q i+1 , then calculate the normal vector V i+1 of the vector Q i Q i+1 and Q i+1 Q i+2 , and then calculate the included angle θ of the two normal vectors. For two-dimensional data points, when the value of θ is π, then Q i+1 is the inflection point; and for three-dimensional data points, if the value of θ is a large value close to π, then Q i+1 is the inflection point, set a reference threshold value θ max , when θ > θ max , extract Q i+1 as the inflection point; The extraction of the curvature extreme point comprises: Traverse all the tool position points, calculate the curvature k of each point i The formula is: where Q i-1 , Q i , Q i+1 are consecutive three tool position points, k i is the curvature calculated value of Q i . At the same time, in order to avoid the influence of noise, the curvature average value k is defined aver The curvature threshold value is defined, and the curvature extreme point is extracted based on the curvature maximum value and the curvature threshold value. When the curvature of a point is greater than the curvature average value and is the curvature maximum value point, the point is extracted as a feature point. The specific extraction expression is as follows: The extraction of the length mutation point comprises: Traverse each main feature point, calculate the length of the adjacent main feature point connected into a line segment, set the length ratio threshold λ of adjacent line segment lim , if the length ratio of two adjacent line segments is greater than λ lim , select the middle tool position point between the two end points of the long line segment as the main feature point, if there is no tool position point in the two end points, do not add, and constantly loop and traverse, so that the length ratio of the line segment connected by the adjacent main feature points is less than λ lim .

2. A micro-segment global fairing method based on contour constraint according to claim 1, characterized in that, The step S201 comprises: S202, performing approximation fitting according to the main feature point set; S203, solving initial control points based on the least square method to obtain a NURBS fitting curve.

3. A micro-segment global fairing method based on contour constraint according to claim 1, characterized in that, The step S301 comprises: S302, acquiring distances from the discrete tool position points to the NURBS fitting curve, and adopting the distances as a point-line fitting error threshold; S303, judging whether the NURBS fitting curve meets the requirement of the point-line fitting error threshold, when meeting, executing step S401, when not meeting, executing step S501.

4. The micro-segment global fairing method based on contour constraint of claim 1, wherein, The step S401 comprises: S402, setting a profile error threshold, calculating the fitting profile error of the NURBS fitting curve relative to the continuous micro straight line segment, if the fitting profile error of the NURBS fitting curve relative to the continuous micro straight line segment in the region is not greater than the profile error threshold, the NURBS fitting curve meets the profile constraint requirement, otherwise it is determined as not meeting the profile constraint requirement.

5. The micro-segment global fairing method based on contour constraint of claim 1, wherein, The step S601 comprises: S602, finding out the NURBS curve micro line segment corresponding to the maximum profile error of the NURBS curve; S603, judging whether the two endpoints of the NURBS curve micro line segment are both in the main feature point set, if so, constructing an auxiliary point, if not, selecting one as an auxiliary point, then using the local support of the NURBS curve to continue to adaptively construct or add auxiliary points, and adding them to the main feature point set, adding the corresponding parameters to the fitting parameter set, and re-fitting to obtain a new fitting curve, and finally continuously iterating until the profile constraint is met.

Citation Information

Patent Citations

  • Global curvature continuous smoothing method aiming at micro-line segment processing

    CN109976262A

  • Method for estimating the reversely calculated control points of NURBS

    CN110908337A