Free-form surface smooth extension method and system based on boundary second-order difference fading and cumulative reconstruction, and storage medium

By using the boundary second-order difference fading and cumulative reconstruction method, the problems of surface shape change, dependence on external target surface and divergence of higher-order terms in the smooth extension of freeform surfaces are solved, generating continuous and stable outer surface shape, and improving processing efficiency and optical performance.

CN123052203APending Publication Date: 2026-11-06YEJIA OPTICAL TECH GUANGDONG CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611355643.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-06

Smart Images

  • Figure CN123052203A_ABST
    Figure CN123052203A_ABST
Patent Text Reader

Abstract

The application discloses a free surface smooth extension method based on boundary second-order difference gradual attenuation and accumulation reconstruction, and solves the problems of easy change of effective area surface shape, dependence on external target surface, high-order term divergence and insufficient boundary continuity in the prior art. The method comprises the following steps: obtaining free surface original surface shape data, determining an effective area, and determining the effective area or an area containing the effective area as a surface shape protection area; determining an extension direction; calculating the second-order difference of the original surface shape along the extension direction to obtain boundary second-order difference; generating a gradual attenuation coefficient and constructing an extension second-order difference, so that the extension second-order difference gradually decreases from the boundary second-order difference; obtaining an extension surface height by twice accumulation of the extension second-order difference; and combining the extension surface height with the original surface shape in the surface shape protection area to obtain an extended free surface. The application does not depend on an external target surface, the effective area surface shape is not changed, the surface height and the first-order difference at the boundary are continuous, and the second-order difference naturally gradually decreases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of freeform surface data processing technology, specifically to a freeform surface smoothing and extension method based on boundary second-order difference fading and cumulative reconstruction, which is particularly suitable for the ultra-precision machining of freeform surface optical elements. Background Technology

[0002] Optical freeform surfaces are typically expressed using extended polynomials, Zernike polynomials, or other parametric forms, and can also be delivered as discrete point clouds. These surface data are primarily designed and optimized for imaging requirements within the optically effective region; surfaces outside the effective region are generally not considered major constraints in optical design. For analytical expressions containing higher-order terms, directly calculating them outside the optically effective region can cause these higher-order terms to amplify with increasing distance from the effective region, resulting in excessively large surface heights, slopes, curvatures, or higher-order undulations in the non-optical region.

[0003] Although non-optical regions typically do not directly participate in imaging, in actual manufacturing processes, the cutting tool still needs to pass through introduction zones, exit zones, or other machining extension zones located outside the optically effective zone to form a continuous and complete machining toolpath. Directly using the calculation results from the original freeform surface expression on the periphery may lead to the following problems:

[0004] 1. Rapid growth in the periphery led to The required range of motion for the shaft increases;

[0005] 2. Excessive slope, curvature, or curvature variation along the toolpath increases the dynamic following load on the machine tool;

[0006] 3. Unnatural surface shape changes occur between the boundary of the optical effective area and the processing extension area;

[0007] 4. Directly cutting off the original surface shape or simply using a plane to fill it can easily cause discontinuities in surface height, slope, or curvature at the connection points;

[0008] 5. When using higher-order Taylor extrapolation, the calculation error of the boundary derivative may be amplified by higher-order terms as the extrapolation distance increases;

[0009] 6. When using target surface fusion, it is necessary to additionally determine the target surface type, fusion width, and fusion weight, and the overall trend of the outer surface shape may be changed due to improper selection of the target surface.

[0010] The aforementioned problems are particularly pronounced on three-axis ultra-precision lathes. , Linear axis and workpiece spindle Taking the turning of free-form surfaces with axis linkage as an example, The shaft continuously drives the workpiece to rotate. The shaft is fed radially. The axis must periodically follow the spindle rotation angle according to the surface height of the freeform surface. The first and second order variations of the outer periphery of the freeform surface along the toolpath will be reflected in the actual axis motion. Changes in axial velocity and acceleration; when the outer surface shape grows rapidly, the second-order transformation abruptly changes, or local oscillations occur. Axis movements may require large reciprocating motions within a short time, increasing the risk of servo tracking errors, acceleration saturation, mechanical vibration, and surface defects. To ensure that the movements of each axis do not exceed the machine tool's speed and acceleration limits, actual machining often requires reducing the spindle speed or overall feed rate, significantly increasing the machining time for individual freeform surfaces. Because this motion is strictly synchronized with the spindle rotation angle, it cannot be easily eliminated by locally altering the toolpath. Therefore, three-axis turning places particularly high demands on the smoothness and machinability of the outer surface shape outside the effective area.

[0011] Furthermore, in some product design data delivery scenarios, the available data may only contain discrete point clouds within the optically effective area, without the corresponding original analytical equations, design coefficients, or surface data outside the effective area. In this case, the surface shape outside the effective area cannot be obtained through direct calculation, and information such as the slope, curvature, and curvature changes at the boundaries can only be estimated from discrete points. The sampling interval of the point cloud, measurement noise, interpolation errors, and incomplete boundary data can all reduce the estimation accuracy of the boundary derivatives. When these estimates are used for higher-order Taylor extrapolation or global higher-order fitting, the errors are easily accumulated and amplified with the extension distance, leading to oscillations, distortions, or divergence in the outer surface shape.

[0012] Existing general smoothing methods typically apply filtering directly to surface height data or force the outer surface shape to transition to a plane, sphere, or solid of revolution. Direct filtering can easily affect the designed surface shape within the optically effective area; forcibly connecting target surfaces requires additional target surface design and may introduce abrupt curvature changes at the connection point. These methods still face the following pressing technical challenges:

[0013] First, how to extend the outer region while strictly maintaining the original value of the effective region surface shape; second, how to simultaneously accept the surface height, first-order difference, and second-order difference at the boundary of the effective region to ensure the high-order continuity of the connection position; third, how to prevent the high-order terms in the original freeform surface from continuing to diverge in the outer region and eliminate large slopes or curvatures caused by non-physical amplification; fourth, how to make the outer surface shape naturally continue along the trend of the original boundary without relying on the artificially specified target surface; fifth, how to make the second-order difference of the far region gradually approach zero or a preset residual value, or make its absolute value less than a predetermined threshold, so that the outer region gradually converges into a low-curvature tangential continuation state; sixth, how to complete the stable calculation of the upper and lower sides or multiple boundary directions with fewer control parameters, so that the extension method is both simple and universal.

[0014] Therefore, there is a need for a smooth extension method that is applicable to both analytical equation surface shapes and discrete point clouds in the effective region, and that can generate continuous and stable peripheral surface shapes by utilizing the local geometric state at the boundary of the effective region without depending on the external target surface or changing the optical effective region. Summary of the Invention

[0015] This invention aims to solve the technical problems existing in the smooth extension method of freeform surfaces, such as the effective area surface shape being easily changed, dependence on external target surfaces, divergence of higher-order terms, and insufficient boundary continuity. To this end, it provides a smooth extension method of freeform surfaces based on boundary second-order difference fading and cumulative reconstruction.

[0016] This invention provides a freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction, comprising:

[0017] S1. Obtain the original surface shape data of the freeform surface, determine the effective area in the original surface shape data, and define the effective area or the area containing the effective area as the surface shape protection area;

[0018] S2. Determine the extension direction from the boundary of the surface protection area to the processing extension area;

[0019] S3. Along the extension direction, calculate the first-order difference and second-order difference of the original surface shape on multiple surface shape sections respectively, and obtain the boundary surface height, first-order difference and second-order difference of the boundary at the boundary of the surface shape protection area;

[0020] S4. Generate a fading coefficient based on the outward distance from each sampling position in the processing extension area to the boundary of the surface protection area, and construct the extended second-order difference of the processing extension area using the fading coefficient and the boundary second-order difference, so that the extended second-order difference gradually decreases from the boundary second-order difference;

[0021] S5. Using the first-order difference of the boundary as the initial value, the second-order difference of the extension is accumulated for the first time to obtain the first-order difference of the extension; using the boundary surface height as the initial value, the first-order difference of the extension is accumulated for the second time to obtain the extension surface height of the processing extension area.

[0022] S6. Combine the extended surface height with the original surface data that remains unchanged within the surface protection area to obtain the extended freeform surface.

[0023] Furthermore, the fading coefficient varies according to the outward distance from each sampling position within the processing extension area to the boundary of the surface protection area. It is 1 at the boundary of the surface protection area and decreases monotonically as the outward distance increases. It is 0 or a preset residual final value at the far boundary of the processing extension area. Correspondingly, the extended second-order difference is 0, a preset residual value, or its absolute value is less than a predetermined threshold at the far end.

[0024] Furthermore, the extended second-order difference satisfies:

[0025] ;

[0026] in, The number of the high node on the boundary surface of the surface protection area is [number]. The sequence number is the cross section number. This refers to the second-order difference position number, calculated from the second-order difference position associated with the boundary. For the first Strip-shaped section at the boundary of the surface protection area The boundary second difference at the point, For the second-order difference of the boundary After extension, in the first On the cross-section of the strip shape, starting from the boundary of the surface protection area... The extension of the second-order difference at each second-order difference position For the first The fading coefficients corresponding to the second-order difference positions.

[0027] Furthermore, the fading coefficient satisfies:

[0028] ;

[0029] in, Used to distinguish between the first outward direction and the second outward direction. This represents the number of differential intervals from the boundary of the corresponding surface protection area to the far boundary. The fading exponent is greater than zero, and the fading exponents for the two outward directions can be set separately. This refers to the second-order difference position number, calculated from the second-order difference position associated with the boundary. For direction Upper The fading coefficients corresponding to the second-order difference positions.

[0030] Furthermore, the surface height, first-order difference, and second-order difference of the extended freeform surface at the boundary of the surface shape protection area are consistent with the surface height, first-order difference, and second-order difference of the original surface shape at the corresponding positions.

[0031] Furthermore, the extension direction has a first outward direction and a second outward direction, which extend outward from two opposite boundaries of the surface protection region, and respectively construct the second-order difference of the extension and the extension surface height.

[0032] Furthermore, a reference section is selected within the surface protection area, and the surface data located on both sides of the reference section are arranged in order from the reference section outward. The same or different fading functions are used on both sides to generate corresponding fading coefficients, and the fading coefficients and the corresponding boundary second-order differences are used to construct extended second-order differences. The parameters of the fading functions on both sides can be set independently and processed by a cumulative reconstruction process.

[0033] Furthermore, the surface protection area is a protection strip defined along the extension direction, and the protection strip includes the effective area.

[0034] Furthermore, the original surface data is generated by the freeform surface equation or obtained by interpolating discrete point clouds to a regular mesh.

[0035] Furthermore, after generating the extended freeform surface, the surface height within the surface protection area is restored point by point according to the original surface data, and it is checked whether the extended surface completely covers the predetermined output mesh.

[0036] Furthermore, a rotary machining toolpath is generated for the extended freeform surface, and the machining smoothness of the extended freeform surface is evaluated based on the first-order or second-order difference of the toolpath height.

[0037] The discrete boundary acceptance relationship of the present invention, at the boundary of the surface protection region, has the following discrete acceptance relationship:

[0038] 1. The boundary surface height inherits the original surface shape;

[0039] 2. The first-order difference at the boundary inherits the original surface shape;

[0040] 3. The first second difference of the peripheral fading sequence is equal to the boundary second difference;

[0041] 4. The second-order difference at the far end is zero, a preset residual value, or its absolute value is less than a predetermined threshold.

[0042] Right now: ,

[0043] The aforementioned relationship where the distal second-order difference equals zero represents the preferred case when the distal final value of the fading coefficient is 0. When the fading coefficient takes a preset residual final value at the distal end, the distal second-order difference equals the product of this preset residual final value and the boundary second-order difference. When a threshold termination condition is used, the absolute value of the distal second-order difference is less than a predetermined threshold. Therefore, this method does not refit a curve outside the boundary that is independent of the original surface shape, but rather extends the curve using the original boundary differential state as the initial condition.

[0044] The present invention also provides a freeform surface smooth extension system based on boundary second-order difference fading and cumulative reconstruction, including a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the freeform surface smooth extension method based on boundary second-order difference fading and cumulative reconstruction as described above.

[0045] Furthermore, the computer program includes:

[0046] The surface shape acquisition module is used to read the coefficients of the freeform surface equation or Point cloud;

[0047] The regular grid module is used to generate or identify regular computational grids;

[0048] The effective area definition module is used to determine the optical effective area, surface protection area, and extension direction;

[0049] The difference calculation module is used to calculate the first-order and second-order differences of each intercept.

[0050] The boundary state extraction module is used to extract the surface height, first-order difference, and second-order difference at the boundary of the surface protection area;

[0051] The fading sequence generation module is used to generate fading coefficients based on the distance from the boundary to the output boundary;

[0052] The second-order difference extension module is used to construct the outer second-order difference using the boundary second-order difference and the fading coefficients.

[0053] The cumulative reconstruction module is used to sequentially reconstruct the first-order difference and the outer surface height;

[0054] The effective area protection module is used to verify or restore the original surface shape within the surface shape protection area;

[0055] The output and evaluation module is used for output. Diagnostic data on surface shape, cross-section, or toolpath.

[0056] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method for smooth extension of free-form surfaces based on boundary second-order difference fading and cumulative reconstruction.

[0057] The beneficial effects of this invention are as follows:

[0058] (i) The effective area shape remains strictly unchanged.

[0059] This invention effectively solves the problem that existing filtering or fitting methods cause associated changes to the surface shape of the effective area during the extension process by defining the optical effective area or the area containing the effective area as the surface shape protection area (S1). After the extension is completed, the original surface shape data in the surface shape protection area is not changed (S6), thus ensuring that the imaging performance of the optical effective area is not affected by the extension process.

[0060] (ii) The outer surface shape naturally continues along the original boundary trend, without the need to preset a target surface.

[0061] This invention does not require the outer surface shape to reach a preset external target surface such as a plane, sphere, or solid of revolution. The height of the outer far end surface is determined by the boundary surface height, the first-order difference of the boundary, and the gradually diminishing second-order difference, so that the outer surface shape naturally extends outward along the local geometric trend at the boundary of the surface shape protection area, eliminating the distortion of the outer surface shape trend caused by improper target surface selection, and also eliminating the steps of target surface type selection and fusion parameter adjustment.

[0062] (III) Achieving discrete connection of surface height, first-order difference, and second-order difference at the boundary.

[0063] This invention simultaneously incorporates three levels of geometric information (S3)—surface height, first-order difference, and second-order difference—at the boundary of the surface protection region. This ensures that the surface height, first-order difference, and second-order difference of the expanded freeform surface at the boundary of the surface protection region remain consistent with the original surface shape at corresponding positions. This achieves consistency in the discrete boundary integration between the surface protection region and the processing expansion area, avoiding the boundary and second-order difference abrupt changes introduced by direct truncation or simple completion. This effect correspondingly solves the problem pointed out in the background art of "how to simultaneously incorporate surface height, first-order difference, and second-order difference at the effective region boundary."

[0064] (iv) The second-order difference gradually diminishes monotonically with outward distance, suppressing the divergence of higher-order terms.

[0065] This invention constructs an extended second-order difference (S4) using a fading function that monotonically decreases with outward distance, which satisfies... This causes the extended second-order difference to originate from the boundary second-order difference via the fading coefficient. The monotonically diminishing effect is generated at the boundary ( , =1) is exactly equal to the second-order difference of the original boundary, achieving second-order continuity; with outward distance Increase The extended second-order difference gradually approaches its far-end terminal value, causing it to gradually diminish from the boundary value to zero or a preset residual value. When a threshold termination condition is used, the absolute value of the far-end second-order difference is made less than a predetermined threshold. This mechanism fundamentally suppresses the continued growth and divergence of higher-order terms in the original freeform surface analytical expression outside the effective region, avoiding non-physical amplification of the height, slope, or curvature of the outer surface. Correspondingly, it solves the problems pointed out in the background technology of "how to prevent the higher-order terms of the original freeform surface from continuing to diverge on the periphery" and "how to make the far-end second-order difference approach zero or a preset residual value, or make its absolute value less than a predetermined threshold".

[0066] (v) Two-level cumulative reconstruction ensures the self-consistency of the outer surface shape and the boundary differential state.

[0067] This invention obtains the extended first-order difference by performing the first accumulation on the gradually diminishing extended second-order difference and the second accumulation to obtain the extended surface height (S5). This ensures that the surface height, first-order difference and second-order difference of the outer region strictly satisfy the difference recursion relationship, guaranteeing that the outer surface shape is generated consistently from the differential state at the boundary, and avoiding the inherent inconsistency introduced by separate independent interpolation.

[0068] (vi) Both the top and bottom sides can be processed independently, making it suitable for asymmetrical scenarios.

[0069] This invention supports setting opposing first and second outward directions (S2) along the extension direction. The two outward directions extend outward from two opposing boundaries of the surface protection area, and their respective fading indices can be set. This feature enables the method to flexibly adapt to practical scenarios such as effective area offset and asymmetric processing diameter, and correspondingly solves the problem pointed out in the background art of "how to complete the stable calculation of the upper and lower sides or multiple boundary directions with fewer parameters".

[0070] (vii) High computational efficiency and easy to implement in parallel.

[0071] In this method, the extension calculations of each surface section are independent of each other, and there is no need for iterative coupling between adjacent sections. It is easy to implement parallel acceleration on single instruction multiple data architecture or multi-core processors. Moreover, the computational load increases approximately linearly with the total number of grid points, which has a significant computational efficiency advantage compared with existing iterative solutions or global optimization methods.

[0072] (viii) Few parameters, easy to implement

[0073] In the preferred embodiment of the present invention, only two main control parameters need to be determined: the location of the guard zone boundary and the fading index of each of the two outward directions. There is no need to set the target surface type, fusion width, fusion weight or other combinations of parameters, which reduces the threshold for using the method and the workload of parameter debugging.

[0074] (ix) Wide range of applications

[0075] This method can process surface data generated by the analytical equations of freeform surfaces, as well as regular mesh surfaces obtained by interpolation of discrete point clouds, and has good compatibility with the source and format of input data.

[0076] (x) Improve processing smoothness and shorten processing time

[0077] As the second-order difference of the outer surface gradually diminishes to near zero, the outer region tends to continue tangentially with low curvature, resulting in improved machining toolpaths based on the extended freeform surface during rotational machining. The directional changes and their first and second-order changes are effectively suppressed, significantly improving the smoothness of the machining data. After the toolpath is smoothed, the number of speed reduction machining operations due to machine tool speed and acceleration limitations can be reduced, allowing the machine tool to use higher spindle speeds or feed rates within the range allowed by dynamic capabilities, thereby greatly shortening the ultra-precision turning machining time of freeform surface optical elements.

[0078] In summary, this invention simultaneously achieves technical effects such as invariance of effective area surface shape, high-order boundary continuity, suppression of high-order term divergence, independence from target surface, independent controllability on both sides, and concise parameters. While ensuring optical performance, it effectively improves the manufacturability of freeform surface elements, and has outstanding substantive features and significant progress.

[0079] This invention can be used for HUD (Head-Up Display) reflectors, optical devices for automotive lighting, freeform surface lenses, mold cores, and other freeform surface parts that require expanded processing coverage. It can also be used for data preparation processes in single-point diamond turning, slow tool servo, fast tool servo, and other continuous toolpath machining. Attached Figure Description

[0080] Figure 1 This is a flowchart of the method in the first embodiment.

[0081] Figure 2 This is the single-sided stub reconstruction process of the first implementation method.

[0082] Figure 3 This is the effective processing area for the freeform surface in the second implementation method.

[0083] Figure 4This is a schematic diagram comparing the continuity of the original equations and the helical toolpath and normalized Z-axis acceleration of the curvature extension surface shape in the second embodiment.

[0084] Figure 5 This is the result of the surface axis motion of the original equation calculated by ILCAM3D in the second embodiment.

[0085] Figure 6 This is the result of the curvature extension surface axis motion calculated by ILCAM3D in the second embodiment. Detailed Implementation

[0086] To further understand the features, technical means, and specific objectives and functions achieved by the present invention, the present invention will be described in further detail below with reference to specific embodiments and accompanying drawings.

[0087] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0088] like Figure 1-2 As shown, this is the first embodiment.

[0089] The freeform surface smoothing extension method provided by this invention includes the following steps:

[0090] S1, obtain the original freeform surface data.

[0091] Read the coefficients of the freeform surface equation or discrete point cloud, and establish a structure containing within a predetermined output range. , and The surface shape data.

[0092] S2, Establish a regular computational grid.

[0093] Organize or interpolate the raw data to a regular grid. , ), thus obtaining the surface height matrix Equally spaced grids are preferred; for non-equally spaced grids, difference and integral formulas with actual spacing can be used.

[0094] S3, determine the protective strip and extension direction.

[0095] The protective zone, which serves as the surface protection area, is determined based on the optically effective area, and the lower boundary of the protective zone in the extension direction is also determined. and upper boundary And select a reference line located within the protection zone. The protective zone's range meets the following requirements: ≤ ≤ The protective belt can cover the entire The direction is such that a safety strip containing the optically effective area is formed.

[0096] S4 divides the grid into two outwardly ordered half-regions.

[0097] Reference line Starting from the upper half, divide it into + Directional arrangement; reverse the lower half of the row so that it also follows the direction from the reference row - The outer sides are arranged in a directional manner. Therefore, the same difference and cumulative reconstruction process can be reused on both the top and bottom sides, but their respective fading function parameters can be set independently.

[0098] S5, calculate the original first-order difference and second-order difference.

[0099] For each column outward indexing calculate:

[0100] ,

[0101] ;

[0102] in, For the first-order difference of the surface, This is a second-order difference. When the grid spacing is... hour, / This is an approximation using the first derivative. / This is a discrete approximation of the second derivative along the extension direction; when the slope of the intercept is small, the latter can serve as an approximate representation of the geometric curvature trend. When using the three-point center difference, the boundary-related second-order difference is jointly determined by the high node of the protection zone boundary surface, the first adjacent node on the inner side, and the first adjacent node on the outer side; after obtaining this boundary-related second-order difference, the original surface shape data further out no longer participates in the construction of the extension second-order difference. When only the effective area point cloud is available, the boundary-related second-order difference can also be estimated by using unilateral difference or local fitting from the sampling points on the inner side of the protection zone.

[0103] S6, second-order difference within the locking protection band.

[0104] The second-order difference between the reference line and the boundary of the protection zone is kept in its original value so that the surface height obtained by cumulative reconstruction within the protection zone is consistent with the original surface height.

[0105] S7, construct the peripheral fading sequence based on the second-order difference of the boundary.

[0106] To avoid conceptual confusion, this article distinguishes between the fading function, fading coefficient, and fading exponent as follows.

[0107] The fading function. The fading function is a continuous function or discrete generation rule that generates fading weights based on normalized outward positions. For directions... The continuous form is denoted as ,in The function takes a value of 1 at the boundary, monotonically does not increase along the outward distance, and takes a value of 0 or a preset residual final value at the far end. =1, = ,in It can be 0 or satisfy 0 < The default value is <1.

[0108] The fading coefficient is the value of the fading function at a specific sampling location. Let the direction be... From the boundary-related second-order difference position to the far boundary, there are a total of The nth difference interval, the nth The normalized outward position and fading coefficient of each position are calculated using the following formula:

[0109] ;

[0110] in, and The first subscript Indicates the sampling location number, the second subscript This indicates the outward direction. For discrete implementations of continuous functions that are not explicitly constructed, the fading coefficients can also be directly given by discrete generation rules that satisfy the same boundary conditions and monotonicity requirements.

[0111] The fading exponent. The fading exponent is simply a parameter in the fading of a power function, denoted as . This is used to adjust the decay rate and its spatial distribution. The power function containing the preset residual final value can be written as:

[0112] ;

[0113] in, and These are the fading indices for the upper and lower sides, respectively, both greater than zero and independently set; when the conditions on both sides are similar, a value can be taken. The larger the exponent of the fading function, the faster it decreases near the boundary and the more gradual it becomes as it approaches its final value at the far end; other types of fading functions may not have an exponent of fading.

[0114] When the preset residual final value is 0, the fading coefficient consistent with the existing program implementation is:

[0115] ;

[0116] Use the top and bottom sides respectively and Indicate. Let the first... The high node number of the side protection zone boundary surface is Its boundary correlation second difference is divided into Then, the outer second-order difference is constructed using the fading coefficients:

[0117] ;

[0118] The above structure causes the outer second-order difference at the boundary to inherit the boundary second-order difference, and gradually decays to zero or a preset residual value as the outward distance increases.

[0119] Using actual outward distance When indicating, set the direction The available extension length on is The equivalent power function form is:

[0120] ;

[0121] S8, first accumulation, reconstructing the first-order difference.

[0122] Using the original first-order difference at the reference row or boundary as the initial value, accumulate point by point according to the second-order difference sequence:

[0123] ;

[0124] For physical quantities, they can be written as:

[0125] ;

[0126] In the above formula, Indicates the physical slope along the extension direction. This represents the corresponding second derivative quantity. The sampling interval; It only indicates the slope and is no longer used as an index for the outward direction.

[0127] S9, second accumulation, reconstructs the outer surface height.

[0128] Using the original surface height at the reference row or boundary as the initial value, the reconstructed first-order difference is accumulated again:

[0129] ;

[0130] S10 processes the top and bottom sides separately and then merges them.

[0131] Perform steps S5 to S9 for the upper and lower boundaries respectively. After the lower half-region calculation is completed, restore the original state. The order is then merged with the upper half to form a complete face shape.

[0132] S11 performs valid area protection and data verification.

[0133] Compare the output surface height within the guard band with the original surface height point by point; if necessary, accurately restore the nodes within the guard band according to the original values. Check whether the output mesh is complete, whether there are non-finite values, and whether the difference at the boundary meets the predetermined error requirements.

[0134] S12 outputs the results and performs processing evaluation.

[0135] Output extension The data can be used to generate diagnostic results for center section, second-order difference, or rotary machining toolpaths.

[0136] Furthermore, as a supplementary explanation of this embodiment, the extension processing of the present invention has the following flexibility and preferred implementation in terms of bilateral parameter settings and extension direction selection.

[0137] (a) Independent processing of the top and bottom sides

[0138] In this embodiment, the following parameters of the first outward direction (upper side) and the second outward direction (lower side) of the protective strip can be the same or different:

[0139] 1. Location of the boundary of the protection zone;

[0140] 2. Available extension length;

[0141] 3. Upper and lower diminishing indices and ;

[0142] 4. Gradual fading function type;

[0143] 5. Output boundary position;

[0144] 6. Differential sampling interval.

[0145] Therefore, the present invention can flexibly handle asymmetric optical effective areas and asymmetric processing apertures.

[0146] (ii) Selection of extension direction

[0147] In this embodiment, the extension direction (step S2) is preferably along... direction The column is processed. Based on the core principle of this invention, this extension direction can also be implemented in the following alternative ways:

[0148] 1. Along direction Line processing;

[0149] 2. First, align the selected extension direction with the grid axis using coordinate transformation;

[0150] 3. Process along the local direction determined by the boundary normal, machining feed direction, or main surface shape change direction;

[0151] 4. Select different extension directions for different zones.

[0152] It should be noted that the above coordinate transformation is only used to determine the extension direction in the computational coordinate system. The core steps of this invention—namely, the boundary second-order difference fading and cumulative reconstruction—are not changed by the coordinate transformation.

[0153] Furthermore, the fading coefficients used above can be implemented through the following preferred embodiments and alternative methods. The fading function of the present invention needs to satisfy the following conditions: it takes a value of 1 at the boundary and decreases monotonically with the increase of outward distance, and takes a value of 0 or a preset residual final value at the far end; when a threshold is used as the termination condition, the absolute value of the corresponding extended second-order difference is made less than a predetermined threshold. Specific implementation methods of the fading function are given below.

[0154] (a) Implementation of the fading function

[0155] 1. Power function fading (preferred implementation method)

[0156] Preferred method:

[0157] ;

[0158] The features of this preferred embodiment are as follows:

[0159] a. at the boundary Accepting the second-order difference of the boundary;

[0160] b. At the remote end This causes the second-order difference to converge to zero;

[0161] c. Parameters and By adjusting the spatial distribution of the gradual disappearance of the second-order difference on the upper and lower sides respectively, different values ​​can be obtained;

[0162] d. When The continuous and gradually diminishing envelope satisfies On a finite sampling grid, the discrete rate of change of the second-order difference on the corresponding far side decreases and approaches zero.

[0163] 2. Other optional fading functions

[0164] Provided that the boundary value conditions and the requirement of monotonically decreasing distance along the outward direction are satisfied, the specific form of the fading function is not limited. It can be a linear function, Hermite interpolation function, cosine window function, normalized exponential function, rational function, piecewise polynomial function, or spline function, selected based on the extension length, the second-order difference state of the boundary, and processing constraints. For implementations that do not explicitly construct a continuous fading function, a monotonically discrete fading sequence satisfying the above conditions can also be adaptively generated based on processing constraints. The Hermite interpolation function can include a cubic smooth step function, a quintic smooth step function, and other functions that satisfy preset endpoint derivative conditions.

[0165] For example, the cubic smooth step decay function can be written as: Its first derivative is zero at both the boundary and the far end.

[0166] It should be noted that, regardless of the fading function used, the core of this invention lies in constructing an extended second-order difference using the boundary second-order difference, and then generating the extended surface height through two-stage cumulative reconstruction, rather than directly interpolating or fitting the target surface height to the outer surface. The specific form of the fading function only affects the fading rate of the second-order difference in space and does not change the core methodological framework of this invention.

[0167] like Figure 3 As shown in the second embodiment, this embodiment takes a HUD freeform surface product as an example. The input data is a freeform surface design file, which includes quadratic surface parameters and information about... , The polynomial freeform surface coefficients are used. The calculation program reads these coefficients and constructs the original freeform surface expression. The surface height value of each node is calculated on a regular rectangular coordinate grid. The effective optical area of ​​this HUD product is... The width of direction AA is 390 mm, in The width of the BB direction is 130mm, that is: , . Figure 3 The diagram shows the effective surface shape of the product calculated from the input freeform surface coefficients. The colors in the diagram represent relative surface height variations, and the display direction is only used to make the product shape clearly visible; it does not change the coordinates and surface height data used in subsequent difference calculations.

[0168] To form a complete surface shape that meets processing requirements outside the optically effective area, the output area is expanded to 440mm × 440mm, and the following calculation parameters are used:

[0169]

[0170] In this embodiment, the algorithm along direction Column processing. To improve protection reliability, the entire... The strip serves as a protective strip; therefore, this protective strip encompasses a rectangular optically effective area, and all nodes within the protective strip remain unchanged. This embodiment is for ease of comparison. However, the two parameters in the algorithm are independent of each other and do not need to have the same value.

[0171] upper side treatment

[0172] 1. From the reference line Starting from here, divide the upper half of the zone into sections. Directional arrangement;

[0173] 2. Calculate the first and second differences for each column;

[0174] 3. Preserve the reference row to the top boundary The original second-order difference between them;

[0175] 4. Obtain the second-order difference of the upper boundary correlation;

[0176] 5. Within the range of 65 mm to 220 mm, according to To generate a second-order difference, this embodiment takes... =1.15;

[0177] 6. The height of the upper outer perimeter is obtained by accumulating the two measurements.

[0178] lower side treatment

[0179] 1. The lower half of the partition is flipped vertically, causing the calculated index to be calculated from... point to outer side;

[0180] 2. Use the same cumulative reconstruction steps as above, to... As the boundary, according to Generate the peripheral second-order difference; in this embodiment, we take... =1.15;

[0181] 3. After two accumulations, restore the original row order;

[0182] 4. Merge the results from the lower side with those from the upper side at the reference row.

[0183] Numerical verification results

[0184] The same Archimedes spiral toolpath is used for sampling on both the original equation surface and the reconstructed smooth surface generated by this method. Figure 4 The top row shows the spiral toolpaths on two different surface shapes, with the blue part located within the optically effective region and the orange part located outside the optically effective region; Figure 4The bottom row shows the normalization along the toolpath. The axis acceleration trajectory and its local magnification results are used to observe the continuity of the toolpath when it passes through the effective area boundary and the surrounding area. Figure 4 This indicates that the reconstructed smooth surface shape preserves the original toolpath within the optically effective region, while simultaneously improving the toolpath morphology outside the effective region and along the toolpath. The axis acceleration changes more continuously. This graph is mainly used to compare continuity and does not use the absolute value of normalized acceleration as the result of machine tool dynamics evaluation.

[0185] To further verify whether this change can be reflected in the axis motion characteristics of actual machining equipment, the original equation surface shape and the reconstructed smooth surface shape were imported into the ILCAM3D software used by the Innolite IL300 ultra-precision machining equipment, and helical toolpath calculations were performed under the same machining parameters. The calculation results of axis position, velocity, acceleration, and axial jerk (also known as jerk acceleration) given by ILCAM3D are as follows: Figure 5 and Figure 6 As shown.

[0186] contrast Figure 5 and Figure 6 It can be seen that, while maintaining a consistent trend in axis position and overall velocity variation, the acceleration fluctuation range corresponding to the reconstructed smooth surface shape is significantly narrowed. Based on the coordinate scale in the figure, the peak positive acceleration of the original equation surface shape is approximately +0.38 m / s². 2 The peak negative acceleration is approximately -0.19 m / s². 2 The peak-to-peak value is approximately 0.57 m / s. 2 The peak positive acceleration of the reconstructed smooth surface is approximately +0.15 m / s². 2 The peak negative acceleration is approximately -0.20 m / s². 2 The peak-to-peak value is approximately 0.35 m / s. 2 Therefore, the positive peak value is significantly reduced after reconstruction, while the negative peak value is at a similar level to the original result; if both directions are considered simultaneously, the maximum absolute acceleration is reduced from approximately 0.38 m / s². 2 It dropped to approximately 0.20 m / s 2 The peak-to-peak acceleration was reduced by approximately 39%. This indicates that the peripheral second-order difference fading and cumulative reconstruction not only improve the geometric continuity of the surface shape and toolpath, but also result in a smoother overall acceleration response in ILCAM3D's machine tool axis motion calculations.

[0187] The above results are used to illustrate the effectiveness of this method in a HUD design example and under Innolite IL300 processing conditions, and do not constitute a limitation on output size, grid spacing, effective area range, upper and lower fading index, processing equipment model or processing parameters.

[0188] Technical Boundaries and Alternative Embodiments of the Invention

[0189] I. Technical Boundary Description

[0190] To further clarify the technical content of this invention and distinguish it from the prior art, this invention has the following technical boundaries:

[0191] 1. This method does not use surfaces of revolution, planes, or spheres as the forced target surface;

[0192] 2. Except for the boundary neighborhood sampled values ​​used to calculate the second-order difference of the boundary, this method does not continue to use the calculation results of the original freeform surface expression outside the effective region;

[0193] 3. This method does not use finite-distance high-order Taylor polynomials to directly extrapolate the surface height;

[0194] 4. This method does not replace boundary differential state extension with surface height filtering;

[0195] 5. The core control object of this method is the second-order difference and the second derivative of the intercept it represents, rather than the pre-given height of the far end face.

[0196] The aforementioned boundaries are used to illustrate preferred solutions. Based on the search results, the claims can combine "no target surface," "second-order differential fading," "two-level cumulative reconstruction," and "hard protection of the effective area" into different levels of protection scope.

[0197] II. Alternative Implementation Methods

[0198] Within the scope of the inventive concept, the above preferred embodiments may also have the following alternative implementations:

[0199] 1. The input can be freeform surface coefficients, regular point clouds, or regular surface shapes obtained through interpolation;

[0200] 2. The surface protection area can be rectangular, striped, or a security area that includes the actual optically effective area;

[0201] 3. The extension direction can be , The orientation of the rotated mesh or the local boundary normal;

[0202] 4. Second-order differences can be obtained using three-point central difference, one-sided difference, local polynomial fitting, or spline differentiation;

[0203] 5. The fading function can be a power function, Hermite function, cosine window, exponential function, rational function, or monotonic spline;

[0204] 6. The terminal value of the fading coefficient can be zero or a preset residual terminal value; the corresponding extended second-order difference or second-order derivative can be zero, a preset residual value, or its absolute value can be less than a predetermined threshold as the termination condition.

[0205] 7. Different fading functions and parameters can be used on the top and bottom sides;

[0206] 8. The fading exponents on both sides can be determined based on their respective boundary second-order differences, available extension lengths, allowable peak values ​​of second-order derivatives, or machine tool dynamic constraints.

[0207] 9. Robust estimation of second-order differences of outlier boundaries can be performed, for example, by using neighborhood fitting, median or amplitude limiting;

[0208] 10. After output, the nodes within the surface protection area can be accurately restored according to the original data to eliminate floating-point accumulated errors;

[0209] 11. Multiple cutoff lines can be processed in parallel;

[0210] 12. After generating the surface shape, the first-order difference, second-order difference, and higher-order changes of the toolpath can be calculated as a basis for quality verification or parameter selection.

[0211] The third embodiment provides a freeform surface smoothing extension system based on boundary second-order difference fading and cumulative reconstruction. The system includes a processor and a memory. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the method described in any one of the first embodiments.

[0212] Preferably, in this embodiment, the processor is configured as the following functional modules when it calls and executes the computer program:

[0213] The surface shape acquisition module is used to read the coefficients of the freeform surface equation or Point cloud data;

[0214] The regular grid module is used to generate or identify regular computational grids;

[0215] The effective area definition module is used to determine the optical effective area, surface protection area, and extension direction;

[0216] The difference calculation module is used to calculate the first-order and second-order differences along the extension direction on each surface section;

[0217] The boundary state extraction module is used to extract surface height, first-order difference, and boundary second-order difference at the boundary of the surface protection area.

[0218] The fading sequence generation module is used to generate fading coefficients based on the outward distance from each sampling position in the processing extension area to the boundary of the surface protection area;

[0219] The second-order difference extension module is used to construct an extension second-order difference using the boundary second-order difference and the fading coefficient.

[0220] The cumulative reconstruction module is used to perform two consecutive accumulations on the extended second-order difference to reconstruct the extended first-order difference and the height of the extended surface.

[0221] The effective area protection module is used to verify or recover the original surface shape data within the surface shape protection area;

[0222] The output and evaluation module is used to output the extended freeform surface shape data and cross-section or toolpath diagnostic data.

[0223] Fourth embodiment: This embodiment provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of the first embodiments.

[0224] The computer-readable storage medium may include, but is not limited to, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and other media capable of storing program code.

[0225] The embodiments described above merely illustrate the optimal implementation of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A free-form surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction, characterized in that, include: S1. Obtain the original surface shape data of the freeform surface, determine the effective area in the original surface shape data, and define the effective area or the area containing the effective area as the surface shape protection area; S2. Determine the extension direction from the boundary of the surface protection area to the processing extension area; S3. Along the extension direction, calculate the first-order difference and second-order difference of the original surface shape on multiple surface shape sections respectively, and obtain the boundary surface height, first-order difference and second-order difference of the boundary at the boundary of the surface shape protection area; S4. Generate a fading coefficient based on the outward distance from each sampling position in the processing extension area to the boundary of the surface protection area, and construct the extended second-order difference of the processing extension area using the fading coefficient and the boundary second-order difference, so that the extended second-order difference gradually decreases from the boundary second-order difference; S5. Using the first-order difference of the boundary as the initial value, perform the first accumulation of the extended second-order difference to obtain the extended first-order difference; Using the boundary surface height as the initial value, the first-order difference of the extension is accumulated a second time to obtain the extension surface height of the processing extension region; S6. Combine the extended surface height with the original surface data that remains unchanged within the surface protection area to obtain the extended freeform surface.

2. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, The fading coefficient varies according to the outward distance from each sampling position in the processing extension area to the boundary of the surface protection area. It is 1 at the boundary of the surface protection area and decreases monotonically as the outward distance increases. It is 0 or a preset residual final value at the far boundary of the processing extension area. Correspondingly, the extended second-order difference is 0, a preset residual value, or its absolute value is less than a predetermined threshold at the far end.

3. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1 or 2, characterized in that, The extended second-order difference satisfies: ; in, The number of the high node on the boundary surface of the surface protection area is [number]. The sequence number is the cross section number. This refers to the second-order difference position number, calculated from the second-order difference position associated with the boundary. For the first Strip-shaped section at the boundary of the surface protection area The boundary second difference at the point, For the second-order difference of the boundary After extension, in the first On the cross-section of the strip shape, starting from the boundary of the surface protection area... The extension of the second-order difference at each second-order difference position For the first The fading coefficients corresponding to the second-order difference positions.

4. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 3, characterized in that, The fading coefficient satisfies: ; in, Used to distinguish between the first outward direction and the second outward direction. This represents the number of differential intervals from the boundary of the corresponding surface protection area to the far boundary. The fading exponent is greater than zero, and the fading exponents for the two outward directions can be set separately. This refers to the second-order difference position number, calculated from the second-order difference position associated with the boundary. For direction Upper The fading coefficients corresponding to the second-order difference positions.

5. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, The surface height, first-order difference, and second-order difference of the extended freeform surface at the boundary of the surface protection region are consistent with the surface height, first-order difference, and second-order difference of the original surface at the corresponding positions.

6. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, The extension direction has a first outward direction and a second outward direction, which extend outward from two opposite boundaries of the surface protection region, and respectively construct the second-order difference of the extension and the extension surface height.

7. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 6, characterized in that, Within the surface protection area, a reference sectional line is selected. The surface data located on both sides of the reference sectional line are arranged in order from the reference sectional line outward. The same or different fading functions are used to generate corresponding fading coefficients on both sides. The fading coefficients and the corresponding boundary second-order difference are used to construct an extended second-order difference. The parameters of the fading functions on both sides can be set independently and are processed by an accumulation reconstruction process.

8. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, The surface protection area is a protection strip defined along the extension direction, and the protection strip includes the effective area.

9. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, The original surface data is generated by the freeform surface equation or obtained by interpolating discrete point clouds to a regular mesh.

10. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, After generating the extended freeform surface, the surface height within the surface protection area is restored point by point according to the original surface data, and it is checked whether the extended surface completely covers the predetermined output mesh.

11. The freeform surface smoothing extension method based on boundary second-order difference fading and cumulative reconstruction according to claim 1, characterized in that, Generate a rotary machining toolpath for the expanded freeform surface, and evaluate the machining smoothness of the expanded freeform surface based on the first-order or second-order difference of the toolpath height.

12. A free-form surface smooth extension system based on boundary second-order difference fading and cumulative reconstruction, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, causes the processor to perform the method according to any one of claims 1 to 11.

13. The freeform surface smooth extension system based on boundary second-order difference fading and cumulative reconstruction according to claim 12, characterized in that, The computer program includes: The surface shape acquisition module is used to read the coefficients of the freeform surface equation or Point cloud; The regular grid module is used to generate or identify regular computational grids; The effective area definition module is used to determine the optical effective area, surface protection area, and extension direction; The difference calculation module is used to calculate the first-order and second-order differences of each intercept. The boundary state extraction module is used to extract the surface height, first-order difference, and second-order difference at the boundary of the surface protection area; The fading sequence generation module is used to generate fading coefficients based on the distance from the boundary to the output boundary; The second-order difference extension module is used to construct the outer second-order difference using the boundary second-order difference and the fading coefficients. The cumulative reconstruction module is used to sequentially reconstruct the first-order difference and the outer surface height; The effective area protection module is used to verify or restore the original surface shape within the surface shape protection area; The output and evaluation module is used for output. Diagnostic data on surface shape, cross-section, or toolpath.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 11.