A 3D printing slicing method based on two-dimensional images

Through the 3D printing slicing method based on two-dimensional images, the problems of low contour filling efficiency and Gcode commands in the prior art are solved, and the efficiency of inkjet 3D printing and image edge quality are improved.

CN114953466BActive Publication Date: 2024-11-12HARBIN UNIV OF SCI & TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202210548543.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2024-11-12
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

In the existing 3D printing slice methods, the contour line filling efficiency is low, and the Gcode command is not suitable for inkjet 3D printing.

Method used

Using a 3D printing slicing method based on two-dimensional images, the two-dimensional slice outline information of each layer is obtained by scanning the 3D model, the scan line is used to fill the inside of the contour line, and the filled outline is stored as a two-dimensional image format. , adapt to the working principle of inkjet 3D printing.

Benefits of technology

The contour line filling rate is improved, adapted to the working principle of inkjet 3D printing, improved the edge jagging problem of two-dimensional image, and achieved a more efficient printing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114953466B_ABST
    Figure CN114953466B_ABST
Patent Text Reader

Abstract

The present invention provides a 3D printing slicing method based on two-dimensional images, which is applied to the field of 3D printing, and the method includes: step 1: selecting a 3D model file to be printed; step 2: scanning the selected 3D model file and reconstructing the model; step 3 slicing the reconstructed model to obtain the two-dimensional slice contour information of each layer of the model; step 4: scanning each layer of contour data, and using the scan line to fill the inside of the contour line; step 5: storing the filled two-dimensional contour line as a two-dimensional image format; step 6: transmitting each layer of the filled slice image to the 3D printer, and the printer prints the image layer by layer. The slicing method provided by the present invention can quickly fill the slice contour line, has high filling efficiency, improves the slicing rate, and the generated two-dimensional slice image is more suitable for the working principle of the inkjet 3D printer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of 3D printing, and in particular to a 3D printing slicing method based on two-dimensional images. Background Art

[0002] 3D printing, also known as additive manufacturing, is a process that uses powdered materials or thermoplastic materials such as plastics to form parts or entities by gluing and printing layer by layer based on three-dimensional model data.

[0003] The working principle of inkjet 3D printing technology on the XOY plane is basically the same as that of ordinary 2D plane printing. The print head does not need to perform complex path movements according to Gcode commands. The existing slicing method uses complex printing paths to fill the tangent contour after slicing the model, and finally converts the printing path into Gcode. The contour filling efficiency is low, and the Gcode command is not suitable for inkjet 3D printing.

[0004] Therefore, it is necessary to provide a 3D printing slicing method based on two-dimensional images to solve the above technical problems. Summary of the invention

[0005] In view of the above problems, the present invention proposes a 3D printing slicing method based on two-dimensional images, which solves the problems that the contour filling efficiency is low and the Gcode command is not suitable for the inkjet 3D printing working mode.

[0006] In order to solve the above technical problems, the present invention provides a 3D printing slicing method based on a two-dimensional image, comprising the following steps:

[0007] Step 1: Select the 3D model file to be printed;

[0008] Step 2: Scan the selected 3D model file and reconstruct the model;

[0009] Step 3: Slice the reconstructed model to obtain the two-dimensional slice contour information of each layer of the model;

[0010] Step 4: Scan each layer of contour data and use the scan line to fill the inside of the contour line;

[0011] Step 5: Store the filled two-dimensional contour line as a two-dimensional image format;

[0012] Step 6: Send the slice image after each layer is filled to the 3D printer, and the printer prints the image layer by layer.

[0013] Furthermore, the 3D model file in step 1 is a STL type file.

[0014] Furthermore, the data scanned in step 2 are the coordinates of each point and each normal vector in the 3D model file, and triangular patches are established based on the points and normal vectors to reconstruct the model.

[0015] Furthermore, the slicing step in step 3 includes:

[0016] S1. Use the bounding box algorithm to obtain the minimum coordinate X of the model in the X-axis direction min and the maximum value coordinate X max , minimum coordinate Y in the Y-axis direction min and the maximum value coordinate Y max , Z axis minimum coordinate Z min and the maximum coordinate Z max , Z-axis coordinate of the center point of the bounding box Zcenter;

[0017] S2, determine an infinite plane based on the coordinates of the center point of the bounding box and the normal vector;

[0018] S3. Use the bounding box and normal vector to constrain the cutting plane and specify the range of intersection between the cutting plane and the model;

[0019] S4, constructing a plane intersection detector by cutting the plane;

[0020] S5. Obtain the contour line where the cutting plane in the plane intersection finder intersects the model.

[0021] Furthermore, the slicing direction is the Z axis direction, slicing starts from the lowest point of the model, the layer thickness is zoffset, and the number of layers = (Z max -Z min ) / zoffset, the layer number is n, the Z axis coordinate of the center point of the cutting plane is Zcenter=Z min + layer thickness*(layer number+1), the Z axis coordinate of the center point of the last layer cutting plane is Zcenter=Z max -0.0001.

[0022] Furthermore, the scan line filling contour line step in step 4 includes:

[0023] S1, traverse all contour lines where the cutting plane intersects the model;

[0024] S2. Create an image canvas, set the canvas size and canvas background color;

[0025] S3. Set brush width and brush color;

[0026] S4, turn on the anti-aliasing function;

[0027] S5, traverse the points constituting the closed contour line, and use a brush on the canvas to connect the points constituting the closed contour line;

[0028] S6. Draw a scan line perpendicular to the X axis, move the scan line in the positive direction of the X axis, set the moving step length, and the moving range is within the canvas length;

[0029] S7, record the intersection of the scan line and the contour line, and store the intersection in an intersection array;

[0030] S8, sorting the points in the intersection array according to the size of the Y axis;

[0031] S9. Traverse the intersection array and connect two adjacent points with the line segments drawn by the brush.

[0032] Furthermore, in step S3, the brush color determines the filling color, and the scanning line moving step determines the contour filling rate.

[0033] Furthermore, the two-dimensional image format in step 5 may be PNG, JPG, TIFF, BMP or the like.

[0034] Compared with the related art, the 3D printing slicing method based on two-dimensional images provided by the present invention has the following beneficial effects: using scanning lines with a line width of 1mm and a step length of 1mm to fully fill the inside of the contour line, thereby improving the contour line filling rate; the tangent contour of the model that is completely filled is converted into a PNG two-dimensional image format, which is adapted to the working principle of inkjet 3D printing; when drawing pictures, the anti-aliasing function is turned on, and the edge jagged problem of the two-dimensional image is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be further introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 It is a flow chart of a 3D printing slicing method based on two-dimensional images provided by the present invention.

[0037] Figure 2 It is a slicing flow chart provided by the present invention.

[0038] Figure 3 It is a flow chart of scanning line filling outline provided by the present invention.

[0039] Figure 4 It is the 3D model provided by the present invention.

[0040] Figure 5 It is a schematic diagram of the contour line of the 200th layer of the model slice of the present invention.

[0041] Figure 6It is a schematic diagram of contour filling of the 200th layer of the model of the present invention.

[0042] Figure 7 It is a schematic diagram of the contour filling of the 10th layer of the model of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] See also Figure 1 , Figure 2 and Figure 3 The present invention provides a technical solution: a 3D printing slicing method based on a two-dimensional image, comprising the following steps:

[0045] Step 1001: Select the 3D model file to be printed.

[0046] In implementation, the user selects a model file in STL format and imports it into the slicing software.

[0047] Step 1002: Scan the selected 3D model file and reconstruct the model.

[0048] In implementation, the coordinates of each point and the normal vector in the 3D model file are scanned, and all the triangular facets on the model surface are constructed using the right-hand rule and the normal vector.

[0049] Step 1003: Slice the reconstructed model to obtain two-dimensional slice contour information of each layer of the model.

[0050] In practice, the slicing step is as follows Figure 2 As shown:

[0051] Step 2001: Use the bounding box algorithm to obtain the minimum coordinate X of the model in the X-axis direction min and the maximum value coordinate X max , minimum coordinate Y in the Y-axis direction min and the maximum value coordinate Y max , Z axis minimum coordinate Z min and the maximum coordinate Z max , Z-axis coordinate of the center point of the bounding box Zcenter;

[0052] Step 2002: Determine an infinite plane according to the coordinates of the center point of the bounding box and the normal vector;

[0053] Step 2003: Use the bounding box and the normal vector to constrain the cutting plane and define the range of the intersection between the cutting plane and the model;

[0054] Step 2004: construct a plane intersection finder by cutting the plane;

[0055] Step 2005: Obtain the contour line where the cutting plane in the plane intersection finder intersects the model.

[0056] In the implementation, the slice direction is the Z axis direction, the slice thickness is zoffset, and the number of slices = (Z max -Z min ) / zoffset, the layer number is n, slicing starts from the lowest point of the model, the first layer of the cutting plane layer number is 1, the last layer of the cutting plane layer number = layer number, the Z axis coordinate of the center point of the cutting plane Zcenter = Z min + layer thickness*(layer number+1), the Z axis coordinate of the center point of the last layer cutting plane is Zcenter=Z max -0.0001.

[0057] Step 1004: Scan each layer of contour data and use a scan line algorithm to fill the inside of the contour line.

[0058] In implementation, the scan line filling contour process is as follows Figure 3 As shown:

[0059] Step 3001: traverse all contour lines where the cutting planes intersect the model;

[0060] Step 3002: Create an image canvas, set the canvas size and canvas background color;

[0061] Step 3003: Set the brush width to 1mm and the brush color to black;

[0062] Step 3004: Enable the anti-aliasing function;

[0063] Step 3005: traverse the points constituting the closed contour line, and use a brush on the canvas to connect the points constituting the closed contour line;

[0064] Step 3006: Make a scan line perpendicular to the X-axis, and move the scan line in the positive direction of the X-axis, with a moving step of 1 mm and a moving range of 0 to 297 mm;

[0065] Step 3007: record the intersection of the scan line and the contour line, and store the intersection in an intersection array;

[0066] Step 3008: sort the points in the intersection array according to the size of the Y axis;

[0067] Step 3009: traverse the intersection array and connect two adjacent points with line segments drawn by the brush.

[0068] In implementation, the canvas size is selected according to the printer size. The X-axis movement distance of the inkjet printer is 210 mm, the Y-axis movement distance is 297 mm, and the canvas color is white to form a contrast with the solid color.

[0069] In practice, the lines drawn by the brush have jagged edges. By turning on the anti-aliasing function, the edges of the lines can be made smoother.

[0070] In practice, the scanning line moving step determines the contour filling rate. In order to fully fill the inside of the contour and ensure tight adhesion between layers, the moving step is selected as 1 mm.

[0071] In implementation, the canvas size, canvas background color, and brush color can be selected according to user needs.

[0072] Step 1005: Store the filled two-dimensional contour line in a two-dimensional image format.

[0073] In implementation, the two-dimensional image format is selected as PNG image format.

[0074] Step 1006: Transmit each layer of the slice image after filling to the 3D printer, and the printer prints the image layer by layer.

[0075] The core process of the slicing method is described below with Example 1:

[0076] (1) Select Figure 5 The 3D model file shown is in STL format.

[0077] (2) Scan each point and normal vector in the 3D file, reconstruct the model and display it.

[0078] (3) Establish a bounding box and obtain the minimum value Z of the model's Z axis min , maximum value Z max , minimum value of X axis Z min , maximum value Z max , Y axis minimum value Y min , maximum value Y max , the Z-axis coordinate of the center point of the bounding box is Zcenter.

[0079] (4) Set the layer thickness zoffset = 1 mm, the number of layers = (Z max -Z min ) / zoffset.

[0080] (5) Determine the tangent plane based on the coordinates of the enclosing and center points and the normal vector, and construct a plane intersection finder.

[0081] (6) Obtain the contour line where the cutting plane in the plane intersection finder intersects with the model. The contour line of the 200th layer of the model is as follows: Figure 5 shown.

[0082] (7) Traverse all contour lines and create a canvas with a white background, a length of 210 mm and a width of 297 mm.

[0083] (8) Set the brush width to 1mm, the brush color to black, and turn on the anti-aliasing function.

[0084] (9) Traverse the points that constitute the closed contour line and use a brush on the canvas to connect the points that constitute the closed contour line.

[0085] (10) Draw a scan line perpendicular to the X-axis, X=0, and the moving step is 1 mm.

[0086] (11) Record the intersection points of the scan line and the contour line, and store the intersection points in the intersection point array.

[0087] (12) Sort the points in the intersection array according to the size of the Y axis.

[0088] (13) Traverse the intersection array and use the brush to connect two adjacent points with a line segment.

[0089] (14) The filled two-dimensional contour lines are stored in PNG image format. The contour line filling image of the 200th layer of the model is as follows: Figure 6 shown.

[0090] (15) The two-dimensional image after each layer of filling is transmitted to the inkjet 3D printer, and the 3D printer prints the image layer by layer.

[0091] The core process of the slicing method is described below with Example 2:

[0092] (1) Select Figure 5 The 3D model file shown is in STL format.

[0093] (2) Scan each point and normal vector in the 3D file, reconstruct the model and display it.

[0094] (3) Create a bounding box and obtain the minimum Z value of the model's Z axis min , maximum value Z max , minimum value of X axis Z min , maximum value Z max , Y axis minimum value Y min , maximum value Y max , the Z-axis coordinate of the center point of the bounding box is Zcenter.

[0095] (4) Set the layer thickness zoffset = 2 mm, the number of layers = (Z max -Z min ) / zoffset.

[0096] (5) Determine the tangent plane based on the coordinates of the enclosing and center points and the normal vector, and construct a plane intersection finder.

[0097] (6) Obtain the contour line where the cutting plane in the plane intersection finder intersects the model.

[0098] (7) Traverse all contour lines and create a canvas with a white background, an A3 size, a length of 297 mm, and a width of 420 mm.

[0099] (8) Set the brush width to 1mm, the brush color to black, and turn on the anti-aliasing function.

[0100] (9) Traverse the points that constitute the closed contour line and use a brush on the canvas to connect the points that constitute the closed contour line.

[0101] (10) Draw a scan line perpendicular to the X-axis, X=0, and the moving step length is 3 mm.

[0102] (11) Record the intersection points of the scan line and the contour line, and store the intersection points in the intersection point array.

[0103] (12) Sort the points in the intersection array according to the size of the Y axis.

[0104] (13) Traverse the intersection array and use the brush to connect two adjacent points with a line segment.

[0105] (14) The filled two-dimensional contour lines are stored in JPG image format. The contour line filling image of the 10th layer of the model is as follows: Figure 7 shown.

[0106] (15) The two-dimensional image after each layer of filling is transmitted to the inkjet 3D printer, and the 3D printer prints the image layer by layer.

Claims

1. A 3D printing slicing method based on two-dimensional images, characterized in that: The following steps are involved: Step 1: Select the 3D model file to be printed; Step 2: Scan the selected 3D model file and reconstruct the model; Step 3: Slice the reconstructed model to obtain the two-dimensional slice contour information of each layer of the model; Step 4: Scan each layer of contour data and use the scan line to fill the inside of the contour line; Step 5: Store the filled two-dimensional contour line as a two-dimensional image format; Step 6: Send each layer of slice image after filling to the 3D printer, and the printer prints the image layer by layer; The slicing step in step 3 includes: S1. Use the bounding box algorithm to obtain the minimum coordinate Xmin and maximum coordinate Xmax of the model in the X-axis direction, the minimum coordinate Ymin and maximum coordinate Ymax in the Y-axis direction, the minimum coordinate Zmin and maximum coordinate Zmax in the Z-axis direction, and the Z-axis coordinate Zcenter of the center point of the bounding box; S2, determine an infinite plane based on the coordinates of the center point of the bounding box and the normal vector; S3. Use the bounding box and normal vector to constrain the cutting plane and specify the range of intersection between the cutting plane and the model; S4, constructing a plane intersection detector by cutting the plane; S5. Obtain the contour line where the cutting plane in the plane intersection finder intersects the model.

2. A 3D printing slicing method based on two-dimensional images according to claim 1, characterized in that: The 3D model file in step 1 is a file of STL type.

3. The 3D printing slicing method based on two-dimensional images according to claim 1, characterized in that: The data scanned in step 2 are the coordinates of each point and each normal vector in the 3D model file, and triangular patches are established based on the points and normal vectors to reconstruct the model.

4. The 3D printing slicing method based on two-dimensional images according to claim 1, characterized in that: The slicing direction is the Z-axis direction, starting from the lowest point of the model, the layer thickness is zoffset, the layer number is n, the number of layers = (Zmax-Z min) / zoffset, the Z-axis coordinate of the center point of the cutting plane Zcenter = Z min + layer thickness * (layer number + 1), and the Z-axis coordinate of the center point of the last cutting plane Zcenter = Z max-0.0001.

5. The 3D printing slicing method based on two-dimensional images according to claim 1, characterized in that: The step of filling the contour line with the scan line in step 4 comprises: S1, traverse all contour lines where the cutting plane intersects the model; S2. Create an image canvas, set the canvas size and canvas background color; S3. Set brush width and brush color; S4, turn on the anti-aliasing function; S5, traverse the points constituting the closed contour line, and use a brush on the canvas to connect the points constituting the closed contour line; S6. Draw a scan line perpendicular to the X axis, move the scan line in the positive direction of the X axis, set the moving step length, and the moving range is within the canvas length; S7, record the intersection of the scan line and the contour line, and store the intersection in an intersection array; S8, sorting the points in the intersection array according to the size of the Y axis; S9. Traverse the intersection array and connect two adjacent points with the line segments drawn by the brush.

6. The 3D printing slicing method based on two-dimensional images according to claim 1, characterized in that: The two-dimensional image format in step 5 is PNG, JPG, TIFF or BMP format.

7. The 3D printing slicing method based on two-dimensional images according to claim 5, characterized in that: The brush color determines the fill color, and the scan line movement step size determines the outline fill rate.

Citation Information

Patent Citations

  • Three-dimensional model slice for surface exposure additive forming and projection plane generating method

    CN103761397A

  • Implementation method based on 3D (Three Dimensional) printing data processing software platform

    CN104504186A

  • 3D (three-dimensional) printing adaptive slicing method capable of reserving model features

    CN104708824A

  • 3D printing die and printing method thereof

    CN106064480A

  • 3d print slice rapid generation method

    CN106200559A