WO2023029619A1 - Slicing method for three-dimensional model, printing method and related device - Google Patents
Slicing method for three-dimensional model, printing method and related device Download PDFInfo
- Publication number
- WO2023029619A1 WO2023029619A1 PCT/CN2022/095545 CN2022095545W WO2023029619A1 WO 2023029619 A1 WO2023029619 A1 WO 2023029619A1 CN 2022095545 W CN2022095545 W CN 2022095545W WO 2023029619 A1 WO2023029619 A1 WO 2023029619A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- triangular
- directed
- target layer
- layer slice
- contour
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000007639 printing Methods 0.000 title claims abstract description 21
- 239000013598 vector Substances 0.000 claims description 46
- 238000012545 processing Methods 0.000 claims description 14
- 238000010146 3D printing Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000001723 curing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 239000007788 liquid Substances 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 239000000843 powder Substances 0.000 description 2
- 239000011347 resin Substances 0.000 description 2
- 229920005989 resin Polymers 0.000 description 2
- HCUOEKSZWPGJIM-YBRHCDHNSA-N (e,2e)-2-hydroxyimino-6-methoxy-4-methyl-5-nitrohex-3-enamide Chemical compound COCC([N+]([O-])=O)\C(C)=C\C(=N/O)\C(N)=O HCUOEKSZWPGJIM-YBRHCDHNSA-N 0.000 description 1
- 101100162200 Aspergillus parasiticus (strain ATCC 56775 / NRRL 5862 / SRRC 143 / SU-1) aflD gene Proteins 0.000 description 1
- 239000000919 ceramic Substances 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000000016 photochemical curing Methods 0.000 description 1
- 239000004033 plastic Substances 0.000 description 1
- 238000006116 polymerization reaction Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B29—WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
- B29C—SHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
- B29C64/00—Additive manufacturing, i.e. manufacturing of three-dimensional [3D] objects by additive deposition, additive agglomeration or additive layering, e.g. by 3D printing, stereolithography or selective laser sintering
- B29C64/30—Auxiliary operations or equipment
- B29C64/386—Data acquisition or data processing for additive manufacturing
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B33—ADDITIVE MANUFACTURING TECHNOLOGY
- B33Y—ADDITIVE MANUFACTURING, i.e. MANUFACTURING OF THREE-DIMENSIONAL [3-D] OBJECTS BY ADDITIVE DEPOSITION, ADDITIVE AGGLOMERATION OR ADDITIVE LAYERING, e.g. BY 3-D PRINTING, STEREOLITHOGRAPHY OR SELECTIVE LASER SINTERING
- B33Y50/00—Data acquisition or data processing for additive manufacturing
Definitions
- the invention relates to the technical field of 3D printing, in particular to a slicing method of a three-dimensional model, a printing method and related equipment.
- 3D printing belongs to rapid prototyping technology. It is based on digital models and uses materials such as metal powder, ceramic powder, plastic or liquid photosensitive resin to print out the entire three-dimensional object layer by layer.
- the process of 3D printing is to first design the 3D model through computer 3D modeling software, then "slice" the 3D model into layer-by-layer sections, and then obtain the processing path according to the analysis section information, so as to guide the 3D printer to print layer by layer.
- the superposition results in a three-dimensional object.
- the most widely used 3D printing technology is light-curing 3D printing.
- the material used in light-curing 3D printing is generally photosensitive resin, usually liquid, with a certain ratio of photoinitiator, which undergoes polymerization reaction under light irradiation to achieve fixation.
- photosensitive resin usually liquid
- photoinitiator which undergoes polymerization reaction under light irradiation to achieve fixation.
- Embodiments of the present invention provide a three-dimensional model slicing method, a printing method and related equipment, so as to solve the problem of low efficiency of three-dimensional model slicing in the prior art.
- an embodiment of the present invention provides a method for slicing a three-dimensional model, the method comprising:
- the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice;
- a contour picture of the target layer slice corresponding to the triangular skirt set is generated according to the half-edge data structure of the triangular patch.
- an embodiment of the present invention provides a printing method, the method comprising:
- the file to be printed is an outline picture generated by the slicing method of the three-dimensional model described in the first aspect.
- an embodiment of the present invention provides a printing system, including: a slicing device and a printing device;
- the slicing device is used to execute the slicing method of the three-dimensional model described in the first aspect
- a printing device that uses the outline picture output by the slicing device, and obtains a model to be printed according to the outline picture.
- an embodiment of the present invention provides a printing device, including: a memory, a processor, and a program stored in the memory and operable on the processor, when the program is executed by the processor. The steps in the method for slicing a three-dimensional model as described in the first aspect are realized.
- an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the three-dimensional model as described in the first aspect is implemented. Steps in the slice method.
- the triangular skirt set corresponding to the target layer slice of the 3D model is determined, wherein the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice; The half-edge data structure of the triangular patch in the triangular crony set; generating the outline picture of the target layer slice corresponding to the triangular crony set according to the half-edge data structure of the triangular patch.
- the outline picture of the target layer slice corresponding to the triangular skirt set is determined through the half-edge data structure of the triangle patch in the triangular skirt set, which can improve the efficiency of 3D model slicing.
- Fig. 1 is a flow chart of a method for slicing a three-dimensional model provided by an embodiment of the present invention
- Fig. 2 is one of the schematic diagrams of a three-dimensional model slice provided by an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a half-edge data structure provided by an embodiment of the present invention.
- Fig. 4 is the second schematic diagram of a three-dimensional model slice provided by an embodiment of the present invention.
- Fig. 5 is the third schematic diagram of a three-dimensional model slice provided by an embodiment of the present invention.
- Fig. 6 is a fourth schematic diagram of a three-dimensional model slice provided by an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a printing device provided by an embodiment of the present invention.
- Fig. 1 is a flowchart of a method for slicing a three-dimensional model provided by an embodiment of the present invention, as shown in Fig. 1 , it includes the following steps:
- Step 101 Determine a triangular skirt set corresponding to a target layer slice of the 3D model, wherein the triangular skirt set includes at least two triangle faces that intersect with a tangent plane of the target layer slice.
- the target layer slice may be a layer slice or all layer slices of the three-dimensional model.
- the target layer slice is any layer slice of the three-dimensional model.
- All triangular patches of the 3D model to be processed may be traversed to determine a triangular skirt set corresponding to the target layer slice.
- Multithreading can be used to traverse all the triangular patches in the 3D model to be processed. As shown in FIG. 2, the triangular patches intersecting with the tangent plane P of the target layer slice can be obtained, and the triangle skirt set corresponding to the target layer slice can be established.
- Step 102 Obtain the half-edge data structure of the triangular patch in the triangular crony set.
- the half-edge data structure of the triangular face may include vertices, half-edges and faces of the triangular face.
- the triangular facets in the triangular crony set redundant vertices and degenerate triangles can be removed, the topological data structure of the point-line face of the triangular facets can be established, and the half-edge data structure of the triangular facets can be obtained. .
- triangular patch fA consists of points ⁇ 0, 1, 2 ⁇ , half sides ⁇ 0, 1 ⁇ , ⁇ 1, 2 ⁇ , ⁇ 2, 0 ⁇ ; triangular patch fB is composed of points ⁇ 0, 2, 3 ⁇ , half edges ⁇ 0, 2 ⁇ , ⁇ 2, 3 ⁇ , ⁇ 3, 0 ⁇ ; fA and fB are adjacent to each other, and the half edge of fB ⁇ 0, 2 ⁇ and the half side ⁇ 2, 0 ⁇ of fA form a complete line segment.
- Step 103 Generate a contour picture of the target layer slice corresponding to the triangular crony set according to the half-edge data structure of the triangular patch.
- all intersections of the tangent planes of the triangle patch in the triangular crony set and the target layer slice corresponding to the triangular crony set can be determined according to the half-edge data structure of the triangular patch, and according to all the intersection points A contour picture of the target layer slice corresponding to the triangular crony set is generated.
- the generating the outline picture of the target layer slice corresponding to the triangular crony set based on all the intersection points may be to determine the directed line segment set formed by all the intersection points, and the directed line segment set includes A plurality of directed line segments, based on the plurality of directed line segments corresponding to the triangular crony set, determine the contour picture of the target layer slice corresponding to the triangular crony set.
- a slice file of the three-dimensional model may be generated based on the contour picture.
- contour pictures corresponding to all layer slices of the 3D model may be packaged and compressed to obtain a slice file of the 3D model.
- the slice file of the 3D model may be a compressed file of zip type obtained by packing and compressing all outline images.
- the method for slicing a three-dimensional model in the embodiment of the present invention can be applied in the process of photocuring and slicing a three-dimensional model.
- the triangular skirt set corresponding to the target layer slice of the 3D model is determined, wherein the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice; The half-edge data structure of the triangular patch in the triangular crony set; generating the outline picture of the target layer slice corresponding to the triangular crony set according to the half-edge data structure of the triangular patch.
- the outline picture of the target layer slice corresponding to the triangular skirt set is determined through the half-edge data structure of the triangle patch in the triangular skirt set, which can improve the efficiency of 3D model slicing.
- the generating the outline picture of the target layer slice corresponding to the triangle crony set according to the half-edge data structure of the triangle patch includes:
- a contour picture of the target layer slice corresponding to the triangular crony set is determined based on the plurality of directed line segments corresponding to the triangular crony set.
- the plurality of directed line segments corresponding to the triangular crony set may form at least two continuous line segments corresponding to the triangular crony set, and the determining of the corresponding triangular crony set based on the multiple directed line segments
- the contour picture of the target layer slice may be to determine the coordinate positions of all line heads of the at least two continuous line segments, and perform integer processing on the coordinate positions of all line heads, and the line heads are the coordinate positions of the continuous line segments
- the end point is to obtain at least two target line heads with the same coordinate positions obtained after the integer processing, and establish a line segment between the target line heads to obtain the contour line of the target layer slice corresponding to the triangular crony set, based on
- the contour lines of the target layer slice corresponding to the triangular crony set determine the contour picture of the target layer slice corresponding to the triangular crony set; or, determine the at least two corresponding to the triangular crony set
- the triangular patch fa is composed of points ⁇ 2, 0, 1 ⁇ , half sides ⁇ 2, 0 ⁇ , ⁇ 0, 1 ⁇ , ⁇ 1, 2 ⁇ ;
- the triangular patch fb is composed of points ⁇ 2, 1, 3 ⁇ , half sides ⁇ 2, 1 ⁇ , ⁇ 1, 3 ⁇ , ⁇ 3, 2 ⁇ ;
- triangular patch fc consists of points ⁇ 3, 4, 2 ⁇ , half sides ⁇ 3, 4 ⁇ , ⁇ 4 , 2 ⁇ , ⁇ 2, 3 ⁇ composition.
- fa ⁇ 0, 1 ⁇ does not intersect the tangent plane, then go to fa ⁇ 1, 2 ⁇ ; fa ⁇ 1, 2 ⁇ intersects the tangent plane, and the intersection point seg[0 ], at the same time, you can find the adjacent edge fb ⁇ 2, 1 ⁇ of fa ⁇ 1, 2 ⁇ ; fb ⁇ 2, 1 ⁇ and fa ⁇ 1, 2 ⁇ are the same line segment, go to fb ⁇ 1, 3 ⁇ ; fb ⁇ 1, 3 ⁇ does not intersect with the tangent plane, go to fb ⁇ 3, 2 ⁇ ; fb ⁇ 3, 2 ⁇ intersects with the tangent plane, get the intersection point seg[1], and at the same time find the adjacent surface of fb ⁇ 3, 2 ⁇ fc ⁇ 2, 3 ⁇ ; fc ⁇ 2, 3 ⁇ and fb ⁇ 3, 2 ⁇ are the same line segment, go to fc ⁇ 3, 4 ⁇ , fc ⁇ 3, 4 ⁇ does not intersect with the tangent plane,
- all intersection points of the tangent planes of the triangle patch in the triangular crony set and the target layer slice corresponding to the triangular crony set are determined according to the half-edge data structure of the triangular patch, and the The set of directed line segments formed by all the above-mentioned intersection points can determine the set of directed line segments relatively quickly, so that the outline picture of the target layer slice can be determined based on the set of directed line segments.
- the determining all intersection points between the triangular patches in the triangular skirt set and the tangent plane of the target layer slice according to the half-edge data structure of the triangular patches includes:
- the target The triangle patch is any triangle patch in the triangular crony set
- the half-edge data structure of the target triangle patch includes the first directed edge, the second directed edge and the third directed edge side, the lower half of the first directed side is the second directed side, the lower half of the second directed side is the third directed side, and the third directed side
- the lower half is the first directed edge
- the determination of the set of directed line segments formed by all the intersection points includes:
- the set of directed line segments includes the first directed line segment.
- the fourth directed side and the fifth directed side of the triangular patch adjacent to the target triangular patch in the triangular skirt set may be sequentially determined, and the target layer slice corresponding to the triangular skirt set Whether there is an intersection point in the tangent plane of the target triangular patch, to obtain the third intersection point between the triangular patch adjacent to the target triangular patch and the tangent plane, the half-edge data structure of the triangular patch adjacent to the target triangular patch includes The fourth directional side, the fifth directional side and the sixth directional side, the sixth directional side and the third directional side are the same line segment, the bottom of the sixth directional side Half of the side is the fourth oriented side, the next half of the fourth oriented side is the fifth oriented side, and the next half of the fifth oriented side is the sixth oriented side ;
- the second directed line segment can be determined according to the third intersection point and the second intersection point, the direction of the second directed line segment is that the second intersection point points to the third intersection point, and the determination time
- the first directed edge, the second directed edge and the third directed edge of the target triangular patch in the triangular skirt set are sequentially determined, and the target layer slice corresponding to the triangular skirt set Whether there is an intersection point between the tangent planes of , and obtain the set of directed line segments according to the determined intersection point, in this way, the set of directed line segments can be determined in an orderly and efficient manner.
- the slices of the three-dimensional model are filtered in layers, and the data that will be used repeatedly in the three-dimensional model is prepared in advance in each processing of the slices of the three-dimensional model, which reduces the data collection elements required for subsequent processing, and can Greatly improve slicing efficiency.
- the plurality of directed line segments form at least two continuous line segments
- the determining the contour picture of the target layer slice corresponding to the triangular crony set based on the plurality of directed line segments corresponding to the triangular crony set includes:
- a contour picture of the target layer slice corresponding to the triangular skirt set is determined based on the contour line of the target layer slice.
- the integer processing may be to directly remove the last digit or the last two digits of the coordinate positions of all thread ends; or it may be to perform rounding processing on the last digit or the last two digits of the coordinate positions.
- all thread ends include thread ends A, B, C, D, E, F, G, H, O and Q, take thread end A and thread end B as example, the coordinate position of thread end A is (1.085 , 2.065), the coordinate position of thread head B is (1.086, 2.068), after the integer processing of the coordinate positions of thread head A and thread head B, the coordinate position of thread head A is (1.09, 2.07), and the coordinate position of thread head B is is (1.09, 2.07), the coordinate position of thread head A is the same as the coordinate position of thread head B after integer processing, and thread head A and thread head B can be connected.
- the remaining thread ends can be searched by the nearest neighbor point, and the remaining thread ends are connected with their nearest adjacent thread ends to obtain the target layer slice corresponding to the triangular crony set. contour line.
- At least two target line heads with the same coordinate positions obtained after the integer processing are obtained, and a line segment between the target line heads is established to obtain the contour line of the target layer slice corresponding to the triangular crony set,
- the directed line segment set can be determined more quickly, and the number of line ends can be reduced; and, by establishing the line segment between the target line ends to obtain the contour line of the target layer slice corresponding to the triangular skirt set, it is possible to avoid the
- the original model has the problem of low efficiency due to damage or self-intersection, which requires manual connection of a large number of wire ends.
- the determining the contour picture of the target layer slice corresponding to the triangular crony set based on the contour line of the target layer slice includes:
- the first vector of each directed line segment in the plurality of directed line segments corresponding to the triangular crony set can be determined, the first vector is the geometric representation of the directed line segment, and according to each directed line segment
- the normal vectors of the two triangular patches corresponding to the starting point of the oriented line segment determine the second vector corresponding to each oriented line segment, wherein the second vector is one of the vectors of the normal vectors of the two triangular patches
- the intersection point of each triangle patch in the two triangle patches corresponding to the starting point and the tangent plane of the target layer slice includes the starting point, and can be based on each of the directional triangle patches corresponding to the triangular skirt set
- the first vector corresponding to the line segment and the second vector corresponding to each directed line segment determine the direction of the contour line of the target layer slice corresponding to the triangular skirt set.
- the triangular crony set corresponding to the triangular crony set may be determined according to the cross product result of the first vector of each directed line segment corresponding to the triangular crony set and the second vector corresponding to each directed line segment. Describes the direction of the outline of the target layer slice.
- the direction of the contour line can be inward or outward, inwardly refers to the area enclosed by the contour line, and outwardly refers to the area outside the area enclosed by the contour line.
- the area enclosed by the contour line is rendered as a hollow area; if the direction of the contour line is outward, the area enclosed by the contour line is rendered into a solid area.
- the direction of the contour line of the target layer slice corresponding to the triangular skirt set is determined, and the direction of the contour line is determined according to the direction of the contour line.
- the contour line is rendered to obtain the contour picture of the target layer slice corresponding to the triangular crony set, so that the contour picture of the target layer slice can be obtained through more accurate rendering.
- the determining the direction of the contour line of the target layer slice according to the plurality of directed line segments corresponding to the triangular skirt set includes:
- the second vector corresponding to each directed line segment determines the second vector corresponding to each directed line segment, wherein the second vector is the two triangle faces
- the sum of the vectors of the normal vectors of the starting point, the intersection of each triangle patch and the tangent plane of the target layer slice in the two triangle patches corresponding to the starting point all includes the starting point;
- the direction of the contour line of the target layer slice is determined according to the cross product result of the first vector of each directed line segment and the second vector corresponding to each directed line segment.
- the directed line segment can include the line segment formed by the intersection points seg[0] and seg[1], and the direction of the line segment is that the intersection point seg[0] points to seg [1]; the directed line segment may also include the line segment formed by the intersection point seg[1] and seg[2], and the direction of the line segment is that the intersection point seg[1] points to seg[2].
- the starting point of the directed line segment formed by seg[1] and seg[2] is seg[1], and the two triangle patches corresponding to seg[1] are fb and fc.
- the cross product result of the first vector of the directed line segment and the second vector corresponding to the directed line segment is greater than 0, it can be considered that the directed line segment votes in favor; the first vector of the directed line segment and the second vector corresponding to the directed line segment If the cross product result of the vector is less than or equal to 0, it can be considered that the directed line segment casts a negative vote.
- the orientation represented by the second vector corresponding to the directed line segment voting in favor may be determined as the profile The direction of the line; if there are more directed line segments that cast negative votes than directed line segments that vote in favor among the plurality of directed line segments, the orientation represented by the second vector corresponding to the directed line segments that cast negative votes can be determined is the direction of the contour line.
- the cross product result of the first vector and the second vector corresponding to the directed line segment is greater than 0, it can be considered that the directed line segment votes in favor; the cross product result of the first vector and the second vector corresponding to the directed line segment If it is less than or equal to 0, it can be considered that the directed line segment casts a negative vote, and the direction of the second vector corresponding to the majority of the directed line segment is determined as the direction of the contour line through the principle of minority obeying the majority.
- the triangular patch may be reversed, if the direction of the contour line is determined only according to the two smallest line segments on the x-axis, the direction of the contour line may be wrong, and it will take a lot of resources to correct the direction of the contour line in the later stage.
- nor is the second vector corresponding to the directed line segment nor is the second vector corresponding to the directed line segment, and seg is the first vector corresponding to the directed line segment. Even if the direction of nor1 is wrong due to the reverse direction of a certain triangular patch, the decision is made through the voting mechanism. When the second vector corresponding to most directed line segments is correct, the direction of the contour line will not be wrong.
- the cross product result of the first vector of each directed line segment corresponding to the triangular crony set and the second vector corresponding to each directed line segment determine the The direction of the contour line of the target layer slice, so that the direction of the contour line can be determined by a voting mechanism, which can accurately and efficiently determine the direction of the contour line; and can effectively repair some reverse patches and small holes in the model case, improving the fault-tolerant robustness of slicing.
- An embodiment of the present invention also provides a printing method, the method comprising:
- the file to be printed is an outline picture generated by using the slicing method of the three-dimensional model described in the embodiment of the present invention.
- the embodiment of the present invention also provides a printing system, including: a slicing device and a printing device;
- the slicing device is used to execute the slicing method of the three-dimensional model described in the embodiment of the present invention.
- a printing device that uses the outline picture output by the slicing device, and obtains a model to be printed according to the outline picture.
- the embodiment of the present invention also provides a printing device 200, including: a memory 202, a processor 201, and a program stored in the memory 202 and executable on the processor 201, the When the program is executed by the processor 201, each process of the above-mentioned three-dimensional model slicing method embodiment can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
- the embodiment of the present invention also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the above-mentioned three-dimensional model slicing method embodiment is realized, and the same Technical effects, in order to avoid repetition, will not be repeated here.
- the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.
Landscapes
- Chemical & Material Sciences (AREA)
- Engineering & Computer Science (AREA)
- Materials Engineering (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- Mechanical Engineering (AREA)
- Optics & Photonics (AREA)
Abstract
The present invention provides a slicing method for a three-dimensional model, a printing method, and a related device, and relates to the technical field of 3D printing. The method comprises: determining a triangular skirt band set corresponding to a target layer slice of the three-dimensional model, wherein the triangular skirt band set comprises at least two triangular patches intersecting with a tangent plane of the target layer slice; obtaining a half-edge data structure of the triangular patch in the triangular skirt band set; and generating, according to the half-edge data structure of the triangular patch, a contour picture of the target layer slice corresponding to the triangular skirt band set. Embodiments of the present invention can improve the slicing efficiency of the three-dimensional model.
Description
本发明涉及3D打印技术领域,尤其涉及一种三维模型的切片方法、打印方法及相关设备。The invention relates to the technical field of 3D printing, in particular to a slicing method of a three-dimensional model, a printing method and related equipment.
3D打印属于快速成型技术,它以数字模型为基础,利用金属粉末、陶瓷粉末、塑料或液体光敏树脂等材料,逐层地打印出整个三维物体。3D打印的过程首先是通过计算机3D建模软件设计3D模型,再将该三维模型“切片”成逐层的截面,再根据分析截面信息得到加工路径,从而指导3D打印机逐层打印,通过逐层叠加最终形成三维物件。3D打印技术应用较多的为光固化3D打印,光固化3D打印使用的材料一般为光敏树脂,通常为液体,配比一定的光引发剂,在光照射下发生聚合反应,实现固定。在进行光固化3D打印之前,需要对待打印模型进行三维模型的切片,目前在进行三维模型的切片时对待打印模型的所有三角面片进行集中分析,进行三维模型切片的效率较低。3D printing belongs to rapid prototyping technology. It is based on digital models and uses materials such as metal powder, ceramic powder, plastic or liquid photosensitive resin to print out the entire three-dimensional object layer by layer. The process of 3D printing is to first design the 3D model through computer 3D modeling software, then "slice" the 3D model into layer-by-layer sections, and then obtain the processing path according to the analysis section information, so as to guide the 3D printer to print layer by layer. The superposition results in a three-dimensional object. The most widely used 3D printing technology is light-curing 3D printing. The material used in light-curing 3D printing is generally photosensitive resin, usually liquid, with a certain ratio of photoinitiator, which undergoes polymerization reaction under light irradiation to achieve fixation. Before 3D printing with light curing, it is necessary to slice the 3D model of the model to be printed. At present, when slicing the 3D model, all the triangular faces of the model to be printed are analyzed intensively, and the efficiency of slicing the 3D model is low.
发明内容Contents of the invention
本发明实施例提供一种三维模型的切片方法、打印方法及相关设备,以解决现有技术中三维模型切片的效率较低的问题。Embodiments of the present invention provide a three-dimensional model slicing method, a printing method and related equipment, so as to solve the problem of low efficiency of three-dimensional model slicing in the prior art.
为了解决上述技术问题,本发明是这样实现的:In order to solve the problems of the technologies described above, the present invention is achieved in that:
第一方面,本发明实施例提供了一种三维模型的切片方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for slicing a three-dimensional model, the method comprising:
确定三维模型的目标层切片对应的三角形裙带集合,其中,所述三角形裙带集合包括与所述目标层切片的切平面相交的至少两个所述三角面片;determining a triangular skirt set corresponding to the target layer slice of the three-dimensional model, wherein the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice;
获取所述三角形裙带集合中所述三角面片的半边数据结构;Obtain the half-edge data structure of the triangular facet in the triangular crony set;
依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片。A contour picture of the target layer slice corresponding to the triangular skirt set is generated according to the half-edge data structure of the triangular patch.
第二方面,本发明实施例提供了一种打印方法,所述方法包括:In a second aspect, an embodiment of the present invention provides a printing method, the method comprising:
获取待打印文件,并根据所述待打印文件打印模型;其中,所述待打印文件为第一方面所述的三维模型的切片方法生成的轮廓图片。Acquire a file to be printed, and print a model according to the file to be printed; wherein, the file to be printed is an outline picture generated by the slicing method of the three-dimensional model described in the first aspect.
第三方面,本发明实施例提供了一种打印系统,包括:切片装置和打印设备;In a third aspect, an embodiment of the present invention provides a printing system, including: a slicing device and a printing device;
所述切片装置,用于执行第一方面所述的三维模型的切片方法;The slicing device is used to execute the slicing method of the three-dimensional model described in the first aspect;
打印设备,使用所述切片装置输出的轮廓图片,并依据所述轮廓图片得到待打印模型。A printing device that uses the outline picture output by the slicing device, and obtains a model to be printed according to the outline picture.
第四方面,本发明实施例提供了一种打印设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如第一方面所述的三维模型的切片方法中的步骤。In a fourth aspect, an embodiment of the present invention provides a printing device, including: a memory, a processor, and a program stored in the memory and operable on the processor, when the program is executed by the processor The steps in the method for slicing a three-dimensional model as described in the first aspect are realized.
第五方面,本发明实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的三维模型的切片方法中的步骤。In a fifth aspect, an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the three-dimensional model as described in the first aspect is implemented. Steps in the slice method.
本发明实施例中,确定三维模型的目标层切片对应的三角形裙带集合,其中,所述三 角形裙带集合包括与所述目标层切片的切平面相交的至少两个所述三角面片;获取所述三角形裙带集合中所述三角面片的半边数据结构;依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片。这样,在三维模型的切片过程中通过所述三角形裙带集合中所述三角面片的半边数据结构确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,能够提高三维模型切片的效率。In the embodiment of the present invention, the triangular skirt set corresponding to the target layer slice of the 3D model is determined, wherein the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice; The half-edge data structure of the triangular patch in the triangular crony set; generating the outline picture of the target layer slice corresponding to the triangular crony set according to the half-edge data structure of the triangular patch. In this way, during the slicing process of the 3D model, the outline picture of the target layer slice corresponding to the triangular skirt set is determined through the half-edge data structure of the triangle patch in the triangular skirt set, which can improve the efficiency of 3D model slicing.
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本发明实施例提供的一种三维模型的切片方法的流程图;Fig. 1 is a flow chart of a method for slicing a three-dimensional model provided by an embodiment of the present invention;
图2是本发明实施例提供的一种三维模型切片的示意图之一;Fig. 2 is one of the schematic diagrams of a three-dimensional model slice provided by an embodiment of the present invention;
图3是本发明实施例提供的一种半边数据结构的示意图;FIG. 3 is a schematic diagram of a half-edge data structure provided by an embodiment of the present invention;
图4是本发明实施例提供的一种三维模型切片的示意图之二;Fig. 4 is the second schematic diagram of a three-dimensional model slice provided by an embodiment of the present invention;
图5是本发明实施例提供的一种三维模型切片的示意图之三;Fig. 5 is the third schematic diagram of a three-dimensional model slice provided by an embodiment of the present invention;
图6是本发明实施例提供的一种三维模型切片的示意图之四;Fig. 6 is a fourth schematic diagram of a three-dimensional model slice provided by an embodiment of the present invention;
图7是本发明实施例提供的一种打印设备的结构示意图。FIG. 7 is a schematic structural diagram of a printing device provided by an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
参见图1,图1是本发明实施例提供的一种三维模型的切片方法的流程图,所如图1所示,包括以下步骤:Referring to Fig. 1, Fig. 1 is a flowchart of a method for slicing a three-dimensional model provided by an embodiment of the present invention, as shown in Fig. 1 , it includes the following steps:
步骤101、确定三维模型的目标层切片对应的三角形裙带集合,其中,所述三角形裙带集合包括与所述目标层切片的切平面相交的至少两个所述三角面片。 Step 101. Determine a triangular skirt set corresponding to a target layer slice of the 3D model, wherein the triangular skirt set includes at least two triangle faces that intersect with a tangent plane of the target layer slice.
其中,所述目标层切片可以为三维模型的一个层切片,或全部层切片。示例地,所述目标层切片为所述三维模型的任意一个层切片。可以遍历待处理的三维模型的所有三角面片,确定目标层切片对应的三角形裙带集合。可以采用多线程遍历待处理的三维模型中的所有三角面片,如图2所示,可以获取与目标层切片的切平面P相交的三角面片,建立目标层切片对应的三角形裙带集合。Wherein, the target layer slice may be a layer slice or all layer slices of the three-dimensional model. Exemplarily, the target layer slice is any layer slice of the three-dimensional model. All triangular patches of the 3D model to be processed may be traversed to determine a triangular skirt set corresponding to the target layer slice. Multithreading can be used to traverse all the triangular patches in the 3D model to be processed. As shown in FIG. 2, the triangular patches intersecting with the tangent plane P of the target layer slice can be obtained, and the triangle skirt set corresponding to the target layer slice can be established.
步骤102、获取所述三角形裙带集合中所述三角面片的半边数据结构。 Step 102. Obtain the half-edge data structure of the triangular patch in the triangular crony set.
其中,所述三角面片的半边数据结构可以包括所述三角面片的顶点、半边及面片。对于所述三角形裙带集合中的所述三角面片,可以去除冗余顶点,并去除退化三角形,建立所述三角面片的点线面的拓扑数据结构,获取所述三角面片的半边数据结构。Wherein, the half-edge data structure of the triangular face may include vertices, half-edges and faces of the triangular face. For the triangular facets in the triangular crony set, redundant vertices and degenerate triangles can be removed, the topological data structure of the point-line face of the triangular facets can be established, and the half-edge data structure of the triangular facets can be obtained. .
示例地,以三角面片fA和fB为例,如图3所示,三角面片fA由点{0,1,2},半边{0,1}、{1,2}、{2,0}组成;三角面片fB由点{0,2,3},半边{0,2}、{2,3}、{3,0}组成;fA和fB互为相邻关系,且fB的半边{0,2}与fA的半边{2,0}构成一条完整的线段。As an example, take triangular patches fA and fB as examples, as shown in Figure 3, triangular patch fA consists of points {0, 1, 2}, half sides {0, 1}, {1, 2}, {2, 0 }; triangular patch fB is composed of points {0, 2, 3}, half edges {0, 2}, {2, 3}, {3, 0}; fA and fB are adjacent to each other, and the half edge of fB {0, 2} and the half side {2, 0} of fA form a complete line segment.
步骤103、依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片。Step 103: Generate a contour picture of the target layer slice corresponding to the triangular crony set according to the half-edge data structure of the triangular patch.
其中,可以依据所述三角面片的半边数据结构确定所述三角形裙带集合中所述三角面片与所述三角形裙带集合对应的所述目标层切片的切平面的所有交点,依据所述所有交点生成所述三角形裙带集合对应的所述目标层切片的轮廓图片。具体的,所述依据所述所有交点生成所述三角形裙带集合对应的所述目标层切片的轮廓图片,可以是,确定所述所有交点形成的有向线段集合,所述有向线段集合中包括多条有向线段,基于所述三角形裙带集合对应的所述多条有向线段,确定所述三角形裙带集合对应的所述目标层切片的轮廓图片。Wherein, all intersections of the tangent planes of the triangle patch in the triangular crony set and the target layer slice corresponding to the triangular crony set can be determined according to the half-edge data structure of the triangular patch, and according to all the intersection points A contour picture of the target layer slice corresponding to the triangular crony set is generated. Specifically, the generating the outline picture of the target layer slice corresponding to the triangular crony set based on all the intersection points may be to determine the directed line segment set formed by all the intersection points, and the directed line segment set includes A plurality of directed line segments, based on the plurality of directed line segments corresponding to the triangular crony set, determine the contour picture of the target layer slice corresponding to the triangular crony set.
另外,在生成所述三角形裙带集合对应的所述目标层切片的轮廓图片之后,可以基于所述轮廓图片生成所述三维模型的切片文件。在所述目标层切片为所述三维模型的任意一个层切片的情况下,可以对三维模型的全部层切片对应的轮廓图片进行打包并压缩,得到所述三维模型的切片文件。示例地,所述三维模型的切片文件可以为对全部轮廓图片打包压缩得到的zip类型的压缩文件。In addition, after the contour picture of the target layer slice corresponding to the triangular skirt set is generated, a slice file of the three-dimensional model may be generated based on the contour picture. When the target layer slice is any layer slice of the 3D model, contour pictures corresponding to all layer slices of the 3D model may be packaged and compressed to obtain a slice file of the 3D model. For example, the slice file of the 3D model may be a compressed file of zip type obtained by packing and compressing all outline images.
需要说明的是,本发明实施例中的三维模型的切片方法可以应用于三维模型的光固化切片过程中。It should be noted that the method for slicing a three-dimensional model in the embodiment of the present invention can be applied in the process of photocuring and slicing a three-dimensional model.
本发明实施例中,确定三维模型的目标层切片对应的三角形裙带集合,其中,所述三角形裙带集合包括与所述目标层切片的切平面相交的至少两个所述三角面片;获取所述三角形裙带集合中所述三角面片的半边数据结构;依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片。这样,在三维模型的切片过程中通过所述三角形裙带集合中所述三角面片的半边数据结构确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,能够提高三维模型切片的效率。In the embodiment of the present invention, the triangular skirt set corresponding to the target layer slice of the 3D model is determined, wherein the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice; The half-edge data structure of the triangular patch in the triangular crony set; generating the outline picture of the target layer slice corresponding to the triangular crony set according to the half-edge data structure of the triangular patch. In this way, during the slicing process of the 3D model, the outline picture of the target layer slice corresponding to the triangular skirt set is determined through the half-edge data structure of the triangle patch in the triangular skirt set, which can improve the efficiency of 3D model slicing.
可选的,所述依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片,包括:Optionally, the generating the outline picture of the target layer slice corresponding to the triangle crony set according to the half-edge data structure of the triangle patch includes:
依据所述三角面片的半边数据结构确定所述三角形裙带集合中的三角面片与所述目标层切片的切平面的所有交点;Determining all intersection points between the triangular patches in the triangular skirt set and the tangent planes of the target layer slice according to the half-edge data structure of the triangular patches;
确定所述所有交点形成的有向线段集合,所述有向线段集合中包括多条有向线段;Determining a set of directed line segments formed by all intersection points, where the set of directed line segments includes a plurality of directed line segments;
基于所述三角形裙带集合对应的所述多条有向线段确定所述三角形裙带集合对应的所述目标层切片的轮廓图片。A contour picture of the target layer slice corresponding to the triangular crony set is determined based on the plurality of directed line segments corresponding to the triangular crony set.
其中,所述三角形裙带集合对应的所述多条有向线段可以形成所述三角形裙带集合对应的至少两条连续线段,所述基于所述多条有向线段确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,可以是,确定所述至少两条连续线段的所有线头的坐标位置,并对所述所有线头的坐标位置进行整型化处理,所述线头为所述连续线段的端点,获取所述整型化处理后得到的坐标位置相同的至少两个目标线头,建立所述目标线头之间的线段以 获取所述三角形裙带集合对应的所述目标层切片的轮廓线,基于所述三角形裙带集合对应的所述目标层切片的轮廓线确定所述三角形裙带集合对应的所述目标层切片的轮廓图片;或者还可以是,确定所述三角形裙带集合对应的所述至少两条连续线段的所有线头的坐标位置,并依据所述所有线头的坐标位置确定所述所有线头中的多对线头,多对线头中每对线头包括位置最相近的两个线头,连接所述两个线头以获取所述三角形裙带集合对应的所述目标层切片的轮廓线,基于所述目标层切片的轮廓线确定所述三角形裙带集合对应的所述目标层切片的轮廓图片。本实施例对此不进行限定。Wherein, the plurality of directed line segments corresponding to the triangular crony set may form at least two continuous line segments corresponding to the triangular crony set, and the determining of the corresponding triangular crony set based on the multiple directed line segments The contour picture of the target layer slice may be to determine the coordinate positions of all line heads of the at least two continuous line segments, and perform integer processing on the coordinate positions of all line heads, and the line heads are the coordinate positions of the continuous line segments The end point is to obtain at least two target line heads with the same coordinate positions obtained after the integer processing, and establish a line segment between the target line heads to obtain the contour line of the target layer slice corresponding to the triangular crony set, based on The contour lines of the target layer slice corresponding to the triangular crony set determine the contour picture of the target layer slice corresponding to the triangular crony set; or, determine the at least two corresponding to the triangular crony set The coordinate positions of all thread heads of continuous line segments, and determine the multiple pairs of thread heads in all thread heads according to the coordinate positions of all thread heads, and each pair of thread heads in the multiple pairs of thread heads includes two thread heads with the closest positions, connecting the two To obtain the contour line of the target layer slice corresponding to the triangular crony set, and determine the contour picture of the target layer slice corresponding to the triangular crony set based on the contour line of the target layer slice. This embodiment does not limit it.
示例地,如图4所示,三角面片fa由点{2,0,1},半边{2,0}、{0,1}、{1,2}组成;三角面片fb由点{2,1,3},半边{2,1}、{1,3}、{3,2}组成;三角面片fc由点{3,4,2},半边{3,4}、{4,2}、{2,3}组成。在确定三角面片与切平面的交点时,fa{0,1}与切平面不相交,则转到fa{1,2};fa{1,2}与切平面相交,得到交点seg[0],同时可以找到fa{1,2}的相邻边fb{2,1};fb{2,1}与fa{1,2}为相同线段,转到fb{1,3};fb{1,3}与切平面不相交,转到fb{3,2};fb{3,2}与切平面相交,得到交点seg[1],同时可以找到fb{3,2}的相邻面fc{2,3};fc{2,3}与fb{3,2}为相同线段,转到fc{3,4},fc{3,4}与切平面不相交,转到fc{4,2};fc{4,2}与切平面相交,得到交点seg[2]。For example, as shown in Figure 4, the triangular patch fa is composed of points {2, 0, 1}, half sides {2, 0}, {0, 1}, {1, 2}; the triangular patch fb is composed of points { 2, 1, 3}, half sides {2, 1}, {1, 3}, {3, 2}; triangular patch fc consists of points {3, 4, 2}, half sides {3, 4}, {4 , 2}, {2, 3} composition. When determining the intersection point of the triangular surface and the tangent plane, fa{0, 1} does not intersect the tangent plane, then go to fa{1, 2}; fa{1, 2} intersects the tangent plane, and the intersection point seg[0 ], at the same time, you can find the adjacent edge fb{2, 1} of fa{1, 2}; fb{2, 1} and fa{1, 2} are the same line segment, go to fb{1, 3}; fb{ 1, 3} does not intersect with the tangent plane, go to fb{3, 2}; fb{3, 2} intersects with the tangent plane, get the intersection point seg[1], and at the same time find the adjacent surface of fb{3, 2} fc{2, 3}; fc{2, 3} and fb{3, 2} are the same line segment, go to fc{3, 4}, fc{3, 4} does not intersect with the tangent plane, go to fc{4 , 2}; fc{4, 2} intersects with the tangent plane to obtain the intersection point seg[2].
该实施方式中,依据所述三角面片的半边数据结构确定所述三角形裙带集合中所述三角面片与所述三角形裙带集合对应的所述目标层切片的切平面的所有交点,并确定所述所有交点形成的有向线段集合,能够较为快捷地确定有向线段集合,从而能够基于有向线段集合确定目标层切片的轮廓图片。In this embodiment, all intersection points of the tangent planes of the triangle patch in the triangular crony set and the target layer slice corresponding to the triangular crony set are determined according to the half-edge data structure of the triangular patch, and the The set of directed line segments formed by all the above-mentioned intersection points can determine the set of directed line segments relatively quickly, so that the outline picture of the target layer slice can be determined based on the set of directed line segments.
可选的,所述依据所述三角面片的半边数据结构确定所述三角形裙带集合中的三角面片与所述目标层切片的切平面的所有交点,包括:Optionally, the determining all intersection points between the triangular patches in the triangular skirt set and the tangent plane of the target layer slice according to the half-edge data structure of the triangular patches includes:
依次确定所述三角形裙带集合中的目标三角面片的第一有向边、第二有向边及第三有向边,与所述目标层切片的切平面是否存在交点,其中,所述目标三角面片为所述三角形裙带集合中的任意一个三角面片,所述目标三角面片的半边数据结构包括所述第一有向边、所述第二有向边及所述第三有向边,所述第一有向边的下一半边为所述第二有向边,所述第二有向边的下一半边为所述第三有向边,所述第三有向边的下一半边为所述第一有向边;Determine in turn whether the first directed edge, the second directed edge, and the third directed edge of the target triangular patch in the triangular skirt set intersect with the tangent plane of the target layer slice, wherein the target The triangle patch is any triangle patch in the triangular crony set, and the half-edge data structure of the target triangle patch includes the first directed edge, the second directed edge and the third directed edge side, the lower half of the first directed side is the second directed side, the lower half of the second directed side is the third directed side, and the third directed side The lower half is the first directed edge;
在确定所述目标三角面片与所述目标层切片的切平面存在两个交点的情况下,获取所述目标三角面片与所述目标层切片的切平面的第一交点和第二交点;In the case of determining that there are two intersection points between the target triangle patch and the tangent plane of the target layer slice, obtaining a first intersection point and a second intersection point between the target triangle patch and the tangent plane of the target layer slice;
所述确定所述所有交点形成的有向线段集合,包括:The determination of the set of directed line segments formed by all the intersection points includes:
依据所述第一交点及所述第二交点确定第一有向线段,所述第一有向线段的方向为所述第一交点指向所述第二交点,所述第一交点的确定时间先于所述第二交点的确定时间;Determining a first directed line segment according to the first intersection point and the second intersection point, the direction of the first directed line segment is that the first intersection point points to the second intersection point, and the determination time of the first intersection point is first a determined time at said second point of intersection;
其中,所述有向线段集合包括所述第一有向线段。Wherein, the set of directed line segments includes the first directed line segment.
另外,可以依次确定所述三角形裙带集合中与所述目标三角面片相邻的三角面片的第四有向边及第五有向边,与所述三角形裙带集合对应的所述目标层切片的切平面是否存在交点,以获取与所述目标三角面片相邻的三角面片与所述切平面的第三交点,与所述目标三角面片相邻的三角面片的半边数据结构包括所述第四有向边、所述第五有向边及第六有向边,所述第六有向边与所述第三有向边为相同线段,所述第六有向边的下一半边为所述 第四有向边,所述第四有向边的下一半边为所述第五有向边,所述第五有向边的下一半边为所述第六有向边;可以依据所述第三交点及所述第二交点确定第二有向线段,所述第二有向线段的方向为第二交点指向所述第三交点,所述第二交点的确定时间先于所述第三交点的确定时间;其中,所述有向线段集合还包括所述第二有向线段。In addition, the fourth directed side and the fifth directed side of the triangular patch adjacent to the target triangular patch in the triangular skirt set may be sequentially determined, and the target layer slice corresponding to the triangular skirt set Whether there is an intersection point in the tangent plane of the target triangular patch, to obtain the third intersection point between the triangular patch adjacent to the target triangular patch and the tangent plane, the half-edge data structure of the triangular patch adjacent to the target triangular patch includes The fourth directional side, the fifth directional side and the sixth directional side, the sixth directional side and the third directional side are the same line segment, the bottom of the sixth directional side Half of the side is the fourth oriented side, the next half of the fourth oriented side is the fifth oriented side, and the next half of the fifth oriented side is the sixth oriented side ; The second directed line segment can be determined according to the third intersection point and the second intersection point, the direction of the second directed line segment is that the second intersection point points to the third intersection point, and the determination time of the second intersection point is first At the determined time of the third intersection point; wherein, the set of directed line segments further includes the second directed line segment.
该实施方式中,依次确定所述三角形裙带集合中的目标三角面片的第一有向边、第二有向边及第三有向边,与所述三角形裙带集合对应的所述目标层切片的切平面是否存在交点,依据确定的交点获取有向线段集合,这样,能够有序且高效地确定有向线段集合。In this embodiment, the first directed edge, the second directed edge and the third directed edge of the target triangular patch in the triangular skirt set are sequentially determined, and the target layer slice corresponding to the triangular skirt set Whether there is an intersection point between the tangent planes of , and obtain the set of directed line segments according to the determined intersection point, in this way, the set of directed line segments can be determined in an orderly and efficient manner.
本发明实施例中的三维模型的切片通过分层级过滤的方法,在三维模型的切片的每次处理中都将后续重复用到的数据提前准备,减少了后续处理需要的数据集合元素,能够极大提高切片效率。In the embodiment of the present invention, the slices of the three-dimensional model are filtered in layers, and the data that will be used repeatedly in the three-dimensional model is prepared in advance in each processing of the slices of the three-dimensional model, which reduces the data collection elements required for subsequent processing, and can Greatly improve slicing efficiency.
可选的,所述多条有向线段形成至少两条连续线段;Optionally, the plurality of directed line segments form at least two continuous line segments;
所述基于所述三角形裙带集合对应的所述多条有向线段确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,包括:The determining the contour picture of the target layer slice corresponding to the triangular crony set based on the plurality of directed line segments corresponding to the triangular crony set includes:
确定所述至少两条连续线段的所有线头的坐标位置,并对所述所有线头的坐标位置进行整型化处理,所述线头为所述连续线段的端点;Determining the coordinate positions of all line heads of the at least two continuous line segments, and performing integer processing on the coordinate positions of all line heads, where the line heads are endpoints of the continuous line segments;
获取所述整型化处理后得到的坐标位置相同的至少两个目标线头;Obtaining at least two target thread heads with the same coordinate positions obtained after the integer processing;
建立所述目标线头之间的线段以获取所述三角形裙带集合对应的所述目标层切片的轮廓线;Establishing a line segment between the target line ends to obtain the contour line of the target layer slice corresponding to the triangular crony set;
基于所述目标层切片的轮廓线确定所述三角形裙带集合对应的所述目标层切片的轮廓图片。A contour picture of the target layer slice corresponding to the triangular skirt set is determined based on the contour line of the target layer slice.
其中,整型化处理可以是直接去除所有线头的坐标位置的最后一位,或者最后两位;或者,是对坐标位置的最后一位,或者最后两位进行四舍五入处理。示例地,如图5所示,所有线头包括线头A、B、C、D、E、F、G、H、O及Q,以线头A和线头B为例,线头A的坐标位置为(1.085,2.065),线头B的坐标位置为(1.086,2.068),对线头A和线头B的坐标位置进行整型化处理后,得到线头A的坐标位置为(1.09,2.07),线头B的坐标位置为(1.09,2.07),整型化处理后线头A的坐标位置和线头B的坐标位置相同,可以连接线头A和线头B。Wherein, the integer processing may be to directly remove the last digit or the last two digits of the coordinate positions of all thread ends; or it may be to perform rounding processing on the last digit or the last two digits of the coordinate positions. Exemplarily, as shown in Figure 5, all thread ends include thread ends A, B, C, D, E, F, G, H, O and Q, take thread end A and thread end B as example, the coordinate position of thread end A is (1.085 , 2.065), the coordinate position of thread head B is (1.086, 2.068), after the integer processing of the coordinate positions of thread head A and thread head B, the coordinate position of thread head A is (1.09, 2.07), and the coordinate position of thread head B is is (1.09, 2.07), the coordinate position of thread head A is the same as the coordinate position of thread head B after integer processing, and thread head A and thread head B can be connected.
另外,建立所述目标线头之间的线段之后,对于剩余的线头可以采用最邻近点查找,将剩余的线头与其最邻近的线头进行连接,获取所述三角形裙带集合对应的所述目标层切片的轮廓线。In addition, after establishing the line segments between the target thread ends, the remaining thread ends can be searched by the nearest neighbor point, and the remaining thread ends are connected with their nearest adjacent thread ends to obtain the target layer slice corresponding to the triangular crony set. contour line.
该实施方式中,获取整型化处理后得到的坐标位置相同的至少两个目标线头,建立所述目标线头之间的线段以获取所述三角形裙带集合对应的所述目标层切片的轮廓线,能够较为快捷地确定有向线段集合,且能够减少线头的数量;并且,通过建立所述目标线头之间的线段以获取所述三角形裙带集合对应的所述目标层切片的轮廓线,能够避免由于原始模型存在破损或自相交导致的需要手动连接大量线头,效率较低的问题。In this embodiment, at least two target line heads with the same coordinate positions obtained after the integer processing are obtained, and a line segment between the target line heads is established to obtain the contour line of the target layer slice corresponding to the triangular crony set, The directed line segment set can be determined more quickly, and the number of line ends can be reduced; and, by establishing the line segment between the target line ends to obtain the contour line of the target layer slice corresponding to the triangular skirt set, it is possible to avoid the The original model has the problem of low efficiency due to damage or self-intersection, which requires manual connection of a large number of wire ends.
可选的,所述基于所述目标层切片的轮廓线确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,包括:Optionally, the determining the contour picture of the target layer slice corresponding to the triangular crony set based on the contour line of the target layer slice includes:
依据所述三角形裙带集合对应的所述多条有向线段,确定所述目标层切片的轮廓线的方向;Determine the direction of the contour line of the target layer slice according to the plurality of directed line segments corresponding to the triangular skirt set;
依据所述轮廓线的方向对所述轮廓线进行渲染得到所述三角形裙带集合对应的所述目标层切片的轮廓图片。Render the contour line according to the direction of the contour line to obtain the contour image of the target layer slice corresponding to the triangular skirt set.
其中,可以确定所述三角形裙带集合对应的所述多条有向线段中每条有向线段的第一向量,所述第一向量为所述有向线段的几何表示,依据所述每条有向线段的起点对应的两个三角面片的法向量,确定所述每条有向线段对应的第二向量,其中,所述第二向量为所述两个三角面片的法向量的向量之和,所述起点对应的两个三角面片中每个三角面片与所述目标层切片的切平面的交点均包括所述起点,可以依据所述三角形裙带集合对应的所述每条有向线段对应的第一向量和所述每条有向线段对应的第二向量,确定所述三角形裙带集合对应的所述目标层切片的轮廓线的方向。具体的,可以依据所述三角形裙带集合对应的所述每条有向线段的第一向量和所述每条有向线段对应的第二向量的叉乘结果,确定所述三角形裙带集合对应的所述目标层切片的轮廓线的方向。Wherein, the first vector of each directed line segment in the plurality of directed line segments corresponding to the triangular crony set can be determined, the first vector is the geometric representation of the directed line segment, and according to each directed line segment The normal vectors of the two triangular patches corresponding to the starting point of the oriented line segment determine the second vector corresponding to each oriented line segment, wherein the second vector is one of the vectors of the normal vectors of the two triangular patches And, the intersection point of each triangle patch in the two triangle patches corresponding to the starting point and the tangent plane of the target layer slice includes the starting point, and can be based on each of the directional triangle patches corresponding to the triangular skirt set The first vector corresponding to the line segment and the second vector corresponding to each directed line segment determine the direction of the contour line of the target layer slice corresponding to the triangular skirt set. Specifically, the triangular crony set corresponding to the triangular crony set may be determined according to the cross product result of the first vector of each directed line segment corresponding to the triangular crony set and the second vector corresponding to each directed line segment. Describes the direction of the outline of the target layer slice.
另外,轮廓线的方向可以为朝内或朝外,朝内指的是朝向轮廓线围合而成的区域,朝外指的是朝向轮廓线围合而成的区域以外的区域。一种实施方式中,若轮廓线的方向朝内,则将该轮廓线围合而成的区域渲染为空心区域;若轮廓线的方向朝外,则将该轮廓线围合而成的区域渲染成实心区域。In addition, the direction of the contour line can be inward or outward, inwardly refers to the area enclosed by the contour line, and outwardly refers to the area outside the area enclosed by the contour line. In one implementation, if the direction of the contour line is inward, the area enclosed by the contour line is rendered as a hollow area; if the direction of the contour line is outward, the area enclosed by the contour line is rendered into a solid area.
该实施方式中,依据所述三角形裙带集合对应的所述多条有向线段,确定所述三角形裙带集合对应的所述目标层切片的轮廓线的方向,依据所述轮廓线的方向对所述轮廓线进行渲染得到所述三角形裙带集合对应的所述目标层切片的轮廓图片,从而能够较为准确地渲染得到目标层切片的轮廓图片。In this embodiment, according to the plurality of directed line segments corresponding to the triangular skirt set, the direction of the contour line of the target layer slice corresponding to the triangular skirt set is determined, and the direction of the contour line is determined according to the direction of the contour line. The contour line is rendered to obtain the contour picture of the target layer slice corresponding to the triangular crony set, so that the contour picture of the target layer slice can be obtained through more accurate rendering.
可选的,所述依据所述三角形裙带集合对应的所述多条有向线段,确定所述目标层切片的轮廓线的方向,包括:Optionally, the determining the direction of the contour line of the target layer slice according to the plurality of directed line segments corresponding to the triangular skirt set includes:
确定所述三角形裙带集合对应的所述多条有向线段中每条有向线段的第一向量,所述第一向量为所述有向线段的几何表示;determining a first vector of each directed line segment in the plurality of directed line segments corresponding to the triangular crony set, where the first vector is a geometric representation of the directed line segment;
依据所述每条有向线段的起点对应的两个三角面片的法向量,确定所述每条有向线段对应的第二向量,其中,所述第二向量为所述两个三角面片的法向量的向量之和,所述起点对应的两个三角面片中每个三角面片与所述目标层切片的切平面的交点均包括所述起点;According to the normal vectors of the two triangle faces corresponding to the starting point of each directed line segment, determine the second vector corresponding to each directed line segment, wherein the second vector is the two triangle faces The sum of the vectors of the normal vectors of the starting point, the intersection of each triangle patch and the tangent plane of the target layer slice in the two triangle patches corresponding to the starting point all includes the starting point;
依据所述每条有向线段的第一向量和所述每条有向线段对应的第二向量的叉乘结果,确定所述目标层切片的轮廓线的方向。The direction of the contour line of the target layer slice is determined according to the cross product result of the first vector of each directed line segment and the second vector corresponding to each directed line segment.
其中,如图4所示,以三角面片fa、fb及fc为例,有向线段可以包括交点seg[0]与seg[1]构成的线段,线段的方向为交点seg[0]指向seg[1];有向线段还可以包括交点seg[1]与seg[2]构成的线段,线段的方向为交点seg[1]指向seg[2]。seg[1]与seg[2]构成的有向线段的起点为seg[1],seg[1]对应的两个三角面片为fb和fc。Among them, as shown in Figure 4, taking triangular patches fa, fb and fc as examples, the directed line segment can include the line segment formed by the intersection points seg[0] and seg[1], and the direction of the line segment is that the intersection point seg[0] points to seg [1]; the directed line segment may also include the line segment formed by the intersection point seg[1] and seg[2], and the direction of the line segment is that the intersection point seg[1] points to seg[2]. The starting point of the directed line segment formed by seg[1] and seg[2] is seg[1], and the two triangle patches corresponding to seg[1] are fb and fc.
另外,有向线段的第一向量和有向线段对应的第二向量的叉乘结果大于0,可以认为该有向线段投赞成票;有向线段的第一向量和有向线段对应的第二向量的叉乘结果小于或 等于0,可以认为该有向线段投反对票。若所述多条有向线段中投赞成票的有向线段多于投反对票的有向线段,则可以将投赞成票的有向线段对应的第二向量所表征的朝向确定为所述轮廓线的方向;若所述多条有向线段中投反对票的有向线段多于投赞成票的有向线段,则可以将投反对票的有向线段对应的第二向量所表征的朝向确定为所述轮廓线的方向。In addition, if the cross product result of the first vector of the directed line segment and the second vector corresponding to the directed line segment is greater than 0, it can be considered that the directed line segment votes in favor; the first vector of the directed line segment and the second vector corresponding to the directed line segment If the cross product result of the vector is less than or equal to 0, it can be considered that the directed line segment casts a negative vote. If there are more directed line segments voting in favor than directed line segments voting negative among the plurality of directed line segments, the orientation represented by the second vector corresponding to the directed line segment voting in favor may be determined as the profile The direction of the line; if there are more directed line segments that cast negative votes than directed line segments that vote in favor among the plurality of directed line segments, the orientation represented by the second vector corresponding to the directed line segments that cast negative votes can be determined is the direction of the contour line.
需要说明的是,有向线段对应的第一向量和第二向量的叉乘结果大于0,可以认为该有向线段投赞成票;有向线段对应的第一向量和第二向量的叉乘结果小于或等于0,可以认为该有向线段投反对票,通过少数服从多数的原则,将该多数有向线段对应的第二向量的方向确定为所述轮廓线的方向。由于三角面片可能反向,若仅按照x轴最小的两个线段决定轮廓线的方向可能会导致轮廓线的方向有误,从而后期需要耗费大量资源去修正轮廓线的方向。如图6所示,nor为有向线段对应的第二向量,seg为有向线段对应的第一向量,即使由于某个三角面片反向导致nor1的方向有误,通过投票机制决策,在大部分有向线段对应的第二向量正确的情况下,轮廓线的方向不会有误。It should be noted that if the cross product result of the first vector and the second vector corresponding to the directed line segment is greater than 0, it can be considered that the directed line segment votes in favor; the cross product result of the first vector and the second vector corresponding to the directed line segment If it is less than or equal to 0, it can be considered that the directed line segment casts a negative vote, and the direction of the second vector corresponding to the majority of the directed line segment is determined as the direction of the contour line through the principle of minority obeying the majority. Since the triangular patch may be reversed, if the direction of the contour line is determined only according to the two smallest line segments on the x-axis, the direction of the contour line may be wrong, and it will take a lot of resources to correct the direction of the contour line in the later stage. As shown in Figure 6, nor is the second vector corresponding to the directed line segment, and seg is the first vector corresponding to the directed line segment. Even if the direction of nor1 is wrong due to the reverse direction of a certain triangular patch, the decision is made through the voting mechanism. When the second vector corresponding to most directed line segments is correct, the direction of the contour line will not be wrong.
该实施方式中,依据所述三角形裙带集合对应的所述每条有向线段的第一向量和所述每条有向线段对应的第二向量的叉乘结果,确定所述三角形裙带集合对应的所述目标层切片的轮廓线的方向,从而可以采用投票机制确定轮廓线的方向,能够准确且高效地确定轮廓线的方向;并且能够有效的修复模型中一些面片反向、小破洞的情况,提高了切片的容错鲁棒性。In this embodiment, according to the cross product result of the first vector of each directed line segment corresponding to the triangular crony set and the second vector corresponding to each directed line segment, determine the The direction of the contour line of the target layer slice, so that the direction of the contour line can be determined by a voting mechanism, which can accurately and efficiently determine the direction of the contour line; and can effectively repair some reverse patches and small holes in the model case, improving the fault-tolerant robustness of slicing.
本发明实施例还提供了一种打印方法,所述方法包括:An embodiment of the present invention also provides a printing method, the method comprising:
获取待打印文件,并根据所述待打印文件打印模型;其中,所述待打印文件为采用本发明实施例所述的三维模型的切片方法生成的轮廓图片。Obtain the file to be printed, and print the model according to the file to be printed; wherein, the file to be printed is an outline picture generated by using the slicing method of the three-dimensional model described in the embodiment of the present invention.
本发明实施例还提供了一种打印系统,包括:切片装置和打印设备;The embodiment of the present invention also provides a printing system, including: a slicing device and a printing device;
所述切片装置,用于执行本发明实施例所述的三维模型的切片方法;The slicing device is used to execute the slicing method of the three-dimensional model described in the embodiment of the present invention;
打印设备,使用所述切片装置输出的轮廓图片,并依据所述轮廓图片得到待打印模型。A printing device that uses the outline picture output by the slicing device, and obtains a model to be printed according to the outline picture.
如图7所示,本发明实施例还提供了一种打印设备200,包括:存储器202、处理器201及存储在所述存储器202上并可在所述处理器201上运行的程序,所述程序被所述处理器201执行时实现上述三维模型的切片方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。As shown in FIG. 7 , the embodiment of the present invention also provides a printing device 200, including: a memory 202, a processor 201, and a program stored in the memory 202 and executable on the processor 201, the When the program is executed by the processor 201, each process of the above-mentioned three-dimensional model slicing method embodiment can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
本发明实施例还提供一种可读存储介质,可读存储介质上存储程序或指令,该程序或指令被处理器执行时实现上述三维模型的切片方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the above-mentioned three-dimensional model slicing method embodiment is realized, and the same Technical effects, in order to avoid repetition, will not be repeated here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure.
上面结合附图对本公开的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present disclosure have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are only illustrative and not restrictive. Those of ordinary skill in the art will Under the enlightenment of the present invention, without departing from the gist of the present invention and the protection scope of the claims, many forms can also be made, all of which belong to the protection of the present invention.
Claims (10)
- 一种三维模型的切片方法,其特征在于,所述方法包括:A method for slicing a three-dimensional model, characterized in that the method comprises:确定三维模型的目标层切片对应的三角形裙带集合,其中,所述三角形裙带集合包括与所述目标层切片的切平面相交的至少两个所述三角面片;determining a triangular skirt set corresponding to the target layer slice of the three-dimensional model, wherein the triangular skirt set includes at least two triangle faces that intersect with the tangent plane of the target layer slice;获取所述三角形裙带集合中所述三角面片的半边数据结构;Obtain the half-edge data structure of the triangular facet in the triangular crony set;依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片。A contour picture of the target layer slice corresponding to the triangular skirt set is generated according to the half-edge data structure of the triangular patch.
- 根据权利要求1所述的三维模型的切片方法,其特征在于,所述依据所述三角面片的半边数据结构生成所述三角形裙带集合对应的所述目标层切片的轮廓图片,包括:The method for slicing a three-dimensional model according to claim 1, wherein the generating the contour picture of the target layer slice corresponding to the triangular skirt set according to the half-edge data structure of the triangular patch includes:依据所述三角面片的半边数据结构确定所述三角形裙带集合中的三角面片与所述目标层切片的切平面的所有交点;Determining all intersection points between the triangular patches in the triangular skirt set and the tangent planes of the target layer slice according to the half-edge data structure of the triangular patches;确定所述所有交点形成的有向线段集合,所述有向线段集合中包括多条有向线段;Determining a set of directed line segments formed by all intersection points, where the set of directed line segments includes a plurality of directed line segments;基于所述三角形裙带集合对应的所述多条有向线段确定所述三角形裙带集合对应的所述目标层切片的轮廓图片。A contour picture of the target layer slice corresponding to the triangular crony set is determined based on the plurality of directed line segments corresponding to the triangular crony set.
- 根据权利要求2所述的三维模型的切片方法,其特征在于,所述依据所述三角面片的半边数据结构确定所述三角形裙带集合中的三角面片与所述目标层切片的切平面的所有交点,包括:The method for slicing a three-dimensional model according to claim 2, wherein, according to the half-edge data structure of the triangular face, the relationship between the triangular face in the triangular skirt set and the tangent plane of the target layer slice is determined. All intersections, including:依次确定所述三角形裙带集合中的目标三角面片的第一有向边、第二有向边及第三有向边,与所述目标层切片的切平面是否存在交点,其中,所述目标三角面片为所述三角形裙带集合中的任意一个三角面片,所述目标三角面片的半边数据结构包括所述第一有向边、所述第二有向边及所述第三有向边,所述第一有向边的下一半边为所述第二有向边,所述第二有向边的下一半边为所述第三有向边,所述第三有向边的下一半边为所述第一有向边;Determine in turn whether the first directed edge, the second directed edge, and the third directed edge of the target triangular patch in the triangular skirt set intersect with the tangent plane of the target layer slice, wherein the target The triangle patch is any triangle patch in the triangular crony set, and the half-edge data structure of the target triangle patch includes the first directed edge, the second directed edge and the third directed edge side, the lower half of the first directed side is the second directed side, the lower half of the second directed side is the third directed side, and the third directed side The lower half is the first directed edge;在确定所述目标三角面片与所述目标层切片的切平面存在两个交点的情况下,获取所述目标三角面片与所述目标层切片的切平面的第一交点和第二交点;In the case of determining that there are two intersection points between the target triangle patch and the tangent plane of the target layer slice, obtaining a first intersection point and a second intersection point between the target triangle patch and the tangent plane of the target layer slice;所述确定所述所有交点形成的有向线段集合,包括:The determination of the set of directed line segments formed by all the intersection points includes:依据所述第一交点及所述第二交点确定第一有向线段,所述第一有向线段的方向为所述第一交点指向所述第二交点,所述第一交点的确定时间先于所述第二交点的确定时间;Determining a first directed line segment according to the first intersection point and the second intersection point, the direction of the first directed line segment is that the first intersection point points to the second intersection point, and the determination time of the first intersection point is first a determined time at said second point of intersection;其中,所述有向线段集合包括所述第一有向线段。Wherein, the set of directed line segments includes the first directed line segment.
- 根据权利要求2所述的三维模型的切片方法,其特征在于,所述多条有向线段形成至少两条连续线段;The method for slicing a three-dimensional model according to claim 2, wherein the plurality of directed line segments form at least two continuous line segments;所述基于所述三角形裙带集合对应的所述多条有向线段确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,包括:The determining the contour picture of the target layer slice corresponding to the triangular crony set based on the plurality of directed line segments corresponding to the triangular crony set includes:确定所述至少两条连续线段的所有线头的坐标位置,并对所述所有线头的坐标位置进行整型化处理,所述线头为所述连续线段的端点;Determining the coordinate positions of all line heads of the at least two continuous line segments, and performing integer processing on the coordinate positions of all line heads, where the line heads are endpoints of the continuous line segments;获取所述整型化处理后得到的坐标位置相同的至少两个目标线头;Obtaining at least two target thread heads with the same coordinate positions obtained after the integer processing;建立所述目标线头之间的线段以获取所述三角形裙带集合对应的所述目标层切片的轮廓线;Establishing a line segment between the target line ends to obtain the contour line of the target layer slice corresponding to the triangular crony set;基于所述目标层切片的轮廓线确定所述三角形裙带集合对应的所述目标层切片的轮廓图片。A contour picture of the target layer slice corresponding to the triangular skirt set is determined based on the contour line of the target layer slice.
- 根据权利要求4所述的三维模型的切片方法,其特征在于,所述基于所述目标层切片的轮廓线确定所述三角形裙带集合对应的所述目标层切片的轮廓图片,包括:The method for slicing a three-dimensional model according to claim 4, wherein the determining the contour picture of the target layer slice corresponding to the triangular skirt set based on the contour line of the target layer slice comprises:依据所述三角形裙带集合对应的所述多条有向线段,确定所述目标层切片的轮廓线的方向;Determine the direction of the contour line of the target layer slice according to the plurality of directed line segments corresponding to the triangular skirt set;依据所述轮廓线的方向对所述轮廓线进行渲染得到所述三角形裙带集合对应的所述目标层切片的轮廓图片。Render the contour line according to the direction of the contour line to obtain the contour image of the target layer slice corresponding to the triangular skirt set.
- 根据权利要求5所述的三维模型的切片方法,其特征在于,所述依据所述三角形裙带集合对应的所述多条有向线段,确定所述目标层切片的轮廓线的方向,包括:The method for slicing a three-dimensional model according to claim 5, wherein the determining the direction of the contour line of the target layer slice according to the plurality of directed line segments corresponding to the triangular skirt set includes:确定所述三角形裙带集合对应的所述多条有向线段中每条有向线段的第一向量,所述第一向量为所述有向线段的几何表示;determining a first vector of each directed line segment in the plurality of directed line segments corresponding to the triangular crony set, where the first vector is a geometric representation of the directed line segment;依据所述每条有向线段的起点对应的两个三角面片的法向量,确定所述每条有向线段对应的第二向量,其中,所述第二向量为所述两个三角面片的法向量的向量之和,所述起点对应的两个三角面片中每个三角面片与所述目标层切片的切平面的交点均包括所述起点;According to the normal vectors of the two triangle faces corresponding to the starting point of each directed line segment, determine the second vector corresponding to each directed line segment, wherein the second vector is the two triangle faces The sum of the vectors of the normal vectors of the starting point, the intersection of each triangle patch and the tangent plane of the target layer slice in the two triangle patches corresponding to the starting point all includes the starting point;依据所述每条有向线段的第一向量和所述每条有向线段对应的第二向量的叉乘结果,确定所述目标层切片的轮廓线的方向。The direction of the contour line of the target layer slice is determined according to the cross product result of the first vector of each directed line segment and the second vector corresponding to each directed line segment.
- 一种打印方法,其特征在于,所述方法包括:A printing method, characterized in that the method comprises:获取待打印文件,并根据所述待打印文件打印模型;其中,所述待打印文件为权利要求1-6中任一项所述的三维模型的切片方法生成的轮廓图片。Acquiring a file to be printed, and printing a model according to the file to be printed; wherein, the file to be printed is an outline picture generated by the slicing method of a three-dimensional model according to any one of claims 1-6.
- 一种打印系统,其特征在于,包括:切片装置和打印设备;A printing system, characterized by comprising: a slicing device and a printing device;所述切片装置,用于执行如权利要求1-6中任一项所述的三维模型的切片方法;The slicing device is used to execute the slicing method of the three-dimensional model according to any one of claims 1-6;打印设备,使用所述切片装置输出的轮廓图片,并依据所述轮廓图片得到待打印模型。A printing device that uses the outline picture output by the slicing device, and obtains a model to be printed according to the outline picture.
- 一种打印设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如权利要求1-6中任一项所述的三维模型的切片方法中的步骤。A printing device, characterized in that it comprises: a memory, a processor, and a program stored in the memory and operable on the processor, when the program is executed by the processor, it realizes the claims 1- Steps in the method for slicing a three-dimensional model described in any one of 6.
- 一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-6中任一项所述的三维模型的切片方法中的步骤。A readable storage medium, characterized in that a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the three-dimensional model according to any one of claims 1-6 is realized. Steps in the slice method.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111002138.1 | 2021-08-30 | ||
CN202111002138.1A CN113715338B (en) | 2021-08-30 | 2021-08-30 | Slicing method, printing method and related equipment of three-dimensional model |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023029619A1 true WO2023029619A1 (en) | 2023-03-09 |
Family
ID=78678904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/095545 WO2023029619A1 (en) | 2021-08-30 | 2022-05-27 | Slicing method for three-dimensional model, printing method and related device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113715338B (en) |
WO (1) | WO2023029619A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116310261A (en) * | 2023-05-19 | 2023-06-23 | 深圳开鸿数字产业发展有限公司 | Three-dimensional model segmentation method, device, equipment and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113715338B (en) * | 2021-08-30 | 2023-08-18 | 深圳市纵维立方科技有限公司 | Slicing method, printing method and related equipment of three-dimensional model |
AT525686A1 (en) * | 2021-12-09 | 2023-06-15 | Mehmet Bugra Akin | Process for the additive manufacturing of a workpiece |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6678571B1 (en) * | 2000-07-07 | 2004-01-13 | 3D Systems, Inc. | Micro-slicing contour smoothing technique |
CN102446368A (en) * | 2010-10-11 | 2012-05-09 | 王素 | Rapid slicing method of STL (Stereo Lithography) model based on sorting by triangle adjacency in layers in rapid prototyping manufacturing |
CN104331555A (en) * | 2014-10-31 | 2015-02-04 | 河海大学常州校区 | Slicing processing method aiming at non-closed STL model with boundaries |
JP2017097517A (en) * | 2015-11-20 | 2017-06-01 | ローランドディー.ジー.株式会社 | Cross section data creation device, cross section data creation method, and program |
CN109159425A (en) * | 2018-08-21 | 2019-01-08 | 东莞中国科学院云计算产业技术创新与育成中心 | The dicing method and 3 D-printing device of threedimensional model |
CN110232742A (en) * | 2019-06-12 | 2019-09-13 | 洁誉科技(上海)股份有限公司 | 3D printing hierarchical control algorithm |
CN110757804A (en) * | 2018-07-26 | 2020-02-07 | 中国科学院沈阳自动化研究所 | Full-color layered slicing algorithm based on texture mapping three-dimensional model |
CN112659316A (en) * | 2020-12-17 | 2021-04-16 | 江苏集萃复合材料装备研究所有限公司 | Rapid layering method for 3D cement printing |
CN113183469A (en) * | 2021-04-27 | 2021-07-30 | 珠海赛纳三维科技有限公司 | Cutting method, printing method, device and equipment of chartlet three-dimensional model |
CN113715338A (en) * | 2021-08-30 | 2021-11-30 | 深圳市纵维立方科技有限公司 | Three-dimensional model slicing method, printing method and related equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111319264B (en) * | 2018-12-17 | 2021-07-13 | 苏州苏大维格科技集团股份有限公司 | Data processing method applied to 3D printing equipment and 3D printing equipment |
CN110956699B (en) * | 2019-11-27 | 2022-10-25 | 西安交通大学 | GPU (graphics processing unit) parallel slicing method for triangular mesh model |
CN111805894B (en) * | 2020-06-15 | 2021-08-03 | 苏州大学 | STL model slicing method and device |
CN112734934B (en) * | 2021-01-25 | 2023-12-01 | 嘉兴学院 | STL model 3D printing slicing method based on intersecting edge mapping |
-
2021
- 2021-08-30 CN CN202111002138.1A patent/CN113715338B/en active Active
-
2022
- 2022-05-27 WO PCT/CN2022/095545 patent/WO2023029619A1/en unknown
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6678571B1 (en) * | 2000-07-07 | 2004-01-13 | 3D Systems, Inc. | Micro-slicing contour smoothing technique |
CN102446368A (en) * | 2010-10-11 | 2012-05-09 | 王素 | Rapid slicing method of STL (Stereo Lithography) model based on sorting by triangle adjacency in layers in rapid prototyping manufacturing |
CN104331555A (en) * | 2014-10-31 | 2015-02-04 | 河海大学常州校区 | Slicing processing method aiming at non-closed STL model with boundaries |
JP2017097517A (en) * | 2015-11-20 | 2017-06-01 | ローランドディー.ジー.株式会社 | Cross section data creation device, cross section data creation method, and program |
CN110757804A (en) * | 2018-07-26 | 2020-02-07 | 中国科学院沈阳自动化研究所 | Full-color layered slicing algorithm based on texture mapping three-dimensional model |
CN109159425A (en) * | 2018-08-21 | 2019-01-08 | 东莞中国科学院云计算产业技术创新与育成中心 | The dicing method and 3 D-printing device of threedimensional model |
CN110232742A (en) * | 2019-06-12 | 2019-09-13 | 洁誉科技(上海)股份有限公司 | 3D printing hierarchical control algorithm |
CN112659316A (en) * | 2020-12-17 | 2021-04-16 | 江苏集萃复合材料装备研究所有限公司 | Rapid layering method for 3D cement printing |
CN113183469A (en) * | 2021-04-27 | 2021-07-30 | 珠海赛纳三维科技有限公司 | Cutting method, printing method, device and equipment of chartlet three-dimensional model |
CN113715338A (en) * | 2021-08-30 | 2021-11-30 | 深圳市纵维立方科技有限公司 | Three-dimensional model slicing method, printing method and related equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116310261A (en) * | 2023-05-19 | 2023-06-23 | 深圳开鸿数字产业发展有限公司 | Three-dimensional model segmentation method, device, equipment and storage medium |
CN116310261B (en) * | 2023-05-19 | 2023-08-08 | 深圳开鸿数字产业发展有限公司 | Three-dimensional model segmentation method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113715338B (en) | 2023-08-18 |
CN113715338A (en) | 2021-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023029619A1 (en) | Slicing method for three-dimensional model, printing method and related device | |
US11275353B2 (en) | Creating a voxel representation of a three dimensional (3-D) object | |
US10529126B2 (en) | Generating slice data from a voxel representation | |
CN113183469B (en) | Slicing method, printing method, device and equipment for mapping three-dimensional model | |
Huang et al. | Algorithms for layered manufacturing in image space | |
CN103294421A (en) | Three-dimensional copying device | |
Huang et al. | An effective error-tolerance slicing algorithm for STL files | |
US20220410483A1 (en) | Stl model slicing method and device | |
WO2018113509A1 (en) | Self-adaptive direct-slicing method for preparing biological stent | |
US11935193B2 (en) | Automated mesh generation | |
WO2020125380A1 (en) | Data processing method applied in 3d printing device, and 3d printing device | |
US20210103269A1 (en) | Methods, systems, apparatusses and devices for facilitating producing hollowed 3d shapes by layer | |
Adnan et al. | Real-time slicing algorithm for Stereolithography (STL) CAD model applied in additive manufacturing industry | |
CN114861500B (en) | Method and system for automatically generating finite element model of tunnel structure based on three-dimensional point cloud | |
KR101890536B1 (en) | Method and system for differentially reducing data for comparative analysis between 3D design model data and laser scan data in construction stage | |
EP4011602A1 (en) | Additive manufacturing based on displaced signed distance fields | |
Shin et al. | Direct slicing of a point set model for rapid prototyping | |
Chen et al. | Idealization of scanning-derived triangle mesh models of prismatic engineering parts | |
Dassi et al. | Curvature-adapted remeshing of CAD surfaces | |
CN112819108A (en) | Slice fusion method and system of multi-source heterogeneous model and storage medium | |
Bender et al. | Direct solid element slicing in topology optimization for additive manufacturing | |
CN118180410B (en) | 3D printing-oriented automatic printing monitoring and analyzing method | |
US20200326682A1 (en) | Adapting a 3d printing file | |
CN118429551B (en) | Multi-source point cloud fusion method and device, electronic equipment and storage medium | |
CN116766597A (en) | Three-dimensional printing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22862761 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |