Slice file generation method, light-curing three-dimensional printing method, device and medium
By generating slice contour images as slice files, the problem of large slice file space occupation in high-resolution 3D printers is solved and the printing speed is improved.
Patent Information
- Application Number
- CN202311161964.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-09-08
AI Technical Summary
As the resolution of 3D printers increases, the space occupied by slice files increases, which leads to longer file storage and transmission time and affects the model printing speed.
By acquiring the slice plane of the 3D digital model, generating the slice contour image, and using it as a slice file for 3D model printing, the space occupied by a single slice file is reduced and the production and transmission speed is improved.
It effectively reduces the time for making and transmitting slice files and improves the printing speed of the model.
Smart Images

Figure CN119589959B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional printing, and in particular to a slicing file generation method, a light-curing three-dimensional printing method, a device and a medium. Background Art
[0002] In the field of three-dimensional printing technology, after a print model is created on a computer, it is necessary to slice the model to be printed to obtain slice files of each printing layer of the print model. Then, the slice files of each printing layer need to be converted into image formats to obtain pixel images of each printing layer. Finally, the pixel image files or compressed files of the pixel image files are stored in a mobile device so that when printing the model, the pixel images of each printing layer can be read through the mobile device to print the model.
[0003] However, as the resolution of 3D printers becomes higher and higher, from the previous 2K resolution to the current 12K, 16K resolution and even higher, the space occupied by a single slice file is also becoming larger and larger. This not only affects the storage of the file, but also causes the consumption of transmission and printing time, and ultimately leads to a serious reduction in the model printing speed. Summary of the Invention
[0004] In view of this, the present application provides a slicing file generation method, a light-curing three-dimensional printing method, an apparatus and a medium, the main purpose of which is to solve the technical problem that the production speed and transmission speed of slicing files are slow, resulting in slow printing speed of the model.
[0005] According to a first aspect of the present invention, a method for generating a slice file is provided. The slice file is used for three-dimensional model printing. The method comprises:
[0006] Taking a three-dimensional digital model, the three-dimensional digital model includes a plurality of facets;
[0007] Determine the slice plane corresponding to a slice layer;
[0008] Slicing the three-dimensional digital model according to the slicing plane to obtain a slice contour image, wherein the slice contour image includes a plurality of intersection lines between the slicing plane and the surface patches on the three-dimensional digital model;
[0009] The file including the slice contour image is used as a slice file for printing a three-dimensional model on a three-dimensional printer.
[0010] According to a second aspect of the present invention, a light-curing 3D printing method is provided, which is applied to a light-curing 3D printer. The light-curing 3D printer includes a light source and a material storage mechanism. The light source is configured to emit curing light to cure a material to be cured in the material storage mechanism. The method includes:
[0011] Acquire a slicing file, wherein the slicing file includes a slicing contour image of at least one slicing layer of a to-be-printed model, wherein the slicing contour image includes a plurality of line segments connected sequentially and end-to-end;
[0012] Determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed;
[0013] The light source is controlled to expose according to the exposure display image, so as to cure the material to be cured in the area of the material storage mechanism corresponding to the area to be exposed.
[0014] According to a third aspect of the present invention, there is provided a light-curing 3D printing device, which is arranged in a 3D printer, and comprises:
[0015] a slicing file acquisition module, configured to acquire a slicing file, wherein the slicing file includes a slicing contour image of at least one slicing layer of a model to be printed, wherein the slicing contour image includes a plurality of line segments connected in sequence and end to end;
[0016] An exposure image generating module, configured to determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed;
[0017] The exposure image curing module is used to control the exposure of the light source according to the exposure display image to cure the material to be cured in the area of the storage mechanism corresponding to the area to be exposed.
[0018] According to a fourth aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned slicing file generation method and light-stereolithography 3D printing method are implemented.
[0019] According to a fifth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned slicing file generation method and the light-stereolithography 3D printing method when executing the program.
[0020] The present invention provides a slicing file generation method, storage medium, and 3D printer. The method first obtains a 3D digital model comprising multiple facets, then determines a slicing plane corresponding to a slicing layer. The 3D digital model is then sliced according to the determined slicing plane to obtain a slice contour image. Finally, the file including the slice contour image is used as a slicing file for printing the 3D model on a 3D printer. By using the file including the slice contour image as the slicing file for printing the 3D model on a 3D printer, the method can effectively reduce the space occupied by individual slicing files, shorten the slicing file production process, and increase the slicing file production and transmission speeds, thereby improving the model printing speed.
[0021] The present invention provides a photocurable 3D printing method, storage medium, and 3D printer. The method first obtains a slice file containing a slice outline image of at least one slice layer of a model to be printed, then determines an exposure display image based on the slice outline image, and finally controls light exposure based on the exposure display image to cure the material in the area of the material storage mechanism corresponding to the area to be exposed. By using the file containing the slice outline image as the slice file for printing the model on the 3D printer, the method can effectively reduce the space occupied by the slice file, increase the transfer speed of the slice file, and thus improve the printing speed of the model.
[0022] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 A schematic diagram showing a flow chart of a method for generating a slice file provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram showing a process of a photo-curing 3D printing method provided by an embodiment of the present invention is shown;
[0026] Figure 3 A schematic diagram of a slice contour image provided by an embodiment of the present invention is shown;
[0027] Figure 4 A schematic diagram of an exposure display image provided by an embodiment of the present invention is shown;
[0028] Figure 5 A schematic diagram of a process for generating an exposure display image based on a slice contour image and pixel scan lines provided by an embodiment of the present invention is shown;
[0029] Figure 6 A schematic diagram of another process for generating an exposure display image based on a slice contour image and pixel scan lines provided by an embodiment of the present invention is shown;
[0030] Figure 7 A schematic diagram of another process for generating an exposure display image based on a slice contour image and pixel scan lines provided by an embodiment of the present invention is shown;
[0031] Figure 8 A schematic structural diagram of a photocuring 3D printing device provided in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0033] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0034] In one embodiment, Figure 1 As shown, a method for generating an image processing slice file is provided, which is described by taking the application of the method to a computer device as an example, and includes the following steps:
[0035] 101. Obtain a three-dimensional digital model, where the three-dimensional digital model includes multiple facets.
[0036] Among them, the three-dimensional digital model can be constructed using computer three-dimensional modeling software, and the shape expressed by the design plan, original drawing, sketch and technical description and other technical drawings of the project or product can be used to form a three-dimensional digital model required for design and subsequent processing. Furthermore, a patch is a polygonal mesh, and is also a data structure used in computer graphics to model various irregular objects. In some embodiments, the patch is a triangular patch. Among the patches of the polygonal mesh, the triangular patch is the smallest unit to be divided, and the representation is relatively simple, flexible, and the topological description is convenient, so it is widely used. The main components of the patch include vertices, edges and faces. In the field of three-dimensional data model design and application, the patch can be used to describe the surface geometry of an object. It consists of the unit normal vector and vertices of the surface and does not contain color features.
[0037] Specifically, before printing the model, a computer device can be used to obtain a 3D digital model to be printed. This 3D digital model can be imported into the computer device by a user via a mobile device, drawn by the user on the computer device, or downloaded from the internet. The surface of the 3D digital model includes multiple facets, which can be triangular facets, quadrilateral facets, or other shapes, which are not specifically limited in this embodiment.
[0038] 102. Determine a slice plane corresponding to a slice layer.
[0039] The slice layer refers to a printing layer structure of a three-dimensional digital model, and the slice plane refers to a cutting plane corresponding to the slice layer.
[0040] Specifically, after obtaining the three-dimensional digital model to be printed, the angle and position of the three-dimensional digital model can be adjusted. On this basis, the angle and position of the slicing plane of the slicing layer of the three-dimensional digital model can be determined, so that the three-dimensional digital model can be subsequently sliced according to the slicing plane to obtain the slicing layer.
[0041] 103. Slice the three-dimensional digital model according to the slicing plane to obtain a slice contour image, where the slice contour image includes multiple intersection lines between the slicing plane and the facets on the three-dimensional digital model.
[0042] Specifically, 3D model printing is done according to the exposure pattern of the cross section of each layer. Therefore, before printing the 3D model, it is necessary to use 3D modeling software or slicing software on the 3D digital model to slice along the slicing plane at certain intervals (i.e., the height of the slicing layer) to obtain a slicing contour image. The slicing contour image includes multiple intersection lines of the slicing plane and the facets on the 3D digital model. These intersection lines are connected together to form a closed dividing line that runs through the 3D digital model in a cross-sectional manner. The layer height of the printing layer is generally 0.05 to 0.5 mm, and 0.1 to 0.2 mm is commonly used. At this value, a relatively smooth model surface can be obtained. After the height of the slicing layer is selected, the thickness of each layer of superimposed material during forming should be adapted to it.
[0043] 104. Use the file including the slice contour image as a slice file for printing a three-dimensional model on a three-dimensional printer.
[0044] Specifically, after obtaining the sliced outline image of the 3D digital model, a file containing the sliced outline image can be stored in a computer as a slice file of the 3D digital model, and / or the slice file of the 3D digital model can be transferred to a 3D printer so that the 3D printer can print the 3D model using the slice file. In this embodiment, the file containing the sliced outline image can specifically be a vector image of each printed layer of the 3D digital model.
[0045] The slicing file generation method provided in this embodiment first obtains a 3D digital model comprising multiple facets, then determines a slicing plane corresponding to a slicing layer, and then slices the 3D digital model according to the determined slicing plane to obtain a slice outline image. Finally, the file including the slice outline image is used as a slicing file for printing the 3D model on a 3D printer. By using the file including the slice outline image as the slicing file for printing the 3D model on a 3D printer, this method can effectively reduce the space occupied by individual slicing files, shorten the slicing file creation process, and increase the slicing file creation and transmission speed, thereby improving the model printing speed.
[0046] In one embodiment, step 104 can be implemented by the following method: determining the vector direction of the intersection line based on the normal vector of the surface corresponding to the intersection line between the slice plane and the surface on the three-dimensional digital model, and then using the file including the slice contour image and the vector direction of the intersection line as a slice file for printing the three-dimensional model on a three-dimensional printer, wherein the vector directions of the multiple intersection lines of the slice contour image are connected end to end. In a specific embodiment, the vector direction of each intersection line of the slice contour image can be connected end to end with the vector directions of other intersection lines of the slice contour image, such as Figure 3 Alternatively, the vector directions of at least some of the intersection lines of the slice contour image may be connected end to end with the vector directions of other intersection lines of the slice contour image.
[0047] In the above embodiment, the normal vector is a concept in spatial analytic geometry. The vector represented by a line perpendicular to the plane where the patch is located is the normal vector of the patch, wherein the direction of the normal vector is toward the non-filled area of the three-dimensional digital model. Specifically, the computer device can obtain the normal vector of the patch corresponding to the intersection line of the slice plane and the patch on the three-dimensional digital model. Then, based on the normal vector of the patch, the vector direction of the intersection line can be calculated using an algorithm in spatial geometry. The vector direction of the intersection line can be used to determine whether each area of the printed layer of the three-dimensional digital model is a filled area or a non-filled area. Furthermore, a file including the slice contour image and the vector directions of the intersection lines can be used as a slice file for printing the three-dimensional model on a three-dimensional printer, wherein the vector direction of each intersection line of the slice contour image is connected end to end with the vector directions of other intersection lines of the slice contour image, forming at least one closed area, and indicating whether each closed area is a filled area or a non-filled area. This embodiment uses a file including a slice contour image and the vector direction of the intersection line as a slice file for printing a three-dimensional model on a three-dimensional printer. This not only improves the production speed and transmission speed of the slice file, but also indicates whether the model is printed in a filled or non-filled manner. In this way, the computing power for later identification of the slice layer printing method can be reduced, thereby improving the printing speed and printing accuracy of the model.
[0048] In one embodiment, the step of determining the vector direction of the intersection line based on the normal vector of the facet corresponding to the intersection line can be achieved by the following method: determining the vector direction of the facet edge line of the facet corresponding to the intersection line based on the normal vector of the facet corresponding to the intersection line and the right-hand rule; determining the vector direction of the intersection line based on the vector direction of the facet edge line of the facet corresponding to the intersection line.
[0049] In the above embodiment, the normal vector of the patch can be calculated by the cross product (outer product, vector product, cross product) of the two patch edges of the patch. Specifically, after obtaining the normal vector of the patch corresponding to the intersection line, the right-hand rule can be used to obtain the vector direction of the patch edge line of the patch where the normal vector is located. Specifically, according to the normal vector of the patch and the right-hand rule, the vector direction of the patch edge line of the patch where the normal vector is located can be obtained. This can be done by placing the thumb of the right hand of a human being in the direction of the normal vector of the patch, and placing the four fingers other than the thumb of the right hand of the human being inward and around the thumb, and taking the surrounding direction of the four fingers at this time as the vector direction of the patch edge line of the patch where the normal vector is located. The vector direction of the intersection line can then be determined based on the vector direction of the patch edge line, wherein the vector direction of the intersection line is consistent with the vector direction of the patch edge line of the patch corresponding to the intersection line, or has the same direction characteristic. This embodiment determines the vector direction of the face edge of the face corresponding to the intersection line through the normal vector of the face corresponding to the intersection line and the right-hand rule, and then determines the vector direction of the intersection line based on the consistency of the vector direction. This can improve the speed and accuracy of determining the vector direction of the intersection line, thereby improving the printing accuracy of the model.
[0050] For example, suppose the patch is a triangular patch, and the two edge lines of the patch are a and b respectively. In this scenario, if the vector direction of the edge line a points to the edge line b, then the normal vector c of the edge lines a and b can be expressed by the formula: a×b=c. According to the right-hand rule, the direction of the normal vector corresponding to a×b is: the four fingers of the right hand are in the same direction as a, the palm does not move, the four fingers gradually bend toward b, and the thumb points in the direction of a×b, perpendicular to the plane where a and b are located. Then, when the normal vector of the patch is known, by the right-hand rule, it can be concluded that the vector direction of the two edge lines of the patch is a towards b. Conversely, if the vector direction of the patch edge b points to the patch edge a, then the normal vector c of the patch edges a and b can be expressed as: b×a=-c. According to the right-hand rule, the direction of the normal vector corresponding to b×a is: the four fingers of the right hand are aligned with the direction of b, the palm is still, and the four fingers gradually bend toward a, and the thumb points in the direction of b×a, perpendicular to the plane where b and a are located. When the normal vector of the patch is known, the right-hand rule can be used to infer that the vector direction of the two patch edges of the patch is b toward a. Furthermore, after the vector direction of the patch edge is determined, the vector direction of the intersection line can be determined based on the consistency of the vector direction.
[0051] In one embodiment, Figure 2 As shown, a light-curing 3D printing method is provided. The method is applied to a light-curing 3D printer, wherein the light-curing 3D printer includes a light source and a material storage mechanism. The light source can be used to emit curing light to cure the material to be cured in the material storage mechanism. The method includes the following steps:
[0052] 201. Acquire a slicing file, where the slicing file includes a slicing contour image of at least one slicing layer of a model to be printed, and the slicing contour image includes a plurality of line segments connected sequentially and end-to-end.
[0053] Among them, the slice layer refers to a printing layer structure of the model to be printed, and the slice contour image refers to the contour image of the printing layer structure. The slice contour image can specifically be a vector diagram of the printing layer structure. The image contains at least one closed area, and each closed area is composed of multiple line segments connected in sequence and connected end to end. For example, a square closed area can be composed of four line segments connected end to end.
[0054] Specifically, a stereolithography 3D printer (hereinafter referred to as a 3D printer) can obtain a slice file of a model to be printed in a variety of ways. For example, the 3D printer can obtain the slice file through a mobile device connected to the printer, or through a data transmission port. The slice file includes a slice outline image of at least one slice layer of the model to be printed. The slice outline image includes multiple line segments connected in sequence and connected end to end. These line segments can form at least one closed area. The slice file can also include information indicating whether the closed area is a filled area or an unfilled area.
[0055] 202. Determine an exposure display image according to the slice contour image, where the exposure display image includes an area to be exposed and / or an area not to be exposed.
[0056] Among them, the exposure display image can specifically be a pixel image, and the exposure display image includes areas that need to be exposed and / or areas that do not need to be exposed, wherein the areas that need to be exposed correspond to the filled areas in the slice contour image, and the areas that do not need to be exposed correspond to the non-filled areas in the slice contour image.
[0057] Specifically, the 3D printer's processor can determine, based on the location of the closed area in the slice outline image and information indicating whether the closed area is a filled area or a non-filled area, whether the area corresponding to each pixel in the pixel image is to be exposed or not. The processor can then set different fill values for the areas to be exposed and the areas not to be exposed, thereby distinguishing the areas to be exposed and not to be exposed in the pixel image. Furthermore, after all pixels in the pixel image are filled, an exposure display image corresponding to the slice outline image can be obtained.
[0058] For example, assume the structure of the model to be printed is cylindrical, and the model's slicing file includes multiple slicing layers. The slice outline image of each slicing layer includes two circular structures, one large and one small, which are nested together. The closed area corresponding to the large outer circular structure is the filled area, and the closed area corresponding to the small inner circular structure is the non-filled area. Based on this information, it can be determined that the area to be exposed in the exposure display image is the pixel area corresponding to the annular structure between the large outer circular structure and the small inner circular structure, and the area that does not need to be exposed is the closed area of the small inner circular structure and the rest of the area outside the closed area of the large outer circular structure.
[0059] 203. Control the light source to expose according to the exposure display image to cure the material to be cured in the area of the material storage mechanism corresponding to the area to be exposed.
[0060] Specifically, after determining the areas to be exposed and / or areas not to be exposed in the exposure display image, the 3D printer's controller can control the light source to expose the areas to be exposed, thereby curing the material in the corresponding areas of the material storage mechanism. This cures the material in the areas to be exposed in the exposure display image, thereby forming a printed layer structure. Subsequently, the various printed layer structures are stacked layer by layer in the aforementioned manner to complete the printing of the model to be printed.
[0061] For example, let's use a submersible light-curing 3D printer as an example to illustrate the model printing process. The model to be printed is placed on a printing platform, and a material storage mechanism is located below the printing platform to provide printing material for the model to be printed. During printing, the printing platform drives the model to be printed below the liquid level of the printing material in the material storage mechanism, leaving a thickness of one printing layer. A light source is located above the model to be printed, which is used to expose the areas to be exposed in the exposure display image of the current printing layer of the model to be printed, thereby solidifying the printing material. Finally, by stacking layers, a printed 3D model is obtained.
[0062] The stereolithography 3D printing method provided in this embodiment first obtains a slicing file containing a slice outline image of at least one slice layer of the model to be printed, then determines an exposure display image based on the slice outline image, and finally controls the light source exposure based on the exposure display image to cure the material in the area of the material storage mechanism corresponding to the area to be exposed. By using the file containing the slice outline image as the slicing file for printing the model on a 3D printer, this method can effectively reduce the space occupied by the slicing file, increase the slicing file transmission speed, and thus improve the model printing speed.
[0063] In one embodiment, the above-mentioned step 202 can be implemented by the following method: determining a pixel scanning line set along a first direction, determining a pixel scanning line located at a scanning starting point of the slice contour image; determining the intersection of the pixel scanning line and the slice contour image, and according to a preset algorithm, determining whether the pixels at each intersection and the pixels between each intersection are pixels to be exposed or pixels not to be exposed, and then moving the pixel scanning line along a second direction by a preset step length and repeating this step until the scanning end point of the slice contour image is reached, wherein the preset step length is at least one pixel, and the second direction is different from the first direction; finally, determining an area to be exposed and / or an area not to be exposed based on the determined pixels to be exposed and / or pixels not to be exposed, and obtaining an exposed display image.
[0064] In the above embodiment, the first direction and the second direction are located in the plane where the slice contour image is located (hereinafter referred to as the plane), and the first direction is different from the second direction. For example, the first direction may be the x-axis direction on the plane, and the second direction may be the y-axis direction on the plane, and the first direction and the second direction are perpendicular to each other. Figure 3 Take the slice outline image shown as an example. The slice outline image is composed of four line segments. The coordinate origin of the image where the slice outline is located is in the upper left corner of the image. The coordinates of the four vertices of the rectangular structure in the slice outline image are a, b, c and d, which means that the slice outline image can be composed of line segments ab, bc, cd and da. Specifically, the line segments ab, bc, cd and da can be as follows: Figure 3 However, in some embodiments of the present application, line segments ab, bc, cd, and da may also be ordinary line segments without vector directions between respective vertices.
[0065] according to Figure 3 The slice contour image can be obtained through the above step 202. Figure 4 The exposure shown is displayed in the image. Figure 4 As shown, the exposure display image includes areas that need to be exposed and areas that do not need to be exposed. Figure 4 In the image, the areas that need to be exposed are white, and the areas that do not need to be exposed are black.
[0066] When converting the slice contour image into an exposure display image, the coordinate systems of the slice contour image and the screen pixel exposure format can be overlapped after determining the mapping relationship between the slice contour image and the screen pixel exposure format. Next, it is first determined that the pixel scanning line is set along the x-axis direction, and then the pixel scanning line is placed at the scanning starting point, wherein the scanning starting point can be any pixel scanning line whose coordinate value in the second direction is less than or equal to the coordinate value in the second direction of all line segments in the slice contour image, for example, Figure 5As shown, the scanning starting point can be y = 0, y = 1, y = 2 or y = 3. Alternatively, the scanning starting point can also be understood as a pixel point, the coordinate value of the second direction of the pixel point is less than or equal to the coordinate value of the second direction of all line segments in the slice contour image.
[0067] It is understood that after the slice outline image and the screen pixel exposure frame are superimposed, the line segments of the slice outline image may intersect with the edge of a pixel in the screen pixel exposure frame, the center of a pixel in the screen pixel exposure frame, or the point that divides a pixel in the screen pixel exposure frame into three equal parts, and so on. In some embodiments, this is because the slice outline image is a vector image, and the precision of the line segments that make up its outline is likely greater than or equal to the pixel precision of the screen pixel exposure frame. In other embodiments, this is because, although the slice outline image is a bitmap image, its resolution is finer than that of the screen pixel exposure frame. Of course, in still other embodiments, after the slice outline image and the screen pixel exposure frame are superimposed, the coordinates of each point in the slice outline image may correspond one-to-one with the coordinates of each pixel in the screen pixel exposure frame. In this case, a coordinate point of a line segment of the slice outline image intersects the entirety of a pixel in the screen pixel exposure frame.
[0068] Furthermore, after the pixel scan line is determined, the intersection of the pixel scan line and the slice contour image can be determined, and then according to a preset algorithm, it can be determined whether the pixels at the two intersections and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed. Among them, whether the pixels between any two intersections need to be exposed or pixels that do not need to be exposed can be determined based on the information in the slice file that indicates whether the closed area in the slice contour image is a filled area or a non-filled area. For example, Figure 5 As shown in the figure, the coordinates of the intersection of the pixel scan line of y=5 and the slice contour image are (5,5) and (14,5) of the screen pixel exposure format, and the pixels where the two intersections are located are the pixels of the two coordinate points (5,5) and (14,5). Figure 5 Indicated by a vertical grid. When the model to be printed is a solid cuboid, the rectangular area in the contour slice image is a filling area, and the pixels between the two intersections are all pixels that need to be exposed. Furthermore, after the pixels corresponding to a pixel scan line are determined, the pixel scan line can be moved along the y-axis by a preset step size (i.e., moved by at least one pixel) and the above steps of determining the intersection and determining the pixel are repeated until the scanning end point of the slice contour image is reached. The scanning end point can be any pixel scan line whose coordinate value in the second direction is greater than or equal to the coordinate value in the second direction of all line segments in the slice contour image. For example, Figure 5 As shown, the scanning end point can be y=11, y=12, y=13, ..., or y=16, etc. Alternatively, the scanning end point can also be understood as a pixel point, the coordinate value of the second direction of the pixel point is less than or equal to the coordinate value of the second direction of all line segments in the slice contour image.
[0069] Furthermore, after determining the pixels to be exposed and / or the pixels not to be exposed in the image, the area corresponding to the pixels to be exposed can be determined as the area to be exposed, and / or the area corresponding to the pixels not to be exposed can be determined as the area not to be exposed, by filling the flag value, thereby obtaining an exposed display image. Figure 5 For the rectangular outline in the figure, assuming that the model to be printed is a cuboid, the boundary of the rectangular area and the area inside the rectangle are the areas that need to be exposed, and the other areas outside the boundary of the rectangular area are the areas that do not need to be exposed.
[0070] In one embodiment, the method for determining whether the pixels at each intersection and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed in the above embodiment can be implemented by the following steps: according to the arrangement order of the intersections along the first direction, determining whether the pixels at each intersection and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed.
[0071] In the above embodiment, the pixels at each intersection and the pixels between each intersection can be determined as pixels to be exposed or pixels not to be exposed according to the pixel arrangement method corresponding to the arrangement order of the intersections. Figure 6 Taking the slice outline image shown in the figure as an example, the pixel scan line of y=10 is shown by the diagonal grid, and the pixel where the intersection is located is Figure 6As shown by the vertical grid in the figure, the pixel scan line y = 10 has four intersections with the slice contour image. Then, according to the pixel setting method corresponding to the arrangement order of the intersections, the specific steps of determining whether the pixels at each intersection and the pixels between each intersection are pixels to be exposed or pixels not to be exposed can be: the pixels at each intersection are pixels to be exposed, wherein the pixels between the first and second intersections are pixels to be exposed, the pixels between the second and third intersections are pixels not to be exposed, the pixels between the third and fourth intersections are pixels to be exposed, and so on until the last intersection is reached. From the above pixel setting method, it can be seen that the pixels at the four intersections of the pixel scan line y = 10 and the slice contour image are all pixels to be exposed, and the pixels between the first and second intersections are pixels to be exposed, the pixels between the second and third intersections are pixels not to be exposed, the pixels between the third and fourth intersections are pixels to be exposed, and the pixels before the first intersection and after the fourth intersection are pixels not to be exposed. In this way, the speed of judging pixels that need to be exposed and pixels that do not need to be exposed can be improved, the space occupied by the slice file can be reduced, and the conversion efficiency of the pixel image can be improved.
[0072] In one embodiment, the method for determining whether pixels at each intersection and pixels between each intersection are pixels to be exposed or pixels not to be exposed based on the arrangement order of the intersections along a first direction can also be implemented by the following steps: setting the flag value of the pixel before the first intersection on the pixel scan line to an initial value in order from left to right; when an odd-numbered intersection is encountered, adding an incremental value to the flag value of the pixel immediately before the intersection on the pixel scan line, and using the value after the incremental value as the flag value of one or more pixels immediately after the intersection on the pixel scan line; when an even-numbered intersection is encountered, subtracting a decrementing value from the flag value of the pixel immediately before the intersection on the pixel scan line, and using the value after the decrementing value as the flag value of one or more pixels immediately after the intersection on the pixel scan line; determining the pixel at the intersection on the pixel scan line as the pixel to be exposed; for pixels other than the pixel at the intersection on the pixel scan line, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel to be exposed, and when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel not to be exposed.
[0073] In the above embodiment, the pixels at each intersection and the pixels between each intersection can be determined as pixels to be exposed or pixels not to be exposed according to the pixel arrangement method corresponding to the odd or even order of the intersections. Figure 6Taking the slice contour image shown as an example, the pixel scanning line of y=10 has four intersections with the slice contour image. According to the pixel setting method corresponding to the parity of the intersection arrangement order, it can be seen that: the flag value of the pixels before the first intersection on the pixel scanning line of y=10 is the initial value, for example, 0, then the pixels before the first intersection are all pixels that do not need to be exposed; when encountering the first intersection, the flag value of one or more pixels arranged after the first intersection is increased by an incremental value on the basis of the initial value, for example, 1 is added to become 1, then the one or more pixels arranged after the first intersection are pixels that need to be exposed; when encountering the second intersection, the flag value of one or more pixels arranged after the second intersection is increased by an incremental value on the basis of the initial value, for example, 1 is added to become 1, then the one or more pixels arranged after the first intersection are pixels that need to be exposed; when encountering the second intersection, the one or more pixels arranged after the second intersection are increased by an incremental value on the basis of the initial value. The flag value of one or more pixels is subtracted by an incremental value, for example, minus 1 becomes 0, then the one or more pixels arranged after the second intersection are pixels that do not need to be exposed; when encountering the third intersection, the flag value of one or more pixels arranged after the third intersection is increased by an incremental value, for example, plus 1 becomes 1, then the one or more pixels arranged after the third intersection are pixels that need to be exposed; when encountering the fourth intersection, the flag value of one or more pixels arranged after the fourth intersection is subtracted by an incremental value, for example, minus 1 becomes 0, then the one or more pixels arranged after the fourth intersection are pixels that do not need to be exposed; finally, the pixels at the intersection on the pixel scan line are all pixels that need to be exposed. In this way, the speed of pixel judgment can be improved, the space occupied by the slice file can be reduced, and the conversion efficiency of pixel images can be improved.
[0074] In one embodiment, the method for determining whether pixels at each intersection and pixels between each intersection are pixels requiring exposure or pixels not requiring exposure in the above embodiment can also be implemented by the following steps: when the slice file also includes the vector direction of the line segment of the slice contour image, the pixels at each intersection and pixels between each intersection can be determined as pixels requiring exposure or pixels not requiring exposure based on whether the vector direction of the line segment at the intersection is upward or downward. When the third direction coordinate value of the starting coordinate of the line segment with the vector direction is less than the third direction coordinate value of the end coordinate of the line segment with the vector direction, the vector direction of the line segment is upward; when the third direction coordinate value of the starting coordinate of the line segment with the vector direction is greater than the third direction coordinate value of the end coordinate of the line segment with the vector direction, the vector direction of the line segment is upward. The third direction coordinate value can be the y-axis coordinate value of the plane where the slice contour image is located, and the y-axis direction can be the short side direction of the slice contour image, or can be any custom direction.
[0075] In the above embodiment, the pixels at each intersection and the pixels between each intersection can be determined as pixels to be exposed or pixels not to be exposed according to the pixel setting method corresponding to the vector direction of the line segment at the intersection, wherein the vector direction of the line segment at the intersection can be determined according to the starting coordinates and the ending coordinates of the line segment. Figure 5Taking the slice contour image shown as an example, the pixel scan line at y = 5 has two intersections with the slice contour image, and the coordinates of the two intersections are (5, 5) and (15, 5). Assuming that the pixel setting method corresponding to the vector direction of the line segment where the intersection is located is: the pixels at each intersection are all pixels that need to be exposed, wherein when the vector direction of the line segment where the intersection is located is downward, one or more pixels arranged along the first direction immediately following the intersection are pixels that need to be exposed; when the vector direction of the line segment where the intersection is located is upward, one or more pixels arranged along the first direction immediately following the intersection are pixels that do not need to be exposed. Through the above pixel setting method, it can be seen that the pixels at the intersection (5, 5) and the intersection (15, 5) are both pixels that need to be exposed, and since the vector direction of the line segment where the intersection (5, 5) is downward and the vector direction of the line segment where the intersection (15, 5) is upward, the pixels between the two intersections of the pixel scan line at y = 5 and the slice contour image are all pixels that need to be exposed. In this way, the accuracy of pixel judgment can be improved, thereby improving the conversion accuracy of pixel images. In this way, when the slicing file also includes the vector direction of the line segments of the slicing contour image, the interior of the closed area enclosed by the line segments in the clockwise vector direction can be made hollow, and the interior of the closed area enclosed by the line segments in the counterclockwise vector direction can be made solid, so that the solid and hollow conditions of the generated exposure display image correspond to the solid and hollow conditions of the three-dimensional digital model.
[0076] In other embodiments, the pixels at each intersection and the pixels between each intersection are determined as pixels to be exposed or pixels not to be exposed based on whether the vector direction of the line segment where the intersection is located is upward or downward, including: setting the flag value of the pixel before the first intersection on the pixel scan line to the initial value in order from left to right; when the vector direction of the line segment where the intersection is located is upward, adding an incremental value to the flag value of the pixel immediately before the intersection on the pixel scan line, and using the value after the incremental value is added as the flag value of one or more pixels immediately after the intersection on the pixel scan line. Flag value; when the vector direction of the line segment where the intersection is located is downward, a decreasing value is subtracted from the flag value of the pixel arranged immediately before the intersection on the pixel scan line, and the value after subtracting the decreasing value is used as the flag value of one or more pixels arranged immediately after the intersection on the pixel scan line; the pixel where the intersection is located on the pixel scan line is determined as the pixel to be exposed; for other pixels other than the pixel where the intersection is located on the pixel scan line, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel to be exposed, and when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel that does not need to be exposed. Using this embodiment to determine the pixels to be exposed and the pixels that do not need to be exposed, it is possible to determine the pixels to be exposed and the pixels that do not need to be exposed based on the pixel. Figure 3 The slice outline image shown is generated Figure 4 The exposure display image shown, Figure 3 In the figure, the vector direction of the vector segment is clockwise, and the corresponding vector is Figure 4 The exposure display image is such that the interior of the closed area enclosed by the line segments in the clockwise vector direction is solid, and the interior of the closed area enclosed by the line segments in the counterclockwise vector direction is hollow.
[0077] It should be noted that whether the interior of the closed area enclosed by the line segments in the clockwise vector direction is solid or the interior of the closed area enclosed by the line segments in the counterclockwise vector direction is solid needs to be determined according to the different methods used in slicing. In view of this, in some specific embodiments, after obtaining the slicing file, the method further includes: if the sub-flag of the obtained slicing file is the first sub-flag, then the above-mentioned implementation method of determining that the interior of the closed area enclosed by the line segments in the clockwise vector direction is hollow and the interior of the closed area enclosed by the line segments in the counterclockwise vector direction is solid is adopted to generate an exposure display image; and if the sub-flag of the obtained slicing file is the second sub-flag, then the above-mentioned implementation method of determining that the interior of the closed area enclosed by the line segments in the clockwise vector direction is solid and the interior of the closed area enclosed by the line segments in the counterclockwise vector direction is hollow is adopted to generate an exposure display image. In this way, the slicing method and the exposure display image generation method can be diversified and liberalized, and a good slicing-decoding (ie, generating the exposure display image) matching degree can be achieved to prevent decoding errors.
[0078] In one embodiment, the method for determining whether the pixels at each intersection and the pixels between each intersection are pixels to be exposed or pixels not to be exposed based on whether the vector direction of the line segment where the intersection is located is upward or downward in the above embodiment can be implemented by the following steps: setting the flag value of the pixel before the first intersection on the pixel scan line to the initial value in order from left to right; when the vector direction of the line segment where the intersection is located is downward, adding an incremental value to the flag value of the pixel immediately before the intersection on the pixel scan line, and using the value after adding the incremental value as the flag value of the pixel immediately after the intersection on the pixel scan line. The method comprises the following steps: determining the flag value of one or more pixels arranged immediately after the intersection on the pixel scan line; when the vector direction of the line segment where the intersection is located is upward, subtracting a decreasing value from the flag value of the pixel arranged immediately before the intersection on the pixel scan line, and using the value after subtracting the decreasing value as the flag value of one or more pixels arranged immediately after the intersection on the pixel scan line; determining the pixel where the intersection on the pixel scan line is located as the pixel to be exposed; for other pixels other than the pixel where the intersection on the pixel scan line is located, when the flag value of the pixel is greater than the initial value, determining the pixel to be exposed, and when the flag value of the pixel is less than or equal to the initial value, determining the pixel to be not exposed.
[0079] In the above embodiment, the pixel flag value can be accumulated or decremented according to the vector direction of the line segment where the intersection point is located, and the accumulated or decremented flag value can be compared with the initial value to determine whether each pixel needs to be exposed or not. Figure 7 As shown, the pixel scanning line of y=7 has four intersections with the slice contour image, and the vector directions of the line segments where the four intersections are located are "downward", "downward", "upward", and "upward" respectively. According to the pixel setting method corresponding to the vector direction of the above line segment, it can be known that: the flag value of the pixel before the first intersection on the pixel scanning line of y=7 is the initial value, for example, 0, then the pixels before the first intersection are all pixels that do not need to be exposed; after encountering the first intersection, the vector direction of the line segment where the first intersection is located is downward, then the flag value of one or more pixels arranged after the first intersection is increased by an incremental value on the basis of the initial value, for example, adding 1 to become 1, then the one or more pixels arranged after the first intersection are pixels that need to be exposed; after encountering the second intersection, the vector direction of the line segment where the second intersection is located is also 0. If the vector direction of the line segment where the third intersection is located is upward, the flag value of the one or more pixels arranged after the third intersection is subtracted from the flag value of the one or more pixels arranged after the third intersection by an incremental value, for example, by adding 1 to become 2, and the one or more pixels arranged after the second intersection are also pixels that need to be exposed; after encountering the third intersection, the vector direction of the line segment where the third intersection is located is upward, the flag value of the one or more pixels arranged after the third intersection is subtracted from the incremental value, for example, by subtracting 1 to become 1, and the one or more pixels arranged after the third intersection are also pixels that need to be exposed; the vector direction of the line segment where the fourth intersection is located is also upward, the flag value of the one or more pixels arranged after the fourth intersection is subtracted from the flag value of the one or more pixels arranged after the fourth intersection by an incremental value, for example, by subtracting 1 to become 0, and the one or more pixels arranged after the fourth intersection are pixels that do not need to be exposed; finally, the pixels at the intersections on the pixel scan line are all pixels that need to be exposed. In this way, the accuracy of pixel judgment can be improved, thereby improving the conversion accuracy of pixel images.
[0080] In one embodiment, the method for determining whether the pixels at each intersection and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed can also be implemented by the following steps: the pixels at each intersection are determined as pixels that need to be exposed, and then the exposure grayscale value of the pixel at the intersection is determined based on the cutting percentage of the line segment at the intersection for the pixel at the intersection.
[0081] In the above embodiment, for all intersections of the pixel scan line and the slice contour image, the pixels at each intersection can be determined as pixels to be exposed, and then the exposure grayscale value of the pixel at the intersection can be determined, so that the grayscale value of the pixel at the intersection can be filled with the exposure grayscale value later, thereby improving the accuracy of image conversion. For example, Figure 5As shown, the intersection of the pixel scanning line of y=5 and the line segment ab of the slice contour image - pixel (5,5) - that is, in the pixel shown in the dotted box, the line segment ab cuts the pixel (5,5). Through the mapping relationship between the coordinates of the line segment ab in the slice contour image (not shown), the coordinates of the pixel (5,5) in the exposure display image, and the coordinates of the slice contour image and the coordinates in the exposure display image, it can be calculated that the cutting percentages of the line segment ab at the intersection point for the pixel at the intersection point - pixel (5,5) are 35% and 65%. At this time, since the percentage of adjacent pixels to be exposed is 65% on the right, the exposure grayscale value of the pixel at the intersection point is determined to be the first preset grayscale value*65. For example, when the first preset grayscale value is 255, the exposure grayscale value of the pixel at the intersection point is determined to be 255*65%=165.75≈166.
[0082] In some embodiments, when the slice file also includes the vector direction of the line segment of the slice contour image, after calculating the cutting percentage of the line segment ab where the intersection is located for the pixel where the intersection is located, it can be determined by whether the vector direction is upward or downward whether to use the percentage of the left or right side after the pixel is cut, and multiply it with the first preset grayscale value to calculate the exposure grayscale value of the pixel where the intersection is located. In some specific embodiments, when the vector direction of the line segment ab is downward, it can be determined to use the percentage of the right side after the pixel is cut and multiply it with the first preset grayscale value to calculate the exposure grayscale value of the pixel where the intersection is located; when the vector direction of the line segment ab is upward, it can be determined to use the percentage of the left side after the pixel is cut and multiply it with the first preset grayscale value to calculate the exposure grayscale value of the pixel where the intersection is located. Figure 5 As shown, the percentages of the pixel (5,5) cut by line segment ab are 35% and 65%. Since the vector direction of line segment ab is downward, the percentage of the right side of the pixel after the cut is multiplied by the first preset grayscale value of 255 to calculate the exposure grayscale value of the pixel at the intersection: 255*65%=165.75≈166.
[0083] In other specific embodiments, when the vector direction of line segment ab is upward, the exposure grayscale value of the pixel at the intersection is calculated by multiplying the percentage of the right side after pixel cutting by the first preset grayscale value; when the vector direction of line segment ab is downward, the exposure grayscale value of the pixel at the intersection is calculated by multiplying the percentage of the left side after pixel cutting by the first preset grayscale value.
[0084] In one embodiment, a method for determining areas to be exposed and / or areas not to be exposed based on pixels to be exposed and / or pixels not to be exposed, and then obtaining an exposed display image, can be implemented by the following steps: grayscale value filling is performed on pixels to be exposed based on a first preset grayscale value and the exposure grayscale value of the pixel where the determined intersection is located, and / or grayscale value filling is performed on pixels not to be exposed based on a second preset grayscale value, and after the grayscale value filling is completed for all pixels, an exposed display image is obtained.
[0085] In the above embodiment, after determining the pixels requiring exposure and / or not requiring exposure, grayscale filling can be performed on the pixels requiring exposure based on a first preset grayscale value and the exposure grayscale value of the determined pixel at the intersection. For example, the first preset grayscale value can be 255, meaning that the pixels requiring exposure that are not pixels at the intersection can be filled with the preset exposure grayscale value of 255, so that the area requiring exposure appears white. Furthermore, the pixels at the intersection are filled with the exposure grayscale value of the determined pixel at the intersection, so that the edges of the exposure area appear white or gray, thereby achieving a certain anti-aliasing effect. Furthermore, grayscale filling can be performed on the pixels not requiring exposure based on a second preset grayscale value. For example, the second preset grayscale value can be 0, meaning that the pixels not requiring exposure are filled with the preset exposure grayscale value of 0, so that the area requiring exposure appears black or opaque. After the grayscale filling of all pixels is completed, an exposed display image is obtained. By filling pixels that need to be exposed and / or pixels that do not need to be exposed, the slice outline image can be converted into a pixel image that can be recognized by the display device of the 3D printer, thereby facilitating the exposure and shaping of each printing layer of the model to be printed.
[0086] In one embodiment, the method of filling the grayscale value of the pixel to be exposed can be implemented by the following steps: when the pixel to be exposed is the pixel where the intersection is located, the grayscale value of the pixel at the intersection is filled based on the exposure grayscale value of the pixel where the intersection is located; when the pixel to be exposed is not the pixel where the intersection is located, the grayscale value of the pixel to be exposed is filled based on the first preset grayscale value.
[0087] In the above embodiment, after calculating the exposure grayscale value of the pixel at the intersection, the grayscale value of the pixel at the intersection can be filled based on the exposure grayscale value of the pixel at the intersection. Moreover, for other pixels to be exposed other than the intersection, the grayscale value can be filled based on the first preset grayscale value. In this way, the accuracy of the exposure display image production can be effectively improved.
[0088] In one embodiment, the slice file also includes the vector direction of the line segment of the slice contour image. The method for determining the intersection of the pixel scan line and the slice contour image can be implemented by the following steps: according to the preset arrangement order of multiple line segments in the slice contour image, a line segment is obtained, and after determining the intersection of the obtained line segment and the pixel scan line, the next line segment is obtained according to the preset arrangement order, and this step is repeated until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently obtained line segment with the vector direction are both less than the third direction coordinate value of the pixel scan line, and the intersection point of the obtained line segment and the pixel scan line is used as the intersection point of the pixel scan line and the slice contour image. The third direction coordinate value can be the y-axis coordinate value of the plane where the slice contour image is located, and the direction of the y-axis can be the short side direction of the slice contour image, or can be any custom direction.
[0089] In the above embodiment, the multiple line segments in the slice contour image can be sorted according to the third direction coordinate value of the starting coordinate of the line segment or the third direction coordinate value of the end coordinate of the line segment, so that the line segments can be arranged in sequence according to the size of the coordinate value, thereby facilitating the sequential acquisition of the intersection points of the line segments and the pixel scan line. Furthermore, when the third direction coordinate value of the starting coordinate of the line segment and the third direction coordinate value of the end coordinate are both greater than the third direction coordinate value of the pixel scan line, the acquisition of the intersection point of the line segment and the pixel scan line can be stopped. For example, Figure 5 Take the slice contour image shown as an example. The slice contour image has four line segments, namely ab, bc, cd, and da. The four line segments are sorted according to their y-axis coordinates, and the sorted four line segments are ab, cd, da, and bc. When obtaining the intersection points of each line segment with the pixel scan line of y=5, the intersection points of the four line segments with the pixel scan line of y=5 can be obtained in sequence. When the line segment bc is obtained, the third direction coordinate value of the starting coordinate and the third direction coordinate value of the end coordinate of the line segment are both greater than the third direction coordinate value of 5 of the pixel scan line. At this time, the acquisition of the next intersection point of the line segment and the pixel scan line can be stopped, and the two currently obtained intersection points can be used as the intersection points of the pixel scan line and the slice contour image. In this way, it is possible to avoid traversing all line segments, thereby reducing the computing power of obtaining intersections and improving the efficiency of image conversion.
[0090] In one embodiment, the line segments in the slice contour image can be sorted in the following manner: for multiple line segments in the slice contour image, the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate is used as the reference coordinate value of the line segment; according to the reference coordinate values of the multiple line segments, the line segments in the slice contour image are arranged in ascending order to obtain multiple arranged line segments; or, for multiple line segments in the slice contour image, the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate is used as the reference coordinate value of the line segment; according to the reference coordinate values of the multiple line segments, the line segments in the slice contour image are arranged in descending order to obtain multiple arranged line segments. Alternatively, for each line segment in the slice contour image, the minimum coordinate value of the third direction coordinate value of the starting coordinate of the line segment and the third direction coordinate value of the end coordinate is used as the reference coordinate value of the line segment; according to the reference coordinate value of each line segment, the line segments in the slice contour image are arranged in ascending order to obtain the arranged line segments; or for each line segment in the slice contour image, the maximum coordinate value of the third direction coordinate value of the starting coordinate of the line segment and the third direction coordinate value of the end coordinate is used as the reference coordinate value of the line segment; according to the reference coordinate value of each line segment, the line segments in the slice contour image are arranged in descending order to obtain the arranged line segments.
[0091] In the above embodiment, the line segments in the slice contour image can be sorted according to the third direction coordinate value of the starting point coordinate of the line segment or the third direction coordinate value of the end point coordinate of the line segment, so that the line segments can be arranged in order according to the size of the coordinate value. In this way, it is possible to avoid traversing all line segments when obtaining the intersection point, thereby reducing the computing power of obtaining the intersection point and improving the efficiency of image conversion.
[0092] In one embodiment, the slice file further includes the vector direction of the line segment of the slice contour image, and the method for determining the intersection point of the pixel scan line and the slice contour image can also be implemented by the following steps: obtaining a line segment according to a first preset arrangement order of a plurality of line segments in a first area of the slice contour image; after determining the intersection point of the obtained line segment with the pixel scan line, obtaining the next line segment according to the first preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently obtained line segment with the vector direction are both greater than the third direction coordinate value of the pixel scan line, or until the plurality of line segments in the first area are greater than the third direction coordinate value of the pixel scan line. line segments have been acquired; according to a second preset arrangement order of multiple line segments located in a second area of the slice contour image, a line segment is acquired; after determining the intersection point of the acquired line segment with the pixel scan line, the next line segment is acquired according to the second preset arrangement order, and this step is repeated until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line, or until multiple line segments in the second area have been acquired; at least the intersection point of the line segment acquired in the first area and the second area with the pixel scan line is used as the intersection point of the pixel scan line and the slice contour image.
[0093] In the above embodiment, the slice contour image can be divided into multiple areas, and the intersection points can be searched for in each area respectively. Specifically, for each area, the intersection points of the pixel scan line and the multiple line segments in the area can be obtained in sequence according to the preset arrangement order of the various line segments in the area, until the multiple line segments in the area have been obtained. It should be noted that, in addition to dividing the slice contour image into the first area and the second area, the slice contour image can also be divided into the first area, the second area, the third area and the fourth area, and so on. This embodiment does not specifically limit the number of areas into which the slice contour image is divided. In this embodiment, the intersection points of the pixel scan line and the multiple line segments in each area of the slice contour image can be obtained in parallel. In this way, the intersection points in multiple areas can be searched in parallel at the same time, thereby increasing the efficiency of searching for the intersection points, thereby accelerating the generation efficiency of the exposure display image, and improving the efficiency of model printing.
[0094] In one embodiment, determining the area to be exposed and / or the area not to be exposed based on the determined pixels to be exposed and / or pixels not to be exposed, and obtaining the exposure display image can also be achieved by the following steps: determining part of the area to be exposed and / or the area not to be exposed based on the determined part of the pixels to be exposed and / or pixels not to be exposed; storing the part of the area to be exposed and / or the area not to be exposed in a memory; and obtaining the exposure display image in the memory after all the areas to be exposed and / or the areas not to be exposed are stored in the memory.
[0095] In the above embodiment, during the process of producing the exposure display image, the processor of the 3D printer can store the completed areas to be exposed and / or areas that do not need to be exposed in a memory connected to the processor. After all areas to be exposed and / or areas that do not need to be exposed are produced, the complete exposure display image can be read out from the memory and sent to the display device for display, so that the light source can be controlled to expose according to the shape in the exposure display image to solidify the material to be solidified in the area corresponding to the area to be exposed in the storage mechanism.
[0096] In one embodiment, the above-mentioned photo-stereolithography 3D printing method may further include the following steps: if the flag bit of the acquired slicing file is the first flag bit, determining the exposure display image based on the slicing contour image; if the flag bit of the acquired slicing file is the second flag bit, reading the image compression file in the slicing file, and decompressing the image compression file in the slicing file into the exposure display image.
[0097] In the above embodiment, flags can be set for the slice file, and different image processing methods can be used to obtain the exposure display image based on the different flags. The first flag, the second flag, and the mapping relationship between the flags and the image processing methods can be set according to actual needs and are not specifically limited in this embodiment. This approach can enhance the flexibility of exposure display image processing.
[0098] In one embodiment, further, as Figures 2 to 7 The specific implementation of the method shown in this embodiment provides a light-curing three-dimensional printing device, such as Figure 8 As shown, the device includes: a slice file acquisition module 31, an exposure image generation module 32, and an exposure image curing module 33.
[0099] A slice file acquisition module 31 is configured to acquire a slice file, wherein the slice file includes a slice contour image of at least one slice layer of a model to be printed, wherein the slice contour image includes a plurality of line segments connected sequentially and end to end;
[0100] An exposure image generating module 32 is configured to determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed;
[0101] The exposure image curing module 33 can be used to control the exposure of the light source according to the exposure display image, so as to cure the material to be cured in the area of the material storage mechanism corresponding to the area to be exposed.
[0102] In a specific application scenario, the exposure image generation module 32 includes: a pixel processing unit, which is used to determine a pixel scanning line set along a first direction; determine a pixel scanning line located at the scanning starting point of the slice contour image; determine the intersection of the pixel scanning line and the slice contour image, and according to a preset algorithm, determine whether the pixels at each intersection and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed, and then move the pixel scanning line along a second direction by a preset step length and repeat this step until the scanning end point of the slice contour image is reached; the preset step length is at least one pixel; the second direction is different from the first direction.
[0103] In a specific application scenario, the pixel processing unit is specifically used to determine, based on the arrangement order of the intersections along the first direction, whether the pixels at each intersection and the pixels between each intersection need to be exposed or not; or when the slice file also includes the vector direction of the line segment of the slice contour image, based on whether the vector direction of the line segment where the intersection is located is upward or downward, determine whether the pixels at each intersection and the pixels between each intersection need to be exposed or not; wherein, when the third direction coordinate value of the starting point coordinate of the line segment with the vector direction is less than the third direction coordinate value of the end point coordinate of the line segment with the vector direction, the vector direction of the line segment is upward; when the third direction coordinate value of the starting point coordinate of the line segment with the vector direction is greater than the third direction coordinate value of the end point coordinate of the line segment with the vector direction, the vector direction of the line segment is upward.
[0104] In a specific application scenario, the pixel processing unit is further configured to set, from left to right, the flag value of the pixel before the first intersection on the pixel scan line to an initial value; when an odd-numbered intersection is encountered, add an incremental value to the flag value of the pixel immediately before the intersection on the pixel scan line, and use the value after the incremental value is added as the flag value of one or more pixels immediately after the intersection on the pixel scan line; when an even-numbered intersection is encountered, subtract a decrementing value from the flag value of the pixel immediately before the intersection on the pixel scan line, and use the value after the decrementing value is subtracted as the flag value of one or more pixels immediately after the intersection on the pixel scan line; determine the pixel at which the intersection on the pixel scan line is located as a pixel to be exposed; for other pixels other than the pixel at which the intersection on the pixel scan line is located, when the flag value of the pixel is greater than the initial value, determine the pixel to be exposed, and when the flag value of the pixel is less than or equal to the initial value, determine the pixel to be not exposed.
[0105] In a specific application scenario, the pixel processing unit is further configured to, in order from left to right, set the flag value of the pixel before the first intersection on the pixel scan line to an initial value; when the vector direction of the line segment where the intersection is located is downward, add an incremental value to the flag value of the pixel immediately before the intersection on the pixel scan line, and use the value after the incremental value is added as the flag value of one or more pixels immediately after the intersection on the pixel scan line; when the vector direction of the line segment where the intersection is located is upward, subtract a decrementing value from the flag value of the pixel immediately before the intersection on the pixel scan line, and use the value after the decrementing value is subtracted as the flag value of one or more pixels immediately after the intersection on the pixel scan line; determine the pixel at the intersection on the pixel scan line as a pixel to be exposed; for other pixels on the pixel scan line other than the pixel at the intersection, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel to be exposed, and when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel not to be exposed.
[0106] In a specific application scenario, the pixel processing unit is specifically used to determine the pixels at each intersection as pixels to be exposed; and determine the exposure grayscale value of the pixel at the intersection based on the cutting percentage of the line segment at the intersection for the pixel at the intersection.
[0107] In a specific application scenario, the slice file also includes the vector direction of the line segment of the slice contour image, and the pixel processing unit is specifically used to obtain a line segment according to the preset arrangement order of multiple line segments in the slice contour image; after determining the intersection of the obtained line segment with the vector direction and the pixel scan line, obtain the next line segment according to the preset arrangement order, and repeat this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently obtained line segment are both greater than the third direction coordinate value of the pixel scan line; the intersection point of the obtained line segment and the pixel scan line is used as the intersection point of the pixel scan line and the slice contour image.
[0108] In a specific application scenario, the slice file also includes the vector direction of the line segment of the slice contour image, and the pixel processing unit is specifically used to obtain a line segment according to a first preset arrangement order of multiple line segments in a first area of the slice contour image; after determining the intersection of the obtained line segment and the pixel scan line, obtain the next line segment according to the first preset arrangement order, and repeat this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently obtained line segment with the vector direction are both greater than the third direction coordinate value of the pixel scan line, or until multiple line segments in the first area have been obtained; according to the first preset arrangement order of the line segment located in the pixel scan line, the pixel processing unit is used to obtain a line segment; after determining the intersection of the obtained line segment and the pixel scan line, the pixel processing unit is used to obtain a line segment; A line segment is obtained according to a second preset arrangement order of the plurality of line segments in the second area of the slice contour image; after determining the intersection point of the obtained line segment with the pixel scan line, the next line segment is obtained according to the second preset arrangement order, and this step is repeated until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently obtained line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line, or until the plurality of line segments in the second area have been obtained; at least the intersection point of the line segments obtained in the first area and the second area with the pixel scan line is used as the intersection point of the pixel scan line with the slice contour image.
[0109] In a specific application scenario, the exposure image generation module 32 also includes: a pixel filling unit, which is used to fill the grayscale value of the pixels that need to be exposed based on a first preset grayscale value, and / or, to fill the grayscale value of the pixels that do not need to be exposed based on a second preset grayscale value; after the grayscale values of all pixels are filled, the exposure display image is obtained.
[0110] In a specific application scenario, the pixel filling unit is further used to fill the grayscale value of the pixel at the intersection based on the exposure grayscale value of the pixel at the intersection when the pixel to be exposed is the pixel at the intersection; and to fill the grayscale value of the pixel to be exposed based on the first preset grayscale value when the pixel to be exposed is not the pixel at the intersection.
[0111] In a specific application scenario, the exposure image generation module 32 also includes: an image storage unit, which is used to determine part of the area to be exposed and / or the area not to be exposed based on the determined part of the pixels to be exposed and / or the pixels not to be exposed; store the part of the area to be exposed and / or the area not to be exposed in a memory; after all the areas to be exposed and / or the areas not to be exposed are stored in the memory, obtain the exposure display image in the memory.
[0112] In a specific application scenario, the device is arranged in the FPGA processor of the 3D printer, and the FPGA processor includes one or more of a first hardware processing unit, a second hardware processing unit, a third hardware processing unit and the fourth hardware processing unit; the first hardware processing unit is used to execute the steps of the slice file acquisition module, the second hardware processing unit is used to execute the steps of the pixel processing unit of the exposure image generation module, the third hardware processing unit is used to execute the steps of the pixel filling unit of the exposure image generation module, and the fourth hardware processing unit is used to execute the steps of the image storage unit of the exposure image generation module, wherein one or more of the first hardware processing unit, the second hardware processing unit, the third hardware processing unit and the fourth hardware processing unit can execute the method in the module in parallel.
[0113] In a specific application scenario, the device further includes a slice file processing module, which is used to, for each line segment in the slice contour image, use the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate as the reference coordinate value of the line segment; according to the reference coordinate value of each line segment, the line segments in the slice contour image are arranged in ascending order to obtain the arranged line segments; or, for each line segment in the slice contour image, use the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate as the reference coordinate value of the line segment; according to the reference coordinate value of each line segment, the line segments in the slice contour image are arranged in ascending order to obtain the arranged line segments. Arrange the line segments in the slice contour image in descending order to obtain arranged line segments; or for multiple line segments in the slice contour image, use the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate as the reference coordinate value of the line segment; arrange the line segments in the slice contour image in ascending order according to the reference coordinate values of the multiple line segments to obtain arranged line segments; or for multiple line segments in the slice contour image, use the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate as the reference coordinate value of the line segment; arrange the line segments in the slice contour image in descending order according to the reference coordinate values of the multiple line segments to obtain arranged line segments.
[0114] In a specific application scenario, the exposure image generation module 32 is also used to determine the exposure display image based on the slice contour image if the flag bit of the acquired slice file is the first flag bit; if the flag bit of the acquired slice file is the second flag bit, read the image compression file in the slice file, and decompress the image compression file in the slice file into the exposure display image.
[0115] It should be noted that for other corresponding descriptions of the functional units involved in the light-curing three-dimensional printing device provided in this embodiment, please refer to Figures 2 to 7 The corresponding description in will not be repeated here.
[0116] Based on the above Figures 2 to 7 The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, this embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figures 2 to 7 The slice file generation method and light-stereolithography 3D printing method shown.
[0117] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0118] Based on the above Figures 2 to 7 The method shown, and Figure 8 In the embodiment of the photocuring 3D printing device shown in FIG, in order to achieve the above-mentioned purpose, this embodiment also provides a 3D printer, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor; the memory is used to store the computer program and the operating system; the processor is used to execute the computer program to achieve the above-mentioned Figures 2 to 7 The method shown.
[0119] Optionally, the 3D printer may further include internal memory, a communication interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, a display, an input device such as a keyboard, etc. Optionally, the communication interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface), etc.
[0120] Optionally, the processor in the 3D printer may include a main processor and an FPGA processor. The main processor may be configured to execute the step of acquiring the slice file. The main processor is connected to the FPGA processor and further configured to send the slice contour image in the slice file to the FPGA processor, where the FPGA processor executes the step of determining the exposure display image based on the slice contour image. The steps of acquiring the slice file and determining the exposure display image based on the slice contour image can be found in the above-described embodiments and are not further described here.
[0121] Those skilled in the art will appreciate that the structure of a 3D printer provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0122] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the computer device hardware and the software resources to be identified, supporting the execution of the information processing program and other software and / or programs to be identified. The network communication module is used to enable communication between components within the storage medium and with other hardware and software in the information processing computer device.
[0123] In one embodiment, a slice file generation method, a stereolithography 3D printing method, a stereolithography 3D printing method, a storage medium, and a 3D printer are provided. Specific implementations are as follows:
[0124] Reference numeral 1. A method for generating a slice file, wherein the slice file is used for three-dimensional model printing, the method comprising:
[0125] Acquire a three-dimensional digital model, wherein the three-dimensional digital model includes a plurality of facets;
[0126] Determine the slice plane corresponding to a slice layer;
[0127] Slicing the three-dimensional digital model according to the slicing plane to obtain a slice contour image, wherein the slice contour image includes a plurality of intersection lines between the slicing plane and the surface patches on the three-dimensional digital model;
[0128] The file including the slice contour image is used as a slice file for printing a three-dimensional model on a three-dimensional printer.
[0129] Reference numeral 2: The method according to reference numeral 1, wherein the file including the slice contour image is used as a slice file for printing a three-dimensional model on a three-dimensional printer, comprising:
[0130] Determining the vector direction of the intersection line according to the normal vector of the facet corresponding to the intersection line;
[0131] The file including the slice contour image and the vector directions of the intersection lines is used as a slice file for printing a three-dimensional model on a three-dimensional printer, and the vector directions of the multiple intersection lines of the slice contour image are connected end to end.
[0132] Reference numeral 3. The method according to reference numeral 2, wherein the vector direction of each intersection line of the slice contour image is connected end to end with the vector directions of other intersection lines of the slice contour image, and determining the vector direction of the intersection line according to the normal vector of the surface patch corresponding to the intersection line comprises:
[0133] Determine the vector direction of the edge line of the patch corresponding to the intersection line according to the normal vector of the patch corresponding to the intersection line and the right-hand rule;
[0134] The vector direction of the intersection line is determined according to the vector direction of the patch edge line of the patch corresponding to the intersection line.
[0135] Reference numeral 4. A light-curing 3D printing method, applied to a light-curing 3D printer, the light-curing 3D printer comprising a light source and a material storage mechanism, the light source being configured to emit curing light to cure a material to be cured in the material storage mechanism, the method comprising:
[0136] Acquire a slicing file, wherein the slicing file includes a slicing contour image of at least one slicing layer of a to-be-printed model, wherein the slicing contour image includes a plurality of line segments connected sequentially and end-to-end;
[0137] Determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed;
[0138] The light source is controlled to expose according to the exposure display image, so as to cure the material to be cured in the area of the material storage mechanism corresponding to the area to be exposed.
[0139] Reference numeral 5. The method according to reference numeral 4, wherein the exposure display image is determined according to the slice contour image, comprising:
[0140] determining a pixel scan line arranged along a first direction;
[0141] determining a pixel scanning line located at a scanning starting point of the slice contour image;
[0142] Determining the intersection of the pixel scan line and the slice contour image, and determining, based on a preset algorithm, whether the pixels at each intersection and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed, and then moving the pixel scan line along a second direction by a preset step length and repeating this step until the scanning end point of the slice contour image is reached; the preset step length is at least one pixel; and the second direction is different from the first direction;
[0143] According to the determined pixels that need to be exposed and / or pixels that do not need to be exposed, the area that needs to be exposed and / or the area that does not need to be exposed are determined to obtain the exposure display image.
[0144] Reference numeral 6. The method according to reference numeral 5, wherein determining, according to a preset algorithm, the pixels at each intersection and the pixels between each intersection as pixels to be exposed or pixels not to be exposed comprises:
[0145] Determining, according to the arrangement order of the intersection points along the first direction, whether the pixels at which the intersection points are located and the pixels between the intersection points are pixels that need to be exposed or pixels that do not need to be exposed; or
[0146] In the case where the slice file also includes the vector direction of the line segment of the slice contour image, the pixels at each intersection and the pixels between each intersection are determined as pixels to be exposed or pixels not to be exposed according to whether the vector direction of the line segment at which the intersection is located is upward or downward; wherein, when the third direction coordinate value of the starting point coordinate of the line segment with the vector direction is less than the third direction coordinate value of the end point coordinate of the line segment with the vector direction, the vector direction of the line segment is upward; when the third direction coordinate value of the starting point coordinate of the line segment with the vector direction is greater than the third direction coordinate value of the end point coordinate of the line segment with the vector direction, the vector direction of the line segment is upward.
[0147] Reference numeral 7. The method according to reference numeral 6, wherein determining, based on the arrangement order of the intersection points along the first direction, the pixels at which the intersection points are located and the pixels between the intersection points as pixels to be exposed or pixels not to be exposed comprises:
[0148] In order from left to right, the flag values of the pixels before the first intersection on the pixel scan line are set to initial values;
[0149] When an odd-numbered intersection is encountered, an incremental value is added to the flag value of the pixel immediately preceding the intersection on the pixel scan line, and the value after the incremental value is added is used as the flag value of one or more pixels immediately preceding the intersection on the pixel scan line;
[0150] When an even-numbered intersection is encountered, a decreasing value is subtracted from the flag value of the pixel immediately preceding the intersection on the pixel scan line, and the value after subtracting the decreasing value is used as the flag value of one or more pixels immediately preceding the intersection on the pixel scan line;
[0151] Determine the pixel where the intersection point on the pixel scanning line is located as the pixel to be exposed;
[0152] For other pixels other than the pixel where the intersection is located on the pixel scan line, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel that needs to be exposed; when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel that does not need to be exposed.
[0153] Reference numeral 8. The method according to reference numeral 6, wherein determining, based on whether the vector direction of the line segment where the intersection point is located is upward or downward, the pixels where each intersection point is located and the pixels between each intersection point are pixels to be exposed or pixels not to be exposed, comprises:
[0154] In order from left to right, the flag values of the pixels before the first intersection on the pixel scan line are set to initial values;
[0155] When the vector direction of the line segment where the intersection point is located is downward, an incremental value is added to the flag value of the pixel immediately preceding the intersection point on the pixel scan line, and the value after the incremental value is added is used as the flag value of one or more pixels immediately preceding the intersection point on the pixel scan line;
[0156] When the vector direction of the line segment where the intersection point is located is upward, a decreasing value is subtracted from the flag value of the pixel immediately preceding the intersection point on the pixel scan line, and the value after subtracting the decreasing value is used as the flag value of one or more pixels immediately preceding the intersection point on the pixel scan line;
[0157] Determine the pixel where the intersection point on the pixel scanning line is located as the pixel to be exposed;
[0158] For other pixels other than the pixel where the intersection is located on the pixel scan line, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel that needs to be exposed; when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel that does not need to be exposed.
[0159] Reference numeral 9. The method according to reference numeral 5, wherein determining the pixels at each intersection and the pixels between each intersection as pixels to be exposed or pixels not to be exposed further comprises:
[0160] Determine the pixels where each intersection point is located as pixels to be exposed;
[0161] The exposure grayscale value of the pixel where the intersection point is located is determined according to the cutting percentage of the line segment where the intersection point is located with respect to the pixel where the intersection point is located.
[0162] Reference numeral 10. The method according to reference numeral 9, wherein determining the area to be exposed and / or the area not to be exposed based on the determined pixels to be exposed and / or pixels not to be exposed, and obtaining the exposed display image, comprises:
[0163] Performing grayscale filling on the pixels to be exposed based on the first preset grayscale value and the determined exposure grayscale value of the pixel where the intersection is located, and / or performing grayscale filling on the pixels not to be exposed based on the second preset grayscale value;
[0164] After the grayscale values of all pixels are filled, the exposure display image is obtained.
[0165] Reference numeral 11. The method according to reference numeral 10, wherein the grayscale value filling of the pixel to be exposed is performed based on the first preset grayscale value and the determined exposure grayscale value of the pixel where the intersection is located, comprising:
[0166] When the pixel to be exposed is the pixel at the intersection, performing grayscale value filling on the pixel at the intersection based on the exposure grayscale value of the pixel at the intersection;
[0167] In a case where the pixel to be exposed is not the pixel where the intersection is located, grayscale value filling is performed on the pixel to be exposed based on the first preset grayscale value.
[0168] Reference numeral 12. The method according to reference numeral 5, wherein the slice file further includes a vector direction of a line segment of the slice contour image, and determining the intersection of the pixel scan line and the slice contour image includes:
[0169] Acquire a line segment according to a preset arrangement order of the plurality of line segments in the slice contour image;
[0170] After determining the intersection of the acquired line segment and the pixel scan line, acquiring the next line segment according to the preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line;
[0171] The intersection point of the acquired line segment and the pixel scanning line is used as the intersection point of the pixel scanning line and the slice contour image.
[0172] Reference numeral 13. The method according to reference numeral 12, wherein before acquiring a line segment according to the preset arrangement order of the line segments in the slice contour image, the method further comprises:
[0173] For a plurality of line segments in the slice contour image, taking the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment as the reference coordinate value of the line segment; arranging the line segments in the slice contour image in ascending order according to the reference coordinate values of the plurality of line segments to obtain arranged line segments; or
[0174] For a plurality of line segments in the slice contour image, taking the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment as the reference coordinate value of the line segment; arranging the line segments in the slice contour image in descending order according to the reference coordinate values of the plurality of line segments to obtain arranged line segments; or
[0175] For each line segment in the slice contour image, taking the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment as the reference coordinate value of the line segment; arranging the line segments in the slice contour image in ascending order according to the reference coordinate value of each line segment to obtain arranged line segments; or
[0176] For each line segment in the slice contour image, the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment is used as the reference coordinate value of the line segment; according to the reference coordinate value of each line segment, the line segments in the slice contour image are arranged in descending order to obtain the arranged line segments.
[0177] Reference numeral 14. The method according to reference numeral 5, wherein the slice file further includes a vector direction of a line segment of the slice contour image, and determining the intersection of the pixel scan line and the slice contour image includes:
[0178] Acquire a line segment according to a first preset arrangement order of a plurality of line segments located in a first area of the slice contour image;
[0179] After determining the intersection of the acquired line segment and the pixel scan line, acquiring the next line segment according to the first preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line, or until multiple line segments in the first area have been acquired;
[0180] acquiring a line segment according to a second preset arrangement order of a plurality of line segments located in a second area of the slice contour image;
[0181] After determining the intersection of the acquired line segment and the pixel scan line, acquiring the next line segment according to the second preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line, or until multiple line segments in the second area have been acquired;
[0182] At least the intersection points of the line segments acquired in the first area and the second area with the pixel scanning line are used as the intersection points of the pixel scanning line with the slice contour image.
[0183] Reference numeral 15. The method according to reference numeral 5, wherein the area to be exposed and / or the area not to be exposed are determined based on the determined pixels to be exposed and / or pixels not to be exposed, to obtain the exposed display image, further comprising:
[0184] Determine a portion of the area to be exposed and / or the area not to be exposed according to the determined portion of pixels to be exposed and / or pixels not to be exposed;
[0185] storing the area to be exposed and / or the area not to be exposed of the portion in a memory;
[0186] After all the areas to be exposed and / or the areas not to be exposed are stored in the memory, the exposure display image is obtained in the memory.
[0187] Reference numeral 16. The method according to reference numeral 4, further comprising, after obtaining the slice file,
[0188] If the flag bit of the acquired slice file is the first flag bit, determining the exposure display image according to the slice contour image;
[0189] If the flag bit of the acquired slice file is the second flag bit, the image compression file in the slice file is read, and the image compression file in the slice file is decompressed into an exposure display image.
[0190] Reference numeral 17. A light-curing three-dimensional printing device, disposed in a three-dimensional printer, comprising:
[0191] a slicing file acquisition module, configured to acquire a slicing file, wherein the slicing file includes a slicing contour image of at least one slicing layer of a model to be printed, wherein the slicing contour image includes a plurality of line segments connected in sequence and end to end;
[0192] An exposure image generating module, configured to determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed;
[0193] The exposure image curing module is used to control the exposure of the light source according to the exposure display image to cure the material to be cured in the area of the storage mechanism corresponding to the area to be exposed.
[0194] Reference numeral 18. The apparatus according to reference numeral 17, wherein the exposure image generation module comprises:
[0195] A pixel processing unit is configured to determine a pixel scanning line arranged along a first direction; determine a pixel scanning line located at a scanning starting point of the slice contour image; determine an intersection of the pixel scanning line and the slice contour image, and determine, based on a preset algorithm, whether pixels at each of the intersections and pixels between the intersections are pixels to be exposed or pixels not to be exposed, and then repeatedly perform this step after moving the pixel scanning line along a second direction by a preset step length until the scanning end point of the slice contour image is reached; the preset step length is at least one pixel; and the second direction is different from the first direction.
[0196] Reference numeral 19. The apparatus according to reference numeral 18, wherein the exposure image generation module further comprises:
[0197] A pixel filling unit is used to fill the grayscale values of the pixels that need to be exposed based on a first preset grayscale value, and / or to fill the grayscale values of the pixels that do not need to be exposed based on a second preset grayscale value; after the grayscale values of all pixels are filled, the exposure display image is obtained.
[0198] Reference numeral 20. The apparatus according to reference numeral 19, wherein the exposure image generation module further comprises:
[0199] An image storage unit is used to determine a portion of the area to be exposed and / or the area not to be exposed based on the determined portion of pixels to be exposed and / or pixels not to be exposed; store the portion of the area to be exposed and / or the area not to be exposed in a memory; and obtain the exposure display image in the memory after all the areas to be exposed and / or the areas not to be exposed are stored in the memory.
[0200] Reference number 21. The device according to reference number 20, wherein the device is provided in an FPGA processor of the 3D printer, wherein the FPGA processor includes one or more of a first hardware processing unit, a second hardware processing unit, a third hardware processing unit, and a fourth hardware processing unit;
[0201] The first hardware processing unit is used to execute the steps of the slice file acquisition module, the second hardware processing unit is used to execute the steps of the pixel processing unit of the exposure image generation module, the third hardware processing unit is used to execute the steps of the pixel filling unit of the exposure image generation module, and the fourth hardware processing unit is used to execute the steps of the image storage unit of the exposure image generation module, wherein one or more of the first hardware processing unit, the second hardware processing unit, the third hardware processing unit and the fourth hardware processing unit can be executed in parallel.
[0202] Reference numeral 22. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods of reference numerals 4 to 16.
[0203] Label 23. A three-dimensional printer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of any one of the methods of labels 4 to 16 are implemented.
[0204] Label 24, according to the 3D printer described in Label 23, the processor includes a main processor and an FPGA processor, the main processor is used to execute the step of obtaining the slicing file, the main processor is connected to the FPGA processor, the main processor is further used to send the slicing contour image in the slicing file to the FPGA processor, and the FPGA processor is used to execute the step of determining the exposure display image based on the slicing contour image.
[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the technical solution of the present application, a slicing file including a slicing contour image of at least one slicing layer of the model to be printed is first obtained, and then an exposure display image is determined based on the slicing contour image, and finally the light source exposure is controlled based on the exposure display image to solidify the material to be solidified in the area of the storage mechanism corresponding to the area to be exposed. Compared with the prior art, the space occupied by the slicing file can be effectively reduced, the transmission speed of the slicing file can be increased, and thus the printing speed of the model can be improved.
[0206] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0207] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.
Claims
1. A method for generating a slice file, characterized in that: The slicing file is used for three-dimensional model printing, and the slicing file generation method includes: Acquire a three-dimensional digital model, wherein the three-dimensional digital model includes a plurality of facets; Determine the slice plane corresponding to a slice layer; Slicing the three-dimensional digital model according to the slicing plane to obtain a slice contour image, wherein the slice contour image includes a plurality of intersection lines between the slicing plane and the surface patches on the three-dimensional digital model; Using a file including the slice outline image as a slice file for printing a three-dimensional model on a three-dimensional printer specifically includes: determining a vector direction of the intersection line based on a normal vector of a facet corresponding to the intersection line, wherein the normal vector of the facet is perpendicular to the plane on which the facet is located and is oriented toward a non-filled area of the three-dimensional digital model, and the vector direction of the intersection line is used to determine whether each area of a printed layer of the three-dimensional digital model is a filled area or a non-filled area; using a file including the slice outline image and the vector directions of the intersection lines as a slice file for printing a three-dimensional model on a three-dimensional printer, wherein the vector directions of multiple intersection lines of the slice outline image are connected end to end.
2. The method according to claim 1, characterized in that The vector direction of each intersection line of the slice contour image is connected end to end with the vector directions of other intersection lines of the slice contour image, and determining the vector direction of the intersection line according to the normal vector of the surface patch corresponding to the intersection line includes: Determine the vector direction of the edge line of the patch corresponding to the intersection line according to the normal vector of the patch corresponding to the intersection line and the right-hand rule; The vector direction of the intersection line is determined according to the vector direction of the patch edge line of the patch corresponding to the intersection line.
3. A light-curing three-dimensional printing method, characterized in that: The method is applied to a light-curing 3D printer, the light-curing 3D printer comprising a light source and a material storage mechanism, the light source being configured to emit curing light to cure the material to be cured in the material storage mechanism, and comprising: Obtaining a slicing file, the slicing file including a slicing contour image of at least one slicing layer of a model to be printed, the slicing contour image including a plurality of line segments connected sequentially and end-to-end, the slicing file being generated based on the method of claim 1 or 2; Determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed; The light source is controlled to expose according to the exposure display image, so as to cure the material to be cured in the area of the material storage mechanism corresponding to the area to be exposed.
4. The method according to claim 3, characterized in that Determining an exposure display image according to the slice contour image includes: determining a pixel scan line arranged along a first direction; determining a pixel scanning line located at a scanning starting point of the slice contour image; Determining the intersection of the pixel scan line and the slice contour image, and determining, based on a preset algorithm, whether the pixels at each intersection and the pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed, and then moving the pixel scan line along a second direction by a preset step length and repeating this step until the scanning end point of the slice contour image is reached; the preset step length is at least one pixel; and the second direction is different from the first direction; According to the determined pixels that need to be exposed and / or pixels that do not need to be exposed, the area that needs to be exposed and / or the area that does not need to be exposed are determined to obtain the exposure display image.
5. The method according to claim 4, characterized in that The step of determining, according to a preset algorithm, whether pixels at each intersection and pixels between each intersection are pixels that need to be exposed or pixels that do not need to be exposed includes: Determining, according to the arrangement order of the intersection points along the first direction, whether the pixels at which the intersection points are located and the pixels between the intersection points are pixels that need to be exposed or pixels that do not need to be exposed; or In the case where the slice file also includes the vector direction of the line segment of the slice contour image, the pixels at each intersection and the pixels between each intersection are determined as pixels to be exposed or pixels not to be exposed according to whether the vector direction of the line segment at which the intersection is located is upward or downward; wherein, when the third direction coordinate value of the starting point coordinate of the line segment with the vector direction is less than the third direction coordinate value of the end point coordinate of the line segment with the vector direction, the vector direction of the line segment is upward; when the third direction coordinate value of the starting point coordinate of the line segment with the vector direction is greater than the third direction coordinate value of the end point coordinate of the line segment with the vector direction, the vector direction of the line segment is upward.
6. The method according to claim 5, characterized in that The step of determining, based on the arrangement order of the intersection points along the first direction, whether pixels at each intersection point and pixels between each intersection point are pixels to be exposed or pixels not to be exposed comprises: In order from left to right, the flag values of the pixels before the first intersection on the pixel scan line are set to initial values; When an odd-numbered intersection is encountered, an incremental value is added to the flag value of the pixel immediately preceding the intersection on the pixel scan line, and the value after the incremental value is added is used as the flag value of one or more pixels immediately preceding the intersection on the pixel scan line; When an even-numbered intersection is encountered, a decreasing value is subtracted from the flag value of the pixel immediately preceding the intersection on the pixel scan line, and the value after subtracting the decreasing value is used as the flag value of one or more pixels immediately preceding the intersection on the pixel scan line; Determine the pixel where the intersection point on the pixel scanning line is located as the pixel to be exposed; For other pixels other than the pixel where the intersection is located on the pixel scan line, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel that needs to be exposed; when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel that does not need to be exposed.
7. The method according to claim 5, characterized in that The determining, based on whether the vector direction of the line segment where the intersection point is located is upward or downward, that the pixels where each intersection point is located and the pixels between each intersection point are pixels to be exposed or pixels not to be exposed includes: In order from left to right, the flag values of the pixels before the first intersection on the pixel scan line are set to initial values; When the vector direction of the line segment where the intersection point is located is downward, an incremental value is added to the flag value of the pixel immediately preceding the intersection point on the pixel scan line, and the value after the incremental value is added is used as the flag value of one or more pixels immediately preceding the intersection point on the pixel scan line; When the vector direction of the line segment where the intersection point is located is upward, a decreasing value is subtracted from the flag value of the pixel immediately preceding the intersection point on the pixel scan line, and the value after subtracting the decreasing value is used as the flag value of one or more pixels immediately preceding the intersection point on the pixel scan line; Determine the pixel where the intersection point on the pixel scanning line is located as the pixel to be exposed; For other pixels other than the pixel where the intersection is located on the pixel scan line, when the flag value of the pixel is greater than the initial value, the pixel is determined to be a pixel that needs to be exposed; when the flag value of the pixel is less than or equal to the initial value, the pixel is determined to be a pixel that does not need to be exposed.
8. The method according to claim 4, characterized in that: The step of determining whether pixels at each intersection point and pixels between each intersection point are pixels to be exposed or pixels not to be exposed further includes: Determine the pixels where each intersection point is located as pixels to be exposed; The exposure grayscale value of the pixel where the intersection point is located is determined according to the cutting percentage of the line segment where the intersection point is located with respect to the pixel where the intersection point is located.
9. The method according to claim 8, characterized in that The step of determining the area to be exposed and / or the area not to be exposed based on the determined pixels to be exposed and / or pixels not to be exposed, and obtaining the exposure display image, includes: Performing grayscale filling on the pixels to be exposed based on the first preset grayscale value and the determined exposure grayscale value of the pixel where the intersection is located, and / or performing grayscale filling on the pixels not to be exposed based on the second preset grayscale value; After the grayscale values of all pixels are filled, the exposure display image is obtained.
10. The method according to claim 9, characterized in that The grayscale value filling of the pixel to be exposed based on the first preset grayscale value and the determined exposure grayscale value of the pixel where the intersection is located includes: When the pixel to be exposed is the pixel at the intersection, performing grayscale value filling on the pixel at the intersection based on the exposure grayscale value of the pixel at the intersection; In a case where the pixel to be exposed is not the pixel where the intersection is located, grayscale value filling is performed on the pixel to be exposed based on the first preset grayscale value.
11. The method according to claim 4, characterized in that: The slicing file further includes a vector direction of a line segment of the slicing contour image, and determining the intersection of the pixel scan line and the slicing contour image includes: Acquire a line segment according to a preset arrangement order of the plurality of line segments in the slice contour image; After determining the intersection of the acquired line segment and the pixel scan line, acquiring the next line segment according to the preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line; The intersection point of the acquired line segment and the pixel scanning line is used as the intersection point of the pixel scanning line and the slice contour image.
12. The method according to claim 11, characterized in that Before acquiring a line segment according to the preset arrangement order of the line segments in the slice contour image, the method further includes: For a plurality of line segments in the slice contour image, taking the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment as the reference coordinate value of the line segment; arranging the line segments in the slice contour image in ascending order according to the reference coordinate values of the plurality of line segments to obtain arranged line segments; or For a plurality of line segments in the slice contour image, taking the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment as the reference coordinate value of the line segment; arranging the line segments in the slice contour image in descending order according to the reference coordinate values of the plurality of line segments to obtain arranged line segments; or For each line segment in the slice contour image, taking the minimum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment as the reference coordinate value of the line segment; arranging the line segments in the slice contour image in ascending order according to the reference coordinate value of each line segment to obtain arranged line segments; or For each line segment in the slice contour image, the maximum coordinate value of the third direction coordinate value of the starting point coordinate of the line segment and the third direction coordinate value of the end point coordinate of the line segment is used as the reference coordinate value of the line segment; according to the reference coordinate value of each line segment, the line segments in the slice contour image are arranged in descending order to obtain the arranged line segments.
13. The method according to claim 4, characterized in that: The slicing file further includes a vector direction of a line segment of the slicing contour image, and determining the intersection of the pixel scan line and the slicing contour image includes: Acquire a line segment according to a first preset arrangement order of a plurality of line segments located in a first area of the slice contour image; After determining the intersection of the acquired line segment and the pixel scan line, acquiring the next line segment according to the first preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line, or until multiple line segments in the first area have been acquired; acquiring a line segment according to a second preset arrangement order of a plurality of line segments located in a second area of the slice contour image; After determining the intersection of the acquired line segment and the pixel scan line, acquiring the next line segment according to the second preset arrangement order, and repeating this step until it is determined that the third direction coordinate value of the starting point coordinate and the third direction coordinate value of the end point coordinate of the currently acquired line segment with a vector direction are both greater than the third direction coordinate value of the pixel scan line, or until multiple line segments in the second area have been acquired; At least the intersection points of the line segments acquired in the first area and the second area with the pixel scanning line are used as the intersection points of the pixel scanning line with the slice contour image.
14. The method according to claim 4, characterized in that The step of determining the area to be exposed and / or the area not to be exposed based on the determined pixels to be exposed and / or pixels not to be exposed, and obtaining the exposure display image, further includes: Determine a portion of the area to be exposed and / or the area not to be exposed according to the determined portion of pixels to be exposed and / or pixels not to be exposed; storing the area to be exposed and / or the area not to be exposed of the portion in a memory; After all the areas to be exposed and / or the areas not to be exposed are stored in the memory, the exposure display image is obtained in the memory.
15. The method according to claim 3, characterized in that After obtaining the slice file, the method further includes: If the flag bit of the acquired slice file is the first flag bit, determining the exposure display image according to the slice contour image; If the flag bit of the acquired slice file is the second flag bit, the image compression file in the slice file is read, and the image compression file in the slice file is decompressed into an exposure display image.
16. A light-curing three-dimensional printing device, arranged in a three-dimensional printer, characterized in that: The device comprises: a slicing file acquisition module, configured to acquire a slicing file, wherein the slicing file includes a slicing contour image of at least one slicing layer of a model to be printed, the slicing contour image including a plurality of line segments connected sequentially and end-to-end, the slicing file being generated based on the method of claim 1 or 2; An exposure image generating module, configured to determine an exposure display image according to the slice contour image, wherein the exposure display image includes an area to be exposed and / or an area not to be exposed; The exposure image curing module is used to control the exposure of the light source according to the exposure display image to cure the material to be cured in the area of the storage mechanism corresponding to the area to be exposed.
17. The device according to claim 16, characterized in that The exposure image generation module includes: A pixel processing unit is configured to determine a pixel scanning line arranged along a first direction; determine a pixel scanning line located at a scanning starting point of the slice contour image; determine an intersection of the pixel scanning line and the slice contour image, and determine, based on a preset algorithm, whether pixels at each of the intersections and pixels between the intersections are pixels to be exposed or pixels not to be exposed, and then repeatedly perform this step after moving the pixel scanning line along a second direction by a preset step length until the scanning end point of the slice contour image is reached; the preset step length is at least one pixel; and the second direction is different from the first direction.
18. The device according to claim 17, characterized in that The exposure image generation module further includes: A pixel filling unit is used to fill the grayscale values of the pixels that need to be exposed based on a first preset grayscale value, and / or to fill the grayscale values of the pixels that do not need to be exposed based on a second preset grayscale value; after the grayscale values of all pixels are filled, the exposure display image is obtained.
19. The device according to claim 18, characterized in that The exposure image generation module further includes: An image storage unit is used to determine a portion of the area to be exposed and / or the area not to be exposed based on the determined portion of pixels to be exposed and / or pixels not to be exposed; store the portion of the area to be exposed and / or the area not to be exposed in a memory; and obtain the exposure display image in the memory after all the areas to be exposed and / or the areas not to be exposed are stored in the memory.
20. The device according to claim 19, characterized in that The device is provided in an FPGA processor of the three-dimensional printer, wherein the FPGA processor includes one or more of a first hardware processing unit, a second hardware processing unit, a third hardware processing unit, and a fourth hardware processing unit; The first hardware processing unit is used to execute the steps of the slice file acquisition module, the second hardware processing unit is used to execute the steps of the pixel processing unit of the exposure image generation module, the third hardware processing unit is used to execute the steps of the pixel filling unit of the exposure image generation module, and the fourth hardware processing unit is used to execute the steps of the image storage unit of the exposure image generation module, wherein one or more of the first hardware processing unit, the second hardware processing unit, the third hardware processing unit and the fourth hardware processing unit can be executed in parallel.
21. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 3 to 15 are implemented.
22. A three-dimensional printer, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 3 to 15 when executed by the processor.
23. The three-dimensional printer according to claim 22, characterized in that: The processor includes a main processor and an FPGA processor. The main processor is used to execute the step of obtaining the slice file. The main processor is connected to the FPGA processor. The main processor is also used to send the slice contour image in the slice file to the FPGA processor. The FPGA processor is used to execute the step of determining the exposure display image based on the slice contour image.
Citation Information
Patent Citations
Method for determining minimum partition filling direction of three-dimensional printing
CN110001066A
Region determination device for slice model, three-dimensional printing system, and region determination method for slice model
US20160288426A1