3D printing method and printing system suitable for high-throughput continuous switching food
By generating a material information matrix based on grayscale thresholds and optimizing material switching, the problems of discontinuous paths and inaccurate material distribution in multi-material food 3D printing in existing technologies have been solved, achieving efficient and accurate food 3D printing results and supporting the digital and intelligent upgrading of the food manufacturing industry.
Patent Information
- Application Number
- CN202511223203.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-12-16
AI Technical Summary
Existing continuous switching food 3D printing systems lack specialized 3D model slicing and path generation strategies for multiple materials, resulting in discontinuous printing paths, inaccurate material distribution, easy pattern deformation, and residual slurry in the nozzle affecting subsequent food deposition, causing blurred or misaligned pattern edges.
A material information matrix generation method based on grayscale thresholds is adopted. Combined with material property settings, material switching advance distance and speed optimization, continuous switching food 3D printing G-code control instructions are generated. Through layer slicing and high-resolution image processing, accurate segmentation of multi-material regions and coherent path control are achieved.
It improves the path generation efficiency and pattern printing accuracy of continuous switching food 3D printing, ensuring stable deposition and accurate pattern reproduction of food materials during rapid switching of the same nozzle, and enhancing the overall performance of complex model manufacturing and high-throughput production.
Smart Images

Figure CN121128942A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food 3D printing technology, and in particular to a method and system for high-throughput continuous switching food 3D printing. Background Technology
[0002] As people's demands for personalized food nutrition and customized appearance continue to increase, food 3D printing, with its advantages in raw material pre-fabrication stability, extrusion precision control, and equipment integration, is gradually becoming an important technological route for promoting digital food production. In this process, the concept of high-throughput food 3D printing has gained attention: it not only requires the ability to quickly and continuously output finished products, but also demands that efficiency be ensured while maintaining precision in complex structures and multi-material combinations, thereby truly realizing large-scale personalized food manufacturing.
[0003] Multi-material food 3D printing has garnered particular attention, as it allows for the precise combination or fusion of different food pastes within a single printed food item, creating richer nutrition and unique shapes. Continuous switching printing is an advanced method for achieving multi-material printing: it gathers multiple food pastes into a single nozzle and uses rapid control to seamlessly switch between extruding different ingredients at the same nozzle. This not only avoids the inefficiencies caused by pauses and position adjustments during multi-nozzle switching but also improves the continuity of the printing process, contributing to the formation of clearer and more complex patterns.
[0004] However, existing continuous switching printing systems still have shortcomings. They lack specialized 3D model slicing and path generation strategies for multi-material food, resulting in discontinuous printing paths, inaccurate material distribution, and patterns that are prone to deformation. Most existing image slicing methods rely on manual annotation or simple partitioning, making it difficult to accurately handle multi-material areas in complex patterns. At the same time, process parameters also need optimization: residual slurry in the nozzle can affect the subsequent deposition of food ingredients, causing blurred or misaligned pattern edges.
[0005] Food printing materials possess unique rheological properties, such as the gelation behavior of protein slurries, the gelatinization characteristics of starch slurries, and the thermosensitivity and shear thinning tendency of polysaccharide hydrogels. These properties are both the foundation for successful food 3D printing and the challenge of continuous switching printing. During multi-material switching, the viscosity and curing rate of different slurries vary significantly, easily leading to problems such as unclear material boundaries, uneven extrusion, and residual contamination. For high-throughput printing, these problems are further amplified, making it difficult to balance efficiency and quality. Summary of the Invention
[0006] To address the aforementioned issues, this invention provides a method and system for high-throughput continuous switching food 3D printing, which can improve the path generation efficiency and pattern printing accuracy of continuous switching food 3D printing.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] In a first aspect, the present invention provides a method for high-throughput continuous switching food 3D printing, comprising the following steps:
[0009] S1. Select the 3D model of the printing target, slice the 3D model of the printing target along the Z-axis and generate multi-layer printing images;
[0010] S2. Convert the multi-layer printed image generated by slicing into a material information matrix based on grayscale threshold;
[0011] S3. Set printing parameters, and optimize the material switching advance distance and material switching speed according to material properties. Generate continuous switching food 3D printing G-code control instructions based on the material information matrix.
[0012] In one embodiment of the present invention, step S1, which involves slicing the 3D model of the printing target into layers and generating a multi-layer printing image, specifically includes:
[0013] The 3D model of the printing target is processed in layers to obtain the number of slices in the Z direction, the height of each slice is set, and a multi-layer ordered closed contour point set is generated. A multi-layer high-resolution printing image is generated based on the ordered closed contour point set.
[0014] The high-resolution printed image is scaled according to the size of the target product to generate a printed image suitable for continuous switching while ensuring image fidelity.
[0015] The scaled printed image is saved for image processing and generation of continuous switching food 3D printing G-code control instructions. The printed image can be saved as a lossless compressed or uncompressed image format.
[0016] In one embodiment of the present invention, generating a multi-layered ordered closed contour point set includes:
[0017] The target 3D model is printed using the standard 3D solid model file STL format. Triangular facet information is obtained by parsing the STL file for slicing. First, all triangular facets intersecting the current cutting plane are acquired. If a triangular facet intersects the slicing plane at two points, the coordinates of these intersection points are calculated and stored as a pair of endpoints. A point-to-point connection index table is constructed based on geometric adjacency to represent the connectable relationships between intersection points. Using this index table, starting from any unsorted intersection point, adjacent points are connected point by point according to the principle of contour segment direction continuity to construct a contour path. If multiple candidate points exist for the current connection point, the angle between each candidate point and the current path direction is calculated, and the connection direction with the smallest angle is prioritized. After generating a continuous sequence of contour points, a spatial inclusion judgment is performed on unconnected candidate points: if a candidate point is located outside the currently generated contour closed region, connection in that direction is excluded; if it is inside, connection is performed. Finally, sorting is completed to obtain an ordered closed contour point set.
[0018] The generation of multi-layer high-resolution printed images based on ordered closed contour point sets includes:
[0019] The ordered closed contour point set is magnified according to the required resolution, and the closed contour region is processed by image masking to generate a multi-layer high-resolution printed image.
[0020] In one embodiment of the present invention, step S2 specifically includes:
[0021] The generated printed image is subjected to a grayscale conversion operation to obtain a grayscale image, wherein the grayscale value of each pixel in the printed image is between 0 and 255; the grayscale image is processed based on a set grayscale threshold, and multiple grayscale thresholds are set according to the material type. The pixel values of the printed image are divided into multiple regions by the grayscale thresholds, which correspond to the material type, generate a material information matrix, are used for multi-material extrusion control strategies, and generate continuous switching food 3D printing G-code control instructions.
[0022] In one embodiment of the present invention, step S3 specifically includes:
[0023] S3.1 Set the motion direction of the printed image, parse the generated material information matrix row by row or column by column according to the set direction, and complete the parsing of the material information matrix according to the Z-shaped motion trajectory to improve printing efficiency;
[0024] S3.2 Set single pixel distance: Based on the material information matrix and the actual size of the sample, set the actual printing distance value corresponding to a single element in the material information matrix;
[0025] S3.3, Set line spacing and floor height;
[0026] S3.4 Set the printing speed. Based on the material flow characteristics and food printing requirements, set the basic printing speed parameters as the default nozzle movement speed during the printing path execution.
[0027] S3.5 Set the material switching advance distance. At the material switching point, switch materials in advance according to the set material switching advance distance.
[0028] S3.6 Material switching speed optimization: At the material switching point, set the distance and speed curve of each speed segment to complete the printing parameter configuration.
[0029] In one embodiment of the present invention, the step S3.1 of parsing the generated material information matrix row by row or column by column according to a set direction includes two modes: horizontal scanning and vertical scanning. The printing path generated by horizontal scanning is to print one row of pixels of the image, with the moving direction being the positive X-axis. After printing one row of pixels, the Y-axis direction moves to the printing position of the next row in a stepping manner, and the next row of pixels is printed along the negative X-axis. The printing path generated by vertical scanning is to print one column of pixels of the image, with the moving direction being the positive Y-axis. After printing one column of pixels, the X-axis direction moves to the printing position of the next column in a stepping manner, and the next column of pixels is printed along the negative Y-axis.
[0030] The material switching advance distance in step S3.5 is adjusted according to the material properties, needle height, and the diameter and length of the continuous switching nozzle.
[0031] The material switching speed optimization in step S3.6 is adjusted according to the physicochemical properties of the printing material, including the material's viscosity, flowability, solidification rate, thermal response characteristics, and interfacial compatibility.
[0032] The material switching speed optimization in step S3.6 addresses the case where the viscosities of the two slurries differ significantly. The cross-sectional area of the printed lines is calculated as follows:
[0033]
[0034] In the formula, Q (t) To squeeze out instantaneous flow, V (t) For printing speed, the cross-sectional area of the printed lines is positively correlated with the instantaneous extrusion flow rate, that is, positively correlated with the extrusion air pressure and negatively correlated with the printing speed;
[0035] At a fixed printing speed, if the cross-sectional area of the printed line is consistent, that is, the width of all printed lines is w, the extrusion air pressure of the high-viscosity slurry is relatively large, while the extrusion air pressure of the low-viscosity slurry is relatively small. Therefore, when switching from a high-viscosity slurry to a low-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the low-viscosity slurry. Since a part of the high-viscosity slurry remains in the nozzle, the extrusion air pressure is small at this time, the printing speed remains unchanged, and the width of the printed line is w1, where w1 < w. When switching from a low-viscosity slurry to a high-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the high-viscosity slurry. Since a part of the low-viscosity slurry remains in the nozzle, the extrusion air pressure is large at this time, the printing speed remains unchanged, and the width of the printed line is w2, where w2 > w. The inconsistency of the line width caused by the switching of different viscosity slurries will affect the accuracy of the printed product. Therefore, when switching from a high-viscosity slurry to a low-viscosity slurry, the printing speed is reduced to ensure the consistency of the line width. When switching from a low-viscosity slurry to a high-viscosity slurry, the printing speed is increased to ensure the consistency of the line width.
[0036] In an embodiment of the present invention, the continuous switching food 3D printing G-code control instructions in the step S3 include G, X, Y, Z, V, and T parameters, and the definitions of each parameter are as follows:
[0037] The G parameter is used to control the extrusion state of the printing nozzle, and the value 0 or 1 is followed: G0 indicates that the printing nozzle moves without extruding materials, and G1 indicates that the nozzle extrudes materials.
[0038] The X, Y, and Z parameters are motion coordinate information, and the motion coordinate values are followed, indicating the motion target point of the current motion segment.
[0039] The V parameter is the moving speed of the current motion segment, and the motion speed value is followed.
[0040] The T parameter is used to identify the current extruded material, and the digital number is followed to distinguish different material types.
[0041] In a second aspect, the present invention provides a high-throughput continuous switching food 3D printing system, which uses the method described above, including:
[0042] A print image generation module, which is used to select a printing target three-dimensional model, perform layer slicing on the printing target three-dimensional model in the Z-axis direction, and generate multiple layers of print images.
[0043] A print image conversion module, which is used to convert the multiple layers of print images generated by slicing into a material information matrix based on a gray threshold.
[0044] A print parameter setting module, which is used to set print parameters, set the material switching advance distance and optimize the variable speed of the material switching segment according to the material physical properties, and generate continuous switching food 3D printing G-code control instructions based on the material information matrix.
[0045] Thirdly, the present invention provides a computer-readable storage medium storing computer instructions which are executed by a processor to describe the method.
[0046] Fourthly, the present invention provides a computer program product, the computer program product storing computer instructions, the computer instructions being executed by a processor to describe the method.
[0047] The beneficial effects achieved by this invention are as follows:
[0048] This invention provides a method and system for high-throughput, continuous switching food 3D printing. This method leverages the rheological properties of food materials to achieve precise segmentation and path continuity control across multiple material regions. This ensures pattern fidelity while meeting the demands of high-throughput printing, enabling stable deposition and accurate pattern reproduction of food materials during rapid switching within the same printhead. This not only enhances the overall performance of food 3D printing in complex model manufacturing and high-throughput production but also provides strong support for the digital, flexible, and intelligent upgrading of the food manufacturing industry. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the drawings without creative effort.
[0050] Figure 1 This is a schematic diagram illustrating the generation of a high-resolution printed image from multi-layer slicing of the three-dimensional model of the present invention.
[0051] Figure 2 This is a schematic diagram of high-resolution printed image scaling according to the present invention.
[0052] Figure 3 This is a schematic diagram illustrating the generation of an image binarization array for the printing image binarization process of the present invention.
[0053] Figure 4 This is a schematic diagram illustrating the material switching process in advance according to the present invention.
[0054] Figure 5 This is a schematic diagram of the material switching speed optimization of the present invention.
[0055] Figure 6 This is a schematic diagram of the actual printing process of the present invention. Detailed Implementation
[0056] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the invention, are intended to cover non-exclusive inclusion.
[0058] In the description of the embodiments of this invention, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this invention, "multiple" means two or more, unless otherwise explicitly defined.
[0059] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least some embodiments of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0060] In the description of the embodiments of this invention, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0061] Example 1
[0062] This embodiment provides a method for high-throughput continuous switching food 3D printing, including the following steps:
[0063] S1. Select the 3D model of the printing target, slice the 3D model of the printing target along the Z-axis and generate multi-layer printing images;
[0064] S2. Convert the multi-layer printed image generated by slicing into a material information matrix based on grayscale threshold;
[0065] S3. Set printing parameters, and optimize the material switching advance distance and material switching speed according to material properties. Generate continuous switching food 3D printing G-code control instructions based on the material information matrix.
[0066] Furthermore, step S1, which involves slicing the target 3D model into layers and generating multi-layered printed images, specifically includes:
[0067] The 3D model of the printing target is processed in layers to obtain the number of slice layers in the Z direction, set the slice height of each layer, generate a multi-layer ordered closed contour point set, and generate a multi-layer high-resolution printing image based on the ordered closed contour point set; the high-resolution printing image can preserve the slice structure of the 3D model of the printing target relatively completely.
[0068] The high-resolution printed image is scaled according to the size of the target product to generate a printed image suitable for continuous switching while ensuring image fidelity.
[0069] The scaled printed image is saved for image processing and generation of continuous switching food 3D printing G-code control instructions. The printed image can be saved as a lossless compressed or uncompressed image format.
[0070] Furthermore, the generation of the multi-layered ordered closed contour point set includes:
[0071] The target 3D model is printed using the standard 3D solid model file STL format. Triangular facet information is obtained by parsing the STL file for slicing. First, all triangular facets intersecting the current cutting plane are acquired. If a triangular facet intersects the slicing plane at two points, the coordinates of these intersection points are calculated and stored as a pair of endpoints. A point-to-point connection index table is constructed based on geometric adjacency to represent the connectable relationships between intersection points. Using this index table, starting from any unsorted intersection point, adjacent points are connected point by point according to the principle of contour segment direction continuity to construct a contour path. If multiple candidate points exist for the current connection point, the angle between each candidate point and the current path direction is calculated, and the connection direction with the smallest angle is prioritized. After generating a continuous sequence of contour points, a spatial inclusion judgment is performed on unconnected candidate points: if a candidate point is located outside the currently generated contour closed region, connection in that direction is excluded; if it is inside, connection is performed. Finally, sorting is completed to obtain an ordered closed contour point set.
[0072] The generation of multi-layer high-resolution printed images based on ordered closed contour point sets includes:
[0073] The ordered closed contour point set is magnified according to the required resolution, and the poly2mask algorithm is used to perform image masking on the closed contour region to generate a multi-layer high-resolution printed image.
[0074] The scaling process employs the Lanczos3 resampling interpolation algorithm to reduce the details lost during image scaling.
[0075] Further, step S2 specifically includes:
[0076] The generated printed image is subjected to a grayscale conversion operation to obtain a grayscale image, wherein the grayscale value of each pixel in the printed image is between 0 and 255; the grayscale image is processed based on a set grayscale threshold, and multiple grayscale thresholds are set according to the material type. The pixel values of the printed image are divided into multiple regions by the grayscale thresholds, which correspond to the material type, generate a material information matrix, are used for multi-material extrusion control strategies, and generate continuous switching food 3D printing G-code control instructions.
[0077] Furthermore, step S3 specifically includes:
[0078] S3.1 Set the motion direction of the printed image, parse the generated material information matrix row by row or column by column according to the set direction (horizontal or vertical), and complete the parsing of the material information matrix according to the Z-shaped motion trajectory to improve printing efficiency;
[0079] S3.2 Set single pixel distance: Based on the material information matrix and the actual size of the sample, set the actual printing distance value corresponding to a single element in the material information matrix;
[0080] S3.3, Set line spacing and floor height;
[0081] S3.4 Set the printing speed. Based on the material flow characteristics and food printing requirements, set the basic printing speed parameters as the default nozzle movement speed during the printing path execution.
[0082] S3.5 Set the material switching advance distance. At the material switching point, switch materials in advance according to the set material switching advance distance.
[0083] S3.6 Material switching speed optimization: At the material switching point, set the distance and speed curve of each speed segment to complete the printing parameter configuration.
[0084] Among them, when optimizing the material switching distance and material switching speed, it is necessary to ensure that different types of materials are accurately deposited at the designated positions to ensure the fidelity of the printed 3D model.
[0085] Furthermore, the step S3.1 of parsing the generated material information matrix row by row or column by column according to a set direction includes two modes: horizontal scanning and vertical scanning. The printing path generated by horizontal scanning is to print one row of pixels of the image, with the movement direction being the positive X-axis. After printing one row of pixels, the Y-axis direction moves to the printing position of the next row in a stepping manner, and the next row of pixels is printed along the negative X-axis. The printing path generated by vertical scanning is to print one column of pixels of the image, with the movement direction being the positive Y-axis. After printing one column of pixels, the X-axis direction moves to the printing position of the next column in a stepping manner, and the next column of pixels is printed along the negative Y-axis.
[0086] Furthermore, the material switching advance distance in step S3.5 is adjusted according to the material properties, needle height, and the diameter and length of the continuous switching nozzle.
[0087] Furthermore, the material switching speed optimization in step S3.6 is adjusted according to the physicochemical properties of the printing material, including but not limited to the material's viscosity, flowability, solidification rate, thermal response characteristics, and interfacial compatibility.
[0088] Furthermore, the material switching speed optimization in step S3.6 addresses the case where the viscosities of the two slurries differ significantly. The cross-sectional area of the printed lines is calculated as follows:
[0089]
[0090] In the formula, Q (t) To squeeze out instantaneous flow, V (t) For printing speed, the cross-sectional area of the printed lines is positively correlated with the instantaneous extrusion flow rate, that is, positively correlated with the extrusion air pressure and negatively correlated with the printing speed;
[0091] At a fixed printing speed, if the cross-sectional area of the printed line is consistent, that is, the width of the printed line is all w, the extrusion air pressure of the high-viscosity slurry is larger, and the extrusion air pressure of the low-viscosity slurry is smaller; so when switching from high-viscosity slurry to low-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the low-viscosity. Since there will be a part of the high-viscosity slurry remaining inside the nozzle, at this time the extrusion air pressure is smaller, the printing speed remains unchanged, and the width of the printed line is w1, where w1 < w at this time. When switching from low-viscosity slurry to high-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the high-viscosity. Since there will be a part of the low-viscosity slurry remaining inside the nozzle, at this time the extrusion air pressure is larger, the printing speed remains unchanged, and the width of the printed line is w2, where w2 > w at this time; the inconsistency of the line width caused by the switching of different-viscosity slurries will affect the accuracy of the printed product. Therefore, when switching from high-viscosity slurry to low-viscosity slurry, the printing speed is reduced to ensure the consistency of the line width, and when switching from low-viscosity slurry to high-viscosity slurry, the printing speed is increased to ensure the consistency of the line width.
[0092] Further, the continuous switching food 3D printing G-code control instructions in step S3 include G, X, Y, Z, V, and T parameters, and the definitions of each parameter are as follows:
[0093] The G parameter is used to control the extrusion state of the printing nozzle, and the value 0 or 1 is followed: G0 means the printing nozzle moves without extruding materials, and G1 means the nozzle extrudes materials;
[0094] The X, Y, and Z parameters are motion coordinate information, and the motion coordinate values are followed, indicating the motion target point of the current motion segment. The unit of the coordinate value is millimeter (mm) or the user-defined unit;
[0095] The V parameter is the moving speed of the current motion segment, and the motion speed value is followed, with the unit of millimeter per second (mm / s) or the user-defined unit;
[0096] The T parameter is used to identify the current extruded material, and the digital number is followed to distinguish different material types; for example, T0 means printing with material A, and T1 means printing with material B; by setting the T value, continuous switching control of multiple materials can be achieved.
[0097] Further, a single line of the G-code control instruction includes the above parameter information, representing a motion segment and the extrusion state, moving speed, and extruded material of the printing nozzle on the motion segment, which can accurately control the moving speed and extruded material during the printing process and ensure the accurate deposition of multiple materials; multiple lines of the G-code control instruction constitute a complete G-code control instruction set to complete the printing of the target three-dimensional model.
[0098] Example 2
[0099] This embodiment provides a high-throughput continuous switching food 3D printing system, using the aforementioned high-throughput continuous switching food 3D printing method, including:
[0100] The print image generation module is used to select the 3D model of the print target, slice the 3D model of the print target in layers according to the Z-axis direction, and generate multi-layer print images.
[0101] The print image conversion module is used to convert multi-layer print images generated from slices into a material information matrix based on a grayscale threshold.
[0102] The printing parameter setting module is used to set printing parameters, and to set the material switching advance distance and material switching speed optimization according to material properties. It generates continuous switching food 3D printing G-code control instructions based on the material information matrix.
[0103] Example 3
[0104] like Figure 1 and Figure 2 As shown, this embodiment provides a method for generating continuous food 3D printing images by slicing a 3D model, including image scaling and image parsing into a material information matrix.
[0105] In this embodiment, the 3D model is in STL format, with a length of 35mm, a width of 47mm, a height of 4mm, a slice height of 0.5mm, and 9 slice layers. Triangular facet information is obtained by parsing the STL file for slicing processing.
[0106] In this embodiment, firstly, all triangular faces intersecting the current cutting plane are obtained. If a triangular face has two intersection points with the cutting plane, the coordinates of the intersection points are calculated and stored as a pair of endpoints. A point-to-point connection index table is constructed based on geometric adjacency to represent the connectable relationships between each intersection point. Using the point-to-point connection index table, starting from any unsorted intersection point, adjacent points are connected point by point according to the principle of continuity of contour segment direction to construct a contour path. If there are multiple candidate points for the current connection point, the angle between each candidate point and the current path direction is calculated, and the connection direction with the smallest angle is selected first. After generating a continuous sequence of contour points, a spatial inclusion judgment is performed on the unconnected candidate points: if the candidate point is located outside the currently generated contour closed area, the connection in that direction is excluded; if it is inside, the connection is performed. Finally, sorting is completed to obtain an ordered closed contour point set.
[0107] In this embodiment, a high-resolution printed image is generated based on the obtained ordered closed contour point set, and the resolution of the high-resolution printed image is set to 1000×1000. The ordered closed contour point set is enlarged according to the required resolution, and the closed contour region is processed by the poly2mask algorithm to generate a high-resolution printed image.
[0108] In this embodiment, the obtained high-resolution print image needs to be scaled to generate a print image. The scaled image has a resolution of 50×50, and the scaling uses the Lanczos3 resampling interpolation algorithm to reduce the details lost during image scaling. Compared with directly slicing to generate a 50×50 print image, generating a high-resolution print image first and then scaling it can effectively increase the image fidelity, preserve the details of the printed 3D model, and improve the fidelity of the printed product.
[0109] In this embodiment, the grayscale value of each pixel in the generated printed image is between 0 and 255. The grayscale image is processed based on a grayscale threshold. In this embodiment, two types of printing materials are used. The image is binarized, and a grayscale threshold is set to 1. Pixels with grayscale values lower than the grayscale threshold are assigned a value of 0, which is identified as material A extrusion. Pixels with grayscale values higher than or equal to the grayscale threshold are assigned a value of 1, which is identified as material B extrusion. A corresponding material information matrix is generated based on the binarized image to generate a continuously switching food 3D printing path.
[0110] Example 4
[0111] like Figures 3 to 5 As shown, this embodiment provides a method for generating a printing image from 3D model slices and then generating a material information matrix through analysis. A continuous food 3D printing path is generated by setting corresponding printing parameters, including the material information matrix analysis direction, single pixel distance, line spacing, printing speed, material advance switching distance, and material switching speed optimization.
[0112] In this embodiment, the material information matrix is parsed according to a Z-shaped motion trajectory. There are two modes for parsing the material information matrix: horizontal scanning and vertical scanning. The printing path generated by horizontal scanning is to print one row of pixels of the image, with the movement direction being the positive X-axis. After printing one row of pixels, the Y-axis direction moves to the printing position of the next row by stepping. The next row of pixels is printed along the negative X-axis. The printing path generated by vertical scanning is to print one column of pixels of the image, with the movement direction being the positive Y-axis. After printing one column of pixels, the X-axis direction moves to the printing position of the next column by stepping. The next column of pixels is printed along the negative Y-axis.
[0113] In this embodiment, the single pixel distance is the actual size corresponding to a single element in the material information matrix, and is generally set to be consistent with the nozzle inner diameter setting. In this embodiment, the printed image pixel is 50×50, the single pixel distance is 1mm, and the actual size of the printed product is 50×50mm; the line spacing is the distance between printed lines, and is generally set to be consistent with the single pixel distance setting. The path X, Y, and Z values are determined based on the single-pixel distance, line spacing, and number of pixels. Specifically, the image is horizontally parsed, the single-pixel distance is 1mm, the line spacing is 1mm, the printed image is the first layer of a slice, and Z is 0mm. Therefore, the path code generated for the first row of pixels has X, Y, and Z parameter values of 50, 0, and 0. Jumping to the second row of pixels, the path code generated has X, Y, and Z parameter values of 50, 1, and 0. The path code generated for the second row of pixels has X, Y, and Z parameter values of 0, 1, and 0. Furthermore, the current pixel value is obtained based on the image's binarized array. If it is 0, material A is extruded; if it is 1, material B is extruded. The extruded slurry type is stored in parameter T, stored in either T0 or T1 format.
[0114] In this embodiment, the layer height is the height of each printed food product, and the total height of the printed product is the layer height × the number of slices. Specifically, if the layer height is set to 1mm, then the Z value of the first layer is 0mm, the Z value of the second layer is 1mm, and so on.
[0115] In this embodiment, the printing speed is determined by the extrusion performance of the food slurry and is related to the actual extrusion air pressure. After the printing speed is set, it is stored in the path file as a V parameter followed by a numerical value (e.g., V10). The printing speed is determined by reading the value following the V parameter. This customizable printing speed can be used to print different parts of food products at different speeds, improving both the accuracy (fidelity) of the printed shape and the overall printing efficiency. In this embodiment, the printing speed is set to 10 mm / s.
[0116] In this embodiment, if the nozzle channel inside the printhead retains the previous food slurry, and no treatment is taken, the other food slurry will not be accurately deposited at the designated position, reducing the fidelity of the printed image.
[0117] Therefore, when switching food slurry, the extrusion of the other slurry must be started in advance, i.e., advance slurry switching is required. This advance extrusion distance (called the material switching advance distance) is related to the nozzle diameter, nozzle length, and needle height. Specifically, if the material switching advance distance is 2mm and the single pixel distance is 1mm, then the switching needs to be performed 2 pixels in advance when the pixel value changes, thus achieving advance material extrusion.
[0118] In this embodiment, the material speed change optimization is aimed at the situation where the viscosity difference between two slurries is large. The cross-sectional area of the printed line is calculated as follows:
[0119]
[0120] In the formula, Q (t) is the instantaneous extrusion flow rate, V (t) is the printing speed. The cross-sectional area of the printed line is positively correlated with the instantaneous extrusion flow rate, that is, positively correlated with the extrusion air pressure and negatively correlated with the printing speed;
[0121] Specifically, at a fixed printing speed, if the cross-sectional areas of the printed lines are the same, that is, the widths of the printed lines are all w, then the extrusion air pressure of the high-viscosity slurry is larger, and the extrusion air pressure of the low-viscosity slurry is smaller; so when switching from a high-viscosity slurry to a low-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the low-viscosity slurry. Since there will be a part of the high-viscosity slurry remaining inside the nozzle, the extrusion air pressure is smaller at this time, the printing speed remains unchanged, and the width of the printed line is w1, where w1 < w at this time. When switching from a low-viscosity slurry to a high-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the high-viscosity slurry. Since there will be a part of the low-viscosity slurry remaining inside the nozzle, the extrusion air pressure is larger at this time, the printing speed remains unchanged, and the width of the printed line is w2, where w2 > w at this time. This inconsistency in line width caused by the switching of different viscosity slurries will affect the accuracy of the printed product. Therefore, when switching from a high-viscosity slurry to a low-viscosity slurry, the printing speed can be reduced to ensure the consistency of the line width. When switching from a low-viscosity slurry to a high-viscosity slurry, the printing speed can be increased to ensure the consistency of the line width.
[0122] In this embodiment, the speed change optimization is achieved by setting the speed change distance and speed from high viscosity to low viscosity, and the speed change distance and speed from low viscosity to high viscosity to ensure the consistency of the printed line width; specifically, when the single-pixel distance is 1 mm, the printing speed is 10 mm / s, the speed change distance from high viscosity to low viscosity is 2 mm, and the speed is 5 mm / s, at the material switching point, the V parameter value is set to 5 mm / s, and the moving distance is 2 mm, that is, two pixels. After two pixels, the V parameter value is set to 10 mm / s.
[0123] In this embodiment, after completing the above parameter settings, a continuously switching food 3D printing path can be automatically generated. Specifically, the printing path G-code commands are as follows: "G1 X10.5 Y2 V10 T1" (moves straight from the current position to X=10.5, Y=2, using material B, extrusion speed of V=10mm / s, indicating that extrusion printing is in progress), "G1 X13.5 Y2 V10T0" (moves to X=13.5, Y=2, using material A, extrusion speed still 10mm / s), "G1 X32.5 Y2 V10 T1" (continues to move straight, switching back to using material B), "G1 X35.5 Y2 V10 T0" (switches to material A), "G1 X50 Y2V10 T1" (prints again using material B, moves to X=50), "G1 X50 Y3 V10 T1" (moves from X=50, Y=2 to X=50, Y=3, moves 1mm vertically, still using material B).
[0124] In this embodiment, a printed product effect image based on a high-throughput continuous switching food 3D printing method is provided; this embodiment uses chicken breast with 90% moisture (white and blue) as the printing material, and uses food-grade pigments to color the printing material;
[0125] like Figure 6 As shown, the impact of advance material switching distance on print image fidelity was verified using chicken breast (90% moisture content) food paste. Without setting a material switching advance, residual food paste in the printhead prevented the other food paste from accurately depositing at the target position, resulting in material deposition misalignment, pattern misalignment, blurred edges, and decreased print image fidelity. After setting a material switching advance of 2mm, the other food paste was extruded 2mm in advance at the point where material switching was needed. This ensured that the other food paste began accurate deposition precisely when the printhead moved to the target position. Premature material switching at the switching point successfully eliminated food paste deposition deviation and guaranteed print image fidelity.
[0126] In some embodiments, the present invention provides a computer-readable storage medium storing computer instructions that are executed by a processor as described in any of the above embodiments, for a high-throughput continuous switching food 3D printing method.
[0127] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not an exhaustive list) of readable storage media may include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0129] Embodiments of the present invention may also be computer program products, comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in a high-throughput continuous switching food 3D printing method according to various embodiments of the present invention as described in the "Exemplary Methods" section above.
[0130] The steps of the method of the present invention are not limited to the specific order described above, unless otherwise specifically stated. Furthermore, in some embodiments, the invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the method according to the invention. Therefore, the invention also covers recording media storing programs for performing the method according to the invention.
[0131] Although the invention has been described with reference to preferred embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, the technical features mentioned in the various embodiments can be combined in any manner as long as there is no structural conflict. The invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for high-throughput continuous switching food 3D printing, characterized in that, Includes the following steps: S1. Select the 3D model of the printing target, slice the 3D model of the printing target along the Z-axis and generate multi-layer printing images; S2. Convert the multi-layer printed image generated by slicing into a material information matrix based on grayscale threshold; S3. Set printing parameters, and optimize the material switching advance distance and material switching speed according to material properties. Generate continuous switching food 3D printing G-code control instructions based on the material information matrix.
2. The method for high-throughput continuous switching food 3D printing according to claim 1, characterized in that, Step S1, which involves slicing the 3D model of the printing target into layers and generating multi-layer printing images, specifically includes: The 3D model of the printing target is processed in layers to obtain the number of slices in the Z direction, the height of each slice is set, and a multi-layer ordered closed contour point set is generated. A multi-layer high-resolution printing image is generated based on the ordered closed contour point set. The high-resolution printed image is scaled according to the size of the target product to generate a printed image suitable for continuous switching while ensuring image fidelity. The scaled printed image is saved for image processing and to generate continuous switching food 3D printing G-code control instructions. The printed image can be saved as a lossless compressed or uncompressed image format.
3. The method for high-throughput continuous switching food 3D printing according to claim 2, characterized in that, The generation of the multi-layer ordered closed contour point set includes: The target 3D model is printed using the standard 3D solid model file STL format. Triangular facet information is obtained by parsing the STL file for slicing. First, all triangular facets intersecting the current cutting plane are acquired. If a triangular facet intersects the slicing plane at two points, the coordinates of these intersection points are calculated and stored as a pair of endpoints. A point-to-point connection index table is constructed based on geometric adjacency to represent the connectable relationships between intersection points. Using this index table, starting from any unsorted intersection point, adjacent points are connected point by point according to the principle of contour segment direction continuity to construct a contour path. If multiple candidate points exist for the current connection point, the angle between each candidate point and the current path direction is calculated, and the connection direction with the smallest angle is prioritized. After generating a continuous sequence of contour points, a spatial inclusion judgment is performed on unconnected candidate points: if a candidate point is located outside the currently generated contour closed region, connection in that direction is excluded; if it is inside, connection is performed. Finally, sorting is completed to obtain an ordered closed contour point set. The generation of multi-layer high-resolution printed images based on ordered closed contour point sets includes: The ordered closed contour point set is magnified according to the required resolution, and the closed contour region is processed by image masking to generate a multi-layer high-resolution printed image.
4. A method for high-throughput continuous switching food 3D printing according to claim 3, characterized in that, Step S2 specifically includes: The generated printed image is subjected to a grayscale conversion operation to obtain a grayscale image, wherein the grayscale value of each pixel in the printed image is between 0 and 255; the grayscale image is processed based on a set grayscale threshold, and multiple grayscale thresholds are set according to the material type. The pixel values of the printed image are divided into multiple regions by the grayscale thresholds, which correspond to the material type, generate a material information matrix, are used for multi-material extrusion control strategies, and generate continuous switching food 3D printing G-code control instructions.
5. A method for high-throughput continuous switching food 3D printing according to claim 4, characterized in that, Step S3 specifically includes: S3.1 Set the motion direction of the printed image, parse the generated material information matrix row by row or column by column according to the set direction, and complete the parsing of the material information matrix according to the Z-shaped motion trajectory to improve printing efficiency; S3.2 Set single pixel distance: Based on the material information matrix and the actual size of the sample, set the actual printing distance value corresponding to a single element in the material information matrix; S3.3, Set line spacing and floor height; S3.4 Set the printing speed. Based on the material flow characteristics and food printing requirements, set the basic printing speed parameters as the default nozzle movement speed during the printing path execution. S3.5 Set the material switching advance distance. At the material switching point, switch materials in advance according to the set material switching advance distance. S3.6 Material switching speed optimization: At the material switching point, set the distance and speed curve of each speed segment to complete the printing parameter configuration.
6. A method for high-throughput continuous switching food 3D printing according to claim 5, characterized in that, The step S3.1 of parsing the generated material information matrix row by row or column by column according to a set direction includes two modes: horizontal scanning and vertical scanning. The printing path generated by horizontal scanning is to print one row of pixels of the image, with the movement direction being the positive X-axis. After printing one row of pixels, the Y-axis direction moves to the printing position of the next row in a stepping manner. The next row of pixels is printed along the negative X-axis. The printing path generated by vertical scanning is to print one column of pixels of the image, with the movement direction being the positive Y-axis. After printing one column of pixels, the X-axis direction moves to the printing position of the next column in a stepping manner. The next column of pixels is printed along the negative Y-axis. The material switching advance distance in step S3.5 is adjusted according to the material properties, needle height, and the diameter and length of the continuous switching nozzle. The material switching speed optimization in step S3.6 is adjusted according to the physicochemical properties of the printing material, including the material's viscosity, flowability, solidification rate, thermal response characteristics, and interfacial compatibility. The material switching speed optimization in step S3.6 addresses the case where the viscosities of the two slurries differ significantly. The cross-sectional area of the printed lines is calculated as follows: In the formula, Q (t) To squeeze out instantaneous flow, V (t) For printing speed, the cross-sectional area of the printed lines is positively correlated with the instantaneous extrusion flow rate, that is, positively correlated with the extrusion air pressure and negatively correlated with the printing speed; At a fixed printing speed, if the cross-sectional area of the printed line is consistent, that is, the width of all printed lines is w, the extrusion air pressure of the high-viscosity slurry is relatively large, while that of the low-viscosity slurry is relatively small. Therefore, when switching from a high-viscosity slurry to a low-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the low-viscosity slurry. Since a part of the high-viscosity slurry remains in the nozzle, the extrusion air pressure is small at this time, the printing speed remains unchanged, and the width of the printed line is w1, where w1 < w. When switching from a low-viscosity slurry to a high-viscosity slurry, the extrusion air pressure becomes the extrusion air pressure of the high-viscosity slurry. Since a part of the low-viscosity slurry remains in the nozzle, the extrusion air pressure is large at this time, the printing speed remains unchanged, and the width of the printed line is w2, where w2 > w. The inconsistency of the line width caused by the switching of different viscosity slurries will affect the accuracy of the printed product. Therefore, when switching from a high-viscosity slurry to a low-viscosity slurry, the printing speed is reduced to ensure the consistency of the line width. When switching from a low-viscosity slurry to a high-viscosity slurry, the printing speed is increased to ensure the consistency of the line width.
7. A high-throughput continuous-switching food 3D printing method according to claim 6, characterized in that The continuous-switching food 3D printing G-code control instruction in step S3 includes G, X, Y, Z, V, and T parameters, and the definitions of each parameter are as follows: The G parameter is used to control the extrusion state of the printing nozzle, followed by the value 0 or 1: G0 indicates that the printing nozzle moves without extruding materials, and G1 indicates that the nozzle extrudes materials. The X, Y, and Z parameters are motion coordinate information, followed by the motion coordinate values, indicating the motion target point of the current motion segment. The V parameter is the moving speed of the current motion segment, followed by the motion speed value.
8. A high-throughput, continuous-change food 3D printing system, characterized in that, The T parameter is used to identify the current extruded material, followed by a digital number to distinguish different material types. Using the method according to any one of claims 1 to 7, including: A print image generation module for selecting a target 3D model for printing, slicing the target 3D model in the Z-axis direction to generate multiple layers of print images; A print image conversion module for converting the multiple layers of print images generated by slicing into a material information matrix based on a gray threshold; 9. A computer-readable storage medium, characterized in that, A print parameter setting module for setting print parameters, setting the material switching advance distance and optimizing the variable speed of the material switching segment according to the material physical properties, and generating a continuous-switching food 3D printing G-code control instruction based on the material information matrix.
10. A computer program product, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are executed by a processor to perform the method according to any one of claims 1 to 7. The computer program product stores computer instructions, and the computer instructions are executed by a processor to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Slice and supporting point acquisition method of complex anisotropic body parameterized model
CN109571961A
Printing control method and system for multi-material single-nozzle printer
CN117207531A
High-throughput continuous switching food 3D printing equipment and printing method
CN119679185A
Method and apparatus for three dimensional printing
US20180015668A1
Cited By
Continuous switching 3D printing-based method for regulating and controlling quality and structure attributes of animal source system
CN121926332A
