3D printing real model rendering method and device based on variable granularity
Through the 3D printing real model rendering method based on variable granularity, the 3D model library is built using the adjustment spacing strategy and multi-layer fusion strategy, and the secondary rendering is performed, which solves the problems of slow rendering speed and poor authenticity of 3D printing models in the existing technology, and realizes efficient and real 3D printing model rendering.
Patent Information
- Application Number
- CN202510159586.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The existing 3D printing technology has great differences between rendering three-dimensional models and real printing models, and the rendering speed is slow, so it is impossible to effectively preview and correct the printing quality.
A 3D printing real model rendering method based on variable granularity is proposed. By obtaining 3D printing parameters and layers, combining adjustment spacing strategies and multi-layer fusion strategies, a 3D model library is built, and a secondary rendering strategy is used for rendering.
It improves the speed and authenticity of 3D rendering, optimizes the display effect and visual quality of the print, reduces errors and calculation complexity during the rendering process, and realizes a preview of the real appearance of the 3D printed model.
Smart Images

Figure CN119598776B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of 3D rendering technology, and in particular, relates to a 3D printing real model rendering method based on variable granularity. Background Art
[0002] With the rapid development of 3D printing technology, 3D modeling software is increasingly used in the field of 3D printing, especially in the manufacture of personalized products and complex structural parts. Traditional 3D printing model rendering and printing methods mainly focus on building 3D models and optimizing printing parameters, but still face some challenges.
[0003] Although 3D printers can restore design models, due to the physical limitations of different printers, the printed 3D objects often have a large gap with the 3D models in the computer: first, it is impossible to preview and correct the printing quality. The characteristics of 3D printers usually result in a rough surface of the printed objects and layer-by-layer break marks. Secondly, the lack of a layer-by-layer printing model for consumables makes it impossible to effectively calculate and control the printing distance, and the fluidity problem of consumables indirectly leads to a decrease in printing quality.
[0004] The application of existing technologies in the field of 3D printing still has certain limitations. There is a large difference between the rendered three-dimensional model and the real printed model of the 3D printer, and the rendering speed is slow. Summary of the invention
[0005] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a 3D printing real model rendering method based on variable granularity, which improves the speed and authenticity of 3D rendering.
[0006] In a first aspect, the present application provides a 3D printing real model rendering method based on variable granularity, the method comprising:
[0007] Obtaining 3D printing parameters and the number of layers of the printed object, wherein the 3D printing parameters include 3D printing head parameters and 3D printer parameters;
[0008] Based on the 3D printing parameters and the spacing adjustment strategy, single-layer modeling is performed on the printed object;
[0009] Based on a multi-layer fusion strategy, obtaining the surface elements of each layer of the printed object;
[0010] Based on the surface elements of each layer of the printed object and the same area principle, a volume element set of the printed object is obtained;
[0011] Building a 3D model library based on the volume element set of the printed object;
[0012] Based on the 3D model library and the secondary rendering strategy, the real model of the printed object is rendered.
[0013] According to an embodiment of the present application, the spacing adjustment strategy includes:
[0014] Obtaining the overlapping area and the blank area of two adjacent drops of consumables printed by the 3D printing head;
[0015] Based on the area of the overlapping portion and the area of the blank portion, the printing spacing of the 3D printing head is adjusted.
[0016] According to an embodiment of the present application, obtaining the surface elements of each layer of the printed object based on the multi-layer fusion strategy includes:
[0017] Dividing the cross section of each layer of the printed object into an arc-shaped portion and a rectangular portion;
[0018] Based on the arc portion of the cross section of each layer of the printed object, obtaining the arc value of each layer of the printed object;
[0019] Based on the rectangular portion of the cross section of each layer of the printed object, obtaining an initial surface element of each layer of the printed object;
[0020] Based on the difference between the initial surface element of the current layer of the printed object and the initial surface element of the previous layer, the surface element of each layer of the printed object is obtained.
[0021] According to an embodiment of the present application, obtaining a set of volume elements of the printed object based on the surface elements of each layer of the printed object and the same area principle includes:
[0022] Based on the shape parameters of the printed object, a grouping parameter of the printed object is set to group the layers of the printed object;
[0023] Based on the surface elements of each layer of the printed object in each group, combining the areas where the surface elements are repeated to obtain a first volume element set and a layer number of the printed object corresponding to the first volume element set;
[0024] Based on the surface elements of the partial layer of the printed object in each group, combining the repeated areas of the surface elements to obtain a second volume element set and a layer number of the printed object corresponding to the second volume element set;
[0025] A volume element set of the printed object is obtained based on the first volume element set and the second volume element set.
[0026] According to an embodiment of the present application, the step of constructing a 3D model library based on the volume element set of the printed object includes:
[0027] Numbering all volume elements in the volume element set based on the volume sizes of the volume elements in the volume element set;
[0028] Based on the sequence of the numbers, construct a 3D model library, wherein the 3D model library includes a set of volume elements of the printed object and a number corresponding to each volume element;
[0029] The larger the volume of the body element is, the larger the number corresponding to the body element is.
[0030] According to an embodiment of the present application, rendering the real model of the printed object based on the 3D model library and the secondary rendering strategy includes:
[0031] Obtaining serial numbers of volume elements in the 3D model library, and rendering the volume elements in the 3D model library in descending order according to serial numbers;
[0032] Based on the arc value of each layer of the printed object, the arc portion of the cross section of each layer of the printed object is rendered layer by layer.
[0033] According to one embodiment of the present application, the 3D print head parameters include nozzle shape, nozzle diameter and nozzle spacing, and the 3D printer parameters include printing accuracy and thickness of the printed layer.
[0034] In a second aspect, the present application provides a 3D printing real model rendering device based on variable granularity, the device comprising:
[0035] An acquisition module, used to acquire 3D printing parameters and the number of layers of a printed object, wherein the 3D printing parameters include 3D printing head parameters and 3D printer parameters;
[0036] A first processing module, configured to perform single-layer modeling on the printed object based on the 3D printing parameters and the spacing adjustment strategy;
[0037] A second processing module is used to obtain the surface elements of each layer of the printed object based on a multi-layer fusion strategy;
[0038] A third processing module, configured to obtain a volume element set of the printed object based on the surface elements of each layer of the printed object and the same area principle;
[0039] A construction module, used for constructing a 3D model library based on the volume element set of the printed object;
[0040] A rendering module is used to render the real model of the printed object based on the 3D model library and the secondary rendering strategy.
[0041] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for rendering a 3D printed real model based on variable granularity as described in the first aspect above is implemented.
[0042] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for rendering a 3D printed real model based on variable granularity as described in the first aspect above is implemented.
[0043] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the 3D printing real model rendering method based on variable granularity as described in the first aspect.
[0044] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the 3D printing real model rendering method based on variable granularity as described in the first aspect above.
[0045] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application.
[0046] The present invention provides a 3D printing real model rendering method based on variable granularity, which has the following beneficial effects compared with the prior art:
[0047] (1) The present invention obtains 3D printing parameters and the number of layers of the printed object, combines the spacing adjustment strategy to perform single-layer modeling on the printed object, obtains the surface elements of each layer of the printed object through a multi-layer fusion strategy, obtains a set of volume elements based on the same area principle, constructs a 3D model library, and combines the secondary rendering strategy to perform real model rendering on the printed object. It can construct a single-layer 3D model with high restoration, improve the accuracy and realism of 3D printed model rendering, optimize the display effect and visualization quality of the printed object, reduce errors, redundant data and calculation complexity in the rendering process, optimize the 3D rendering and storage process, improve the rendering speed and rendering efficiency, and realize the preview of the real appearance of the 3D printed model.
[0048] (2) The present invention adjusts the printing spacing by obtaining the overlapping area and blank area of two adjacent drops of consumables printed by the 3D printing head, which can reduce excessive overlap or excessive blank space of consumables, improve the consumables utilization rate and printing efficiency during the printing process, and reduce the impact of printing defects and deformation caused by extrusion.
[0049] (3) The present invention separates the arc part and the rectangular part in the cross section of each layer of the printed object, combines the initial surface elements of the rectangular part with the difference between the initial surface elements of the current layer and the previous layer, and obtains the surface elements of each layer of the printed object through a multi-layer fusion strategy, thereby reducing calculation errors and redundant information, and improving the rendering speed while truly reflecting the printing effect.
[0050] (4) The present invention constructs a set of volume elements based on the surface elements of each layer of the printed object and the same area principle, and groups the layers in combination with the shape parameters and grouping parameters of the printed object. It can reasonably divide the different hierarchical structures of the printed object. By combining the regions of the elements on each layer, it can achieve effective combination of repeated regions, reduce redundant calculations, improve the rendering speed of the printed object, and realize integrated storage and rendering. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0052] Figure 1 It is a flow chart of a method for rendering a 3D printed real model based on variable granularity provided in an embodiment of the present application;
[0053] Figure 2 is a structural schematic diagram of a cross section of a printed object in which a printing consumable is deformed according to an embodiment of the present application;
[0054] Figure 3 is a schematic structural diagram of a cross section of mutually extruded printed matter provided in an embodiment of the present application;
[0055] Figure 4 is a structural schematic diagram of a cross section of a printed object obtained by adjusting a spacing strategy provided in an embodiment of the present application;
[0056] Figure 5 is a schematic structural diagram of a single-layer cross-section of a printed object provided in an embodiment of the present application;
[0057] Figure 6 It is a structural schematic diagram of a 3D printing real model rendering device based on variable granularity provided in an embodiment of the present application;
[0058] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0060] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0061] In conjunction with the accompanying drawings, the following detailed description is given of a 3D printing real model rendering method based on variable granularity, a 3D printing real model rendering device based on variable granularity, an electronic device and a readable storage medium provided in an embodiment of the present application through specific embodiments and their application scenarios.
[0062] Among them, the 3D printing real model rendering method based on variable granularity can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.
[0063] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or a tablet computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).
[0064] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.
[0065] The embodiment of the present application provides a method for rendering a 3D printed real model based on variable granularity. The execution subject of the method for rendering a 3D printed real model based on variable granularity can be an electronic device or a functional module or functional entity in the electronic device that can implement the method for rendering a 3D printed real model based on variable granularity. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The method for rendering a 3D printed real model based on variable granularity provided in the embodiment of the present application is described below using an electronic device as an example of the execution subject.
[0066] Figure 1 3D printing real model rendering method based on variable granularity provided in an embodiment of the present application is a flow chart, such as Figure 1 As shown, the 3D printing real model rendering method based on variable granularity includes: step 110, step 120, step 130 and step 140.
[0067] Step 110: Obtain 3D printing parameters and the number of layers of the printed object, wherein the 3D printing parameters include 3D printing head parameters and 3D printer parameters;
[0068] It is easy to understand that when performing 3D printing, electronic equipment needs to collect and organize the printing parameters of the 3D printer to lay the foundation for the subsequent construction of a highly restored 3D printing model.
[0069] The electronic device obtains 3D printing parameters and the number of layers of the printed object. The 3D printing parameters include 3D print head parameters and 3D printer parameters. The 3D print head parameters include nozzle shape, nozzle diameter and nozzle spacing. The 3D printer parameters include printing accuracy and thickness of the printed layer.
[0070] Step 120: Based on the 3D printing parameters and the spacing adjustment strategy, single-layer modeling is performed on the printed object;
[0071] It should be noted that when a single layer of printed objects is modeled, due to the influence of gravity and nozzle extrusion, the filament ejected from the nozzle will deform and present an arc shape, resulting in layered lines on the real 3D printed object. In addition, when the thickness of the printed object is greater than the nozzle diameter, the filaments may squeeze and overflow each other. In order to reduce excessive deformation, it is necessary to adjust the nozzle spacing by adjusting the spacing strategy to achieve a balance between the overlapping area of two adjacent drops of filament and the area of the blank area.
[0072] It should be noted that the number of print heads may be one or more.
[0073] Step 130: obtaining the surface elements of each layer of the printed object based on a multi-layer fusion strategy;
[0074] In this step, in order to improve the rendering speed of 3D printing, a multi-layer fusion strategy can be used to optimize each layer of the printed object. First, the cross section of each layer is divided into an arc and a rectangular part. The arc part remains unchanged and only needs to be stored once. Then, based on the rectangular part of each layer, the initial surface elements are extracted and compared with the surface elements of the previous layer to find the difference. For each layer, only the part that is different from the previous layer is stored. In this way, the surface elements of the printed object are updated layer by layer to obtain the surface elements of each layer of the printed object.
[0075] Step 140: based on the surface elements of each layer of the printed object and the same area principle, obtain a volume element set of the printed object;
[0076] It is easy to understand that a body element is a three-dimensional volume element composed of multiple surface elements, representing the actual volume of an object.
[0077] In this step, the grouping parameters of the number of layers of the printed object are dynamically adjusted based on the principle of the same area. For example, the grouping parameters are set according to the morphological changes of the printed object in the Z-axis direction. For the part with slower changes, a larger grouping parameter is used, and for the part with faster changes, a smaller grouping parameter is used. For each group after grouping, the area with repeated surface elements is combined into a volume element to obtain a volume element set of the printed object.
[0078] Step 150: construct a 3D model library based on the volume element set of the printed object;
[0079] Furthermore, according to the size of the volume elements, all volume elements in the volume element set are numbered from large to small according to their volumes. The larger the volume of the volume element, the larger the corresponding number. A 3D model library is constructed according to the numbering sequence. The 3D model library includes all volume elements of the printed object and their corresponding numbers.
[0080] Step 160: Render the real model of the printed object based on the 3D model library and the secondary rendering strategy.
[0081] Finally, for the volume elements in the 3D model library, rendering is performed according to the secondary rendering strategy. The larger volume elements are rendered first, and then the smaller volume elements. During the rendering process, the volume element numbers are obtained and rendered in order of volume size. At the same time, the arc part of the cross-section of the printed object is rendered layer by layer. The arc part can be parsed as a plane texture. The two-dimensional appearance graphics are rendered first and fed back to the user, and then more complex arc parts are rendered in the background.
[0082] It is worth noting that when storing the parameters of the printed object, each volume element stores the corner point coordinates and cross-sectional surface element information, and also stores the radian values of the edges on both sides of each layer of the printed object.
[0083] According to the 3D printing real model rendering method based on variable granularity provided in the embodiment of the present application, by obtaining the 3D printing parameters and the number of layers of the printed object, the printed object is modeled in a single layer in combination with the spacing adjustment strategy, and the surface elements of each layer of the printed object are obtained through a multi-layer fusion strategy. A set of volume elements is obtained based on the same area principle, a 3D model library is constructed, and the printed object is rendered in a real model in combination with a secondary rendering strategy. A single-layer 3D model with a high degree of restoration can be constructed, the accuracy and realism of the 3D printed model rendering are improved, the display effect and visualization quality of the printed object are optimized, the errors, redundant data and calculation complexity in the rendering process are reduced, the 3D rendering and storage processes are optimized, the rendering speed and rendering efficiency are improved, and a preview of the real appearance of the 3D printed model is realized.
[0084] In some embodiments, the spacing adjustment strategy includes:
[0085] Obtaining the overlapping area and the blank area of two adjacent drops of consumables printed by the 3D printing head;
[0086] Based on the area of the overlapping portion and the area of the blank portion, the printing spacing of the 3D printing head is adjusted.
[0087] In one embodiment, taking a circular nozzle as an example, 3D printing is continuous feeding. When performing single-layer printing, the consumables are sprayed through the nozzle in a cylindrical shape to the top layer of the printed object. First, a basic cylindrical model is constructed. In theory, the consumables sprayed from the top layer are cylindrical. The calculation formula for the cross-sectional area is as follows:
[0088]
[0089] in, is the nozzle diameter, is the cross-sectional area.
[0090] It should be noted that due to the influence of gravity and the extrusion of the nozzle when printing the next layer, the cylindrical original printing consumables will be deformed (flattened). Figure 2 is a schematic structural diagram of a cross section of a printed object in which a printing consumable is deformed according to an embodiment of the present application, such as Figure 2 As shown, the periphery of the 3D printed object is arc-shaped.
[0091] Furthermore, when printing a single layer, since the thickness of the printed material is often much larger than the nozzle diameter, there will be a phenomenon of mutual squeezing and overflow. Figure 3 is a schematic structural diagram of a cross section of mutually extruded printed matter provided in an embodiment of the present application, such as Figure 3 As shown, the printing spacing needs to be adjusted by adjusting the spacing strategy. The specific process of adjusting the spacing strategy is as follows:
[0092] (1) Obtain the overlapping area and blank area of two adjacent drops of filament printed by the 3D printing head;
[0093] (2) Based on the area of the overlapping portion and the area of the blank portion, adjusting the printing pitch of the 3D printing head, for example, by adjusting the distance between the nozzles until the area of the overlapping portion is twice the area of the blank portion.
[0094] Figure 4 is a schematic diagram of the structure of the cross section of the printed object obtained by adjusting the spacing strategy provided in an embodiment of the present application. By adjusting the spacing strategy, the printed object is processed as follows Figure 4 The effect shown.
[0095] Finally, the print object is printed in a single layer by adjusting the spacing strategy. Figure 5 is a schematic diagram of a cross section of a single layer of a printed object provided in an embodiment of the present application, such as Figure 5 As shown, the arc parts on both sides of the single-layer cross section can be calculated through printing interval, printing accuracy, etc., and the layer height of the single-layer cross section is the nozzle spacing.
[0096] In this embodiment, the printing spacing is adjusted by obtaining the overlapping area and blank area of two adjacent drops of consumables printed by the 3D print head, which can reduce excessive overlap of consumables or excessive blank spaces, improve consumable utilization and printing efficiency during the printing process, and reduce the impact of printing defects and deformation caused by extrusion.
[0097] In some embodiments, obtaining the surface elements of each layer of the printed object based on the multi-layer fusion strategy includes:
[0098] Dividing the cross section of each layer of the printed object into an arc-shaped portion and a rectangular portion;
[0099] Based on the arc portion of the cross section of each layer of the printed object, obtaining the arc value of each layer of the printed object;
[0100] Based on the rectangular portion of the cross section of each layer of the printed object, obtaining an initial surface element of each layer of the printed object;
[0101] Based on the difference between the initial surface element of the current layer of the printed object and the initial surface element of the previous layer, the surface element of each layer of the printed object is obtained.
[0102] It is easy to understand that since the thickness of a single-layer model of a printed object is very small, if modeling is done layer by layer, the rendering efficiency is not high. On the premise of ensuring the true printing appearance, a multi-layer fusion strategy is used to obtain the surface elements of each layer of the printed object. The specific process is as follows:
[0103] (1) Divide the cross section of each layer of the printed object into an arc part and a rectangular part;
[0104] Specifically, each layer of the printed object has the same height and similar cross-sectional shapes (the arc-shaped parts on both sides are consistent and the lateral widths of the cross-sections are different). Therefore, each layer of the printed object can be further decomposed: the cross-section of a single-layer printed object is divided into arc-shaped parts on both sides and a rectangular part. The rectangular part may change at different positions in a layer.
[0105] (2) obtaining a curvature value of each layer of the printed object based on the arc portion of the cross section of each layer of the printed object;
[0106] It is easy to understand that the arc portion of the cross section of each layer of the printed object remains unchanged in all layers of the entire printed object, and only one set of arc line data can be stored for the printed object.
[0107] (3) obtaining an initial surface element of each layer of the printed object based on a rectangular portion of a cross section of each layer of the printed object;
[0108] For each layer of the printed object, it is necessary to store a surface composed of different positions and different widths. The cross-section of each layer of the printed object can be stored in the form of vector surface elements. Each layer of the printed object stores a vector surface element as the initial surface element.
[0109] Based on the difference between the initial surface element of the current layer of the printed object and the initial surface element of the previous layer, the surface element of each layer of the printed object is obtained.
[0110] Specifically, for the first layer that starts printing, the attribute value of the stored initial surface element can be set to 1. For the next printing layer, first compare the difference between the surface element coverage area and the initial surface element of the first layer. The overlapping part does not need to be stored in the next layer, and only the difference is stored. The newly added part is stored separately as one or more surface elements, and the attribute value is set to 1. The removed part is also stored separately as one or more surface elements, and the attribute value is set to 0. By passing each layer layer by layer, only the difference with the previous layer element is stored, and the surface elements of each layer of the printed object are obtained.
[0111] In this embodiment, the arc part and the rectangular part in the cross section of each layer of the printed object are separated, the initial surface elements of the rectangular part are combined with the difference between the initial surface elements of the current layer and the previous layer, and the surface elements of each layer of the printed object are obtained through a multi-layer fusion strategy, which reduces calculation errors and redundant information, and improves the rendering speed while truly reflecting the printing effect.
[0112] In some embodiments, obtaining a set of volume elements of the printed object based on the surface elements of each layer of the printed object and the same area principle includes:
[0113] Based on the shape parameters of the printed object, a grouping parameter of the printed object is set to group the layers of the printed object;
[0114] Based on the surface elements of each layer of the printed object in each group, combining the areas where the surface elements are repeated to obtain a first volume element set and a layer number of the printed object corresponding to the first volume element set;
[0115] Based on the surface elements of the partial layer of the printed object in each group, combining the repeated areas of the surface elements to obtain a second volume element set and a layer number of the printed object corresponding to the second volume element set;
[0116] A volume element set of the printed object is obtained based on the first volume element set and the second volume element set.
[0117] It is easy to understand that when grouping the number of layers of a printed object, the parameters of the layer grouping can be dynamically set according to the morphological changes of the printed object. For the slower changing part, multiple layers can be grouped together, and for the faster changing part, each layer can be processed separately.
[0118] In one embodiment, if the printed object changes slowly in the Z-axis direction, the grouping parameter may take a larger value, such as grouping 200 layers into one group. If the printed object changes rapidly in the Z-axis direction, the grouping parameter may take a smaller value, such as grouping 20 layers into one group. The specific process of grouping is as follows:
[0119] (1) Starting from the second layer of print, compare it with the first layer of print and compare the overlapping area of their plane projections;
[0120] (2) Setting a threshold (e.g., 50%). If the overlap area of the plane projection of the second layer of printed matter and the first layer of printed matter is greater than the threshold, the second layer and the first layer are grouped together.
[0121] (3) Repeat steps (1) and (2), compare the third layer with the first layer, compare the fourth layer with the first layer, and so on, until the overlapping area of the planar projection of the target layer and the first layer is less than or equal to the threshold. At this time, the first layer to the layer above the target layer are grouped together, and starting from the target layer, the target layer is taken as the new "first layer";
[0122] (4) Repeat steps (1) to (3) until all printed layers of the printed object are grouped.
[0123] It should be noted that if a part of the printed matter changes slowly and another part changes quickly, dynamic grouping can be adopted for different areas of the printed matter.
[0124] Furthermore, after the layers of the printed object are grouped, the areas where the surface elements are repeated in each group are combined to obtain a set of volume elements. The specific process is as follows:
[0125] (1) performing comparison within each group, combining the areas where the surface elements are repeated based on the surface elements of each layer of the printed object in each group, and obtaining a first volume element set and a layer number of the printed object corresponding to the first volume element set;
[0126] (2) Based on the surface elements of the partial layers of the printed object in each group, the areas where the surface elements are repeated are combined to obtain a second volume element set and a layer number of the printed object corresponding to the second volume element set;
[0127] (3) Repeat steps (1) and (2) until all the surface elements of all layers of each group are combined to obtain a first volume element set and a second volume element set;
[0128] (4) Based on the first volume element set and the second volume element set, a volume element set of the printed object is obtained.
[0129] It should be noted that a volume element refers to a three-dimensional volume element composed of multiple surface elements. It is a geometric unit that occupies a certain volume in space. Unlike surface elements (usually two-dimensional surfaces), volume elements are the actual three-dimensional parts that constitute the inside or outside of an object. In 3D modeling, volume elements are used to represent the actual volume of an object.
[0130] In this embodiment, by constructing a set of volume elements based on the surface elements of each layer of the printed object and the same area principle, and grouping the layers in combination with the shape parameters and grouping parameters of the printed object, the different hierarchical structures of the printed object can be reasonably divided, and by combining the regions of the elements on each layer, effective combination of repeated regions can be achieved, which reduces redundant calculations, improves the rendering speed of the printed object, and realizes integrated storage and rendering.
[0131] In some embodiments, the step of constructing a 3D model library based on the volume element set of the printed object includes:
[0132] Numbering all volume elements in the volume element set based on the volume sizes of the volume elements in the volume element set;
[0133] Based on the sequence of the numbers, construct a 3D model library, wherein the 3D model library includes a set of volume elements of the printed object and a number corresponding to each volume element;
[0134] The larger the volume of the body element is, the larger the number corresponding to the body element is.
[0135] It is easy to understand that according to the volume size relationship of the volume elements in the volume element set, all volume elements in the volume element set are numbered in descending order of volume. The larger the volume of the volume element, the larger the number corresponding to the volume element.
[0136] Furthermore, a 3D model library is constructed according to the order in which the volume elements are numbered. The 3D model library includes all volume elements of the printed object and the number corresponding to each volume element.
[0137] In this embodiment, a 3D model library is constructed by a set of volume elements of a printed object, and each volume element is numbered according to its volume size, so that volume elements with larger volumes have larger numbers, thereby facilitating the effective organization and management of a set of volume elements of a printed object, achieving a more reasonable structural hierarchy and arrangement order, being able to quickly locate the relative position of each volume element, and improving the speed and accuracy of 3D rendering.
[0138] In some embodiments, rendering the real model of the printed object based on the 3D model library and the secondary rendering strategy includes:
[0139] Obtaining serial numbers of volume elements in the 3D model library, and rendering the volume elements in the 3D model library in descending order according to serial numbers;
[0140] Based on the arc value of each layer of the printed object, the arc portion of the cross section of each layer of the printed object is rendered layer by layer.
[0141] It is worth noting that the more complex the volume elements, the slower the rendering speed. Since the shapes of different volume elements in the 3D model library are similar, the volume size of the volume element can be used to approximately replace the complexity of the volume element, and a two-level rendering strategy can be formulated: first render the volume elements with relatively large volumes, and then render the volume elements with relatively small volumes.
[0142] Furthermore, the numbers of the volume elements in the 3D model library are obtained, and according to the secondary rendering strategy, the volume elements in the 3D model library are rendered in order from large to small according to the number sequence.
[0143] Finally, based on the curvature values of the edges on both sides of the elements on each layer of the printed object, the arc portion of the cross section of each layer of the printed object is rendered layer by layer.
[0144] It should be noted that when storing volume elements in the 3D model library, the corner point coordinates of the volume element are first obtained through the layer number corresponding to each volume element. Each volume element is stored separately, and the corner point coordinates of the volume element and the surface element information of the cross section are stored.
[0145] It is worth noting that for the edge arcs on both sides of each layer of the printed object, since the arc and length are consistent and fit along the edges of all volume elements, only one arc value is stored.
[0146] In one embodiment, the arc composed of arc parts can be parsed into a plane texture and fitted to the surface of the value body element. When rendering, the two-dimensional surface texture is first quickly rendered to feed back the appearance graphics of the printed object to the user, and then a large number of arc parts are rendered in the background.
[0147] In this embodiment, by obtaining the numbers of the body elements in the 3D model library, a two-level rendering method is used to render the body elements in order from large to small in the order of the numbers, thereby improving the rendering speed and increasing the friendliness of human-computer interaction. Based on the curvature value of each layer of the printed object, the arc portion of the cross section of each layer of the printed object is rendered layer by layer, so that the main part of the printed object model can be rendered as early as possible, thereby improving the authenticity of the 3D printed model and the refinement of the printing effect, and reducing the storage capacity of 3D printing.
[0148] In some embodiments, the 3D print head parameters include nozzle shape, nozzle diameter and nozzle spacing, and the 3D printer parameters include printing accuracy and thickness of the printed layer.
[0149] It is easy to understand that the nozzle shape refers to the physical shape of the 3D print head nozzle, which can be circular, rectangular, etc. The nozzle diameter refers to the width of the nozzle opening, and the nozzle spacing refers to the distance between two adjacent nozzles.
[0150] Printing accuracy refers to the minimum printing detail size that a 3D printer can achieve. Printing accuracy includes the printing accuracy in the X, Y, and Z directions. The thickness of the printing layer refers to the height of each layer of printing material.
[0151] In this embodiment, by acquiring relevant parameter data of the 3D print head and the 3D printer, combined with the nozzle shape, nozzle diameter, nozzle spacing, printing accuracy and printing layer thickness, the printing process is simulated to model the printed object layer by layer, thereby improving the authenticity and printing effect of 3D printing.
[0152] The 3D printing real model rendering method based on variable granularity provided in the embodiment of the present application can be executed by a 3D printing real model rendering device based on variable granularity. In the embodiment of the present application, the 3D printing real model rendering method based on variable granularity is executed by a 3D printing real model rendering device based on variable granularity as an example to illustrate the 3D printing real model rendering device based on variable granularity provided in the embodiment of the present application.
[0153] The present application also provides a 3D printing real model rendering device based on variable granularity, such as Figure 6 As shown, the 3D printing real model rendering device based on variable granularity includes: an acquisition module 610, a first processing module 620, a second processing module 630, a third processing module 640, a construction module 650 and a rendering module 660.
[0154] An acquisition module 610 is used to acquire 3D printing parameters and the number of layers of a printed object, wherein the 3D printing parameters include 3D printing head parameters and 3D printer parameters;
[0155] A first processing module 620 is used to perform single-layer modeling on the printed object based on the 3D printing parameters and the spacing adjustment strategy;
[0156] The second processing module 630 is used to obtain the surface elements of each layer of the printed object based on the multi-layer fusion strategy;
[0157] A third processing module 640 is used to obtain a volume element set of the printed object based on the surface elements of each layer of the printed object and the same area principle;
[0158] A construction module 650 is used to construct a 3D model library based on the volume element set of the printed object;
[0159] The rendering module 660 is used to render the real model of the printed object based on the 3D model library and the secondary rendering strategy.
[0160] According to the 3D printing real model rendering device based on variable granularity provided by the embodiment of the present application, by obtaining the 3D printing parameters and the number of layers of the printed object, the printed object is modeled in a single layer in combination with the spacing adjustment strategy, and the surface elements of each layer of the printed object are obtained through the multi-layer fusion strategy. Based on the same area principle, a set of volume elements is obtained, a 3D model library is constructed, and the printed object is rendered in a real model in combination with the secondary rendering strategy. A single-layer 3D model with a high degree of restoration can be constructed, the accuracy and realism of the 3D printed model rendering are improved, the display effect and visualization quality of the printed object are optimized, the errors, redundant data and calculation complexity in the rendering process are reduced, the 3D rendering and storage processes are optimized, the rendering speed and rendering efficiency are improved, and a preview of the real appearance of the 3D printed model is realized.
[0161] The 3D printing real model rendering device based on variable granularity provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented in the embodiment of the 3D printing real model rendering method based on variable granularity are not described here.
[0162] In some embodiments, Figure 7 As shown, an embodiment of the present application further provides an electronic device 700, including a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the program is executed by the processor 701, each process of the above-mentioned embodiment of the 3D printing real model rendering method based on variable granularity is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0163] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0164] The embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned embodiment of the 3D printing real model rendering method based on variable granularity are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0165] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0166] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned 3D printing real model rendering method based on variable granularity.
[0167] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0168] The embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned embodiment of the 3D printing real model rendering method based on variable granularity, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0169] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0170] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the variable granularity based 3D printing real model rendering method of each embodiment of the present application.
[0172] In the description of this application, "first feature" or "second feature" may include one or more of the features.
[0173] In the description of the present application, “plurality” means two or more.
[0174] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0175] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0176] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A 3D printing real model rendering method based on variable granularity, characterized in that: The method comprises: Obtaining 3D printing parameters and the number of layers of the printed object, wherein the 3D printing parameters include 3D printing head parameters and 3D printer parameters; Based on the 3D printing parameters and the spacing adjustment strategy, the printed object is modeled in a single layer; the spacing adjustment strategy includes: Obtaining the overlapping area and the blank area of two adjacent drops of consumables printed by the 3D printing head; Adjusting the printing spacing of the 3D printing head based on the area of the overlapping portion and the area of the blank portion; Based on a multi-layer fusion strategy, obtaining the surface elements of each layer of the printed object; The multi-layer fusion strategy includes: Dividing the cross section of each layer of the printed object into an arc-shaped portion and a rectangular portion; Based on the arc portion of the cross section of each layer of the printed object, obtaining the arc value of each layer of the printed object; Based on the rectangular portion of the cross section of each layer of the printed object, obtaining an initial surface element of each layer of the printed object; Obtaining the surface elements of each layer of the printed object based on the difference between the initial surface elements of the current layer of the printed object and the initial surface elements of the previous layer; Based on the surface elements of each layer of the printed object and the same area principle, a volume element set of the printed object is obtained; The same area principle includes: Based on the shape parameters of the printed object, a grouping parameter of the printed object is set to group the layers of the printed object; Based on the surface elements of each layer of the printed object in each group, combining the areas where the surface elements are repeated to obtain a first volume element set and a layer number of the printed object corresponding to the first volume element set; Based on the surface elements of the partial layer of the printed object in each group, combining the repeated areas of the surface elements to obtain a second volume element set and a layer number of the printed object corresponding to the second volume element set; Based on the first volume element set and the second volume element set, obtaining a volume element set of the printed object; Building a 3D model library based on the volume element set of the printed object; Based on the 3D model library and the secondary rendering strategy, the real model of the printed object is rendered.
2. The method for rendering a 3D printed real model based on variable granularity according to claim 1, characterized in that: The step of constructing a 3D model library based on the volume element set of the printed object comprises: Numbering all volume elements in the volume element set based on the volume sizes of the volume elements in the volume element set; Based on the sequence of the numbers, construct a 3D model library, wherein the 3D model library includes a set of volume elements of the printed object and a number corresponding to each volume element; The larger the volume of the body element is, the larger the number corresponding to the body element is.
3. The method for rendering a 3D printed real model based on variable granularity according to claim 1, characterized in that: The rendering of the real model of the printed object based on the 3D model library and the secondary rendering strategy includes: Obtaining serial numbers of volume elements in the 3D model library, and rendering the volume elements in the 3D model library in descending order according to serial numbers; Based on the arc value of each layer of the printed object, the arc portion of the cross section of each layer of the printed object is rendered layer by layer.
4. The method for rendering a 3D printed real model based on variable granularity according to claim 1, characterized in that: The 3D printing head parameters include nozzle shape, nozzle diameter and nozzle spacing, and the 3D printer parameters include printing accuracy and printing layer thickness.
5. A 3D printing real model rendering device based on variable granularity, implemented by the 3D printing real model rendering method based on variable granularity according to any one of claims 1 to 4, characterized in that: The device comprises: An acquisition module, used to acquire 3D printing parameters and the number of layers of a printed object, wherein the 3D printing parameters include 3D printing head parameters and 3D printer parameters; A first processing module, configured to perform single-layer modeling on the printed object based on the 3D printing parameters and the spacing adjustment strategy; A second processing module is used to obtain the surface elements of each layer of the printed object based on a multi-layer fusion strategy; A third processing module, configured to obtain a volume element set of the printed object based on the surface elements of each layer of the printed object and the same area principle; A construction module, used for constructing a 3D model library based on the volume element set of the printed object; A rendering module is used to render the real model of the printed object based on the 3D model library and the secondary rendering strategy.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the variable granularity-based 3D printing real model rendering method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for rendering a 3D printing real model based on variable granularity as claimed in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
3D printing data processing method and 3D printing method and device
CN113524688A
Method and device for multi-head splicing calibration and storage medium
CN117341363A
Metal 3D printing method and device and electronic equipment
CN118905247A