WO2023098338A1 - Method, apparatus and device for generating 3d printing file, and storage medium - Google Patents
Method, apparatus and device for generating 3d printing file, and storage medium Download PDFInfo
- Publication number
- WO2023098338A1 WO2023098338A1 PCT/CN2022/127038 CN2022127038W WO2023098338A1 WO 2023098338 A1 WO2023098338 A1 WO 2023098338A1 CN 2022127038 W CN2022127038 W CN 2022127038W WO 2023098338 A1 WO2023098338 A1 WO 2023098338A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- slice
- model
- oblique
- layer
- printing
- Prior art date
Links
- 238000007639 printing Methods 0.000 title claims abstract description 50
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000003860 storage Methods 0.000 title claims abstract description 15
- 238000010146 3D printing Methods 0.000 claims abstract description 49
- 238000007667 floating Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 2
- 239000000463 material Substances 0.000 abstract description 7
- 230000000694 effects Effects 0.000 abstract description 5
- 238000003854 Surface Print Methods 0.000 abstract 1
- 230000002035 prolonged effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000000725 suspension Substances 0.000 description 3
- 230000009466 transformation Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000003475 lamination Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000004441 surface measurement Methods 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/10—Additive manufacturing, e.g. 3D printing
Definitions
- the embodiment of the present invention relates to a 3D model oblique printing technology, and in particular to a method, device, equipment and storage medium for generating a 3D printing file.
- 3D printing technology is fusion lamination technology, which obtains geometric model entities of arbitrary shapes by superimposing printing materials layer by layer on the formed surface.
- the model is printed on the Z-axis of the printer facing upwards. If the upper layer protrudes more than the next layer, the molten consumables of the protruding upper layer will not have time to solidify. Under the influence of gravity, the consumables will fall down. In order to ensure that the model does not deform, Support structures need to be added.
- support structures ensures that the model will not be deformed during printing, more support structures also bring problems such as increased consumables, increased printing time, and difficulty in peeling off the supports. Surface accuracy of the model.
- the invention provides a method, device, equipment and storage medium for generating 3D printing files, so as to achieve the effects of increasing the printing speed of models, reducing printing materials and improving the printing accuracy of model surfaces.
- an embodiment of the present invention provides a method for generating a 3D printing file, including:
- each oblique slice direction For each oblique slice direction, according to the slice layer data of the current oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction;
- a print file of the 3D model is generated according to slice layer data corresponding to the target slice direction.
- the determination of the amount of support required to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction includes:
- the slice layer data of the current oblique slice direction determine the surface to be supported that needs to be added for each slice layer
- each slice layer For each slice layer, obtain the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; determine the support amount of the current slice layer according to the support area and the suspended height ;
- the support amount required to be added to the 3D model in the current oblique slice direction is determined.
- determining the surface to be supported that needs to be added for each slice layer includes:
- n is the number of layers where the slice of the 3D model is located, and n is a positive integer;
- the suspended surface determine the surface to be supported on which the (n+1)th slice needs to be supported.
- determining the surface to be supported for which the (n+1)th layer slice needs to be supported includes:
- the area whose length along the printing line direction is greater than the preset threshold is taken as the supporting surface where support needs to be added.
- the obtaining slice layered data of the 3D model in different oblique slice directions includes:
- the preset oblique slice direction is rotated around the vertical direction; wherein, the angle between the straight line where the preset oblique slice direction is located and the horizontal plane remains unchanged;
- the 3D model is respectively sliced according to the rotated oblique slicing direction, and slice layered data of the 3D model in different oblique slicing directions are obtained.
- the obtaining slice layered data of the 3D model in different oblique slice directions includes:
- the rotated 3D model is respectively sliced according to the preset oblique slicing direction, and slice layered data of the 3D model in different oblique slicing directions are obtained.
- the method before determining the amount of support required to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction for each oblique slice direction, the method further includes:
- the preset oblique slice direction be the changed oblique slice direction, and re-enter the acquisition of slice layered data of the 3D model in different oblique slice directions.
- the embodiment of the present invention also provides a device for generating a 3D printing file, including:
- the slice layered data acquisition module is used to obtain the slice layered data of the 3D model in different oblique slice directions;
- the support amount acquisition module is used to determine the amount of support that needs to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction for each oblique slice direction;
- a target slice direction determining module configured to determine the target slice direction corresponding to the minimum support amount
- a print file generating module configured to generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
- the embodiment of the present invention also provides a device for generating a 3D printing file, the device for generating a 3D printing file includes:
- processors one or more processors
- memory for storing one or more programs
- the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a 3D printing file described in any one of the first aspects.
- the embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for generating a 3D printing file as described in any one of the first aspects is implemented .
- the present invention obtains the slice layer data of the 3D model in different oblique slice directions; for each oblique slice direction, according to the slice layer data of the current oblique slice direction, the amount of support required to be added to the 3D model in the current oblique slice direction is determined; Determine the target slice direction corresponding to the minimum support amount; generate the print file of the 3D model according to the slice layer data corresponding to the target slice direction.
- the model can be printed in the slicing direction with the least amount of support, which solves the problems of increased consumables, increased printing time, difficulty in peeling off the support and the impact on the surface accuracy of the model after peeling off, and improves the model.
- FIG. 1A is a schematic flowchart of a method for generating a 3D printing file provided by Embodiment 1 of the present invention
- FIG. 1B is a schematic flow diagram of the rotation of the preset oblique slice direction in a method for generating a 3D printing file provided by Embodiment 1 of the present invention
- FIG. 1C is a schematic diagram of 3D model rotation in a method for generating a 3D printing file provided by Embodiment 1 of the present invention
- 1D is a schematic diagram of the angle transformation between the straight line where the preset oblique slice direction is located and the horizontal plane in a method for generating a 3D printing file provided by Embodiment 1 of the present invention
- FIG. 1E is a schematic diagram of the angle transformation between the line where the preset oblique slice direction is located and the horizontal plane in another method for generating a 3D printing file provided by Embodiment 1 of the present invention
- FIG. 2 is a schematic structural diagram of a 3D printing file generating device provided in Embodiment 2 of the present invention.
- FIG. 3 is a schematic structural diagram of a device for generating a 3D printing file provided by Embodiment 3 of the present invention.
- Figure 1 is a schematic flow chart of a method for generating a 3D printing file provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of obliquely printing a 3D model, and this method can be implemented by a device for generating a 3D printing file. Execute, specifically include the following steps:
- Step 110 obtaining slice layer data of the 3D model in different oblique slice directions.
- the slicing direction of the 3D model is different, and the amount of support required when printing the 3D model may be different. Oblique layering of the 3D model can reduce the amount of support.
- the system After the 3D model is input into the 3D printer, the system automatically generates the initial oblique slice direction according to the model data or the user manually sets the initial oblique slice direction.
- Step 110 includes the following two situations:
- A1 Rotate the preset oblique slice direction around the vertical direction according to the preset angle; wherein, the angle between the straight line where the preset oblique slice direction is located and the horizontal plane remains unchanged.
- the position of the 3D model is fixed, and the angle between the line where the preset oblique slice direction is located and the horizontal plane is set by the user or automatically generated, and the angle between the straight line and the horizontal plane remains unchanged when the oblique slice direction is changed.
- the preset angle is selected as 45°, and the preset oblique slice direction is rotated 45° clockwise/counterclockwise around the vertical direction each time to obtain the rotated oblique slice direction, according to the rotated oblique slice direction Re-slice the 3D model in the oblique slice direction to obtain new slice layer data; repeat the above steps 8 times to obtain slice layer data in 8 different oblique slice directions corresponding to one rotation of the horizontal plane.
- the angle between the straight line where the preset oblique slice direction A1 is located and the horizontal plane is a1
- the preset oblique slice direction A1 is rotated around the vertical direction to obtain the rotated oblique slice direction A2
- the rotated oblique slice direction A2 The angle between the straight line and the horizontal plane is a2. Since the angle between the straight line and the horizontal plane of the preset oblique slice direction remains unchanged during rotation, the values of the angle a1 and the angle a2 are equal.
- the second type the direction of the oblique slice is fixed, and the position of the 3D model is changed, which specifically includes the following steps:
- the oblique slice direction is fixed.
- the preset angle is selected as 45°
- the oblique slice direction is fixed
- the 3D model is rotated 45° clockwise/counterclockwise around the vertical direction to obtain the selected 3D model.
- the preset angle is 30°
- rotate the preset oblique slice direction 30° clockwise/counterclockwise around the vertical direction, or rotate the 3D model clockwise around the vertical direction /Rotate 30°counterclockwise, repeat 12 times, and obtain slice layered data corresponding to 12 different oblique slice directions.
- the angle between the straight line where the preset oblique slice direction A1 is located and the horizontal plane is a1
- the preset oblique slice direction is fixed
- the 3D model C1 is rotated around the vertical direction by the preset angle ⁇ to obtain the rotated 3D
- slice the rotated 3D model C2 according to the preset oblique slice direction A1 and obtain slice layered data of the 3D model in different oblique slice directions.
- the preset oblique slice direction be the changed oblique slice direction, and re-enter the acquisition of slice layered data of the 3D model in different oblique slice directions.
- the angle between the straight line where the oblique slice direction is located and the horizontal plane remains unchanged in both cases.
- the angle between the straight line where the preset oblique slice direction is located and the horizontal plane is changed. Angle, form a new oblique angle;
- the preset oblique slice direction be the oblique slice direction after the change, re-enter the 3D printer, according to the method provided in the above-mentioned embodiment, obtain the slices of different oblique slice directions of the 3D model in the above two cases Hierarchical data.
- Step 120 for each oblique slice direction, determine the amount of support required to be added to the 3D model in the current oblique slice direction according to slice layer data in the current oblique slice direction.
- the oblique layered data of the 3D model sliced in the current oblique slicing direction can be obtained, so that the amount of support required to be added to the 3D model in the current oblique slicing direction can be obtained according to the sliced layered data.
- the support structure is generated from the surface to be supported all the way down to the plane where the starting point of the z-axis is located.
- the support will not only increase the amount of consumables and increase the printing time, but the 3D model and the support are too close to each other, which will also cause the support to be difficult to peel off.
- step 120 specifically includes:
- Step 121 according to the slice layer data of the current oblique slice direction, determine the surface to be supported for which support needs to be added for each slice layer.
- Step 121 specifically includes the following steps:
- the area difference between the projection of the (n+1)th layer slice and the projection of the nth layer slice can be obtained through Boolean operations.
- the (n+1)th layer slice If the projection of the (n+1)th layer slice is less than or equal to the projection of the nth layer slice, the (n+1)th layer slice can be supported by the nth layer slice, and the (n+1)th layer slice does not need to be supported; If the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, the (n+1)th layer slice may have a suspended surface that needs to be supported. According to the projection of the (n+1)th layer slice and the At least one corresponding surface on the (n+1)th layer slice is determined by the difference of the projections of the n-layer slices, and then the dangling surface is determined according to the connectivity of the corresponding surfaces.
- the specific methods for determining the surface to be supported according to the suspended surface include:
- the area whose length along the printing line direction is greater than the preset threshold is taken as the supporting surface where support needs to be added.
- the suspended surface is the part of the (n+1)th layer slice that protrudes from the nth layer slice. If the length of the current suspended surface along the printing line direction is longer, that is, when the 3D printer prints along the printing line direction, the ( The consumables in the molten state of the n+1) slice are more protruding than the nth slice, and the protruding molten consumables are too late to solidify. Affected by gravity, the consumables will fall down, which will cause the 3D model to deform; therefore, get the current The length of the floating surface along the direction of the printing line is compared with the preset threshold.
- the slice of the nth layer can affect the slice of the (n+1)th layer.
- This part does not need support, and the area larger than the preset threshold is used as the support surface that needs to be added.
- the slice layer data of the current oblique slice direction determine the surface to be supported that needs to be added for each slice layer, and also includes:
- the polygon of the (n+1)th layer slice does not have the polygon support of the nth layer slice, then it is determined that the polygon is a suspended polygon
- the suspended surface determine the surface to be supported on which the (n+1)th slice needs to be supported.
- each slice layer can be divided into multiple small polygons. If the polygon is suspended, that is, there is no other layer of polygons below the polygon, then this polygon is a polygon that needs to be supported; if part of the polygon is in contact with polygons of other layers below, and the other part is suspended, it is necessary to judge whether it needs to be added according to the distance of the suspension
- the support structure is specifically judged according to the above step S3.
- Step 122 For each slice layer, obtain the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; determine the current slice layer according to the support area and the suspended height the amount of support.
- the suspended height of the point on the surface to be supported is the distance from the center point of the surface to be supported to the hot bed, that is, the value of the z coordinate of the center point of the surface to be supported ; If there are other slice layers below the surface to be supported in the direction of the z-axis, obtain the corresponding point on the nearest slice layer below the center point of the surface to be supported, and obtain the distance between the two points, and determine the suspended distance as this The difference between the z-coordinates of the two points.
- the support amount of the support structure is the obtained volume of the support structure of the support surface, the height of the generated support structure can be obtained according to the suspended height of the support surface, and the product of the support area corresponding to the support surface and the suspended height of the support surface can be calculated Get the support amount of the current slice layer.
- Step 123 according to the support amount of each slice layer, determine the amount of support required to be added to the 3D model in the current oblique slice direction.
- the support amount of each slice layer is obtained, and the total support amount required to be added to the 3D model in the current inclined slice direction is obtained by accumulating.
- Step 130 determining the target slice direction corresponding to the minimum support amount.
- Step 140 Generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
- Fig. 2 is a schematic structural diagram of a 3D printing file generating device provided in Embodiment 2 of the present invention. As shown in Fig. 2, a 3D printing file generating device includes:
- the slice layer data acquisition module 210 is configured to acquire slice layer data of the 3D model in different oblique slice directions.
- the slicing direction of the 3D model is different, and the amount of support required when printing the 3D model may be different. Oblique layering of the 3D model can reduce the amount of support.
- the system After the 3D model is input into the 3D printer, the system automatically generates the initial oblique slice direction according to the model data or the user manually sets the initial oblique slice direction.
- the slice layered data acquisition module 210 includes a first slice layered data acquisition submodule and a second slice layered data acquisition submodule;
- the first slice layered data acquisition submodule includes:
- the first rotating unit is configured to rotate the preset oblique slice direction around the vertical direction according to the preset angle; wherein, the angle between the line where the preset oblique slice direction is located and the horizontal plane remains unchanged.
- the first slicing unit is configured to respectively slice the 3D model according to the rotated oblique slicing direction, and acquire slice layered data of the 3D model in different oblique slicing directions.
- the second slice hierarchical data acquisition submodule includes:
- the second rotating unit is used to rotate the 3D model around the vertical direction according to a preset angle.
- the second slicing unit is configured to respectively slice the rotated 3D model according to preset oblique slicing directions, and obtain slice layered data of the 3D model in different oblique slicing directions.
- re-slicing the 3D model after rotating the preset oblique slicing direction around the vertical direction and re-slicing the 3D model after rotating the 3D model around the vertical direction are equivalent to performing different oblique directions. Slice the 3D model again.
- the device for generating the 3D printing file also includes:
- the oblique angle transformation module is used to change the angle between the straight line where the preset oblique slice direction is located and the horizontal plane.
- the slice layer data acquisition and updating module is configured to make the preset oblique slice direction the changed oblique slice direction, and re-enter the acquired slice layer data of the 3D model in different oblique slice directions.
- the support amount acquisition module 220 is configured to, for each oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction.
- the oblique layered data of the 3D model sliced in the current oblique slicing direction can be obtained, so that the amount of support required to be added to the 3D model in the current oblique slicing direction can be obtained according to the sliced layered data.
- the support structure is generated from the surface to be supported all the way down to the plane where the starting point of the z-axis is located.
- the support will not only increase the amount of consumables and increase the printing time, but the 3D model and the support are too close to each other, which will also cause the support to be difficult to peel off.
- the supporting amount obtaining module 220 includes:
- the support surface acquisition sub-module is used to determine the surface to be supported for which support needs to be added for each slice layer according to the slice layer data of the current inclined slice direction.
- the projection acquiring unit is configured to perform a Boolean operation on the projection of the nth layer slice and the projection of the (n+1)th layer slice; wherein, n is the number of layers where the slices of the 3D model are located, and n is a positive integer.
- the suspended surface acquisition unit is used for if the calculation result is that the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, then according to the projection of the (n+1)th layer slice and the The difference of the projected difference of the nth layer slice corresponds to the connectivity of the surface, and the dangling surface of the (n+1)th layer slice is determined.
- the surface-to-be-supported determining unit is configured to determine, according to the suspended surface, the surface to be supported to which support needs to be added for the (n+1)th slice.
- the unit to be supported surface determination also includes:
- the sub-unit for obtaining the length of the printing trace on the floating surface is used for obtaining the length of the current floating surface along the printing trace direction for each floating surface.
- the judging and determining sub-unit is configured to use an area whose length along the printing line direction is greater than a preset threshold as a support surface to be added with support.
- the supporting amount obtaining module 220 also includes:
- the slice layer support acquisition sub-module is used to obtain, for each slice layer, the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; according to the support area and the Overhang height, which determines the support amount of the current slice layer.
- the total support amount determining submodule is used to determine the amount of support required to be added to the 3D model in the current inclined slice direction according to the support amount of each slice layer.
- the target slice direction determination module 230 is configured to determine the target slice direction corresponding to the minimum support amount.
- the print file generation module 240 is configured to generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
- Obtain the oblique layer data of the 3D model in the target slice direction determine each slice layer and printing path according to the oblique layer data, and print the 3D model by adjusting the nozzle angle according to the oblique layer data.
- the device for generating a 3D printing file provided by an embodiment of the present invention can execute the method for generating a 3D printing file provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
- Fig. 3 is a schematic structural diagram of a 3D printing file generating device provided in Embodiment 3 of the present invention.
- the 3D printing file generating device includes a processor 30, a memory 31, an input device 32 and an output device 33
- the number of processors 30 in the generating device of 3D printing files can be one or more, and one processor 30 is taken as an example in Fig. 3; the processor 30, memory 31, input device 32 and The output device 33 can be connected via a bus or in other ways. In FIG. 3 , connection via a bus is taken as an example.
- the memory 31 can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the method for generating 3D printing files in the embodiment of the present invention (for example, 3D printing file Slice layered data acquisition module 210, support amount acquisition module 220, target slice direction determination module 230 and print file generation module 240) in the generation device.
- the processor 30 executes various functional applications and data processing of the 3D printing file generating device by running the software programs, instructions and modules stored in the memory 31 , that is, realizes the above-mentioned 3D printing file generating method.
- the memory 31 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required by a function; the data storage area may store data created according to the use of the terminal, and the like.
- the memory 31 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
- the storage 31 may further include storages that are remotely located relative to the processor 30, and these remote storages may be connected to a device for generating 3D printing files through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- the input device 32 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the 3D printing file generation device.
- the output device 33 may include a display device such as a display screen.
- Embodiment 4 of the present invention also provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a method for generating a 3D printing file when executed by a computer processor.
- the method includes:
- each oblique slice direction For each oblique slice direction, according to the slice layer data of the current oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction;
- a print file of the 3D model is generated according to slice layer data corresponding to the target slice direction.
- the storage medium containing computer-executable instructions provided by the embodiments of the present invention the computer-executable instructions are not limited to the method operations described above, and can also perform the generation of 3D printing files provided by any embodiment of the present invention. Related operations in the method.
- the present invention can be realized by means of software and necessary general-purpose hardware, and of course it can also be realized by hardware, but in many cases the former is a better implementation mode .
- 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 a software product, and the computer software product can be stored in a computer-readable storage medium, such as a floppy disk of a computer , read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disc, etc., including several instructions to make a computer device (which can be a personal computer) , server, or network device, etc.) execute the method described in each embodiment of the present invention.
- a computer-readable storage medium such as a floppy disk of a computer , read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disc, etc.
- each unit and module included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized;
- the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Materials Engineering (AREA)
- General Physics & Mathematics (AREA)
- Manufacturing & Machinery (AREA)
- Geometry (AREA)
- Theoretical Computer Science (AREA)
- Mechanical Engineering (AREA)
- Optics & Photonics (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
Abstract
Disclosed are a method, apparatus and device for generating a 3D printing file, and a storage medium. The method for generating the 3D printing file comprises: obtaining slice hierarchical data of a 3D model in different inclined slice directions; for each inclined slice direction, according to the slice hierarchical data of the current inclined slice direction, determining a support amount of a support required to be added in the 3D model in the current inclined slice direction; determining a target slice direction corresponding to the minimum support amount; and generating a printing file of the 3D model according to the slice hierarchical data corresponding to the target slice direction. By means of such a method, model printing is performed in the slice direction having the minimum support amount, the problems that the number of consumables is increased, the printing time is prolonged, supports are difficult to be peeled off and the surface precision of the model is affected after peeling off due to the fact that the number of support structures is large are solved, and the effects of improving a model printing speed, reducing printing materials and improving the surface printing precision of the model are achieved.
Description
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年11月30日提交的申请号为202111448612.3的中国申请的优先权,其在此处于所有目的通过引用将其全部内容并入本文。This application claims priority to Chinese application No. 202111448612.3 filed on November 30, 2021, which is hereby incorporated by reference in its entirety for all purposes.
本发明实施例涉及三维模型倾斜打印技术,尤其涉及一种3D打印文件的生成方法、装置、设备及存储介质。The embodiment of the present invention relates to a 3D model oblique printing technology, and in particular to a method, device, equipment and storage medium for generating a 3D printing file.
3D打印技术的原理是熔融层积技术,通过将打印材料一层层叠加到已成型表面,获得任意形状的几何模型实体。模型在打印机Z轴朝上打印,如果上一层凸出下一层较多,凸出的上一层的熔融耗材来不及固化,受到重力的影响,耗材会往下掉,为了保证模型不变形,需要添加支撑结构。The principle of 3D printing technology is fusion lamination technology, which obtains geometric model entities of arbitrary shapes by superimposing printing materials layer by layer on the formed surface. The model is printed on the Z-axis of the printer facing upwards. If the upper layer protrudes more than the next layer, the molten consumables of the protruding upper layer will not have time to solidify. Under the influence of gravity, the consumables will fall down. In order to ensure that the model does not deform, Support structures need to be added.
添加支撑结构虽然保证了模型打印过程中不变形,但是较多的支撑结构也带来了耗材量增加、打印时间增加和支撑难以剥离等问题,同时支撑结构剥离会导致模型表面不光滑,降低打印模型的表面精度。Although the addition of support structures ensures that the model will not be deformed during printing, more support structures also bring problems such as increased consumables, increased printing time, and difficulty in peeling off the supports. Surface accuracy of the model.
发明内容Contents of the invention
本发明提供一种3D打印文件的生成方法、装置、设备及存储介质,以实现提高模型打印速度、减少打印用料和提高模型表面打印精度的效果。The invention provides a method, device, equipment and storage medium for generating 3D printing files, so as to achieve the effects of increasing the printing speed of models, reducing printing materials and improving the printing accuracy of model surfaces.
第一方面,本发明实施例提供了一种3D打印文件的生成方法,包括:In a first aspect, an embodiment of the present invention provides a method for generating a 3D printing file, including:
获取3D模型在不同倾斜切片方向的切片分层数据;Obtain the slice layer data of the 3D model in different oblique slice directions;
对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量;For each oblique slice direction, according to the slice layer data of the current oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction;
确定最小的支撑量对应的目标切片方向;Determine the target slice direction corresponding to the minimum support amount;
根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。A print file of the 3D model is generated according to slice layer data corresponding to the target slice direction.
可选的,所述根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量,包括:Optionally, the determination of the amount of support required to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction includes:
根据当前倾斜切片方向的切片分层数据,确定每一个切片层所需添加支撑的待支撑面;According to the slice layer data of the current oblique slice direction, determine the surface to be supported that needs to be added for each slice layer;
对于每一个切片层,获取当前切片层的待支撑面对应的支撑面积,以及所述待支撑面上点的悬空高度;根据所述支撑面积和所述悬空高度,确定当前切片层的支撑量;For each slice layer, obtain the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; determine the support amount of the current slice layer according to the support area and the suspended height ;
根据每一个切片层的支撑量,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量。According to the support amount of each slice layer, the support amount required to be added to the 3D model in the current oblique slice direction is determined.
可选的,所述根据当前倾斜切片方向的所述切片分层数据,确定每一个切片层所需添加支撑的待支撑面,包括:Optionally, according to the slice layer data of the current oblique slice direction, determining the surface to be supported that needs to be added for each slice layer includes:
对第n层切片的投影和第(n+1)层切片的投影进行布尔运算;其中,n为3D模型的切片所在的层数,n为正整数;Perform Boolean operations on the projection of the nth layer slice and the projection of the (n+1)th layer slice; where n is the number of layers where the slice of the 3D model is located, and n is a positive integer;
若运算结果为所述第(n+1)层切片的投影大于所述第n层切片的投影,则根据所述第(n+1)层切片的投影和所述第n层切片的投影的差值对应面的连通性,确定第(n+1)层切片的悬空面;If the operation result is that the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, then according to the projection of the (n+1)th layer slice and the projection of the nth layer slice The connectivity of the surface corresponding to the difference value determines the dangling surface of the (n+1) layer slice;
根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面。According to the suspended surface, determine the surface to be supported on which the (n+1)th slice needs to be supported.
可选的,所述根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面,包括:Optionally, according to the suspended surface, determining the surface to be supported for which the (n+1)th layer slice needs to be supported includes:
对于各悬空面,获取当前悬空面沿打印走线方向的长度;For each floating surface, obtain the length of the current floating surface along the printing line direction;
将沿打印走线方向的长度大于预设阈值的区域作为所需添加支撑的支撑面。The area whose length along the printing line direction is greater than the preset threshold is taken as the supporting surface where support needs to be added.
可选的,所述获取3D模型在不同倾斜切片方向的切片分层数据,包括:Optionally, the obtaining slice layered data of the 3D model in different oblique slice directions includes:
按照预设角度,将预设倾斜切片方向绕竖直方向进行旋转;其中,预设倾斜切片方向所在直线与水平面之间的角度不变;According to the preset angle, the preset oblique slice direction is rotated around the vertical direction; wherein, the angle between the straight line where the preset oblique slice direction is located and the horizontal plane remains unchanged;
按照旋转后的倾斜切片方向对所述3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。The 3D model is respectively sliced according to the rotated oblique slicing direction, and slice layered data of the 3D model in different oblique slicing directions are obtained.
可选的,所述获取3D模型在不同倾斜切片方向的切片分层数据,包括:Optionally, the obtaining slice layered data of the 3D model in different oblique slice directions includes:
按照预设角度,将3D模型绕竖直方向进行旋转;Rotate the 3D model around the vertical direction according to the preset angle;
按照预设倾斜切片方向对旋转后的3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。The rotated 3D model is respectively sliced according to the preset oblique slicing direction, and slice layered data of the 3D model in different oblique slicing directions are obtained.
可选的,在所述对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量之前,还包括:Optionally, before determining the amount of support required to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction for each oblique slice direction, the method further includes:
改变预设倾斜切片方向所在直线与水平面之间的角度;Change the angle between the line where the preset oblique slice direction is located and the horizontal plane;
令所述预设倾斜切片方向为改变后的倾斜切片方向,并重新进入所述获取3D模型在不同倾斜切片方向的切片分层数据。Let the preset oblique slice direction be the changed oblique slice direction, and re-enter the acquisition of slice layered data of the 3D model in different oblique slice directions.
第二方面,本发明实施例还提供了一种3D打印文件的生成装置,包括:In the second aspect, the embodiment of the present invention also provides a device for generating a 3D printing file, including:
切片分层数据获取模块,用于获取3D模型在不同倾斜切片方向的切片分层数据;The slice layered data acquisition module is used to obtain the slice layered data of the 3D model in different oblique slice directions;
支撑量获取模块,用于对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量;The support amount acquisition module is used to determine the amount of support that needs to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction for each oblique slice direction;
目标切片方向确定模块,用于确定最小的支撑量对应的目标切片方向;A target slice direction determining module, configured to determine the target slice direction corresponding to the minimum support amount;
打印文件生成模块,用于根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。A print file generating module, configured to generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
第三方面,本发明实施例还提供了一种3D打印文件的生成设备,所述3D打印文件的生成设备包括:In the third aspect, the embodiment of the present invention also provides a device for generating a 3D printing file, the device for generating a 3D printing file includes:
一个或多个处理器;one or more processors;
存储器,用于存储一个或多个程序;memory for storing one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现第一方面中任一所述的3D打印文件的生成方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a 3D printing file described in any one of the first aspects.
第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面中任一所述的3D打印文件的生成方法。In the fourth aspect, the embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for generating a 3D printing file as described in any one of the first aspects is implemented .
本发明通过获取3D模型在不同倾斜切片方向的切片分层数据;对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定3D模型在当前倾斜切片方向所需添加支撑的支撑量;确定最小的支撑量对应的目标切片方向;根据目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。通过这样的方法,实现以支撑量最少的切片方向进行模型打印,解决支撑结构较多带来的耗材量增加、打印时间增加、支撑难以剥离和剥离后影响模型表面精度的问题,,达到提高模型打印速度、减少打印用料和提高模型表面打印精度的效果。The present invention obtains the slice layer data of the 3D model in different oblique slice directions; for each oblique slice direction, according to the slice layer data of the current oblique slice direction, the amount of support required to be added to the 3D model in the current oblique slice direction is determined; Determine the target slice direction corresponding to the minimum support amount; generate the print file of the 3D model according to the slice layer data corresponding to the target slice direction. Through this method, the model can be printed in the slicing direction with the least amount of support, which solves the problems of increased consumables, increased printing time, difficulty in peeling off the support and the impact on the surface accuracy of the model after peeling off, and improves the model. The effect of printing speed, reducing printing materials and improving the printing accuracy of the model surface.
图1A为本发明实施例一提供的一种3D打印文件的生成方法的流程示意图;FIG. 1A is a schematic flowchart of a method for generating a 3D printing file provided by Embodiment 1 of the present invention;
图1B为本发明实施例一提供的一种3D打印文件的生成方法中预设倾斜切片方向旋转的流程示意图;FIG. 1B is a schematic flow diagram of the rotation of the preset oblique slice direction in a method for generating a 3D printing file provided by Embodiment 1 of the present invention;
图1C为本发明实施例一提供的一种3D打印文件的生成方法中3D模型旋转的示意图;FIG. 1C is a schematic diagram of 3D model rotation in a method for generating a 3D printing file provided by Embodiment 1 of the present invention;
图1D为本发明实施例一提供的一种3D打印文件的生成方法中预设倾斜切片方向所在直线与水平面之间的角度变换的示意图;1D is a schematic diagram of the angle transformation between the straight line where the preset oblique slice direction is located and the horizontal plane in a method for generating a 3D printing file provided by Embodiment 1 of the present invention;
图1E为本发明实施例一提供的另一种3D打印文件的生成方法中预设倾斜切片方向所在直线与水平面之间的角度变换的示意图;FIG. 1E is a schematic diagram of the angle transformation between the line where the preset oblique slice direction is located and the horizontal plane in another method for generating a 3D printing file provided by Embodiment 1 of the present invention;
图2为本发明实施例二提供的一种3D打印文件的生成装置的结构示意图;FIG. 2 is a schematic structural diagram of a 3D printing file generating device provided in Embodiment 2 of the present invention;
图3为本发明实施例三提供的一种3D打印文件的生成设备的结构示意图。FIG. 3 is a schematic structural diagram of a device for generating a 3D printing file provided by Embodiment 3 of the present invention.
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings but not all structures.
实施例一Embodiment one
图1为本发明实施例一提供的一种3D打印文件的生成方法的流程示意图,本实施例可适用于对三维模型进行倾斜打印的情况,该方法可以由一种3D打印文件的生成装置来执行,具体包括如下步骤:Figure 1 is a schematic flow chart of a method for generating a 3D printing file provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of obliquely printing a 3D model, and this method can be implemented by a device for generating a 3D printing file. Execute, specifically include the following steps:
步骤110、获取3D模型在不同倾斜切片方向的切片分层数据。 Step 110, obtaining slice layer data of the 3D model in different oblique slice directions.
三维模型的切片方向不同,打印三维模型时所需的支撑量可能也不相同,对三维模型进行倾斜分层可以减少支撑量。在三维模型输入3D打印机后,系统根据模型数据自动生成初始倾斜切片方向或用户手动设定初始倾斜切片方向。The slicing direction of the 3D model is different, and the amount of support required when printing the 3D model may be different. Oblique layering of the 3D model can reduce the amount of support. After the 3D model is input into the 3D printer, the system automatically generates the initial oblique slice direction according to the model data or the user manually sets the initial oblique slice direction.
步骤110包括以下两种情况:Step 110 includes the following two situations:
第一种,3D模型位置固定,改变倾斜切片方向,具体包括以下步骤:The first one, the position of the 3D model is fixed, and the direction of the oblique slice is changed, which specifically includes the following steps:
A1、按照预设角度,将预设倾斜切片方向绕竖直方向进行旋转;其中,预设倾斜切片方向所在直线与水平面之间的角度不变。A1. Rotate the preset oblique slice direction around the vertical direction according to the preset angle; wherein, the angle between the straight line where the preset oblique slice direction is located and the horizontal plane remains unchanged.
A2、按照旋转后的倾斜切片方向对所述3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。A2. Slicing the 3D model according to the rotated oblique slicing direction, and obtaining slice layered data of the 3D model in different oblique slicing directions.
3D模型的位置固定,预设倾斜切片方向所在直线与水平面之间的角度由用户自主设定或自动生成,并在改变倾斜切片方向时保持与水平面之间的角度不变。示例性的,本实施例中选择预设角度为45°,每次将预设倾斜切片方向绕竖直方向按顺时针/逆时针方向旋转45°得到旋转后的倾斜切片方向,按照旋转后的倾斜切片方向重新对3D模型进行切片,得到新的切片分层数据;重复以上步骤8次,得到水平面旋转一周对应的8个不同倾斜切片方向的切片分层数据。如图1B所示,预设倾斜切片方向A1所在直线与水平面之间的角度为a1,预设倾斜切片方向A1绕竖直方向旋转得到旋转后的倾斜切片方向A2,旋转后的倾斜切片方向A2所在直线与水平面之间的角度为a2,由于旋转时,预设倾斜切片方向所在直线与水平面之间的角度保持不变,则角度a1与角度a2的数值相等。The position of the 3D model is fixed, and the angle between the line where the preset oblique slice direction is located and the horizontal plane is set by the user or automatically generated, and the angle between the straight line and the horizontal plane remains unchanged when the oblique slice direction is changed. Exemplarily, in this embodiment, the preset angle is selected as 45°, and the preset oblique slice direction is rotated 45° clockwise/counterclockwise around the vertical direction each time to obtain the rotated oblique slice direction, according to the rotated oblique slice direction Re-slice the 3D model in the oblique slice direction to obtain new slice layer data; repeat the above steps 8 times to obtain slice layer data in 8 different oblique slice directions corresponding to one rotation of the horizontal plane. As shown in Figure 1B, the angle between the straight line where the preset oblique slice direction A1 is located and the horizontal plane is a1, the preset oblique slice direction A1 is rotated around the vertical direction to obtain the rotated oblique slice direction A2, and the rotated oblique slice direction A2 The angle between the straight line and the horizontal plane is a2. Since the angle between the straight line and the horizontal plane of the preset oblique slice direction remains unchanged during rotation, the values of the angle a1 and the angle a2 are equal.
第二种,倾斜切片方向固定,3D模型位置改变,具体包括以下步骤:The second type, the direction of the oblique slice is fixed, and the position of the 3D model is changed, which specifically includes the following steps:
B1、按照预设角度,将3D模型绕竖直方向进行旋转。B1. Rotate the 3D model around the vertical direction according to the preset angle.
B2、按照预设倾斜切片方向对旋转后的3D模型分别进行切片,获取所述 3D模型在不同倾斜切片方向的切片分层数据。B2. Slicing the rotated 3D model according to the preset oblique slicing direction, and obtaining slice layered data of the 3D model in different oblique slicing directions.
倾斜切片方向固定,示例性的,本实施例中选择预设角度为45°,固定倾斜切片方向,将3D模型绕竖直方向按顺时针/逆时针方向旋转45°,得到选择后的3D模型,按照预设倾斜切片方向对旋转45°后的3D模型重新进行切片,得到新的切片分层数据;重复以上步骤8次,得到3D模型在水平面旋转一周对应的8个不同方向的倾斜切片分层数据。The oblique slice direction is fixed. For example, in this embodiment, the preset angle is selected as 45°, the oblique slice direction is fixed, and the 3D model is rotated 45° clockwise/counterclockwise around the vertical direction to obtain the selected 3D model. , re-slice the 3D model rotated by 45° according to the preset oblique slice direction to obtain new slice layer data; repeat the above steps 8 times to obtain oblique slice scores in 8 different directions corresponding to the 3D model’s rotation on the horizontal plane. layer data.
进一步的,在一替代实施例中,若预设角度为30°,则将预设倾斜切片方向绕竖直方向按顺时针/逆时针方向旋转30°,或将3D模型绕竖直方向顺时针/逆时针方向旋转30°,重复12次,得了12个不同倾斜切片方向对应的切片分层数据。如图1C所示,预设倾斜切片方向A1所在直线与水平面之间的角度为a1,预设倾斜切片方向固定不变,将3D模型C1绕竖直方向旋转预设角度θ得到旋转后的3D模型C2,按照预设倾斜切片方向A1对旋转后的3D模型C2进行切片,获取3D模型在不同倾斜切片方向的切片分层数据。Further, in an alternative embodiment, if the preset angle is 30°, rotate the preset oblique slice direction 30° clockwise/counterclockwise around the vertical direction, or rotate the 3D model clockwise around the vertical direction /Rotate 30°counterclockwise, repeat 12 times, and obtain slice layered data corresponding to 12 different oblique slice directions. As shown in Figure 1C, the angle between the straight line where the preset oblique slice direction A1 is located and the horizontal plane is a1, the preset oblique slice direction is fixed, and the 3D model C1 is rotated around the vertical direction by the preset angle θ to obtain the rotated 3D For model C2, slice the rotated 3D model C2 according to the preset oblique slice direction A1, and obtain slice layered data of the 3D model in different oblique slice directions.
在上述实施例方案中,将预设倾斜切片方向绕竖直方向旋转后重新对3D模型进行切片,和将3D模型绕竖直方向旋转后重新对3D模型进行切片,均相当于按照不同倾斜方向对3D模型再次进行切片。In the above-mentioned embodiment scheme, re-slicing the 3D model after rotating the preset oblique slicing direction around the vertical direction, and re-slicing the 3D model after rotating the 3D model around the vertical direction are equivalent to different oblique directions Slice the 3D model again.
在上述实施例的基础上,还包括:On the basis of the foregoing embodiments, it also includes:
改变预设倾斜切片方向所在直线与水平面之间的角度。Changes the angle between the line on which the preset oblique slice orientation lies and the horizontal plane.
令所述预设倾斜切片方向为改变后的倾斜切片方向,并重新进入所述获取3D模型在不同倾斜切片方向的切片分层数据。Let the preset oblique slice direction be the changed oblique slice direction, and re-enter the acquisition of slice layered data of the 3D model in different oblique slice directions.
在上述实施例中,两种情况中倾斜切片方向所在直线与水平面之间的角度均保持不变,为了获得更全面的倾斜切片分层数据,改变预设倾斜切片方向所在直线与水平面之间的角度,形成新的倾斜角度;令预设倾斜切片方向为改变后的倾斜切片方向,重新进入3D打印机,根据上述实施例提供的方法,获取3D模型在上述两种情况中不同倾斜切片方向的切片分层数据。In the above embodiments, the angle between the straight line where the oblique slice direction is located and the horizontal plane remains unchanged in both cases. In order to obtain more comprehensive oblique slice layered data, the angle between the straight line where the preset oblique slice direction is located and the horizontal plane is changed. Angle, form a new oblique angle; Let the preset oblique slice direction be the oblique slice direction after the change, re-enter the 3D printer, according to the method provided in the above-mentioned embodiment, obtain the slices of different oblique slice directions of the 3D model in the above two cases Hierarchical data.
如图1D所示,改变预设倾斜切片方向A1所在直线与水平面之间的角度得到改变后的倾斜切片方向B1,预设倾斜切片方向A1所在直线与水平面之间的角度为a1,改变后的倾斜切片方向B1所在直线与水平面之间的角度为b1,角度a1和角度b1的数值不相等,本实施例采用角度b1比角度a1大预设角度。在改变倾斜角度后,重新对3D模型进行切片,再次将改变后的倾斜切片方向B1绕竖直方向旋转得到旋转后的倾斜切片方向B2(未示出),重新对3D模型进行切片,重复以上步骤,得到不同倾斜切片方向的切片分层数据。As shown in Figure 1D, changing the angle between the straight line where the preset oblique slice direction A1 is located and the horizontal plane is changed to obtain the changed oblique slice direction B1, the angle between the straight line where the preset oblique slice direction A1 is located and the horizontal plane is a1, and the changed The angle between the straight line where the oblique slice direction B1 is located and the horizontal plane is b1, and the values of the angle a1 and the angle b1 are not equal. In this embodiment, the angle b1 is larger than the angle a1 by a predetermined angle. After changing the tilt angle, slice the 3D model again, rotate the changed tilt slice direction B1 around the vertical direction again to obtain the rotated tilt slice direction B2 (not shown), slice the 3D model again, and repeat the above step to obtain slice layered data of different oblique slice directions.
如图1E所示,改变预设倾斜切片方向A1所在直线与水平面之间的角度得到改变后的倾斜切片方向B1,在改变倾斜角度后,重新对3D模型进行切片,然后将倾斜切片方向B1固定,再次将3D模型C1绕竖直方向旋转预设角度θ得到旋转后的3D模型C2(未示出),按照预设倾斜切片方向B1对旋转后的3D模型C2进行切片,获取3D模型在不同倾斜切片方向的切片分层数据。As shown in Figure 1E, change the angle between the line where the preset oblique slice direction A1 is located and the horizontal plane to obtain the changed oblique slice direction B1, after changing the oblique angle, re-slice the 3D model, and then fix the oblique slice direction B1 , rotate the 3D model C1 around the vertical direction by a preset angle θ again to obtain a rotated 3D model C2 (not shown), slice the rotated 3D model C2 according to the preset oblique slice direction B1, and obtain the 3D model in different Sliced hierarchical data with oblique slice orientation.
步骤120、对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量。 Step 120 , for each oblique slice direction, determine the amount of support required to be added to the 3D model in the current oblique slice direction according to slice layer data in the current oblique slice direction.
当三维模型确定倾斜切片方向后,可得到三维模型在当前倾斜切片方向下进行切片的倾斜分层数据,从而可以根据切片分层数据得到3D模型在当前倾斜切片方向所需添加支撑的支撑量。支撑结构从待支撑面一直往下生成到z轴的起始点所在平面,相应的,三维模型的待支撑面积越大,支撑面距离Z轴起点距离越远,即带支撑面的悬空高度越高,打印时需要产生的支撑结构的体积越大,即支 撑量越大。支撑不仅会增加耗材量,增加打印时间,3D模型与支撑接触过于紧密还会导致支撑难以剥离等问题。After the 3D model determines the oblique slicing direction, the oblique layered data of the 3D model sliced in the current oblique slicing direction can be obtained, so that the amount of support required to be added to the 3D model in the current oblique slicing direction can be obtained according to the sliced layered data. The support structure is generated from the surface to be supported all the way down to the plane where the starting point of the z-axis is located. Correspondingly, the larger the area to be supported of the 3D model, the farther the support surface is from the starting point of the Z-axis, that is, the higher the suspension height with the support surface , the larger the volume of the support structure that needs to be produced during printing, that is, the greater the support amount. The support will not only increase the amount of consumables and increase the printing time, but the 3D model and the support are too close to each other, which will also cause the support to be difficult to peel off.
其中,步骤120具体包括:Wherein, step 120 specifically includes:
步骤121、根据当前倾斜切片方向的切片分层数据,确定每一个切片层所需添加支撑的待支撑面。Step 121 , according to the slice layer data of the current oblique slice direction, determine the surface to be supported for which support needs to be added for each slice layer.
步骤121具体包括以下步骤:Step 121 specifically includes the following steps:
S1、对第n层切片的投影和第(n+1)层切片的投影进行布尔运算;其中,n为3D模型的切片所在的层数,n为正整数。S1. Perform Boolean operations on the projection of the nth layer slice and the projection of the (n+1)th layer slice; where n is the number of layers where the slices of the 3D model are located, and n is a positive integer.
通过布尔运算可以求得第(n+1)层切片的投影与第n层切片的投影的面积差。The area difference between the projection of the (n+1)th layer slice and the projection of the nth layer slice can be obtained through Boolean operations.
S2、若运算结果为所述第(n+1)层切片的投影大于所述第n层切片的投影,则根据所述第(n+1)层切片的投影和所述第n层切片的投影的差值对应面的连通性,确定第(n+1)层切片的悬空面。S2. If the calculation result is that the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, then according to the projection of the (n+1)th layer slice and the nth layer slice The difference of the projection corresponds to the connectivity of the surface, and the dangling surface of the (n+1)th layer slice is determined.
若第(n+1)层切片的投影小于等于第n层切片的投影,则第(n+1)层切片可以被第n层切片支撑,第(n+1)层切片不需要被支撑;若第(n+1)层切片的投影大于第n层切片的投影,则第(n+1)层切片可能存在需要被支撑的悬空面,根据第(n+1)层切片的投影和第n层切片的投影的差值确定在第(n+1)层切片上的至少一个对应面,再根据对应面的连通性确定悬空面。If the projection of the (n+1)th layer slice is less than or equal to the projection of the nth layer slice, the (n+1)th layer slice can be supported by the nth layer slice, and the (n+1)th layer slice does not need to be supported; If the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, the (n+1)th layer slice may have a suspended surface that needs to be supported. According to the projection of the (n+1)th layer slice and the At least one corresponding surface on the (n+1)th layer slice is determined by the difference of the projections of the n-layer slices, and then the dangling surface is determined according to the connectivity of the corresponding surfaces.
S3、根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面。S3. According to the suspended surface, determine the surface to be supported that needs to be supported for the (n+1)th layer slice.
悬空面不一定都需要被支撑,在确定悬空面后,还需要进一步确定需要添加支撑的悬空面。Not all suspended surfaces need to be supported. After determining the suspended surfaces, it is necessary to further determine the suspended surfaces that need to be supported.
根据悬空面确定待支撑面的具体方法包括:The specific methods for determining the surface to be supported according to the suspended surface include:
对于各悬空面,获取当前悬空面沿打印走线方向的长度;For each floating surface, obtain the length of the current floating surface along the printing line direction;
将沿打印走线方向的长度大于预设阈值的区域作为所需添加支撑的支撑面。The area whose length along the printing line direction is greater than the preset threshold is taken as the supporting surface where support needs to be added.
悬空面即为第(n+1)层切片比第n层切片凸出的部分,若当前悬空面沿打印走线方向的长度较长,即在3D打印机沿打印走线方向打印时,第(n+1)层切片熔融状态的耗材比第n层切片凸出较多,凸出的熔融耗材来不及固化,受到重力的影响,耗材会往下掉,就会导致3D模型变形;因此,获取当前悬空面沿打印走线方向的长度与预设阈值进行比较,在预设阈值区域内,由于打印材料的黏性和固化速度等因素,第n层切片可以对第(n+1)层切片起到支撑作用,此部分不需要支撑,将大于预设阈值的区域作为所需添加支撑的支撑面。The suspended surface is the part of the (n+1)th layer slice that protrudes from the nth layer slice. If the length of the current suspended surface along the printing line direction is longer, that is, when the 3D printer prints along the printing line direction, the ( The consumables in the molten state of the n+1) slice are more protruding than the nth slice, and the protruding molten consumables are too late to solidify. Affected by gravity, the consumables will fall down, which will cause the 3D model to deform; therefore, get the current The length of the floating surface along the direction of the printing line is compared with the preset threshold. In the preset threshold area, due to factors such as the viscosity of the printing material and the curing speed, the slice of the nth layer can affect the slice of the (n+1)th layer. This part does not need support, and the area larger than the preset threshold is used as the support surface that needs to be added.
进一步的,在一替代实施例中,根据当前倾斜切片方向的切片分层数据,确定每一个切片层所需添加支撑的待支撑面,还包括:Further, in an alternative embodiment, according to the slice layer data of the current oblique slice direction, determine the surface to be supported that needs to be added for each slice layer, and also includes:
将第n层切片和第(n+1)层切片划分为多个小多边形;Divide the nth layer slice and the (n+1)th layer slice into multiple small polygons;
判断第(n+1)层切片的所有多边形是否具有第n层切片的多边形支撑;Determine whether all polygons of the (n+1)th layer slice have the polygon support of the nth layer slice;
若第(n+1)层切片的多边形不具有第n层切片的多边形支撑,则确定此多边形为悬空多边形;If the polygon of the (n+1)th layer slice does not have the polygon support of the nth layer slice, then it is determined that the polygon is a suspended polygon;
根据多个第(n+1)层切片的悬空多边形的连通性,确定第(n+1)层切片的悬空面;According to the connectivity of the suspended polygons of multiple (n+1)th layer slices, determine the suspended surfaces of the (n+1)th layer slices;
根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面。According to the suspended surface, determine the surface to be supported on which the (n+1)th slice needs to be supported.
得到当前倾斜切片方向的切片分层数据之后,可以将每一切片分层划分为多个小多边形构成。如果多边形悬空,即多边形下面无任何其它层的多边形,那么此多边形为需要被支撑的多边形;如果多边形的部分与下面其它层的多边形接触,另外一部分悬空,则需要根据悬空的距离判断是否需要添加支撑结构,具体根据 上述步骤S3进行判断。After obtaining the slice layer data of the current oblique slice direction, each slice layer can be divided into multiple small polygons. If the polygon is suspended, that is, there is no other layer of polygons below the polygon, then this polygon is a polygon that needs to be supported; if part of the polygon is in contact with polygons of other layers below, and the other part is suspended, it is necessary to judge whether it needs to be added according to the distance of the suspension The support structure is specifically judged according to the above step S3.
遍历构成第(n+1)层切片的所有多边形,即可得到此切片层的所有需添加支撑的待支撑面,遍历构成3D模型的所有切片层,即可得到此三维模型的所有需添加支撑的待支撑面。By traversing all the polygons that make up the (n+1)th layer slice, you can get all the support surfaces that need to be supported in this slice layer, and by traversing all the slice layers that make up the 3D model, you can get all the supports that need to be added in this 3D model the surface to be supported.
步骤122、对于每一个切片层,获取当前切片层的待支撑面对应的支撑面积,以及所述待支撑面上点的悬空高度;根据所述支撑面积和所述悬空高度,确定当前切片层的支撑量。Step 122. For each slice layer, obtain the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; determine the current slice layer according to the support area and the suspended height the amount of support.
若在z轴方向上,待支撑面下方不存在其他切片层,待支撑面上点的悬空高度为待支撑面的中心点到热床的距离,即待支撑面的中心点的z坐标的值;若在z轴方向上,待支撑面下方还存在其他切片层,获取待支撑面的中心点在下方最近的切片层上的对应点,并获取两点之间的距离,确定悬空距离为这两个点的z坐标的差值。If there is no other slice layer below the surface to be supported in the z-axis direction, the suspended height of the point on the surface to be supported is the distance from the center point of the surface to be supported to the hot bed, that is, the value of the z coordinate of the center point of the surface to be supported ; If there are other slice layers below the surface to be supported in the direction of the z-axis, obtain the corresponding point on the nearest slice layer below the center point of the surface to be supported, and obtain the distance between the two points, and determine the suspended distance as this The difference between the z-coordinates of the two points.
支撑结构的支撑量为求得的支撑面的支撑结构的体积,根据支撑面的悬空高度可以求得生成的支撑结构的高度,根据支撑面对应的支撑面积和支撑面的悬空高度的乘积求得当前切片层的支撑量。The support amount of the support structure is the obtained volume of the support structure of the support surface, the height of the generated support structure can be obtained according to the suspended height of the support surface, and the product of the support area corresponding to the support surface and the suspended height of the support surface can be calculated Get the support amount of the current slice layer.
步骤123、根据每一个切片层的支撑量,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量。Step 123 , according to the support amount of each slice layer, determine the amount of support required to be added to the 3D model in the current oblique slice direction.
求得每一个切片层的支撑量,累加得到3D模型在当前倾斜切片方向所需添加支撑的总支撑量。The support amount of each slice layer is obtained, and the total support amount required to be added to the 3D model in the current inclined slice direction is obtained by accumulating.
步骤130、确定最小的支撑量对应的目标切片方向。 Step 130, determining the target slice direction corresponding to the minimum support amount.
从获得的不同倾斜切片分层数据对应的支撑量中确定最小的支撑量对应的倾斜切片方向,确定为目标切片方向,按照此倾斜切片方向进行打印,3D模型所需要的支撑量最少,对3D模型表面精度的影响最小。Determine the oblique slice direction corresponding to the minimum support amount from the support amounts corresponding to the obtained different oblique slice layered data, determine it as the target slice direction, and print according to this oblique slice direction, the 3D model requires the least amount of support, for 3D The surface accuracy of the model is minimally affected.
步骤140、根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。Step 140: Generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
获取3D模型在目标切片方向的倾斜分层数据,根据倾斜分层数据即可确定每个切片层和打印路径,按照倾斜分层数据调整喷头角度对三维模型进行打印。Obtain the oblique layered data of the 3D model in the target slice direction, determine each slice layer and printing path according to the oblique layered data, and print the 3D model by adjusting the nozzle angle according to the oblique layered data.
本实施例的技术方案,通过获取3D模型在不同倾斜切片方向的切片分层数据;对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定3D模型在当前倾斜切片方向所需添加支撑的支撑量;确定最小的支撑量对应的目标切片方向;根据目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。解决支撑结构较多带来的耗材量增加、打印时间增加、支撑难以剥离和剥离后影响模型表面精度的问题,实现以支撑量最少的切片方向进行模型打印,提高模型打印速度、减少打印用料和提高模型表面打印精度的效果。In the technical solution of this embodiment, by obtaining the slice layer data of the 3D model in different oblique slice directions; Supporting amount of support; determining the target slice direction corresponding to the minimum support amount; generating a print file of the 3D model according to slice layer data corresponding to the target slice direction. Solve the problems of increased amount of consumables and increased printing time caused by more support structures, difficult to peel off the support, and affect the surface accuracy of the model after peeling off, realize model printing in the slice direction with the least support, improve model printing speed, and reduce printing materials And the effect of improving the printing accuracy of the model surface.
实施例二Embodiment two
图2为本发明实施例二提供的一种3D打印文件的生成装置的结构示意图,如图2所示,一种3D打印文件的生成装置,包括:Fig. 2 is a schematic structural diagram of a 3D printing file generating device provided in Embodiment 2 of the present invention. As shown in Fig. 2, a 3D printing file generating device includes:
切片分层数据获取模块210,用于获取3D模型在不同倾斜切片方向的切片分层数据。The slice layer data acquisition module 210 is configured to acquire slice layer data of the 3D model in different oblique slice directions.
三维模型的切片方向不同,打印三维模型时所需的支撑量可能也不相同,对三维模型进行倾斜分层可以减少支撑量。在三维模型输入3D打印机后,系统根据模型数据自动生成初始倾斜切片方向或用户手动设定初始倾斜切片方向。The slicing direction of the 3D model is different, and the amount of support required when printing the 3D model may be different. Oblique layering of the 3D model can reduce the amount of support. After the 3D model is input into the 3D printer, the system automatically generates the initial oblique slice direction according to the model data or the user manually sets the initial oblique slice direction.
可选的,切片分层数据获取模块210包括第一切片分层数据获取子模块和第 二切片分层数据获取子模块;Optionally, the slice layered data acquisition module 210 includes a first slice layered data acquisition submodule and a second slice layered data acquisition submodule;
可选的,所述第一切片分层数据获取子模块包括:Optionally, the first slice layered data acquisition submodule includes:
第一旋转单元,用于按照预设角度,将预设倾斜切片方向绕竖直方向进行旋转;其中,预设倾斜切片方向所在直线与水平面之间的角度不变。The first rotating unit is configured to rotate the preset oblique slice direction around the vertical direction according to the preset angle; wherein, the angle between the line where the preset oblique slice direction is located and the horizontal plane remains unchanged.
第一切片单元,用于按照旋转后的倾斜切片方向对所述3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。The first slicing unit is configured to respectively slice the 3D model according to the rotated oblique slicing direction, and acquire slice layered data of the 3D model in different oblique slicing directions.
可选的,所述第二切片分层数据获取子模块包括:Optionally, the second slice hierarchical data acquisition submodule includes:
第二旋转单元,用于按照预设角度,将3D模型绕竖直方向进行旋转。The second rotating unit is used to rotate the 3D model around the vertical direction according to a preset angle.
第二切片单元,用于按照预设倾斜切片方向对旋转后的3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。The second slicing unit is configured to respectively slice the rotated 3D model according to preset oblique slicing directions, and obtain slice layered data of the 3D model in different oblique slicing directions.
在上述实施例中,将预设倾斜切片方向绕竖直方向旋转后重新对3D模型进行切片,和将3D模型绕竖直方向旋转后重新对3D模型进行切片,均相当于按照不同倾斜方向进行对对3D模型再次进行切片。In the above embodiment, re-slicing the 3D model after rotating the preset oblique slicing direction around the vertical direction, and re-slicing the 3D model after rotating the 3D model around the vertical direction are equivalent to performing different oblique directions. Slice the 3D model again.
可选的,3D打印文件的生成装置还包括:Optionally, the device for generating the 3D printing file also includes:
倾斜角度变换模块,用于改变预设倾斜切片方向所在直线与水平面之间的角度。The oblique angle transformation module is used to change the angle between the straight line where the preset oblique slice direction is located and the horizontal plane.
切片分层数据获取更新模块,用于令所述预设倾斜切片方向为改变后的倾斜切片方向,并重新进入所述获取3D模型在不同倾斜切片方向的切片分层数据。The slice layer data acquisition and updating module is configured to make the preset oblique slice direction the changed oblique slice direction, and re-enter the acquired slice layer data of the 3D model in different oblique slice directions.
支撑量获取模块220,用于对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量。The support amount acquisition module 220 is configured to, for each oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction.
当三维模型确定倾斜切片方向后,可得到三维模型在当前倾斜切片方向下进行切片的倾斜分层数据,从而可以根据切片分层数据得到3D模型在当前倾斜切片方向所需添加支撑的支撑量。支撑结构从待支撑面一直往下生成到z轴的起始点所在平面,相应的,三维模型的待支撑面积越大,支撑面距离Z轴起点距离越远,即带支撑面的悬空高度越高,打印时需要产生的支撑结构的体积越大,即支撑量越大。支撑不仅会增加耗材量,增加打印时间,3D模型与支撑接触过于紧密还会导致支撑难以剥离等问题。After the 3D model determines the oblique slicing direction, the oblique layered data of the 3D model sliced in the current oblique slicing direction can be obtained, so that the amount of support required to be added to the 3D model in the current oblique slicing direction can be obtained according to the sliced layered data. The support structure is generated from the surface to be supported all the way down to the plane where the starting point of the z-axis is located. Correspondingly, the larger the area to be supported of the 3D model, the farther the support surface is from the starting point of the Z-axis, that is, the higher the suspension height with the support surface , the larger the volume of the support structure that needs to be produced during printing, that is, the greater the support amount. The support will not only increase the amount of consumables and increase the printing time, but the 3D model and the support are too close to each other, which will also cause the support to be difficult to peel off.
可选的,支撑量获取模块220包括:Optionally, the supporting amount obtaining module 220 includes:
支撑面获取子模块,用于根据当前倾斜切片方向的切片分层数据,确定每一个切片层所需添加支撑的待支撑面。The support surface acquisition sub-module is used to determine the surface to be supported for which support needs to be added for each slice layer according to the slice layer data of the current inclined slice direction.
投影获取单元,用于对第n层切片的投影和第(n+1)层切片的投影进行布尔运算;其中,n为3D模型的切片所在的层数,n为正整数。The projection acquiring unit is configured to perform a Boolean operation on the projection of the nth layer slice and the projection of the (n+1)th layer slice; wherein, n is the number of layers where the slices of the 3D model are located, and n is a positive integer.
悬空面获取单元,用于若运算结果为所述第(n+1)层切片的投影大于所述第n层切片的投影,则根据所述第(n+1)层切片的投影和所述第n层切片的投影的差值对应面的连通性,确定第(n+1)层切片的悬空面。The suspended surface acquisition unit is used for if the calculation result is that the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, then according to the projection of the (n+1)th layer slice and the The difference of the projected difference of the nth layer slice corresponds to the connectivity of the surface, and the dangling surface of the (n+1)th layer slice is determined.
待支撑面确定单元,用于根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面。The surface-to-be-supported determining unit is configured to determine, according to the suspended surface, the surface to be supported to which support needs to be added for the (n+1)th slice.
可选的,待支撑面确定单元还包括:Optionally, the unit to be supported surface determination also includes:
悬空面打印走线长度获取子单元,用于对于各悬空面,获取当前悬空面沿打印走线方向的长度。The sub-unit for obtaining the length of the printing trace on the floating surface is used for obtaining the length of the current floating surface along the printing trace direction for each floating surface.
判断确定子单元,用于将沿打印走线方向的长度大于预设阈值的区域作为所需添加支撑的支撑面。The judging and determining sub-unit is configured to use an area whose length along the printing line direction is greater than a preset threshold as a support surface to be added with support.
可选的,支撑量获取模块220还包括:Optionally, the supporting amount obtaining module 220 also includes:
切片层支撑量获取子模块,用于对于每一个切片层,获取当前切片层的待支 撑面对应的支撑面积,以及所述待支撑面上点的悬空高度;根据所述支撑面积和所述悬空高度,确定当前切片层的支撑量。The slice layer support acquisition sub-module is used to obtain, for each slice layer, the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; according to the support area and the Overhang height, which determines the support amount of the current slice layer.
总支撑量确定子模块,用于根据每一个切片层的支撑量,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量。The total support amount determining submodule is used to determine the amount of support required to be added to the 3D model in the current inclined slice direction according to the support amount of each slice layer.
目标切片方向确定模块230,用于确定最小的支撑量对应的目标切片方向。The target slice direction determination module 230 is configured to determine the target slice direction corresponding to the minimum support amount.
从预设数量的切片方向对应的支撑量中确定最小的支撑量对应的切片方向,确定为目标切片方向,在此切片方向下,三维模型进行打印时所需要的支撑量最少,对三维模型表面的影响最小。Determine the slice direction corresponding to the minimum support amount from the support amounts corresponding to the preset number of slice directions, and determine it as the target slice direction. Under this slice direction, the support amount required for printing the 3D model is the least, and the surface of the 3D model is affected. minimal impact.
打印文件生成模块240,用于根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。The print file generation module 240 is configured to generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
获取三维模型在目标切片方向的倾斜分层数据,根据倾斜分层数据即可确定每个切片层和打印路径,按照倾斜分层数据调整喷头角度对三维模型进行打印。Obtain the oblique layer data of the 3D model in the target slice direction, determine each slice layer and printing path according to the oblique layer data, and print the 3D model by adjusting the nozzle angle according to the oblique layer data.
本实施例的技术方案,通过获取3D模型在不同倾斜切片方向的切片分层数据;对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定3D模型在当前倾斜切片方向所需添加支撑的支撑量;确定最小的支撑量对应的目标切片方向;根据目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。解决支撑结构较多带来的耗材量增加、打印时间增加、支撑难以剥离和剥离后影响模型表面精度的问题,实现以支撑量最少的切片方向进行模型打印,提高模型打印速度、减少打印用料和提高模型表面打印精度的效果。In the technical solution of this embodiment, by obtaining the slice layer data of the 3D model in different oblique slice directions; Supporting amount of support; determining the target slice direction corresponding to the minimum support amount; generating a print file of the 3D model according to slice layer data corresponding to the target slice direction. Solve the problems of increased amount of consumables and increased printing time caused by more support structures, difficult to peel off the support, and affect the surface accuracy of the model after peeling off, realize model printing in the slice direction with the least support, improve model printing speed, and reduce printing materials And the effect of improving the printing accuracy of the model surface.
本发明实施例所提供的3D打印文件的生成装置可执行本发明任意实施例所提供的3D打印文件的生成方法,具备执行方法相应的功能模块和有益效果。The device for generating a 3D printing file provided by an embodiment of the present invention can execute the method for generating a 3D printing file provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
实施例三Embodiment three
图3为本发明实施例三提供的一种3D打印文件的生成设备的结构示意图,如图3所示,该3D打印文件的生成设备包括处理器30、存储器31、输入装置32和输出装置33;3D打印文件的生成设备中处理器30的数量可以是一个或多个,图3中以一个处理器30为例;3D打印文件的生成设备中的处理器30、存储器31、输入装置32和输出装置33可以通过总线或其他方式连接,图3中以通过总线连接为例。Fig. 3 is a schematic structural diagram of a 3D printing file generating device provided in Embodiment 3 of the present invention. As shown in Fig. 3 , the 3D printing file generating device includes a processor 30, a memory 31, an input device 32 and an output device 33 The number of processors 30 in the generating device of 3D printing files can be one or more, and one processor 30 is taken as an example in Fig. 3; the processor 30, memory 31, input device 32 and The output device 33 can be connected via a bus or in other ways. In FIG. 3 , connection via a bus is taken as an example.
存储器31作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本发明实施例中的3D打印文件的生成方法对应的程序指令/模块(例如,3D打印文件的生成装置中的切片分层数据获取模块210、支撑量获取模块220、目标切片方向确定模块230和打印文件生成模块240)。处理器30通过运行存储在存储器31中的软件程序、指令以及模块,从而执行3D打印文件的生成设备的各种功能应用以及数据处理,即实现上述的3D打印文件的生成方法。As a computer-readable storage medium, the memory 31 can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the method for generating 3D printing files in the embodiment of the present invention (for example, 3D printing file Slice layered data acquisition module 210, support amount acquisition module 220, target slice direction determination module 230 and print file generation module 240) in the generation device. The processor 30 executes various functional applications and data processing of the 3D printing file generating device by running the software programs, instructions and modules stored in the memory 31 , that is, realizes the above-mentioned 3D printing file generating method.
存储器31可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器31可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器31可进一步包括相对于处理器30远程设置的存储器,这些远程存储器可以通过网络连接至3D打印文件的生成设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 31 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required by a function; the data storage area may store data created according to the use of the terminal, and the like. In addition, the memory 31 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. In some examples, the storage 31 may further include storages that are remotely located relative to the processor 30, and these remote storages may be connected to a device for generating 3D printing files through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置32可用于接收输入的数字或字符信息,以及产生与3D打印文件 的生成设备的用户设置以及功能控制有关的键信号输入。输出装置33可包括显示屏等显示设备。The input device 32 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the 3D printing file generation device. The output device 33 may include a display device such as a display screen.
实施例四Embodiment Four
本发明实施例四还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种3D打印文件的生成方法,该方法包括:Embodiment 4 of the present invention also provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a method for generating a 3D printing file when executed by a computer processor. The method includes:
获取3D模型在不同倾斜切片方向的切片分层数据;Obtain the slice layer data of the 3D model in different oblique slice directions;
对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量;For each oblique slice direction, according to the slice layer data of the current oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction;
确定最小的支撑量对应的目标切片方向;Determine the target slice direction corresponding to the minimum support amount;
根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。A print file of the 3D model is generated according to slice layer data corresponding to the target slice direction.
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本发明任意实施例所提供的3D打印文件的生成方法中的相关操作。Certainly, the storage medium containing computer-executable instructions provided by the embodiments of the present invention, the computer-executable instructions are not limited to the method operations described above, and can also perform the generation of 3D printing files provided by any embodiment of the present invention. Related operations in the method.
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本发明可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the above description about the implementation mode, those skilled in the art can clearly understand that the present invention can be realized by means of software and necessary general-purpose hardware, and of course it can also be realized by hardware, but in many cases the former is a better implementation mode . Based on this 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 a software product, and the computer software product can be stored in a computer-readable storage medium, such as a floppy disk of a computer , read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disc, etc., including several instructions to make a computer device (which can be a personal computer) , server, or network device, etc.) execute the method described in each embodiment of the present invention.
值得注意的是,上述3D打印文件的生成装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。It should be noted that, in the embodiment of the above-mentioned 3D printing file generation device, each unit and module included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present invention.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, rearrangements and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the present invention The scope is determined by the scope of the appended claims.
Claims (10)
- 一种3D打印文件的生成方法,其特征在于,包括:A method for generating a 3D printing file, comprising:获取3D模型在不同倾斜切片方向的切片分层数据;Obtain the slice layer data of the 3D model in different oblique slice directions;对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量;For each oblique slice direction, according to the slice layer data of the current oblique slice direction, determine the amount of support that needs to be added to the 3D model in the current oblique slice direction;确定最小的支撑量对应的目标切片方向;Determine the target slice direction corresponding to the minimum support amount;根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。A print file of the 3D model is generated according to the slice layer data corresponding to the target slice direction.
- 根据权利要求1所述的3D打印文件的生成方法,其特征在于,所述根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量,包括:The method for generating a 3D printing file according to claim 1, wherein, according to the layered slice data of the current oblique slice direction, determining the amount of support required to be added to the 3D model in the current oblique slice direction includes :根据当前倾斜切片方向的切片分层数据,确定每一个切片层所需添加支撑的待支撑面;According to the slice layer data of the current oblique slice direction, determine the surface to be supported that needs to be added for each slice layer;对于每一个切片层,获取当前切片层的待支撑面对应的支撑面积,以及所述待支撑面上点的悬空高度;根据所述支撑面积和所述悬空高度,确定当前切片层的支撑量;For each slice layer, obtain the support area corresponding to the surface to be supported of the current slice layer, and the suspended height of points on the surface to be supported; determine the support amount of the current slice layer according to the support area and the suspended height ;根据每一个切片层的支撑量,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量。According to the support amount of each slice layer, the support amount required to be added to the 3D model in the current oblique slice direction is determined.
- 根据权利要求2所述的3D打印文件的生成方法,其特征在于,所述根据当前倾斜切片方向的所述切片分层数据,确定每一个切片层所需添加支撑的待支撑面,包括:The method for generating a 3D printing file according to claim 2, characterized in that, according to the slice layer data of the current oblique slice direction, determining the surface to be supported that needs to be added for each slice layer includes:对第n层切片的投影和第(n+1)层切片的投影进行布尔运算;其中,n为3D模型的切片所在的层数,n为正整数;Perform Boolean operations on the projection of the nth layer slice and the projection of the (n+1)th layer slice; where n is the number of layers where the slice of the 3D model is located, and n is a positive integer;若运算结果为所述第(n+1)层切片的投影大于所述第n层切片的投影,则根据所述第(n+1)层切片的投影和所述第n层切片的投影的差值对应面的连通性,确定第(n+1)层切片的悬空面;If the operation result is that the projection of the (n+1)th layer slice is larger than the projection of the nth layer slice, then according to the projection of the (n+1)th layer slice and the projection of the nth layer slice The connectivity of the surface corresponding to the difference value determines the dangling surface of the (n+1)th layer slice;根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面。According to the suspended surface, determine the surface to be supported on which the (n+1)th slice needs to be supported.
- 根据权利要求3所述的3D打印文件的生成方法,其特征在于,所述根据所述悬空面,确定第(n+1)层切片所需添加支撑的待支撑面,包括:The method for generating a 3D printing file according to claim 3, wherein, according to the suspended surface, determining the surface to be supported for the (n+1)th layer slice to be supported includes:对于各悬空面,获取当前悬空面沿打印走线方向的长度;For each floating surface, obtain the length of the current floating surface along the printing line direction;将沿打印走线方向的长度大于预设阈值的区域作为所需添加支撑的支撑面。The area whose length along the printing line direction is greater than the preset threshold is taken as the supporting surface where support needs to be added.
- 根据权利要求1所述的3D打印文件的生成方法,其特征在于,所述获取3D模型在不同倾斜切片方向的切片分层数据,包括:The method for generating a 3D printing file according to claim 1, wherein said obtaining slice layered data of the 3D model in different oblique slice directions comprises:按照预设角度,将预设倾斜切片方向绕竖直方向进行旋转;其中,预设倾斜切片方向所在直线与水平面之间的角度不变;According to the preset angle, the preset oblique slice direction is rotated around the vertical direction; wherein, the angle between the straight line where the preset oblique slice direction is located and the horizontal plane remains unchanged;按照旋转后的倾斜切片方向对所述3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。The 3D model is respectively sliced according to the rotated oblique slicing direction, and slice layered data of the 3D model in different oblique slicing directions are obtained.
- 根据权利要求1所述的3D打印文件的生成方法,其特征在于,所述获取3D模型在不同倾斜切片方向的切片分层数据,包括:The method for generating a 3D printing file according to claim 1, wherein said obtaining slice layered data of the 3D model in different oblique slice directions comprises:按照预设角度,将3D模型绕竖直方向进行旋转;Rotate the 3D model around the vertical direction according to the preset angle;按照预设倾斜切片方向对旋转后的3D模型分别进行切片,获取所述3D模型在不同倾斜切片方向的切片分层数据。The rotated 3D model is respectively sliced according to the preset oblique slicing direction, and slice layered data of the 3D model in different oblique slicing directions are obtained.
- 根据权利要求5或6所述的3D打印文件的生成方法,其特征在于,在所述对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量之前,还包括:The method for generating 3D printing files according to claim 5 or 6, wherein, for each oblique slice direction, according to the slice layer data of the current oblique slice direction, it is determined that the 3D model is in the current oblique slice direction Before the amount of support needed to add support, also include:改变预设倾斜切片方向所在直线与水平面之间的角度;Change the angle between the line where the preset oblique slice direction is located and the horizontal plane;令所述预设倾斜切片方向为改变后的倾斜切片方向,并重新进入所述获取3D模型在不同倾斜切片方向的切片分层数据。Let the preset oblique slice direction be the changed oblique slice direction, and re-enter the acquisition of slice layered data of the 3D model in different oblique slice directions.
- 一种3D打印文件的生成装置,其特征在于,包括:A generating device for 3D printing files, characterized in that it comprises:切片分层数据获取模块,用于获取3D模型在不同倾斜切片方向的切片分层数据;The slice layered data acquisition module is used to obtain the slice layered data of the 3D model in different oblique slice directions;支撑量获取模块,用于对于各倾斜切片方向,根据当前倾斜切片方向的切片分层数据,确定所述3D模型在当前倾斜切片方向所需添加支撑的支撑量;The support amount acquisition module is used to determine the amount of support that needs to be added to the 3D model in the current oblique slice direction according to the slice layer data of the current oblique slice direction for each oblique slice direction;目标切片方向确定模块,用于确定最小的支撑量对应的目标切片方向;A target slice direction determining module, configured to determine the target slice direction corresponding to the minimum support amount;打印文件生成模块,用于根据所述目标切片方向对应的切片分层数据,生成所述3D模型的打印文件。A print file generating module, configured to generate a print file of the 3D model according to the slice layer data corresponding to the target slice direction.
- 一种3D打印文件的生成设备,其特征在于,所述3D打印文件的生成设备包括:A device for generating 3D printing files, characterized in that the device for generating 3D printing files includes:一个或多个处理器;one or more processors;存储器,用于存储一个或多个程序;memory for storing one or more programs;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的3D打印文件的生成方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a 3D printing file according to any one of claims 1-7.
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的3D打印文件的生成方法。A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, the method for generating a 3D printing file according to any one of claims 1-7 is realized.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111448612.3 | 2021-11-30 | ||
CN202111448612.3A CN114147971A (en) | 2021-11-30 | 2021-11-30 | Method, device and equipment for generating 3D printing file and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023098338A1 true WO2023098338A1 (en) | 2023-06-08 |
Family
ID=80455356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/127038 WO2023098338A1 (en) | 2021-11-30 | 2022-10-24 | Method, apparatus and device for generating 3d printing file, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114147971A (en) |
WO (1) | WO2023098338A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114147971A (en) * | 2021-11-30 | 2022-03-08 | 深圳市创想三维科技股份有限公司 | Method, device and equipment for generating 3D printing file and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105745652A (en) * | 2014-08-29 | 2016-07-06 | 微软技术许可有限责任公司 | Fabricating three-dimensional objects |
CN108099203A (en) * | 2016-11-25 | 2018-06-01 | 达索系统公司 | For the orientation of the real object of 3D printings |
CN108248012A (en) * | 2017-08-07 | 2018-07-06 | 株式会社松浦机械制作所 | The setting method of the moulding angle of three-D moulding object |
US20210299962A1 (en) * | 2020-03-27 | 2021-09-30 | Wisconsin Alumni Research Foundation | Systems, methods, and media for controlling support structures and build orientation in manufacturing |
CN114147971A (en) * | 2021-11-30 | 2022-03-08 | 深圳市创想三维科技股份有限公司 | Method, device and equipment for generating 3D printing file and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IL282005B1 (en) * | 2014-07-13 | 2024-08-01 | Stratasys Ltd | Method and system for controlled rotational 3d printing |
CN107053651B (en) * | 2016-02-05 | 2019-07-12 | 三纬国际立体列印科技股份有限公司 | Three dimensional model printing cuts layer method |
CN109774116A (en) * | 2017-11-14 | 2019-05-21 | 上海微电子装备(集团)股份有限公司 | A kind of 3D printing device and Method of printing |
FR3079151B1 (en) * | 2018-03-23 | 2020-10-30 | Safran Aircraft Engines | OPTIMIZATION OF SUPPORTS FOR ADDITIVE PART MANUFACTURING WITH A RECESS |
JP7040236B2 (en) * | 2018-04-05 | 2022-03-23 | 富士フイルムビジネスイノベーション株式会社 | 3D shape data editing device, 3D modeling device, 3D modeling system, and 3D shape data editing program |
-
2021
- 2021-11-30 CN CN202111448612.3A patent/CN114147971A/en active Pending
-
2022
- 2022-10-24 WO PCT/CN2022/127038 patent/WO2023098338A1/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105745652A (en) * | 2014-08-29 | 2016-07-06 | 微软技术许可有限责任公司 | Fabricating three-dimensional objects |
CN108099203A (en) * | 2016-11-25 | 2018-06-01 | 达索系统公司 | For the orientation of the real object of 3D printings |
CN108248012A (en) * | 2017-08-07 | 2018-07-06 | 株式会社松浦机械制作所 | The setting method of the moulding angle of three-D moulding object |
US20210299962A1 (en) * | 2020-03-27 | 2021-09-30 | Wisconsin Alumni Research Foundation | Systems, methods, and media for controlling support structures and build orientation in manufacturing |
CN114147971A (en) * | 2021-11-30 | 2022-03-08 | 深圳市创想三维科技股份有限公司 | Method, device and equipment for generating 3D printing file and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114147971A (en) | 2022-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9511546B2 (en) | Three dimensional printing apparatus | |
WO2023098338A1 (en) | Method, apparatus and device for generating 3d printing file, and storage medium | |
KR102208183B1 (en) | Method and apparatus for realizing color tween animation | |
KR102099014B1 (en) | 2D Slicing Polyline based Support Structure Generation Method for 3D Printing | |
WO2023040290A1 (en) | Three-dimensional object printing method, data processing apparatus, and computer device | |
TW201635128A (en) | Methods and Devices for Interface Display | |
CN104978444B (en) | A kind of method and device of picture combination | |
CN112765695B (en) | Support body generation method, 3D printer, computer device, and storage medium | |
US11069099B2 (en) | Drawing curves in space guided by 3-D objects | |
US10783685B2 (en) | Banner image generation | |
US20150112644A1 (en) | Evaluating the stability of three-dimensional models | |
WO2023051009A1 (en) | Method and apparatus for determining 3d model printing position, a device, and a storage medium | |
US20160129635A1 (en) | Matching the scale of independent objects or intelligently scaling objects when 3d printing | |
US10949601B2 (en) | Reducing chemoepitaxy directed self-assembled defects | |
CN104751506A (en) | Cluster rendering method and equipment for realizing three-dimensional graphic and image | |
US9987802B2 (en) | Method for adjusting printing head usage amount of 3D printer and control device | |
US10543673B2 (en) | Detecting and compensating for an anomaly in three-dimensional object fabrication | |
CN111198684A (en) | Method, apparatus, device and medium for data processing and graphic engine establishment | |
CN103677518A (en) | Method and device for responding to touch messages on mobile terminal | |
CN112052641B (en) | Method and system for generating large-scale integrated circuit layout unstructured grid eccentric midpoint | |
US10339679B2 (en) | Dynamic path modification and extension | |
CN108499109B (en) | Method for realizing real-time unilateral scaling of article based on UE engine | |
US20230415422A1 (en) | Method for generating auxiliary support for 3d printing output stability | |
US11701835B2 (en) | Three-dimensional printing employing movable blocks of a printer base | |
CN116021769A (en) | Control method of three-dimensional printing device, related device 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: 22900143 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |