Methods, apparatus, computer equipment, readable storage media and program products for processing horizontal lines

By identifying the striation regions and adjusting the slicing strategy during the 3D printing process, the problem of striations on the model surface was solved, improving printing quality and surface smoothness.

CN119058099BActive Publication Date: 2025-10-28SHANGHAI UNION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411115029.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2025-10-28
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

During the 3D printing process, horizontal lines appearing on the surface of the model make it difficult to meet the required printing quality.

Method used

By determining the horizontal stripe region through the distance between each adjacent slice layer in the 3D model, and combining the preset slicing interval, the horizontal stripe region is sliced, and the slicing strategy is adjusted to reduce the horizontal stripes.

Benefits of technology

It effectively reduces horizontal lines, improving model printing quality and surface smoothness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119058099B_ABST
    Figure CN119058099B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, computer-readable storage medium, and computer program product for processing horizontal lines. The method includes: acquiring a three-dimensional model of an object to be printed; the three-dimensional model comprising multiple slice layers; determining horizontal line regions by the distances between adjacent slice layers in the three-dimensional model; and slicing the horizontal line regions by combining the distances corresponding to the horizontal line regions with the locations of preset segmentation intervals. This method can process horizontal lines to meet printing quality requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D printing, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for processing horizontal lines. Background Technology

[0002] 3D printing, also known as additive manufacturing, is a technology that creates three-dimensional objects by stacking materials layer by layer. This technology is driven directly by digital model files, stacking materials (such as plastics, metals, ceramics, etc.) layer by layer to ultimately form the desired three-dimensional object.

[0003] In the 3D printing process, each cross-section of the model is achieved by printing layer by layer. This layer-by-layer printing method inevitably results in layers of horizontal stripes on the model surface, a phenomenon known as "horizontal striations," which is particularly noticeable when the sides of the model are sloping curved surfaces. These striations create a distinct layered structure on the surface of the printed part, making it difficult to meet printing quality requirements. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for processing horizontal lines to meet printing quality requirements, in order to address the aforementioned technical problems.

[0005] Firstly, this application provides a method for processing horizontal lines, the method comprising:

[0006] Obtain a 3D model of the object to be printed; the 3D model includes multiple slice layers;

[0007] The horizontal stripe region is determined by the distance between each adjacent slice layer in the three-dimensional model;

[0008] Based on the preset segmentation interval corresponding to the distance of the horizontal stripe region, the horizontal stripe region is sliced.

[0009] In one embodiment, determining the striation region by the distance between adjacent slice layers in the three-dimensional model includes:

[0010] Calculate the initial contour difference between each of the adjacent slices;

[0011] The initial contour difference is scaled according to a preset threshold to obtain the scaling result;

[0012] The adjacent slices whose scaling result is not empty are identified as the horizontal stripe region.

[0013] In one embodiment, the preset segmentation region includes a first preset segmentation region; the first preset segmentation region includes a plurality of first sub-intervals; the step of slicing the horizontal ridge region by combining the distance of the horizontal ridge region to the preset segmentation interval includes:

[0014] Calculate the target contour difference between each of the adjacent slices after scaling;

[0015] Based on the first preset segmentation interval, determine the first sub-interval corresponding to the target contour difference;

[0016] Based on the value corresponding to the first sub-interval, the number of slice layers is increased in the ribbed region.

[0017] In one embodiment, the distance is calculated based on the tilt angle; determining the striation region using the distance between adjacent slice layers in the three-dimensional model includes:

[0018] Calculate the normal vectors of the triangular faces between each of the adjacent slices;

[0019] The tilt angle of the triangular facet is obtained based on the normal vector.

[0020] The adjacent slices with a tilt angle greater than a preset angle are identified as the horizontal stripe region.

[0021] In one embodiment, the preset segmentation region includes a second preset segmentation region; the second preset segmentation region includes a plurality of second sub-intervals; the step of slicing the horizontal ridge region based on the preset segmentation interval where the distance of the horizontal ridge region is located includes:

[0022] Based on the second preset segmentation interval, determine the second sub-interval corresponding to the tilt angle;

[0023] Determine the height corresponding to the second sub-interval, and add the slice layer to the horizontal stripe area according to the height.

[0024] In one embodiment, determining the second sub-interval corresponding to the tilt angle by combining the second preset segmentation interval includes:

[0025] Sort the second sub-intervals in the second preset segmentation interval in ascending order to obtain the second preset sorting interval;

[0026] The tilt angle is compared sequentially with each of the second sub-intervals in the second preset sorting interval to determine the second sub-interval corresponding to the tilt angle.

[0027] In one embodiment, adding the slice layer to the ribbed region according to the height corresponding to the second sub-interval includes:

[0028] When the tilt angle matches the current second sub-interval, the slice layer is added to the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain the first slice position;

[0029] The tilt angle is compared with the next second sub-interval. When the tilt angle matches the next second sub-interval, the slice layer is added to the ribbed area according to the first slice position and the height corresponding to the next second sub-interval.

[0030] Secondly, this application provides a horizontal stripe processing apparatus, the apparatus comprising:

[0031] The acquisition module is used to acquire a 3D model of the object to be printed; the 3D model includes multiple slice layers;

[0032] The location determination module is used to determine the horizontal stripe region by the distance between each adjacent slice layer in the three-dimensional model;

[0033] The slicing module is used to slice the horizontal ridge region by combining the distance of the horizontal ridge region with the preset slicing interval.

[0034] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0035] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0036] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0037] The above-mentioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for processing horizontal lines accurately determine the horizontal line region by the distance between each adjacent slice layer in the 3D model, and then slice the horizontal line region according to the slicing strategy corresponding to the preset slicing interval where the distance of the horizontal line region is located, which can effectively reduce horizontal lines and thus improve the printing quality of the model. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating a method for processing horizontal lines in one embodiment;

[0040] Figure 2 This is a planar schematic diagram of a three-dimensional model in one embodiment;

[0041] Figure 3 This is a schematic diagram of a three-dimensional model in one embodiment;

[0042] Figure 4 This is a schematic diagram of the horizontal stripe region after segmentation in one embodiment;

[0043] Figure 5 This is a schematic diagram of a triangular facet in a 3D model;

[0044] Figure 6 This is a schematic diagram showing the segmented horizontal stripe region in another embodiment;

[0045] Figure 7 This is a structural block diagram of the horizontal stripe processing device in one embodiment;

[0046] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] In one embodiment, such as Figure 1 As shown, a method for processing horizontal lines is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and also to a system including both a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0049] In one exemplary embodiment, such as Figure 1 As shown, a method for processing horizontal lines is provided, including steps 102 to 106. Wherein:

[0050] Step S102: Obtain the 3D model of the object to be printed; the 3D model includes multiple slice layers.

[0051] A 3D model is a digital description used to represent objects in three-dimensional space. It is a digital object that represents the shape and structure of an object in three-dimensional space through geometric data. It can be composed of geometric elements such as points, lines, surfaces, and volumes, which together define the surface and volume of the object.

[0052] Optionally, converting the object to be printed into a 3D model is a crucial step in 3D printing. For example, 3D modeling software such as Blender, Fusion 360, and Tinkercad can be used to create a 3D model of the object to be printed.

[0053] Furthermore, since 3D printers cannot directly read and print 3D models, they need G-code to guide the printing process. During this process, the 3D model is converted into a series of 2D slice layers, and corresponding G-code is generated, enabling the printer to print the model layer by layer. Therefore, a 3D model is composed of multiple slice layers. (Exemplary combination) Figure 2 As shown, Figure 2 This is a planar schematic diagram of a three-dimensional model in one embodiment.

[0054] Step 104: Determine the striation region by measuring the distance between adjacent slice layers in the 3D model.

[0055] In the 3D printing process, the height difference between adjacent layers directly affects the surface quality of the printed part. This is because each layer is a two-dimensional slice, and when they are stacked together, they form a stepped texture, or horizontal lines, on the surface. For example, the greater the layer thickness, the more obvious the distance between layers, i.e., the height difference, and the more pronounced the stepped effect, resulting in more noticeable horizontal lines. Therefore, the presence of horizontal lines can be determined by the distance between adjacent slice layers.

[0056] Optionally, the distance between adjacent slice layers can be determined using contour differences. Contour difference refers to the geometric changes in the model surface between adjacent slice layers. In 3D printing, each layer is a two-dimensional contour, and these contours stack together to form a three-dimensional object as the printing process progresses. When there are geometric changes between different layers of the model surface, such as curved or inclined surfaces, the actual height difference between adjacent layers will be affected. Therefore, the contour difference between adjacent slice layers can be used to accurately determine the distance between each adjacent slice layer.

[0057] Optionally, the distance between adjacent slice layers can be determined by the tilt angle. The tilt angle refers to the degree of inclination of the model surface relative to the vertical direction (Z-axis). The tilt angle directly affects the height difference of each layer because the actual height difference between adjacent slices on a tilted surface is greater than the standard layer thickness. Therefore, the distance between adjacent slice layers can be accurately determined by the tilt angle between them. For example, combining... Figure 3 As shown, Figure 3 This is a schematic diagram of a three-dimensional model in one embodiment. Figure 3 The darker the area, the larger the angle. At the top and bottom of the model, the larger the curvature, the greater the angle of inclination.

[0058] Step 106: Based on the preset segmentation interval corresponding to the distance of the horizontal stripe region, slice the horizontal stripe region.

[0059] The preset segmentation region is based on multiple pre-defined segmentation intervals, each interval corresponding to a different segmentation strategy.

[0060] Optionally, the distance of the horizontal stripe region can be matched with a preset segmentation interval to find the corresponding interval. Based on the matched segmentation interval, the slicing strategy for that region can be adjusted, such as reducing the layer thickness to eliminate the horizontal stripes.

[0061] For example, in conjunction with the examples in the above embodiments, matching can be performed based on the preset segmentation region where the contour difference or tilt angle is located, and then the horizontal stripe region can be segmented according to different segmentation strategies corresponding to the intervals.

[0062] Furthermore, slicing strategies can include increasing the number of slice layers or adding slice layers at a specified height. Increasing the number of slice layers reduces the thickness of each layer, making the transition between layers smoother and thus reducing the appearance of horizontal lines; adding additional slice layers at a specific height of the model can provide more detailed printing in areas with large geometric changes, thereby reducing horizontal lines.

[0063] In the above-mentioned method for processing horizontal lines, the horizontal line region is accurately determined by the distance between each adjacent slice layer in the 3D model. Then, the horizontal line region is sliced ​​according to the slicing strategy corresponding to the preset slicing interval where the distance of the horizontal line region is located. This can effectively reduce horizontal lines and thus improve the printing quality of the model.

[0064] In one embodiment, a method for determining the striation region based on the contour difference region is provided.

[0065] The process of determining the striation region by measuring the distance between adjacent slice layers in the 3D model includes: calculating the initial contour difference between adjacent slices; scaling the initial contour difference according to a preset threshold to obtain the scaling result; and identifying adjacent slices whose scaling result is not empty as striation regions.

[0066] In this embodiment, the contour difference is used to determine whether adjacent slices are striated regions.

[0067] Optionally, assuming the height (Z coordinate) of the slice contour of the model at different layers is known, the contour difference can be calculated using the following formula:

[0068] Contour difference = X coordinate of the current layer - Z coordinate of the previous layer.

[0069] Optionally, the profile difference can also be obtained by comparing the boundary shapes of each layer or by using the distance from a point to a plane.

[0070] For example, the distance between the point sets of adjacent slice layer contours can be calculated. For instance, if the contour coordinates of two adjacent layers, i.e., the X and Y coordinates, have already been extracted, the contour difference can be calculated by comparing the boundary shapes of each layer.

[0071] For example, the contour points of adjacent slice layers are fitted to obtain a plane equation, and the distance from each slice layer to its adjacent slice layer is calculated.

[0072] Furthermore, in this embodiment, if there is an initial contour difference between adjacent slices, it is offset, that is, a scaling operation is performed. The scaling operation can be either inward shrinking or outward scaling. Inward shrinking makes the new shape closer to the center of the original shape, while outward scaling makes the new shape farther away from the center of the original shape.

[0073] In this process, scaling is performed according to a preset threshold. For example, if the initial contour difference is A1, then the preset threshold corresponding to A1 is used for scaling. In other embodiments, if the initial contour difference is A2, then the preset threshold corresponding to A2 is used for scaling.

[0074] The scaling process involves scaling the initial contour difference to obtain a scaling result, which indicates whether the contour difference still exists. If the scaling result is not empty, meaning that a contour difference still exists after the scaling operation, then adjacent slices are identified as striated regions.

[0075] In the above embodiments, by calculating the initial contour difference, performing scaling processing, and determining the horizontal stripe area, areas prone to horizontal stripes can be effectively identified.

[0076] Furthermore, the aforementioned preset segmentation region includes a first preset segmentation region; the first preset segmentation region includes multiple first sub-intervals; the slicing of the striated region is combined with the preset segmentation interval where the distance of the striated region is located, including: calculating the target contour difference between each adjacent slice after scaling; determining the first sub-interval corresponding to the target contour difference based on the first preset segmentation interval; and increasing the number of slice layers in the striated region according to the value corresponding to the first sub-interval.

[0077] In this embodiment, the target contour difference between adjacent slices after scaling will be recalculated. The specific calculation process can be referred to the process described in the above embodiment, and will not be repeated here.

[0078] The first preset segmentation region includes multiple first sub-intervals, each corresponding to a value. The preset segmentation region is defined as [first sub-interval 1, first sub-interval 2, ..., first sub-interval n].

[0079] The target contour difference refers to the contour difference calculated after scaling, while the initial contour difference is the contour difference calculated before scaling.

[0080] For example, the target contour difference is 'a', the first sub-interval is divided into two equal parts (1), the first sub-interval is divided into three equal parts (2), and the first sub-interval is divided into four equal parts (3). If the target contour difference matches the first sub-interval 2, two slice layers are added to the striated area, i.e., a slice layer is added at the 1 / 3 mark and then at the 2 / 3 mark. For example, combined with... Figure 4 As shown, Figure 4 This is a schematic diagram of the horizontal stripe region after being segmented in one embodiment.

[0081] It should be noted that, compared to the cyclic segmentation method used in the prior art, where the target contour difference is compared with a preset comparison threshold and if it does not meet the threshold, the ridged region is bisected, and the target contour difference is calculated and compared with the preset comparison threshold again, and so on, until the target contour difference meets the preset comparison threshold, this embodiment calculates the target contour difference in one step and directly matches it with the preset segmentation interval, avoiding the process of repeated bisection and multiple comparisons, thus significantly reducing the number of calculations and time. Furthermore, the preset segmentation interval allows for flexible adjustments based on different models and printing requirements, improving the applicability and accuracy of the method. Directly matching the segmentation interval based on the target contour difference enables more accurate identification of the area requiring optimization, avoiding errors that may be introduced during cyclic segmentation and improving the accuracy of slicing.

[0082] In the above embodiments, by combining the target contour difference and the preset segmentation interval, the number of slice layers to increase the horizontal stripe area can be accurately determined, which can significantly reduce the horizontal stripes.

[0083] In yet another embodiment, a method for determining the striated region based on the tilt angle is provided.

[0084] The distance is calculated based on the tilt angle. The horizontal stripe region is determined by the distance between each adjacent slice layer in the 3D model, including: calculating the normal vector of the triangular facet between each adjacent slice; obtaining the tilt angle of the triangular facet based on the normal vector; and identifying adjacent slices with a tilt angle greater than a preset angle as the horizontal stripe region.

[0085] A triangular facet is composed of three vertices, which can be used to define a triangular facet. (Specific details can be found in...) Figure 5 As shown, Figure 5 This is a schematic diagram of a triangular facet in a 3D model. Figure 5 Each triangle in the diagram is a triangular facet.

[0086] Optionally, two edge vectors are calculated from the three vertices of the triangular facet. These edge vectors are obtained by the coordinate difference between the two vertices. The normal vector of the triangular facet is obtained by calculating the dot product of these two edge vectors. The normal vector is a vector perpendicular to the plane of the triangular facet.

[0087] Optionally, the angle between the normal vector and the horizontal plane normal vector can be calculated using the dot product. This angle is the tilt angle of the triangular facet. It should be noted that the calculated angle is usually in radians; it can be converted to degrees for easier understanding and application.

[0088] Optionally, the tilt angle can be compared with a preset angle. If the tilt angle is greater than the preset angle, the adjacent slice containing the triangular facet is considered to be a horizontal stripe region. The preset angle is obtained based on expert experience, but can also be set according to the actual application scenario.

[0089] In the above embodiments, by calculating the normal vector of the triangular facets between adjacent slices and further calculating their tilt angle, it is possible to determine which areas have a tilt angle greater than a preset threshold, thus effectively identifying areas prone to horizontal lines.

[0090] Furthermore, the preset segmentation region includes a second preset segmentation region; the second preset segmentation region includes multiple second sub-intervals; based on the preset segmentation interval where the distance of the horizontal stripe region is located, the horizontal stripe region is sliced, including: based on the second preset segmentation interval, determining the second sub-interval corresponding to the tilt angle; determining the height corresponding to the second sub-interval, and adding a slice layer to the horizontal stripe region according to the height.

[0091] The second preset segmentation region includes multiple second sub-intervals, each corresponding to a height. The preset segmentation region = [second sub-interval 1, second sub-interval 2, ..., second sub-interval n].

[0092] The process of obtaining each second sub-interval includes: acquiring threshold groups and preset layer thicknesses. For example, if the threshold groups are [0.1, 0.5, 0.9] and the layer thickness is 0.06, the tilt angle groups can be calculated as α1 = arctan(0.5 / 0.06), α2 = arctan(0.1 / 0.06), and α3 = arctan(0.9 / 0.06), and the corresponding height ranges H1, H2, H3, and H4 are established for each angle. H1 corresponds to 0~α1, H2 to α1~α2, H3 to α2~α3, and H4 to α3~90°. The corresponding layer thicknesses for each height group are set to 0.06, 0.04, 0.02, and 0.01, respectively. That is, the second sub-interval 1 is 0 to α1 with a corresponding height of 0.06; the second sub-interval 2 is α1 to α2 with a corresponding height of 0.04; the second sub-interval 3 is α2 to α3 with a corresponding height of 0.02; and the third sub-interval 4 is α3 to 90 with a corresponding height of 0.01. It should be noted that the data in this embodiment is for illustrative purposes only and is not actual data.

[0093] It's important to note that the number of slice layers added to each horizontal ridge area is different and needs to be determined based on the height of each ridge area. For example, combining... Figure 6 As shown, Figure 6 This is a schematic diagram of the striated region segmentation in another embodiment.

[0094] For example, if the tilt angle is β, then the height corresponding to the second sub-interval 1 is used to add a slice layer.

[0095] In the above embodiments, by combining the preset slicing intervals of distance and tilt angle, slicing adjustment is performed in the ribbed area, which can significantly improve the surface quality and printing efficiency of 3D printing, while also enhancing design flexibility and adaptability.

[0096] Furthermore, in conjunction with the second preset segmentation interval, the second sub-interval corresponding to the tilt angle is determined, including: sorting the second sub-intervals in the second preset segmentation interval in ascending order to obtain the second preset sorting interval; comparing the tilt angle with each of the second sub-intervals in the second preset sorting interval in turn to determine the second sub-interval corresponding to the tilt angle.

[0097] In this embodiment, the second sub-intervals within the second preset segmentation interval are sorted in ascending order to obtain the second preset sorting interval. This is to prioritize layer cutting with smaller heights. By prioritizing layer cutting with smaller heights, the thickness of each layer can be refined, resulting in a smoother and more delicate surface of the printed model, reducing layer lines and irregular surface defects.

[0098] After obtaining the second preset sorting interval, the tilt angle is compared with each of the second sub-intervals in the second preset sorting interval. At this time, there may be tilt angles that belong to multiple eligible sub-intervals. For example, second sub-interval 1 and second sub-interval 2.

[0099] For example, continuing with the example in the above embodiment, the tilt angle is β. When compared with the second sub-interval 1, β includes the angle range of the second sub-interval 1, so it is determined that the tilt angle matches the second sub-interval 1. Continuing to compare with the next second sub-interval, if β is within the angle range of the second sub-interval 2, then it is determined that β matches the second sub-interval 2. At this point, matching with the next second sub-interval stops. This is because, at this time, the tilt angle belongs to the second sub-interval, and its relationship with the next second sub-interval is an empty set.

[0100] Furthermore, based on the height corresponding to the second sub-interval, a slice layer is added to the ribbed region according to the height, including: when the tilt angle matches the current second sub-interval, a slice layer is added to the ribbed region according to the height corresponding to the current second sub-interval to obtain the first slice position; the tilt angle is compared with the next second sub-interval, and when the tilt angle matches the next second sub-interval, a slice layer is added to the ribbed region according to the first slice position and the height corresponding to the next second sub-interval.

[0101] When the tilt angle matches the current second sub-interval, a slice layer is added to the ribbed area according to the height corresponding to the current second sub-interval. Referring to the example in the above embodiment, β includes the angle range of second sub-interval 1, so the tilt angle is determined to match second sub-interval 1. Using the height corresponding to second sub-interval 1, i.e., 0.06, a slice layer is added to the ribbed area and marked as the first slice position. Continuing the comparison with the next second sub-interval, if β is within the angle range of second sub-interval 2, then β is determined to match second sub-interval 2. A slice layer is then added based on the first slice position and the height corresponding to second sub-interval 2. That is, a slice layer is added at the first slice position + 0.02.

[0102] In the above embodiments, by adding slice layers sequentially according to the height corresponding to the second sub-interval, the height of the slice layers can be refined, thereby improving surface smoothness and detail.

[0103] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0104] Based on the same inventive concept, this application also provides a horizontal line processing apparatus for implementing the horizontal line processing method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations of one or more horizontal line processing apparatus embodiments provided below can be found in the limitations of the horizontal line processing method described above, and will not be repeated here.

[0105] In one exemplary embodiment, such as Figure 7 As shown, a horizontal stripe processing device is provided, including: an acquisition module, a position determination module, and a slicing module, wherein:

[0106] The acquisition module 710 is used to acquire the 3D model of the object to be printed; the 3D model includes multiple slice layers.

[0107] The location determination module 720 is used to determine the striation region by the distance between each adjacent slice layer in the 3D model.

[0108] The slicing module 730 is used to slice the slicing region by combining the distance of the slicing region with the preset slicing interval.

[0109] In one embodiment, the location determination module includes:

[0110] The initial calculation unit is used to calculate the initial contour difference between each adjacent slice.

[0111] The bias unit is used to scale the initial contour difference according to a preset threshold to obtain the scaling result.

[0112] The first determining unit is used to determine adjacent slices whose scaling results are not empty as striped regions.

[0113] In one embodiment, the above-mentioned slicing module includes:

[0114] The target calculation unit is used to calculate the target contour difference between adjacent slices after scaling.

[0115] The first interval determination unit is used to calculate the target contour difference between adjacent slices after scaling.

[0116] The first slice addition unit is used to increase the number of slice layers in the ribbed region according to the value corresponding to the first sub-interval.

[0117] In one embodiment, the location determination module includes:

[0118] The vector calculation unit is used to calculate the normal vectors of the triangular faces between each adjacent slice.

[0119] Angle calculation unit, used to obtain the tilt angle of the triangular facet based on the normal vector.

[0120] The second determining unit is used to determine adjacent slices with a tilt angle greater than a preset angle as horizontal stripe regions.

[0121] In one embodiment, the above-mentioned slicing module further includes:

[0122] The second interval determination unit is used to determine the second sub-interval corresponding to the tilt angle by combining the second preset segmentation interval.

[0123] The second slice addition unit is used to determine the height corresponding to the second sub-interval and add slice layers in the ribbed area according to the height.

[0124] In one embodiment, the second interval determination unit includes:

[0125] The sorting sub-unit is used to sort the second sub-interval in the second preset division interval in ascending order to obtain the second preset sorting interval.

[0126] The comparison sub-unit is used to compare the tilt angle with each of the second sub-intervals in the second preset sorting interval in turn to determine the second sub-interval corresponding to the tilt angle.

[0127] In one embodiment, the second slice adding unit includes:

[0128] The first position sub-unit is used to add a slice layer in the ribbed area according to the height corresponding to the current second sub-interval when the tilt angle matches the current second sub-interval, so as to obtain the first slice position.

[0129] The second position sub-unit is used to compare the tilt angle with the next second sub-interval. When the tilt angle matches the next second sub-interval, a slice layer is added to the ribbed area according to the first slice position and the height corresponding to the next second sub-interval.

[0130] Each module in the aforementioned horizontal stripe processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0131] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores 3D model data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a texturing method.

[0132] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring a three-dimensional model of an object to be printed; the three-dimensional model includes multiple slice layers; determining a ribbed region by the distance between each adjacent slice layer in the three-dimensional model; and slicing the ribbed region by combining the distance corresponding to the ribbed region with the preset slicing interval.

[0134] In one embodiment, when the processor executes the computer program, it further performs the following steps: calculating the initial contour difference between each adjacent slice; scaling the initial contour difference according to a preset threshold to obtain a scaling result; and identifying adjacent slices whose scaling result is not empty as striated regions.

[0135] In one embodiment, when the processor executes the computer program, it further performs the following steps: calculating the target contour difference between each adjacent slice after scaling; determining the first sub-interval corresponding to the target contour difference by combining the first preset segmentation interval; and increasing the number of slice layers in the striated region according to the value corresponding to the first sub-interval.

[0136] In one embodiment, when the processor executes the computer program, it further performs the following steps: calculating the normal vectors of the triangular facets between each adjacent slice; obtaining the tilt angle of the triangular facets based on the normal vectors; and identifying adjacent slices with tilt angles greater than a preset angle as striated regions.

[0137] In one embodiment, when the processor executes the computer program, it further performs the following steps: combining the second preset segmentation interval, determining the second sub-interval corresponding to the tilt angle; determining the height corresponding to the second sub-interval, and adding a slice layer in the ribbed area according to the height.

[0138] In one embodiment, when the processor executes the computer program, it further performs the following steps: sorting the second sub-intervals in the second preset segmentation interval in ascending order to obtain a second preset sorting interval; comparing the tilt angle with each of the second sub-intervals in the second preset sorting interval in turn to determine the second sub-interval corresponding to the tilt angle.

[0139] In one embodiment, when the processor executes the computer program, it further implements the following steps: when the tilt angle matches the current second sub-interval, a slice layer is added to the ribbed region according to the height corresponding to the current second sub-interval to obtain the first slice position; the tilt angle is compared with the next second sub-interval, and when the tilt angle matches the next second sub-interval, a slice layer is added to the ribbed region according to the first slice position and the height corresponding to the next second sub-interval.

[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: a three-dimensional model of an object to be printed; the three-dimensional model includes multiple slice layers; the horizontal stripe region is determined by the distance between each adjacent slice layer in the three-dimensional model; and the horizontal stripe region is sliced ​​by combining the preset slicing interval where the distance corresponding to the horizontal stripe region is located.

[0141] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: calculating the initial contour difference between each adjacent slice; scaling the initial contour difference according to a preset threshold to obtain a scaling result; and identifying adjacent slices whose scaling result is not empty as striated regions.

[0142] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: calculating the target contour difference between adjacent slices after scaling; determining the first sub-interval corresponding to the target contour difference by combining the first preset segmentation interval; and increasing the number of slice layers in the ribbed region according to the value corresponding to the first sub-interval.

[0143] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: calculating the normal vectors of the triangular facets between each adjacent slice; obtaining the tilt angle of the triangular facets based on the normal vectors; and identifying adjacent slices with tilt angles greater than a preset angle as striated regions.

[0144] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: combining the second preset segmentation interval, determining the second sub-interval corresponding to the tilt angle; determining the height corresponding to the second sub-interval, and adding a slice layer in the ribbed area according to the height.

[0145] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: sorting the second sub-intervals in the second preset segmentation interval in ascending order to obtain a second preset sorting interval; comparing the tilt angle with each of the second sub-intervals in the second preset sorting interval in turn to determine the second sub-interval corresponding to the tilt angle.

[0146] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: when the tilt angle matches the current second sub-interval, a slice layer is added to the ribbed region according to the height corresponding to the current second sub-interval to obtain the first slice position; the tilt angle is compared with the next second sub-interval, and when the tilt angle matches the next second sub-interval, a slice layer is added to the ribbed region according to the first slice position and the height corresponding to the next second sub-interval.

[0147] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring a three-dimensional model of an object to be printed; the three-dimensional model includes multiple slice layers; determining a ribbed region by the distance between adjacent slice layers in the three-dimensional model; and slicing the ribbed region by combining the distance corresponding to the ribbed region with the preset slicing interval.

[0148] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: calculating the initial contour difference between each adjacent slice; scaling the initial contour difference according to a preset threshold to obtain a scaling result; and identifying adjacent slices whose scaling result is not empty as striated regions.

[0149] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: calculating the target contour difference between adjacent slices after scaling; determining the first sub-interval corresponding to the target contour difference by combining the first preset segmentation interval; and increasing the number of slice layers in the ribbed region according to the value corresponding to the first sub-interval.

[0150] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: calculating the normal vectors of the triangular facets between each adjacent slice; obtaining the tilt angle of the triangular facets based on the normal vectors; and identifying adjacent slices with tilt angles greater than a preset angle as striated regions.

[0151] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: combining the second preset segmentation interval, determining the second sub-interval corresponding to the tilt angle; determining the height corresponding to the second sub-interval, and adding a slice layer in the ribbed area according to the height.

[0152] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: sorting the second sub-intervals in the second preset segmentation interval in ascending order to obtain a second preset sorting interval; comparing the tilt angle with each of the second sub-intervals in the second preset sorting interval in turn to determine the second sub-interval corresponding to the tilt angle.

[0153] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: when the tilt angle matches the current second sub-interval, a slice layer is added to the ribbed region according to the height corresponding to the current second sub-interval to obtain the first slice position; the tilt angle is compared with the next second sub-interval, and when the tilt angle matches the next second sub-interval, a slice layer is added to the ribbed region according to the first slice position and the height corresponding to the next second sub-interval.

[0154] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0155] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0156] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for processing horizontal lines, characterized in that, The method includes: Obtain a 3D model of the object to be printed; the 3D model includes multiple slice layers; The horizontal stripe region is determined by the distance between each adjacent slice layer in the three-dimensional model; The horizontal stripe region is sliced ​​based on the preset segmentation interval corresponding to the distance of the horizontal stripe region; Determining the striation region by the distance between adjacent slice layers in the three-dimensional model includes: Calculate the initial contour difference between each of the adjacent slices; The initial contour difference is scaled according to a preset threshold to obtain the scaling result; The adjacent slices whose scaling result is not empty are identified as the horizontal stripe region; The preset segmentation interval includes a first preset segmentation region; the first preset segmentation region includes multiple first sub-intervals; the step of slicing the horizontal ridge region based on the preset segmentation interval where the distance of the horizontal ridge region is located includes: Calculate the target contour difference between each of the adjacent slices after scaling; Based on the first preset segmentation region, determine the first sub-interval corresponding to the target contour difference; Based on the value corresponding to the first sub-interval, the number of slice layers is increased in the ribbed region.

2. The method for processing horizontal lines according to claim 1, characterized in that, The distance is calculated based on the tilt angle; determining the striation region by the distance between adjacent slice layers in the three-dimensional model includes: Calculate the normal vectors of the triangular faces between each of the adjacent slices; The tilt angle of the triangular facet is obtained based on the normal vector. The adjacent slices with a tilt angle greater than a preset angle are identified as the horizontal stripe region; The preset segmentation interval includes a second preset segmentation region; the second preset segmentation region includes multiple second sub-intervals; the step of slicing the horizontal ridge region based on the preset segmentation interval where the distance of the horizontal ridge region is located includes: Based on the second preset segmentation region, determine the second sub-interval corresponding to the tilt angle; Determine the height corresponding to the second sub-interval, and add the slice layer to the horizontal stripe area according to the height.

3. The method for processing horizontal lines according to claim 2, characterized in that, The step of determining the second sub-interval corresponding to the tilt angle by combining the second preset segmentation region includes: Sort the second sub-intervals in the second preset segmentation region in ascending order to obtain the second preset sorting interval; The tilt angle is compared sequentially with each of the second sub-intervals in the second preset sorting interval to determine the second sub-interval corresponding to the tilt angle.

4. The method for processing horizontal lines according to claim 3, characterized in that, The step of adding the slice layer to the horizontal stripe area according to the height corresponding to the second sub-interval includes: When the tilt angle matches the current second sub-interval, the slice layer is added to the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain the first slice position; The tilt angle is compared with the next second sub-interval. When the tilt angle matches the next second sub-interval, the slice layer is added to the ribbed area according to the first slice position and the height corresponding to the next second sub-interval.

5. A transverse stripe treatment device, characterized in that, The apparatus is used to perform the steps of the method according to any one of claims 1 to 4.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • 3D printing self-adaptive layering method based on STL model patch normal vector

    CN113134975A

  • 3D printing data processing method and 3D printing method and device

    CN113524688A