A partition constraint-based light-cured additive manufacturing slice gray level optimization method

CN122584675APending Publication Date: 2026-08-18SHENZHEN TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610909179.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0002]光固化打印增材技术(DLP)凭借其高精度、高表面质量的优势,在微流控芯片、生物医疗器件、精密模具等领域得到广泛应用,其中,微小通道空腔结构是上述器件的核心组件,其最小可打印直径和形状精度直接决定了器件的性能,传统的光固化打印方法通常采用全局统一的二进制或者灰度切片策略,且曝光时间、光强等等关键工艺参数主要依靠操作者的经验进行调试,这种经验调试方法存在显著的局限性:不同树脂、不同光机甚至不同批次的材料都需要重新进行大量的试错实验,不仅耗时耗力,而且无法实现对每个体素曝光剂量的精准调控,难以保证微小通道等精细结构的打印质量和一致性

Benefits of technology

[0077]1. Completely eliminate reliance on experience-based adjustments: By establishing a calibration curve of cured layer thickness-exposure time through experimental calibration, the number of layers N with effective influence in the Z direction and the area to be optimized can be automatically calculated and updated. No manual adjustments are required when changing resins, optical engines or adjusting process parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122584675A_ABST
    Figure CN122584675A_ABST
Patent Text Reader

Abstract

This invention discloses a slicing optimization method for photopolymer additive manufacturing based on partition constraints, belonging to the field of photopolymer additive manufacturing technology. The method involves acquiring resin curing parameters and printing equipment optical parameters, and determining the effective number of influencing layers for the cavity structure based on the calibration relationship between the actual cured layer thickness and exposure conditions. The method then performs voxelization on the 3D model to be printed, identifies cavity voxels, and generates local areas to be optimized based on the effective number of influencing layers and the light diffusion range. Based on the positional relationship between the voxels and the cavity structure, the areas to be optimized are partitioned, and differentiated exposure constraints are applied to achieve local exposure adjustment. Finally, optimized slicing data is generated for printing control, while non-optimized areas are printed using a multi-layer fusion strategy. This invention can improve the forming accuracy and smoothness of micro-cavity structures, reduce the risk of over-curing, reduce the amount of optimization calculations, and improve the surface quality of printed parts. It is applicable to surface projection photopolymer additive manufacturing equipment using digital micromirror devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D printing technology, and in particular to a method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints. Background Technology

[0002] Photopolymerization additive manufacturing (DLP) technology, with its advantages of high precision and high surface quality, has been widely used in fields such as microfluidic chips, biomedical devices, and precision molds. Among them, microchannel cavity structures are the core components of these devices, and their minimum printable diameter and shape accuracy directly determine the performance of the devices. Traditional photopolymerization printing methods usually adopt a globally uniform binary or grayscale slicing strategy, and key process parameters such as exposure time and light intensity mainly rely on the operator's experience for adjustment. This experience-based adjustment method has significant limitations: different resins, different photomechanics, and even different batches of materials all require a large number of trial and error experiments, which is not only time-consuming and labor-intensive, but also cannot achieve precise control of the exposure dose of each voxel, making it difficult to guarantee the printing quality and consistency of fine structures such as microchannels.

[0003] To address these issues, researchers began exploring grayscale optimization methods based on physical models. Among them, Wang et al. published "Optimize projected mask images for improving three-dimensional printing accuracy for digital light processing based vatphotopolymerization" in 2024. The core contributions of this method include:

[0004] 1. A three-dimensional voxel multilayer curing model that simultaneously considers XY plane light diffraction (PSF) and Z-direction light transmission effect was established, and joint optimization in three directions was achieved.

[0005] 2. A gradient descent optimization algorithm based on convolution is proposed, which controls the total cumulative exposure of each voxel by adjusting the pixel grayscale of all projection mask images.

[0006] 3. A target region extraction mechanism was introduced to reduce the amount of computation. By identifying the pattern edge of each slice and extending it outward by a fixed distance as the optimization region, the grayscale of the remaining regions was set to 0.

[0007] 4. Successfully achieved the printing of microchannel structures, significantly improving the shape accuracy of printing complex three-dimensional structures.

[0008] Although the above method does consider the light penetration effect of the Z-direction structure, establish a model for multi-layer light energy accumulation, introduce an identification and extraction mechanism for the global target projection pattern area, and also propose an algorithm for convolutional reverse optimization, its defects are that the quantification of the influence range of Z-direction light penetration is inaccurate and divorced from the actual process, the optimization area decision is simple and does not distinguish the energy difference between the entity and the cavity, and there is a lack of accurate quantification and zoning decision mechanism based on physical characteristics. The specific manifestations are as follows:

[0009] 1. The influence range of the Z-direction light penetration depth is not quantified, resulting in an overly large area that needs to be optimized. Although the method considers the Z-direction penetration of light, it does not establish a quantitative mapping relationship between the resin penetration characteristics and the effective number of affected layers of light, and optimizes all layers of the global target projection pattern, rather than only optimizing the limited number of layers where the light penetration accumulates energy above the cavity. Unnecessary optimization is also carried out on the entity part below the cavity and far from the cavity, causing waste of computing resources. There is a certain deviation between the theoretical penetration depth and the effective curing depth under the actual process, and the optimization strategy cannot be adaptively adjusted according to process parameters such as exposure time.

[0010] 2. The optimization strategy is simple and does not match the energy characteristics of the cavity. The method uses the method of "global outer boundary + fixed margin" to determine the optimization area, which does not match the actual energy influence area range of the cavity structure (the limited Z-direction depth of the cavity area, the Gaussian XY diffusion radius of light). The method does not distinguish the energy difference between the cavity structure and the entity area, and uses the same area division method for all structures.

[0011] 3. The energy constraint strategy is single and lacks hierarchical decision-making. A global unified binary constraint strategy of "entity area ≥ Ec, cavity area < Ec" is adopted, and no safety margin is set for the cavity structure. Different constraint intensities are not applied according to the distance between the voxel and the cavity, resulting in insufficient protection of the cavity edge or insufficient curing of the entity area. Applying the same strong constraint to non-critical areas as to critical areas instead introduces unnecessary gray-scale fluctuations and layer pattern defects.

[0012] 4. There is no adaptive layer pattern suppression mechanism, and the surface quality is poor. Global optimization leads to drastic fluctuations in the gray-scale values of adjacent layers, resulting in obvious layer pattern defects. No decision-making judgment mechanism is introduced, and the smoothing intensity cannot be adaptively adjusted according to local gray-scale changes, and layer patterns cannot be effectively suppressed while ensuring the cavity accuracy.

[0013] 5. The cavity protection ability is insufficient, and the printability limit is restricted. No safety margin is introduced, and it is impossible to effectively suppress the over-curing inside the cavity caused by multi-layer energy accumulation in the Z-direction. In practice, only channels with a diameter of more than 100 μm can be printed, making it difficult to meet the requirements for smaller-sized channels in the microfluidics field. Summary of the Invention

[0014] In view of this, the present invention proposes a grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints. This method can obtain the precise influence range of the cavity structure and perform local inverse optimization only on this range. Furthermore, it achieves a balance between computational efficiency, cavity protection, and surface quality through differentiated energy constraint strategies.

[0015] The technical solution of this invention is implemented as follows:

[0016] A method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints includes the following steps:

[0017] Step S1: Establish a curing layer thickness-exposure time calibration curve under preset light intensity conditions, and obtain the curing threshold and penetration depth of the photosensitive resin, as well as the grayscale-light intensity mapping relationship and Gaussian beam diffusion radius of the printer.

[0018] Step S2: Based on the curing layer thickness-exposure time calibration curve and the current actual printing process parameters, calculate the number of effective influence layers in the Z direction corresponding to the cavity structure;

[0019] Step S3: Discretize the 3D model to be printed into a 3D voxel mesh, identify and mark all cavity voxels in the 3D model to be printed, and obtain a cavity voxel set.

[0020] Step S4: Determine the Z-direction influence domain and XY-direction influence domain based on the number of effective influence layers in the Z direction and the Gaussian beam diffusion radius, and merge them to obtain the region to be optimized;

[0021] Step S5: Based on the voxel location, divide the region to be optimized into a strong protection zone, a weak protection zone, and a cavity region, and configure differentiated energy constraints.

[0022] Step S6: Calculate the grayscale difference of corresponding pixels in the adjacent layers within the region to be optimized, and configure adaptive layer texture suppression constraints.

[0023] Step S7: Based on the energy constraint and the layering suppression constraint, iteratively update the gray values ​​of voxels in the region to be optimized, while keeping the gray values ​​of the remaining voxels unchanged.

[0024] Step S8: When the iteration process meets the preset termination condition, output the optimized grayscale slice sequence.

[0025] Step S9: For areas not to be optimized, determine the number of fusion layers based on the degree of interlayer pattern change in the areas not to be optimized, and adjust the exposure time based on the thickness of the fused layers to fuse the continuous multi-layer slices into a single layer for printing.

[0026] Preferably, the specific steps of step S1 are as follows:

[0027] Select a standard geometric test pattern, and under the preset light intensity of the printer, change the single exposure time, measure the actual cured layer thickness of the photosensitive resin corresponding to different exposure times, and fit the cured layer thickness-exposure time calibration curve.

[0028] The longitudinal attenuation of light within the photosensitive resin follows the Beer-Lambert law, and the formula for obtaining the light intensity attenuation is:

[0029]

[0030] in Let be the light intensity at depth z. For the incident light intensity, The light transmittance coefficient of the photosensitive resin. The depth of light penetration;

[0031] Substituting the light intensity attenuation formula into the critical curing conditions of the photosensitive resin, we obtain the relationship between the cured layer thickness and the exposure time:

[0032]

[0033] in The thickness of the cured layer at exposure time t. The depth of light penetration. For the exposure time, This represents the curing threshold of the photosensitive resin.

[0034] The relationship between the cured layer thickness and exposure time was fitted to obtain the light penetration depth. and curing threshold ;

[0035] Calibration is used to obtain the mapping relationship between the printer's projected grayscale and the emitted light intensity. and Gaussian beam spread radius ,in The grayscale value of the projected pattern. grayscale The corresponding projected light intensity.

[0036] Preferably, the specific steps of step S2 are as follows:

[0037] Based on the actual exposure time used in the current printing process The cured layer thickness is retrieved from the cured layer thickness-exposure time calibration curve. Based on the cured layer thickness and the printing process layer thickness, the number of effective Z-axis influence layers corresponding to the cavity structure is calculated.

[0038]

[0039] in The number of layers with effective influence in the Z direction. Actual exposure time The thickness of the cured layer at that time For printing process layer thickness, This is for rounding up.

[0040] Preferably, the specific steps of step S3 are as follows:

[0041] Based on the external dimensions, slice pixel resolution, and single-layer thickness of the 3D model to be printed, the 3D model to be printed is discretized into a uniform 3D voxel mesh to obtain the overall voxel set.

[0042] Based on the geometric occupancy state or slice contour information of the 3D model, identify solid voxels and cavity voxels, mark and summarize all cavity voxels to form a cavity voxel set.

[0043] Preferably, the specific steps of step S4 are as follows:

[0044] Setting boundary-near interference conditions and inter-layer exposure crosstalk conditions, the region satisfying the boundary-near interference condition is output as the XY-axis influence domain, and the region satisfying the inter-layer exposure crosstalk condition is output as the Z-axis influence domain. The boundary-near interference is defined as follows:

[0045] For any voxel near the geometric model boundary, the thin-walled region of the model, and the cavity structure, The location satisfies: ,in For any entity voxel, The distance threshold is calculated based on the Gaussian beam spread radius;

[0046] Interlayer exposure crosstalk conditions are:

[0047] For each identified cavity voxel Based on the number of effective influence layers in the Z direction, a Z-axis influence domain is constructed. : ,in Number the layer where the current cavity voxel is located. For depth, The number of layers with effective influence in the Z direction;

[0048] The region to be optimized is obtained by merging the Z-axis influence domain and the XY-axis influence domain.

[0049] Preferably, the specific steps of step S5 are as follows:

[0050] The region of the cavity voxel within the region to be optimized is defined as the cavity region. The region within the region to be optimized that is no more than a preset distance threshold from the cavity voxel is defined as the strong protection zone. The region within the region to be optimized that is more than a preset distance threshold from the cavity voxel is defined as the weak protection zone. The remaining voxels are defined as the solid region.

[0051] The energy constraint condition of the strong protection zone is: ;

[0052] The energy constraint condition of the weak protection zone is: ;

[0053] The energy constraint condition for the cavity region is: ;

[0054] The energy constraint condition for the physical region is: ;

[0055] in The curing threshold, To accumulate exposure energy, To ensure a strong safety margin, To allow for sufficient exposure, and .

[0056] Preferably, the specific steps of step S6 are as follows:

[0057] The average grayscale difference between pixels in two adjacent layers within the optimization region is calculated using the following formula:

[0058]

[0059] in The average grayscale difference For the first The area to be optimized in the layer. This represents the number of pixels in the region. The first Layer and first The pixel grayscale values ​​within the area to be optimized in the layer;

[0060] Set grayscale difference threshold Based on average grayscale difference With grayscale difference threshold The comparison results adaptively adjust the layering suppression weights and apply layering suppression constraints, the expression of which is:

[0061]

[0062] in The weight for suppressing laminar flow is expressed as follows:

[0063]

[0064] in Indicates the strong layering suppression weight. This represents the weight for suppressing weak ridge lines.

[0065] Preferably, step S7 specifically involves: under energy constraints and layering suppression constraints, minimizing topography error and constraint penalty as the objective function, wherein the objective function is:

[0066]

[0067] in These are the weighting coefficients. For energy constraints, its expression is:

[0068]

[0069] in , , These are the voxel sets of the cavity region, the voxel set of the strong protection zone, and the voxel set of the weak protection zone, respectively.

[0070] During the optimization process, only the pixel grayscale values ​​within the area to be optimized are updated. The update formula is as follows:

[0071]

[0072] For the first The pixel grayscale value of the nth iteration of the region to be optimized in the layer. The iteration step size, The partial derivative of the objective function with respect to the grayscale value. This is the area to be optimized;

[0073] In step S8, when the objective function or When the iteration stops, the optimized grayscale slice sequence is output, where To preset the error threshold, This represents the maximum number of iterations.

[0074] Preferably, for areas not to be optimized, the number of fusion layers is determined based on the degree of interlayer pattern change in the areas not to be optimized, and the exposure time is adjusted based on the thickness of the fused layers, so that the continuous multi-layer slices are fused into a single layer for printing.

[0075] A computer-readable storage medium storing a computer program configured to perform a grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints.

[0076] Compared with the prior art, the beneficial effects of the present invention are:

[0077] 1. Completely eliminate reliance on experience-based adjustments: By establishing a calibration curve of cured layer thickness-exposure time through experimental calibration, the number of layers N with effective influence in the Z direction and the area to be optimized can be automatically calculated and updated. No manual adjustments are required when changing resins, optical engines or adjusting process parameters.

[0078] 2. More accurate quantification of Z-axis influence range: The method proposes to calculate the number of effective influence layers N in the Z-axis based on the curing layer thickness-exposure time calibration curve calibrated by actual process experiments, rather than relying on theoretical penetration depth estimation, which completely solves the problem of the optimization area being too large or too small.

[0079] 3. Order-of-magnitude improvement in computational efficiency: Only the limited N layers above the cavity affected by energy penetration and the voxels within the XY crosstalk range are optimized, generating an optimization region that precisely matches the shape of the cavity, rather than all layers within the global bounding rectangle, thus significantly reducing the total computational load.

[0080] 4. A qualitative breakthrough in cavity protection capability: By adopting a multi-level energy confinement strategy and setting differentiated safety margins based on the distance between the voxel and the cavity, over-curing caused by multi-layer energy accumulation in the Z-direction is effectively suppressed, and the minimum printable channel diameter is significantly reduced.

[0081] 5. Effectively suppresses layer texture defects: Non-critical areas maintain the original slice grayscale, avoiding unnecessary grayscale fluctuations caused by global optimization; At the same time, an adaptive layer texture suppression mechanism is introduced, which activates interlayer continuity penalty only when the grayscale difference in the adjacent areas to be optimized exceeds the threshold, greatly reducing surface roughness.

[0082] 6. This invention does not involve any hardware modifications to the optical engine or changes to the resin composition, and is compatible with all DMD surface projection photopolymerization printers and various commercial photosensitive resins. Attached Figure Description

[0083] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only preferred embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0084] Figure 1 This is a flowchart of a method for optimizing the grayscale of slices in photopolymer additive manufacturing based on partition constraints, according to the present invention. Detailed Implementation

[0085] To better understand the technical content of this invention, a specific embodiment is provided below, and the invention will be further described in conjunction with the accompanying drawings.

[0086] See Figure 1The present invention provides a method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints, comprising the following steps:

[0087] Step S1: Establish a curing layer thickness-exposure time calibration curve under preset light intensity conditions, and obtain the curing threshold and penetration depth of the photosensitive resin, as well as the grayscale-light intensity mapping relationship of the printer and the Gaussian beam diffusion radius. The specific steps are as follows:

[0088] Select a standard geometric test pattern, such as a square, circle or other regular shape. Under the printer's preset light intensity conditions, such as the printer's full power light intensity or other commonly used working light intensity, change the single exposure time, measure the actual cured layer thickness of the photosensitive resin corresponding to different exposure times, and fit the cured layer thickness-exposure time calibration curve.

[0089] The longitudinal attenuation of light within the photosensitive resin follows the Beer-Lambert law, and the formula for obtaining the light intensity attenuation is:

[0090]

[0091] in Let be the light intensity at depth z. For the incident light intensity, The light transmittance coefficient of the photosensitive resin. The depth of light penetration;

[0092] Substituting the light intensity attenuation formula into the critical curing conditions of the photosensitive resin, we obtain the relationship between the cured layer thickness and the exposure time:

[0093]

[0094] in The thickness of the cured layer at exposure time t. The depth of light penetration. For the exposure time, This represents the curing threshold of the photosensitive resin.

[0095] The relationship between the cured layer thickness and exposure time was fitted using mathematical tools to obtain the light penetration depth. and curing threshold ;

[0096] Calibration is used to obtain the mapping relationship between the printer's projected grayscale and the emitted light intensity. ,in The grayscale value of the projected pattern. grayscale The corresponding projected light intensity was used, and then a full-grayscale white light pattern projected by a printer was used as the light source to generate a standard geometric test pattern. A sample with a certain thickness of 5mm was generated. The sample was placed under an electron microscope, and the sample outline was identified by machine vision. The sample outline was then compared with the test pattern, and the Gaussian beam diffusion radius was calculated by fitting parameters. .

[0097] Step S2: Based on the curing layer thickness-exposure time calibration curve and the current actual printing process parameters, calculate the number of effective influence layers in the Z direction corresponding to the cavity structure. The specific steps are as follows:

[0098] Based on the actual exposure time used in the current printing process The cured layer thickness is retrieved from the cured layer thickness-exposure time calibration curve. Based on the cured layer thickness and the printing process layer thickness, the number of effective Z-axis influence layers corresponding to the cavity structure is calculated.

[0099]

[0100] in The number of layers with effective influence in the Z direction. Actual exposure time The thickness of the cured layer at that time For printing process layer thickness, This is for rounding up.

[0101] When the exposure time, light intensity, or layer thickness of the printing process changes, the calibration curve is automatically re-queried and the number of effective layers in the Z direction is updated.

[0102] Step S3: Discretize the 3D model to be printed into a 3D voxel mesh, identify and label all cavity voxels within the 3D model to be printed, and obtain a cavity voxel set. The specific steps are as follows:

[0103] Based on the external dimensions of the 3D model to be printed, the pixel resolution of the slices, and the thickness of a single printing layer, the 3D model to be printed is discretized into a uniform 3D voxel mesh to obtain an overall voxel set. For example, for a black and white binary projection image slice obtained based on the geometric model segmentation, if the image resolution is 1920×1080 pixels, the pixel size is 10μm / pixel, and the printing layer thickness is 10μm, then the corresponding overall voxel set V can be constructed accordingly.

[0104] Based on the geometric occupancy state or slice contour information of the 3D model, identify solid voxels and cavity voxels, mark and summarize all cavity voxels to form a cavity voxel set.

[0105] Step S4: Determine the Z-axis influence domain and XY-axis influence domain based on the number of effective influence layers in the Z-axis and the Gaussian beam diffusion radius, respectively, and merge them to obtain the region to be optimized. The optimization focus of the region to be optimized is concentrated near the model boundary, near the cavity structure boundary, and in key areas where interlayer energy easily accumulates. Accordingly, the region to be optimized is defined as the set of voxels formed by the target voxel boundary in three-dimensional space after a certain neighborhood expansion. The specific steps for generating it are as follows:

[0106] Setting boundary-near interference conditions and inter-layer exposure crosstalk conditions, the region satisfying the boundary-near interference condition is output as the XY-axis influence domain, and the region satisfying the inter-layer exposure crosstalk condition is output as the Z-axis influence domain. The boundary-near interference is defined as follows:

[0107] For any voxel near the geometric model boundary, the thin-walled region of the model, and the cavity structure, The location satisfies: ,in For any entity voxel, The distance threshold is calculated based on the Gaussian beam spread radius;

[0108] According to the characteristics of optical crosstalk, when a beam of light shines perpendicularly along the Z-direction onto a voxel in the XY plane, this beam of light also affects the voxels surrounding that voxel in the XY plane, and the intensity distribution exhibits a Gaussian function distribution:

[0109]

[0110] in This indicates that the light beam affects any voxel in the XY plane. light intensity, This represents the distance from any voxel to the central voxel. Therefore, the light from voxels in the transition region between the solid region and the cavity voxel will also affect the cavity voxel. Thus, it is necessary to further consider the Gaussian beam diffusion radius. The influence domain of the light intensity of each voxel in the XY direction is determined, and the influence domain in the XY direction is finally obtained.

[0111] Interlayer exposure crosstalk conditions are:

[0112] For each identified cavity voxel Based on the number of effective influence layers in the Z direction, a Z-axis influence domain is constructed. : ,in Number the layer where the current cavity voxel is located. For depth, The number of effective influence layers in the Z direction is used to merge the Z-direction influence domain with the XY-direction influence domain to obtain the region to be optimized.

[0113] Step S5: Based on voxel locations, divide the region to be optimized into a strong protection zone, a weak protection zone, and a cavity region, and configure differentiated energy constraints. The specific steps are as follows:

[0114] The region of the cavity voxel within the region to be optimized is defined as the cavity region. The region within the region to be optimized that is no more than a preset distance threshold from the cavity voxel is defined as the strong protection zone. The region within the region to be optimized that is more than a preset distance threshold from the cavity voxel is defined as the weak protection zone. The remaining voxels are defined as solid regions. The preset distance threshold is 1 voxel.

[0115] For the strong protection zone, which is close to the geometric model boundary and cavity region, high dimensional accuracy is required. The decision rule is: for the solid voxel region in the strong protection zone, control its cumulative exposure energy to slightly exceed the curing threshold to reduce the risk of boundary expansion. The energy constraint condition is: ;

[0116] For voxels in weakly protected areas, a larger exposure margin is allowed. Increasing the exposure dose improves the structural curing stability, and the energy constraint condition is as follows: ;

[0117] For the cavity voxel region, the cumulative exposure energy is strictly limited to be below the curing threshold to avoid over-curing of the cavity and causing blockage. The energy constraint is as follows: ;

[0118] For solid regions, no strong constraints are imposed; it is only necessary to ensure that the voxels of the solid region satisfy the following energy constraints: ;

[0119] in The curing threshold, To accumulate exposure energy, To ensure a strong safety margin, To allow for sufficient exposure, and .

[0120] Step S6: Calculate the grayscale difference between corresponding pixels in the adjacent layers within the region to be optimized, and configure adaptive layer texture suppression constraints. The specific steps are as follows:

[0121] The average grayscale difference between pixels in two adjacent layers within the optimization region is calculated using the following formula:

[0122]

[0123] in The average grayscale difference For the first The area to be optimized in the layer. This represents the number of pixels in the region. The first Layer and first The pixel grayscale values ​​within the area to be optimized in the layer;

[0124] To avoid applying the same level of smoothing constraint to all layers, a grayscale difference threshold is set. Based on average grayscale difference With grayscale difference threshold The comparison results adaptively adjust the layering suppression weights and apply layering suppression constraints, the expression of which is:

[0125]

[0126] in The weight for suppressing laminar flow is expressed as follows:

[0127]

[0128] in Indicates the strong layering suppression weight. This represents the weight for suppressing weak ridge lines.

[0129] An adaptive interlayer continuity constraint is introduced in the region to be optimized. The smoothing constraint is enhanced only in the region where the gray level of adjacent layers changes significantly. When the gray level of adjacent layers changes little, the constraint strength is reduced. This avoids the loss of microchannel boundary details due to excessive smoothing and avoids the generation of layer texture defects caused by excessive gray level abrupt changes between adjacent slice layers in local gray level optimization.

[0130] Step S7: Under the constraints of energy and layering suppression, with the objective function of minimizing the shape error and constraint penalty, iteratively update the gray values ​​of voxels within the region to be optimized, while keeping the gray values ​​of other entity voxels unchanged. The objective function is:

[0131]

[0132] in These are the weighting coefficients. For energy constraints, its expression is:

[0133]

[0134] in , , These are the voxel sets of the cavity region, the voxel set of the strong protection zone, and the voxel set of the weak protection zone, respectively.

[0135] During the optimization process, only the pixel grayscale values ​​within the area to be optimized are updated. The update formula is as follows:

[0136]

[0137] For the first The pixel grayscale value of the nth iteration of the region to be optimized in the layer. The iteration step size, The partial derivative of the objective function with respect to the grayscale value. This is the area that needs optimization.

[0138] Step S8: When the iteration process meets the preset termination condition, output the optimized grayscale slice sequence. The specific steps are as follows: when the objective function... or When the iteration stops, the optimized grayscale slice sequence is output, where To preset the error threshold, This represents the maximum number of iterations.

[0139] Step S9: For areas not to be optimized, determine the number of fusion layers based on the degree of interlayer pattern change in the areas not to be optimized, and adjust the exposure time based on the thickness of the fused layers to fuse the continuous multi-layer slices into a single layer for printing.

[0140] For areas not to be optimized, due to the small layer thickness, the changes in the slice pattern between adjacent layers are not obvious. Furthermore, the exposure time t for a single layer in a photopolymer printer is typically a few seconds, while the photomechanical cooling time is approximately several hundred seconds after the single-layer exposure and curing are completed. To further reduce the number of printing layers and significantly improve printing efficiency, after outputting the optimized grayscale slice image, this invention employs a multi-layer fusion strategy in the slice layers of non-optimized areas, fusing several consecutive slice layers into a single slice with a larger layer thickness. This is achieved by changing the exposure time. In this way, areas that previously required multi-layer printing can be converted into single-layer printing, improving printing efficiency and reducing printing time.

[0141] For the optimized slice image, this invention sets the layer thickness of each partition according to the different needs of the region to be optimized and the region not to be optimized. For the region to be optimized: due to the high requirements for dimensional accuracy and surface quality of the key structures (including the area near the cavity and the model boundary), the initial layer thickness is still used. For non-optimized areas: Shape accuracy requirements are lower, and inter-layer projection pattern changes are not significant. The number of fusion layers is determined based on the degree of inter-layer pattern change in the non-optimized area, and the exposure time is adjusted according to the fused layer thickness. Multiple slices in this area are fused into a single layer for printing. The combined printed layer thickness can be set to... .

[0142] By employing a multi-layer optimization strategy, the total number of slice layers can be significantly reduced: for the original model height H, the initial layer thickness is... The optimized slice layer thickness is The number of slice layers reduced before and after optimization is

[0143]

[0144] Therefore, by adopting a multi-layered optimization strategy, printing time can be significantly reduced, and this reduction can be roughly achieved using... To express.

[0145] This invention discloses a grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints. Taking the basic parameters of the photosensitive resin and printer calibration parameters as input, and building upon existing voxelized multilayer curing models, convolutional gradient descent optimization frameworks, and parameter calibration methods, it performs precise calculation of the number of Z-axis effective influence layers based on experimental calibration, accurate automatic generation of the region to be optimized, and partitioned energy constraints and adaptive layer texture suppression. Through a three-level decision-making approach, it derives the precise influence range of the cavity structure, performs local inverse optimization only on voxels within this range, and applies differentiated energy constraint strategies based on region type and location. This achieves the following:

[0146] The precise quantification of the effective number of Z-axis optimization layers, calibrated based on actual experiments, eliminates the reliance on experience-based debugging.

[0147] Precise positioning of the cavity's influence range based on the solidification prediction results;

[0148] Precisely generate the optimization region that matches the energy characteristics of the cavity;

[0149] A tiered and differentiated energy constraint strategy;

[0150] Adaptive layering suppression mechanism;

[0151] Without relying on additional hardware, the minimum printable channel diameter was increased from approximately 100 μm to 60 μm, while the computational load was reduced by more than 80%, and layer cracks were significantly suppressed, ultimately achieving a balance between computational efficiency, cavity protection, and surface quality.

[0152] In addition, the present invention also provides a computer-readable storage medium storing a computer program, which, when run by a processor, can execute the steps in the above-described method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0153] The effectiveness of the present invention is illustrated by the following example:

[0154] The hardware used in this embodiment includes: a Mofang S140 Pro photopolymer printer, a DMD digital micromirror (9400*5200 resolution, 10μm / pixel pitch); a UP19K-50L-H5-D0 light intensity meter, a LEICA DM2700M optical microscope, and a Dongguan Sanliang digital micrometer. The programming software environment used is: Python 3.9 programming language, PyTorch 2.0 deep learning framework, and Materisse Magics slicing software. The experimental material used is Mofang H120 high-temperature resistant photosensitive resin, stored at 25°C, shaken well for 10 minutes before use, and poured into the resin tank. Basic process parameters: printing layer thickness controlled at 10μm, exposure time 1s (adjustable according to process requirements), and platform movement speed is not specified.

[0155] Specific implementation process:

[0156] 1. Under full power light intensity (16.52mW / cm²), a 10mm×10mm square pattern was projected, and the thickness of the cured layer was measured to be 120μm at an exposure time of 0.4s. A calibration curve of cured layer thickness-exposure time was established.

[0157] 2. The resin curing threshold was calibrated and obtained. =6.53mJ / cm², the grayscale-light intensity mapping relationship is linear, and the Gaussian beam diffusion radius is 140μm.

[0158] 3. The number of effective influence layers in the Z direction is calculated to be N = ⌈120 / 50⌉ = 3 layers.

[0159] 4. Voxelize the model containing the 60μm diameter circular channel and identify all the cavity voxels.

[0160] 5. For each cavity voxel, extend upwards by 3 layers along the Z direction and extend upwards by 1 voxel in the XY plane to generate a tubular region to be optimized.

[0161] The region to be optimized is divided into a strong protection zone (distance from the cavity ≤ 1 voxel) and a weak protection zone (distance from the cavity > 1 voxel), and constraints E≤ 5.53 mJ / cm² and E≤ 6.03 mJ / cm² are applied respectively.

[0162] 6. When the grayscale difference between adjacent layers exceeds 20, the TV penalty item is enabled.

[0163] 7. Optimize using the convolutional gradient descent algorithm, and output the optimized slice after 500 iterations.

[0164] 8. The minimum channel diameter obtained by printing is 58-62μm, with a roundness error of ±3%, and is completely unobstructed.

[0165] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints, characterized in that, Includes the following steps: Step S1: Establish a curing layer thickness-exposure time calibration curve under preset light intensity conditions, and obtain the curing threshold and penetration depth of the photosensitive resin, as well as the grayscale-light intensity mapping relationship and Gaussian beam diffusion radius of the printer. Step S2: Based on the curing layer thickness-exposure time calibration curve and the current actual printing process parameters, calculate the number of effective influence layers in the Z direction corresponding to the cavity structure; Step S3: Discretize the 3D model to be printed into a 3D voxel mesh, identify and mark all cavity voxels in the 3D model to be printed, and obtain a cavity voxel set. Step S4: Determine the Z-direction influence domain and XY-direction influence domain based on the number of effective influence layers in the Z direction and the Gaussian beam diffusion radius, and merge them to obtain the region to be optimized; Step S5: Based on the voxel location, divide the region to be optimized into a strong protection zone, a weak protection zone, and a cavity region, and configure differentiated energy constraints. Step S6: Calculate the grayscale difference of corresponding pixels in the adjacent layers within the region to be optimized, and configure adaptive layer texture suppression constraints. Step S7: Based on the energy constraint and the layering suppression constraint, iteratively update the gray values ​​of voxels in the region to be optimized, while keeping the gray values ​​of the remaining voxels unchanged. Step S8: When the iteration process meets the preset termination condition, output the optimized grayscale slice sequence.

2. The grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints according to claim 1, characterized in that, The specific steps of step S1 are as follows: Select a standard geometric test pattern, and under the preset light intensity of the printer, change the single exposure time, measure the actual cured layer thickness of the photosensitive resin corresponding to different exposure times, and fit the cured layer thickness-exposure time calibration curve. The longitudinal attenuation of light within the photosensitive resin follows the Beer-Lambert law, and the formula for obtaining the light intensity attenuation is: in Let be the light intensity at depth z. For the incident light intensity, The light transmittance coefficient of the photosensitive resin. The depth of light penetration; Substituting the light intensity attenuation formula into the critical curing conditions of the photosensitive resin, we obtain the relationship between the cured layer thickness and the exposure time: in The thickness of the cured layer at exposure time t. The depth of light penetration. For the exposure time, This represents the curing threshold of the photosensitive resin. The relationship between the cured layer thickness and exposure time was fitted to obtain the light penetration depth. and curing threshold ; Calibration is used to obtain the mapping relationship between the printer's projected grayscale and the emitted light intensity. and the Gaussian beam spread radius ,in The grayscale value of the projected pattern. grayscale The corresponding projected light intensity.

3. The grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints according to claim 1, characterized in that, The specific steps of step S2 are as follows: Based on the actual exposure time used in the current printing process The cured layer thickness is retrieved from the cured layer thickness-exposure time calibration curve. Based on the cured layer thickness and the printing process layer thickness, the number of effective Z-axis influence layers corresponding to the cavity structure is calculated. in The number of layers with effective influence in the Z direction. Actual exposure time The thickness of the cured layer at that time For printing process layer thickness, This is for rounding up.

4. The grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints according to claim 1, characterized in that, The specific steps of step S3 are as follows: Based on the external dimensions, slice pixel resolution, and single-layer thickness of the 3D model to be printed, the 3D model to be printed is discretized into a uniform 3D voxel mesh to obtain the overall voxel set. Based on the geometric occupancy state or slice contour information of the 3D model, identify solid voxels and cavity voxels, mark and summarize all cavity voxels to form a cavity voxel set.

5. The grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints according to claim 4, characterized in that, The specific steps of step S4 are as follows: Setting boundary-near interference conditions and inter-layer exposure crosstalk conditions, the region satisfying the boundary-near interference condition is output as the XY-axis influence domain, and the region satisfying the inter-layer exposure crosstalk condition is output as the Z-axis influence domain. The boundary-near interference is defined as follows: For any voxel near the geometric model boundary, the thin-walled region of the model, and the cavity structure, The location satisfies: ,in For any entity voxel, The distance threshold is calculated based on the Gaussian beam spread radius; Interlayer exposure crosstalk conditions are: For each identified cavity voxel Based on the number of effective influence layers in the Z direction, a Z-axis influence domain is constructed. : ,in Number the layer where the current cavity voxel is located. For depth, The number of layers with effective influence in the Z direction; The region to be optimized is obtained by merging the Z-axis influence domain and the XY-axis influence domain.

6. The grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints according to claim 1, characterized in that, The specific steps of step S5 are as follows: The region of the cavity voxel within the region to be optimized is defined as the cavity region. The region within the region to be optimized that is no more than a preset distance threshold from the cavity voxel is defined as the strong protection zone. The region within the region to be optimized that is more than a preset distance threshold from the cavity voxel is defined as the weak protection zone. The remaining voxels are defined as the solid region. The energy constraint condition of the strong protection zone is: ; The energy constraint condition of the weak protection zone is: ; The energy constraint condition for the cavity region is: ; The energy constraint condition for the physical region is: ; in The curing threshold, To accumulate exposure energy, To ensure a strong safety margin, To allow for sufficient exposure, and .

7. The method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints according to claim 6, characterized in that, The specific steps of step S6 are as follows: The average grayscale difference between pixels in two adjacent layers within the optimization region is calculated using the following formula: in The average grayscale difference For the first The area to be optimized in the layer. This represents the number of pixels in the region. The first Layer and first The pixel grayscale values ​​within the area to be optimized in the layer; Set grayscale difference threshold Based on average grayscale difference With grayscale difference threshold The comparison results adaptively adjust the layering suppression weights and apply layering suppression constraints, the expression of which is: in The weight for suppressing layer folds is expressed as follows: in Indicates the strong layering suppression weight. This represents the weight for suppressing weak ridge lines.

8. The grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints according to claim 7, characterized in that, The specific steps of step S7 are as follows: Under the conditions of energy constraint and layering suppression constraint, the objective function is to minimize the topography error and constraint penalty, wherein the objective function is: in These are the weighting coefficients. For energy constraints, its expression is: in , , These are the voxel sets of the cavity region, the voxel set of the strong protection zone, and the voxel set of the weak protection zone, respectively. During the optimization process, only the pixel grayscale values ​​within the area to be optimized are updated. The update formula is as follows: For the first The pixel grayscale value of the nth iteration of the region to be optimized in the layer. The iteration step size, The partial derivative of the objective function with respect to the grayscale value. This is the area to be optimized; In step S8, when the objective function or When the iteration stops, the optimized grayscale slice sequence is output, where To preset the error threshold, This represents the maximum number of iterations.

9. The method for optimizing the grayscale of photopolymer additive manufacturing slices based on partition constraints according to claim 1, characterized in that, For areas not to be optimized, the number of fusion layers is determined based on the degree of interlayer pattern change in the areas not to be optimized, and the exposure time is adjusted based on the thickness of the fused layer to fuse multiple consecutive slices into a single layer for printing.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program configured to perform the grayscale optimization method for photopolymer additive manufacturing slices based on partition constraints as described in any one of claims 1-9.