A 3D printing method
By converting 3D models into a combination of 2D planar bitmaps, the problem of low computational efficiency in complex model processing in traditional 3D printing methods is solved, achieving efficient printing and storage optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional 3D printing methods have high computational complexity when dealing with complex curved surfaces, porous structures, or irregular cavities, resulting in low computational efficiency and affecting printing efficiency.
The problem of building a 3D model is transformed into a combination of 2D planar bitmaps. By using filling templates and slicing techniques, the amount of data storage and computational complexity are reduced, and 2D filled bitmaps are used for model printing.
It simplifies the modeling process, improves the printing efficiency of large-size, high-resolution 3D models, and reduces storage space requirements and computing resource consumption.
Smart Images

Figure CN121043408B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of 3D printing, in particular to a 3D printing method. BACKGROUND
[0002] 3D printing technology is a technology that uses a digital model file to make a material into a solid object through layer-by-layer stacking.
[0003] Traditional 3D printing methods mainly rely on three-dimensional voxelization technology, that is, discretizing the model to be printed into tiny spatial units (voxels), and assigning independent storage and computing resources to each unit. However, when the model to be printed has complex curved surfaces, porous structures or special-shaped cavities, the computational complexity of 3D printing will increase exponentially because each voxel unit in three-dimensional space needs to be traversed to determine whether it belongs to the solid part, which will cause a cliff-like drop in computing efficiency. For example, a medium-complexity 1GB 3D model file may take 4-6 hours to process on a regular workstation; and for a super-large 3D model of more than 10GB, the processing time may even exceed 24 hours. This efficiency defect directly leads to a significant extension of the whole process cycle from design to molding, affecting the efficiency of 3D printing. SUMMARY
[0004] The present application provides a 3D printing method that converts the three-dimensional model construction problem into a two-dimensional plane bitmap combination, reducing the data storage and computational complexity of 3D printing, and improving the printing efficiency of large-size high-resolution 3D models.
[0005] The technical solution of the present application to solve the above technical problems is as follows:
[0006] In a first aspect, the present application provides a 3D printing method that can be applied to electronic devices. In this method, an entity model corresponding to the model to be printed and a filling template for filling the entity model are obtained. The entity model has the same shape as the model to be printed, and the filling template includes m layers of filling bitmaps stacked on each other, and each filling bitmap has the same size. The entity model is sliced to obtain N layers of model slice bitmaps. The thickness of each model slice bitmap and the thickness of each filling bitmap are the same. The N layers of model slice bitmaps are filled based on the filling template to obtain target bitmaps corresponding to the N layers of model slice bitmaps, wherein the f-th layer of filling bitmap is used to fill the x*m+f-th layer of model slice bitmap, x is a positive integer greater than or equal to 0, and f is a positive integer greater than or equal to 0 and less than or equal to m. Based on the target bitmaps corresponding to each layer of model slice bitmap, a target bitmap collection is obtained. Based on the target bitmap collection, the model to be printed is printed.
[0007] Based on the above technical solution, the present application can also be improved as follows.
[0008] Further, the filling template is determined based on the filling model. The filling pose of the filling model in the entity model is determined. The filling model is sliced while the filling model keeps the filling pose, and m layers of filling bitmaps are obtained. The slicing direction of the filling model is the same as the slicing direction of the entity model. The filling template is obtained based on the m layers of filling bitmaps.
[0009] Further, based on the fth layer filling bitmap, each target region included in the x*m+fth layer model slice bitmap is filled each time. The size of the target region is the same as the size of the fth layer filling bitmap. The target regions included in the x*m+fth layer model slice bitmap do not overlap with each other. The target bitmap corresponding to the x*m+fth layer model slice bitmap is obtained based on the filling of the target regions included in the x*m+fth layer model slice bitmap.
[0010] Further, based on the fth layer filling bitmap, each target region included in the x*m+fth layer model slice bitmap is filled row by row.
[0011] Further, based on the size of the model to be printed, the bounding box corresponding to the model to be printed is determined, and the bounding box is a cuboid structure. In the case where the model to be printed is located in the bounding box, each plane included in the bounding box is in contact with the model to be printed. Based on the size of the bounding box and the size of the filling bitmap, the expansion multiple corresponding to the filling bitmap is determined. The expansion processing is performed on the fth layer filling bitmap based on the expansion multiple of the filling bitmap, and the expansion bitmap corresponding to the fth layer filling bitmap is obtained. The expansion bitmap corresponding to the fth layer filling bitmap includes multiple contents corresponding to the fth layer filling bitmap. The size of the expansion bitmap corresponding to the fth layer filling bitmap is the same as the size of the x*m+fth layer model slice bitmap. The target bitmap corresponding to the x*m+fth layer model slice bitmap is obtained based on the filling of the x*m+fth layer model slice bitmap by the expansion bitmap corresponding to the fth layer filling bitmap.
[0012] Further, the expansion processing includes copying and translating the fth layer filling bitmap.
[0013] Further, the filling bitmap includes a first long side and a first wide side which are perpendicular to each other. The direction of the first long side is the first direction, the direction of the first wide side is the second direction, the first direction is perpendicular to the second direction, and the plane composed of the first long side and the first wide side is perpendicular to the direction of the thickness of the model slice bitmap. The bounding box includes a second long side and a second wide side, the direction of the second long side is the first direction, the direction of the second wide side is the second direction, and the plane composed of the second long side and the second wide side is perpendicular to the direction of the height of the bounding box. The expansion multiple includes a first expansion multiple and a second expansion multiple. The first expansion multiple is determined based on the length of the first long side and the length of the second long side. The second expansion multiple is determined based on the length of the first wide side and the length of the second wide side.
[0014] The beneficial effects of the present application are:
[0015] The three-dimensional model object construction problem is converted into two-dimensional pattern combination, a two-dimensional filling bitmap is used, and complex three-dimensional voxel filling is avoided to simplify the modeling process.
[0016] The filling bitmap involved in the method is not only limited to the slice bitmap of the three-dimensional filling model, but also can be a series of custom bitmaps designed directly in two dimensions as custom filling templates, and the offset, rotation angle or scaling ratio of the adjacent layer templates can be specified to ensure the interlayer structure connectivity. The overlapping area of the adjacent layer templates is checked to ensure the physical continuity of the structure after filling, and the suspension or fracture is avoided. The filling strategy can be flexibly planned according to the functional requirements.
[0017] The extended filling bitmap is intersected with the model slice bitmap to obtain a filling pattern bitmap conforming to the model shape, and the filling area is accurately determined.
[0018] The method precisely realizes the spatial alignment of the filling model and the entity model with the aid of the custom spatial coordinate system, clearly defines the filling starting position and direction, and guarantees the accuracy of the filling.
[0019] In a second aspect, the present application provides an electronic device, comprising: a memory, one or more processors; the memory and the processor are coupled; wherein the memory stores computer program code, the computer program code includes computer instructions, when the computer instructions are executed by the processor, the electronic device executes the 3D printing method of any one of the first aspect.
[0020] In a third aspect, a computer readable storage medium is provided, comprising computer instructions, when the computer instructions run on an electronic device, the electronic device executes the 3D printing method of any one of the first aspect.
[0021] In a fourth aspect, a computer program product is provided, when the computer program product runs on a computer, the computer executes the 3D printing method of any one of the first aspect.
[0022] It can be understood that the beneficial effects that can be achieved by the electronic device of the second aspect, the computer readable storage medium of the third aspect, and the computer program product of the fourth aspect can refer to the beneficial effects in the first aspect and any possible design manner thereof, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 A flowchart of a 3D printing method provided by the present application is shown in the figure;
[0024] Figure 2AThe schematic diagram of various models and various filling bitmaps provided by the present application;
[0025] Figure 2B The schematic diagram of constructing three-dimensional model based on self-defined filling bitmap provided by the present application;
[0026] Figure 3 The alignment schematic diagram of filling model and entity model provided by the present application;
[0027] Figure 4 The model slice bitmap schematic diagram of entity model provided by the present application;
[0028] Figure 5 The first process schematic diagram of filling model slice based on filling bitmap provided by the present application;
[0029] Figure 6 The second process schematic diagram of filling model slice based on filling bitmap provided by the present application;
[0030] Figure 7 The fusion schematic diagram of extension bitmap and model slice bitmap provided by the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, “ / ” represents a “or” relationship of the objects before and after the “ / ”, for example, A / B can represent A or B; “and / or” in the present application is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone, where A, B can be singular or plural. In the description of the present application, unless otherwise specified, “multiple” means two or more than two. “At least one of the following (one)” or the like means any combination of the items, including any combination of single (one) or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same function and role are distinguished by using “first”, “second” and the like. Those skilled in the art can understand that “first”, “second” and the like do not limit the quantity and execution order, and “first”, “second” and the like do not necessarily mean different. At the same time, in the embodiments of the present application, “exemplary” or “for example” means to serve as an example, illustration or description. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes.
[0032] In the field of 3D printing technology, the design method of porous structure based on digital modeling has become an important research direction to improve the performance of lightweight components. The current mainstream method mainly focuses on two technical routes: parameterized unit cell structure configuration and packing unit layout optimization. However, there are still significant technical bottlenecks in dealing with complex geometric features.
[0033] For the direction of porous modeling, existing methods usually achieve structure generation by predefining unit cell types and topological mapping along the solid frame. Typical implementation includes core steps such as unit cell geometry parameter setting, connecting rod axis definition, and triangular facet precision control, effectively reducing data redundancy through key feature parameter storage mechanism. However, this technical path needs to perform complex spatial projection and compression deformation operations when dealing with irregular solid frames or irregular unit cell structures, especially in the process of conformal mapping, which is prone to geometric distortion, resulting in a negative correlation between modeling efficiency and structure accuracy. In addition, the existing parameterized modeling system lacks compatibility for special topological configurations, and when facing complex models with multiple connected domains or curved surface features, additional preprocessing operations are often required, which seriously restricts its application expansion in special fields such as biomedicine.
[0034] In the field of filling structure optimization, the prior art adopts a spatial division strategy combining a peripheral bounding box with a periodic unit, and achieves material optimization configuration by driving the spatial pose adjustment of the filling unit through structure parameters. A typical system generates lightweight structures through the Boolean operation of a shell model and a filling model, and introduces an offset rate control mechanism to improve the structural strength in a specific direction. However, this method is highly sensitive to the structural complexity of the model, and when dealing with components with nonlinear distribution characteristics or local fine structures, the position relationship determination algorithm of the filling unit faces a combination explosion problem. In particular, when involving special-shaped curved surfaces or thin-walled features, the existing unit adaptation mechanism is difficult to ensure the functional continuity of the filling structure, and is prone to structural defects such as stress concentration or support failure.
[0035] Notably, the current mainstream technical solutions all have common defects at the underlying architecture level: first, the model reconstruction process lacks effective association with the initial design parameters, and any geometric changes need to re-execute the complete filling structure generation process, resulting in low design iteration efficiency; second, the traditional voxelization processing method produces a large amount of discrete data, not only significantly increasing storage overhead, but also severely limiting the cross-model reuse capability of structural features; third, the existing algorithm architecture has too high dependence on hardware computing power, and when facing large-size high-resolution models, the computing resource consumption grows exponentially, making it difficult to meet the needs of industrial-level applications.
[0036] To solve the above problems, the present application provides a 3D printing method, which can be implemented based on an electronic device, is suitable for various common 3D printing methods such as stereolithography printing and fused deposition modeling printing, and supports the import of various model file formats such as STL and OBJ formats. By converting the three-dimensional model construction problem into a two-dimensional bitmap combination, the data storage amount and computational complexity of 3D printing are reduced, and the printing efficiency of large-size high-resolution 3D models is improved.
[0037] Reference Figure 1 is a flowchart of a 3D printing method provided by the present application. As Figure 1 shown, the 3D printing method provided by the present application includes the following steps S101-S105:
[0038] S101: Obtain an entity model corresponding to a to-be-printed model and a filling template for filling the entity model.
[0039] The entity model has the same shape as the to-be-printed model. As Figure 2AAs shown, both the solid model 201 and the model to be printed 202 are rabbit-shaped. However, the solid model 201 is a solid structure, while the model to be printed 202 can be a honeycomb structure (the structure of the model to be printed is related to the structure of the infill template). Based on the structure of the model to be printed 202, an infill template 203 for infilling the solid model 201 can be determined. After the infill template 203 fills the solid model 201, the model to be printed 202 can be obtained. The infill template 203 can include m layers of stacked infill bitmaps (e.g., infill bitmap 204, infill bitmap 205, infill bitmap 206, and infill bitmap 207), all of which have the same size.
[0040] It should be noted that a fill template can be a collection of fill bitmaps obtained by slicing a 3D fill model. A fill template can also be a series of custom bitmaps designed directly in 2D (e.g., Figure 2B This refers to a collection of fill bitmaps (e.g., 211, 212, etc.). When the fill template is a collection of custom bitmaps designed directly in 2D, the offset, rotation angle, or scaling of adjacent fill bitmaps must be specified to ensure structural continuity between layers. Furthermore, overlapping areas of adjacent fill bitmaps must be checked to ensure physical continuity of the filled structure and avoid gaps or breaks. By stacking a series of custom bitmaps layer by layer, a corresponding 3D model can be obtained (e.g., ...). Figure 2B (3D model 213).
[0041] In other words, the fill bitmaps involved in this method are not limited to slice bitmaps of 3D fill templates, but can also be a series of custom bitmaps designed directly in 2D, and the fill strategy can be flexibly planned according to functional requirements.
[0042] The following describes in detail the method of slicing a 3D filled model to obtain a filled template.
[0043] First, determine the fill pose of the fill template within the solid model. Then, while maintaining the fill pose, slice the fill template to obtain m stacked fill bitmaps. The slicing direction of the fill template is parallel to the horizontal plane. Based on the obtained m stacked fill bitmaps, the fill template is obtained.
[0044] For example, a custom coordinate system can be introduced (such as Cartesian, cylindrical, polar, or spherical coordinate systems). This coordinate system can be considered a reference frame. An initial fill point can be specified, and translation and rotation matrices can be used to define the coordinate system based on this initial fill point. The filling cells are transformed. is a rotation matrix, used to control the rotation angle of the padding model, to change its direction; is a translation vector, determining the translation distance of the padding model in space. As shown in Figure 3 , through such a transformation, the padding model 301 passes through ( represents the pose of the padding model 301 before alignment, represents the pose of the padding model 301 after alignment), the alignment with the entity model 302 in space is realized, so as to determine the pose of the padding model 301 after alignment (i.e. the initial filling position and direction of the padding model 301 in the entity model 302). Then, the padding model 301 maintaining the corresponding pose is sliced (sliced along the direction parallel to the horizontal plane), to obtain a series of mutually stacked padding bitmaps. Based on the obtained collection of a series of mutually stacked padding bitmaps, the padding template is obtained.
[0045] S102: Slice the entity model to obtain N-layer model slice bitmaps.
[0046] Wherein, the thickness of each model slice bitmap and the thickness of each padding bitmap are the same, and the slicing direction of the padding model is the same as the slicing direction of the entity model.
[0047] For example, the slicing software can be used to set the slicing thickness of the entity model as h, the slicing direction of the entity model is the same as the slicing direction of the padding model (both are parallel to the horizontal plane), and the entity model is sliced. Then, N-layer model slice bitmaps (such as model slice bitmap 401 shown in Figure 4 , etc.) can be obtained.
[0048] S103: Fill the N-layer model slice bitmaps based on the padding template to obtain the target bitmap corresponding to the N-layer model slice bitmaps.
[0049] Wherein, the fth padding bitmap is used to fill the x*m+fth model slice bitmap, x is a positive integer greater than or equal to 0, and f is a positive integer greater than or equal to 0 and less than or equal to m.
[0050] In some embodiments, based on the fth padding bitmap, each time a target region included in the x*m+fth model slice bitmap is filled. The size of the target region is the same as the size of the fth padding bitmap. Each target region included in the x*m+fth model slice bitmap does not overlap. Based on the filling of each target region included in the x*m+fth model slice bitmap, the target bitmap corresponding to the x*m+fth model slice bitmap is obtained.
[0051] In some embodiments, based on the fth padding bitmap, each target region included in the x*m+fth model slice bitmap is filled row by row.
[0052] For example, refer to Figure 5 For example, the first-layer filling bitmap can be slid on the first-layer model slice bitmap from left to right row by row, and each time the sliding unit is a target region. Each time the first-layer filling bitmap slides on the first-layer model slice bitmap and passes a target region, the first-layer filling bitmap and the target region passed thereby can be subjected to a pixel-by-pixel intersection operation. When the pixel values of the pixels included in the first-layer filling bitmap and the target region passed thereby are all 1, the target region passed thereby by the first-layer filling bitmap is recorded as 1, indicating that the filling of the target region is completed. Until the filling of all target regions on the first-layer model slice bitmap is completed, a target bitmap corresponding to the first-layer model slice bitmap is obtained.
[0053] In this case, since the electronic device only uses the first-layer filling bitmap when filling the first-layer model slice bitmap, and does not use all the filling bitmaps, the electronic device only needs to store the first-layer filling bitmap when filling the first-layer model slice bitmap, thereby releasing the storage space of the electronic device.
[0054] In some embodiments, the bounding box corresponding to the model to be printed can be determined based on the size of the model to be printed. The bounding box is a cuboid structure. In the case where the model to be printed is located in the bounding box, each plane included in the bounding box is in contact with the model to be printed. Based on the size of the bounding box and the size of the filling bitmap, an expansion multiple corresponding to the filling bitmap is determined. Based on the expansion multiple of the filling bitmap, expansion processing is performed on the fth-layer filling bitmap to obtain an expansion bitmap corresponding to the fth-layer filling bitmap. The expansion bitmap corresponding to the fth-layer filling bitmap includes multiple contents corresponding to the fth-layer filling bitmap. The size of the expansion bitmap corresponding to the fth-layer filling bitmap is the same as the size of the x*m+fth-layer model slice bitmap. The x*m+fth-layer model slice bitmap is filled based on the expansion bitmap corresponding to the fth-layer filling bitmap to obtain a target bitmap corresponding to the x*m+fth-layer model slice bitmap.
[0055] In some embodiments, the expansion processing includes copying and translating the fth-layer filling bitmap.
[0056] In some embodiments, the filling bitmap comprises a first long side and a first wide side which are perpendicular to each other. The first long side is in a first direction, the first wide side is in a second direction, the first direction is perpendicular to the second direction, and a plane formed by the first long side and the first wide side is perpendicular to a direction in which the thickness of the model slice bitmap lies. The bounding box comprises a second long side and a second wide side, the second long side is in the first direction, the second wide side is in the second direction, and a plane formed by the second long side and the second wide side is perpendicular to a direction in which the height of the bounding box lies. The expansion multiple comprises a first expansion multiple and a second expansion multiple. The first expansion multiple is determined based on the length of the first long side and the length of the second long side. The second expansion multiple is determined based on the length of the first wide side and the length of the second wide side.
[0057] For example, the size of the solid model can be determined based on the size of the model to be printed (both sizes are the same). Then, referring to Figure 6 , an XYZ coordinate system can be established based on the position of the bounding box, the second long side and the second wide side of the bounding box are in the XY plane , , and the first long side and the first wide side of each filling bitmap are in the X and Y directions , , the expansion multiple of each filling bitmap in the X and Y directions is calculated , , and the upper limit is taken to ensure complete coverage.
[0058] Then, for each layer of filling bitmap, translation and copying are performed in the X and Y directions according to the calculated expansion multiple. The unit of each translation is the size of the filling bitmap itself. Through multiple translation and copying, the final expansion bitmap can cover the entire range of the bounding box of the model object in the XY plane. Since the number of expansion bitmaps is much smaller than the number of model slice bitmaps, the storage space of the electronic device is greatly saved.
[0059] Continuing to refer to Figure 7 , each expansion bitmap and each model slice bitmap can be converted into a data format suitable for intersection operation (binary image data format), i.e., the area of the expansion bitmap or the model slice bitmap is set to 1, and the blank area is set to 0, to obtain an expansion bitmap matrix and a model bitmap matrix . Then, the elements at corresponding positions of the two bitmaps are subjected to intersection operation. Only when both bitmaps are 1 at the same position, the intersection result is 1 at the position, otherwise it is 0. Through , the corresponding target bitmap is obtained, which contains the filling pattern information conforming to the shape of the model to be printed.
[0060] S104: Obtain a target bitmap collection based on the target bitmap corresponding to each layer of model slice bitmap.
[0061] For example, the target bitmap corresponding to each layer model slice bitmap (in binary matrix form) can be processed and output to obtain a result file (.bmp,.png, etc.) according to requirements. In the conversion process, 0 in the matrix represents empty, and 255 represents entity. Then, the matrix is sequentially named and stored, and is converted into a G-code file after path planning processing, etc. according to requirements. Taking a Bmp image as an example, the image is named as “layer_001.bmp”, “layer_002.bmp”, etc. Finally, a target bitmap collection is obtained.
[0062] S105: printing the to-be-printed model based on the target bitmap collection.
[0063] As can be seen, the method decomposes the construction of a three-dimensional model into a pattern combination problem in a two-dimensional plane, avoids directly processing three-dimensional voxel filling, significantly reduces the complexity of model construction, and makes the operation more easily implemented and understood.
[0064] The method can interleave different filling bitmaps and dynamically switch different filling bitmaps in different regions of a three-dimensional model. The construction of a complex internal structure can be realized by spatial combination of two-dimensional patterns, and the filling strategy can be flexibly planned according to functional requirements, a specific filling bitmap can be selected for directional arrangement in a local region of the model, and the boundary morphology of the internal structure can be accurately controlled through geometric interlacing and boundary connection between templates.
[0065] The method breaks through the storage and calculation bottleneck of traditional 3D printing large-scale filling by storing filling bitmaps and performing two-dimensional bitmap operations. Traditional three-dimensional voxel filling needs to allocate an independent storage unit for each spatial unit. When processing a model with a size of one meter and a resolution of one hundred microns, the amount of data will increase exponentially (for example, a 1m³ model needs to store 10^15 three-dimensional coordinate points at a resolution of 100μm), far exceeding the carrying capacity of conventional computer memory (the upper limit of current mainstream workstation memory is about 1TB) and storage devices (SSD capacity is generally ≤10TB). The method only needs to store the geometric parameters of the filling unit (<1KB / template), converts the three-dimensional problem into a two-dimensional bitmap operation (2MB / 1080p per layer), and the number of filling bitmap layers is much smaller than the number of slice layers of the entity model, which realizes a thousand-fold compression of data volume, greatly reduces the storage space, and improves the calculation efficiency.
[0066] The method defines two-dimensional filling bitmaps that can be infinitely expanded, so that the technical solution has high reusability. Different shapes and sizes of model objects only need to select appropriate filling bitmaps and perform corresponding operations to realize model construction.
[0067] The method can take advantage of parallel computing in two-dimensional images to further improve the operation efficiency.
[0068] In some embodiments, the various embodiments of the present application can be combined, and the combined embodiments can be implemented. Optionally, some operations in the flow of the method embodiments can be combined, and / or the order of the some operations can be changed. Also, the execution sequence of the steps between the various flows is only exemplary, and does not constitute a limitation on the execution sequence of the steps, and other execution sequences between the steps can also be possible. The described execution sequence is not intended to indicate or imply that the operations must be performed in this order. A person of ordinary skill in the art can think of various ways to reorder the operations described herein. In addition, it should be pointed out that the process details involved in a certain embodiment herein are also applicable in a similar manner to other embodiments, or different embodiments can be combined for use.
[0069] In addition, some steps in the method embodiments can be equivalently replaced by other possible steps. Alternatively, some steps in the method embodiments can be optional, and can be deleted in some use scenarios. Alternatively, other possible steps can be added in the method embodiments. Also, the method embodiments can be implemented individually, or in combination.
[0070] From the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the system is divided into different functional modules to complete all or part of the functions described above.
[0071] In the several embodiments provided in the present application, it should be understood that the disclosed method can be implemented by other ways. For example, the method embodiments described above are only exemplary, for example, each method step can be implemented by a module or unit. The division of the module or unit is only a logical function division, and in actual implementation, another division mode can be adopted, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0072] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0073] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or in the part that contributes to the present application, or the whole or part of the technical solutions can be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0074] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A 3D printing method, characterized in that, Applied to electronic devices, the method includes: Obtain the solid model corresponding to the model to be printed and the infill template for filling the solid model; the solid model has the same shape as the model to be printed; the infill template includes m layers of stacked infill bitmaps; all the infill bitmaps have the same size; The solid model is sliced to obtain N layers of model slice bitmaps; the thickness of each model slice bitmap and the thickness of each fill bitmap are the same; The N-layer model slice bitmap is filled based on the filling template to obtain the target bitmap corresponding to the N-layer model slice bitmap. The f-th layer filling bitmap is used to fill the x*m+f-th layer model slice bitmap, where x is a positive integer greater than or equal to 0 and f is a positive integer greater than or equal to 0 and less than or equal to m. Based on the target bitmaps corresponding to the slice bitmaps of each layer of the model, a set of target bitmaps is obtained; Based on the target bitmap set, print the model to be printed; The fill template is determined based on the fill model, and the method further includes: Determine the infill posture of the infill model in the solid model; While maintaining the filling posture, the filling model is sliced to obtain the m-layer stacked filling bitmap; the slicing direction of the filling model is the same as the slicing direction of the solid model; The filling template is obtained based on the m layers of stacked filling bitmaps; The step of filling the N-layer model slice bitmap based on the filling template to obtain the target bitmap corresponding to the N-layer model slice bitmap includes: Based on the dimensions of the model to be printed, a bounding box corresponding to the model to be printed is determined; the bounding box is a cuboid structure; when the model to be printed is located in the bounding box, each plane included in the bounding box is in contact with the model to be printed; Based on the size of the bounding box and the size of the fill bitmap, determine the expansion factor corresponding to the fill bitmap; Based on the expansion factor of the fill bitmap, an expansion process is performed on the f-th layer fill bitmap to obtain an extended bitmap corresponding to the f-th layer fill bitmap; the extended bitmap corresponding to the f-th layer fill bitmap includes the content corresponding to multiple f-th layer fill bitmaps; The size of the extended bitmap corresponding to the f-th layer fill bitmap is the same as the size of the x*m+f-th layer model slice bitmap; The x*m+f layer model slice bitmap is filled with the extended bitmap corresponding to the f-th layer fill bitmap to obtain the target bitmap corresponding to the x*m+f layer model slice bitmap.
2. The method according to claim 1, characterized in that, The step of filling the N-layer model slice bitmap based on the filling template to obtain the target bitmap corresponding to the N-layer model slice bitmap includes: Based on the f-th layer fill bitmap, each time a target region included in the x*m+f-th layer model slice bitmap is filled; the size of the target region is the same as the size of the f-th layer fill bitmap; the target regions included in the x*m+f-th layer model slice bitmap do not overlap with each other; Based on the completion of filling each target region included in the x*m+f layer model slice bitmap, the target bitmap corresponding to the x*m+f layer model slice bitmap is obtained.
3. The method according to claim 2, characterized in that, The method of filling a target region included in the x*m+f layer model slice bitmap each time based on the f-th layer fill bitmap also includes: Based on the f-th layer fill bitmap, each target region included in the x*m+f-th layer model slice bitmap is filled line by line.
4. The method according to claim 1, characterized in that, The extended processing includes copying and translating the f-th layer fill bitmap.
5. The method according to claim 4, characterized in that, The filled bitmap includes a first long side and a first wide side that are perpendicular to each other; the direction of the first long side is a first direction, the direction of the first wide side is a second direction, the first direction is perpendicular to the second direction, and the plane formed by the first long side and the first wide side is perpendicular to the direction of the thickness of the model slice bitmap; the bounding box includes a second long side and a second wide side; the direction of the second long side is the first direction, the direction of the second wide side is the second direction; the plane formed by the second long side and the second wide side is perpendicular to the height direction of the bounding box; the expansion factor includes a first expansion factor and a second expansion factor, and determining the expansion factor corresponding to the filled bitmap based on the size of the bounding box and the size of the filled bitmap includes: The first expansion factor is determined based on the length of the first long side and the length of the second long side; The second expansion factor is determined based on the side lengths of the first and second wide sides.
6. An electronic device, characterized in that, include: A memory, one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the 3D printing method as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the 3D printing method as described in any one of claims 1-5.
8. A computer program product, characterized in that, When the computer program product is run on a computer, the computer performs the 3D printing method as described in any one of claims 1-5.
Citation Information
Patent Citations
3D printing method based on layer construction filling structure
CN111941829A