Disclosure of Invention
In view of at least one of the above technical problems, an object of the present invention is to provide a divisional slicing method, a 3D printing method, an apparatus, and a storage medium.
In one aspect, embodiments of the invention include
Acquiring a geometric model boundary to be subjected to 3D printing;
slicing is carried out according to the boundary of the geometric model, and a plurality of slicing layers and the outer contour of each slicing layer are obtained;
identifying a recessed layer and a non-recessed layer in the plurality of sliced layers;
generating a boundary contour of the concave layer according to the outer contour of the concave layer; the area in the outer contour of the concave layer is the inner area of the concave layer, and the area between the outer contour and the boundary contour of the concave layer is the outer area of the concave layer;
generating an inner contour of the non-concave layer according to the outer contour of the non-concave layer; the area in the inner contour of the non-concave layer is the inner area of the non-concave layer, and the area between the inner contour and the outer contour of the non-concave layer is the outer area of the non-concave layer;
an inner region of each of the sliced layers is set to have a first printing accuracy and an outer region of each of the sliced layers is set to have a second printing accuracy.
Further, identifying recessed layers and non-recessed layers in the plurality of sliced layers includes:
acquiring a corresponding inclination angle of each sliced layer; the inclined angle is the extending direction of the corresponding slice layer on the section and the included angle between the corresponding point connecting line of the corresponding slice layer and the next slice layer;
when the inclination angle corresponding to one slicing layer is smaller than 90 degrees and the inclination angle corresponding to the upper slicing layer of the slicing layer is larger than 90 degrees, the slicing layer is determined as the inner concave layer, otherwise, the slicing layer is determined as the non-inner concave layer.
Further, the second printing accuracy is higher than the first printing accuracy.
Further, the distance between corresponding points of the outer contour and the boundary contour in the concave layer is equal to the first printing precision.
Further, the distance between corresponding points of the outer contour and the inner contour in the non-concave layer is equal to the first printing precision.
Further, the geometric model is in stl format.
On the other hand, the embodiment of the invention also comprises a 3D printing method, comprising:
obtaining a plurality of slicing layers and printing precision of each region of each slicing layer by using a regional slicing method for 3D printing in an embodiment;
and 3D printing is carried out on each area of each sliced layer with corresponding printing precision.
In another aspect, an embodiment of the present invention further includes a computer apparatus including a memory and a processor, where the memory is configured to store at least one program, and the processor is configured to load the at least one program to perform the 3D printing method or the 3D printing method for 3D printing in the embodiment.
In another aspect, embodiments of the present invention also include a storage medium in which a processor-executable program is stored, the processor-executable program being configured to perform the 3D printing method or the 3D printing method for 3D printing in embodiments, when executed by a processor.
The invention has the beneficial effects that: when the regional slicing method in the embodiment is applied to 3D printing, as the determined internal region has lower requirement on printing precision, the internal region of each sliced layer is printed by using the first printing precision with lower precision, higher printing speed can be obtained on the premise of not influencing performance, and the higher printing precision requirement of the external region can be met by using the higher second printing precision, so that the balance between the printing precision and the printing speed is obtained.
Detailed Description
In this embodiment, referring to fig. 1, the method for 3D printing by dividing the area into slices includes the following steps:
s1, acquiring a geometric model boundary to be subjected to 3D printing;
s2, slicing according to the boundary of the geometric model to obtain a plurality of slice layers and the outline of each slice layer;
s3, identifying an inner concave layer and a non-inner concave layer in the plurality of slice layers;
s4, generating a boundary contour of the inner concave layer according to the outer contour of the inner concave layer; the area in the outer contour of the concave layer is the inner area of the concave layer, and the area between the outer contour and the boundary contour of the concave layer is the outer area of the concave layer;
s5, generating an inner contour of the non-inner concave layer according to the outer contour of the non-inner concave layer; the area in the inner contour of the non-concave layer is the inner area of the non-concave layer, and the area between the inner contour and the outer contour of the non-concave layer is the outer area of the non-concave layer;
s6, setting the inner domain of each sliced layer to have first printing precision, and setting the outer domain of each sliced layer to have second printing precision.
In step S1, the geometric model in stl format is obtained, step S2 is performed to slice the boundary of the geometric model, and the obtained result is as shown in fig. 2, and when one of the slices is viewed in cross section, a plurality of slice layers numbered 1, 2, 3, 4, etc. are visible, and the outer contour of each slice layer is distributed along the boundary of the geometric model.
In step S3, the inclination angle corresponding to each slice layer is first determined. Referring to fig. 2, for the slice layer numbered 1, a ray is taken from the middle point in the outer contour in the same direction as the extending direction of the slice layer, for the next slice layer numbered 1, the middle point in the outer contour is determined, and a ray is also obtained by connecting the slice layer numbered 1 and the middle point in the outer contour of the next slice layer, and the included angle α formed by the two rays is the inclined angle corresponding to the slice layer numbered 1. According to the method, the inclination angle corresponding to each sliced layer can be obtained.
In step S3, if the inclination angle corresponding to one slice layer is smaller than 90 ° and the inclination angle corresponding to the last slice layer of the slice layer is larger than 90 °, the slice layer is determined as the inner concave layer, otherwise the slice layer is determined as the non-inner concave layer. In fig. 2, only the slice layer numbered 2 is an inner concave layer, and since the corresponding inclination angle is smaller than 90 °, and the inclination angle corresponding to the last slice layer of the slice layer, that is, the slice layer numbered 3, is larger than 90 °, the other slice layers do not meet the condition, so that the other slice layers are non-inner concave layers.
In step S4, for the concave layer, referring to fig. 3, a boundary contour having the same shape is generated outside the outer contour according to the shape of the outer contour. The distance between the corresponding points of the outer contour and the boundary contour is equal to the first printing precision, for example, when the first printing precision is set to be H, the distance between the corresponding points of the outer contour and the boundary contour is H. For the concave layer, its inner region refers to the region within the outer contour and its outer region refers to the region between the outer contour and the boundary contour.
In step S5, for the non-recessed layer, referring to fig. 4, an inner contour having the same shape is generated inside the outer contour according to the shape of the outer contour. The distance between the corresponding points of the outer contour and the inner contour is equal to the first printing precision, for example, when the first printing precision is set to H, the distance between the corresponding points of the outer contour and the inner contour is H. For a non-concave layer, its inner region refers to the area within the inner contour, and its outer region refers to the area between the outer and inner contours.
In step S6, the inner region of each cut sheet layer is set to have a first printing accuracy, and the outer region of each cut sheet layer is set to have a second printing accuracy. Specifically, for the concave layer, since its inner region refers to a region within the outer contour and its outer region refers to a region between the outer contour and the boundary contour, the region within the outer contour of the concave layer is set to have the first printing accuracy and the region between the outer contour and the boundary contour of the concave layer is set to have the second printing accuracy. For the non-concave layer, since the inner region thereof refers to a region within the inner contour and the outer region thereof refers to a region between the outer contour and the inner contour, the region within the inner contour of the non-concave layer is set to have a first printing precision and the region between the outer contour and the inner contour of the non-concave layer is set to have a second printing precision.
In the present embodiment, the second printing accuracy is higher than the first printing accuracy. When the first printing precision and the second printing precision are expressed in units of length, for example, the first printing precision is expressed as length H and the second printing precision is expressed as length H, since the smaller the length, the higher the printing precision, the second printing precision is higher than the first printing precision, which means H < H. For convenience of 3D printing, H ═ Z × H may be set, where Z is a positive integer.
By performing steps S1-S6, the results are shown in FIG. 5. Based on the results shown in fig. 5, a 3D printing method is performed to 3D print each region of each sliced layer with a corresponding printing precision. Specifically, when printing the inner region of each sliced layer, i.e., the region within the outer contour of the concave layer or the region within the inner contour of the non-concave layer, 3D printing is performed using a first printing precision H having a lower precision; when printing the outer region of each sliced layer, i.e. the region between the outer contour and the boundary contour of the recessed layer or the region between the outer contour and the inner contour of the non-recessed layer, 3D printing is performed using a higher second printing precision h. Since the inner domain determined through steps S1-S6 has a lower requirement on printing accuracy, it is possible to print with a lower first printing accuracy H, achieving a higher printing speed without affecting performance, and with a higher second printing accuracy H satisfying a higher printing accuracy requirement of the outer domain, thereby achieving a balance between printing accuracy and printing speed.
The 3D printing method or the 3D printing method for 3D printing in the present embodiment may be performed by writing a computer program that executes the 3D printing method or the 3D printing method for 3D printing in the present embodiment, writing the computer program into a computer device or a storage medium, and when the computer program is read out and run.
It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, the descriptions of upper, lower, left, right, etc. used in the present disclosure are only relative to the mutual positional relationship of the constituent parts of the present disclosure in the drawings. As used in this disclosure, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. In addition, unless defined otherwise, all technical and scientific terms used in this example have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description of the embodiments herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this embodiment, the term "and/or" includes any combination of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element of the same type from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present disclosure. The use of any and all examples, or exemplary language ("e.g.," such as "or the like") provided with this embodiment is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, operations of processes described in this embodiment can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described in this embodiment (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described in this embodiment includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described in the present embodiment to convert the input data to generate output data that is stored to a non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.