Cross grain processing method and device, computer equipment, readable storage medium and program product

By determining and processing the transverse grain areas in 3D printing, the transverse grain problems in 3D printing are solved by increasing the number of slice layers or adding slice layers, and the printing quality and surface details are improved.

CN119058099AActive Publication Date: 2024-12-03SHANGHAI UNION TECH
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

During the 3D printing process, the transverse pattern caused by layer-by-layer printing on the model surface is difficult to meet the printing quality requirements, affecting the surface smoothness and detailed performance.

Method used

By obtaining the distance between adjacent slice layers in the three-dimensional model, determine the cross-grain area, and slice the cross-grain area according to the preset slicing interval, increasing the number of slice layers or adding slice layers at a specific height to reduce the cross-grain Appear.

Benefits of technology

Effectively reduce cross-grain, improve model printing quality, improve surface smoothness and detail performance, and enhance design flexibility and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119058099A_ABST
    Figure CN119058099A_ABST
Patent Text Reader

Abstract

The invention relates to a cross grain processing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a three-dimensional model of a to-be-printed object; the three-dimensional model comprises a plurality of slice layers; determining a cross grain area according to the distance between every two adjacent slice layers in the three-dimensional model; and in combination with a preset segmentation interval where the distance corresponding to the cross grain area is located, the cross grain area is sliced. By adopting the method, the cross grain can be treated to meet the printing quality requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D printing, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for processing horizontal grains. Background Art

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

[0003] In the 3D printing process, each cross section of the model is printed layer by layer. This layer-by-layer printing method inevitably causes horizontal stripes to appear on the surface of the model. This phenomenon is called "horizontal stripes", which is particularly obvious when the side of the model is an inclined surface. "Horizontal stripes" make the surface of the printout have an obvious layered structure, which makes it difficult to meet the quality requirements of printing. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for processing horizontal stripes to meet the printing quality requirements in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a method for processing horizontal lines, the method comprising:

[0006] Acquire a three-dimensional model of an object to be printed; the three-dimensional model includes a plurality of slice layers;

[0007] Determine the cross-striped area by the distance between each adjacent slice layer in the three-dimensional model;

[0008] The horizontal stripe area is sliced ​​according to the preset segmentation interval in which the distance corresponding to the horizontal stripe area is located.

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

[0010] Calculating initial contour differences between each of the adjacent slices;

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

[0012] The adjacent slices whose scaling results are not empty are determined as the horizontal stripe area.

[0013] In one embodiment, the preset segmentation area includes a first preset segmentation area; the first preset segmentation area includes a plurality of first sub-intervals; and slicing the horizontal stripe area in combination with the preset segmentation interval in which the distance of the horizontal stripe area is located includes:

[0014] Calculating the target contour difference between the adjacent slices after scaling;

[0015] Determine the first sub-interval corresponding to the target contour difference in combination with the first preset segmentation interval;

[0016] According to the value corresponding to the first sub-interval, the number of slice layers is increased in the horizontal stripe area.

[0017] In one embodiment, the distance is calculated based on the tilt angle; and determining the cross-striped area by the distance between each adjacent slice layer in the three-dimensional model includes:

[0018] Calculate the normal vectors of the triangles between the adjacent slices;

[0019] Obtaining the inclination angle of the triangular face according to the normal vector;

[0020] The adjacent slices whose inclination angle is greater than a preset angle are determined as the horizontal stripe area.

[0021] In one embodiment, the preset segmentation area includes a second preset segmentation area; the second preset segmentation area includes a plurality of second sub-intervals; and slicing the horizontal stripe area in combination with the preset segmentation interval in which the distance of the horizontal stripe area is located includes:

[0022] Determine the second sub-interval corresponding to the tilt angle in combination with the second preset segmentation interval;

[0023] A height corresponding to the second sub-interval is determined, and the slice layer is added in the horizontal stripe area according to the height.

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

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

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

[0027] In one embodiment, adding the slice layer in the horizontal stripe area according to the height corresponding to the second sub-interval and the height includes:

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

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

[0030] In a second aspect, the present application provides a device for processing horizontal lines, the device comprising:

[0031] An acquisition module, used to acquire a three-dimensional model of an object to be printed; the three-dimensional model includes a plurality of slice layers;

[0032] A position determination module, used to determine the cross-striped area by the distance between each adjacent slice layer in the three-dimensional model;

[0033] The slicing module is used to slice the horizontal stripe area in combination with the preset segmentation interval of the distance at the horizontal stripe area.

[0034] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0036] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0037] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for processing horizontal stripes can accurately determine the horizontal stripe area through the distance between each adjacent slice layer in the three-dimensional model, and then slice the horizontal stripe area according to the slicing strategy corresponding to the preset segmentation interval corresponding to the distance of the horizontal stripe area, which can effectively reduce the horizontal stripes and thus improve the printing quality of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic diagram of a process for treating horizontal lines in one embodiment;

[0040] Figure 2 is a schematic plan view of a three-dimensional model in one embodiment;

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

[0042] Figure 4 A schematic diagram of a horizontal stripe area after segmentation in one embodiment;

[0043] Figure 5 A schematic diagram of a triangular face in a three-dimensional model;

[0044] Figure 6 is a schematic diagram of a horizontal stripe area after segmentation in another embodiment;

[0045] Figure 7 is a structural block diagram of a device for processing horizontal lines in one embodiment;

[0046] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

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

[0049] In an exemplary embodiment, Figure 1 As shown, a method for processing horizontal lines is provided, including the following steps 102 to 106. Among them:

[0050] Step S102, obtaining a three-dimensional model of the object to be printed; the three-dimensional model includes multiple slice layers.

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

[0052] Optionally, converting the object to be printed into a three-dimensional model is a key step in 3D printing. Exemplarily, a three-dimensional model of the object to be printed can be created using 3D modeling software such as Blender, Fusion 360, Tinkercad, etc.

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

[0054] Step 104: determine the horizontal stripe area by the distance between each adjacent slice layer in the three-dimensional model.

[0055] The height difference between adjacent layers in the 3D printing process will directly affect the surface quality of the print. This is because each layer is a two-dimensional slice. When stacked together, a stepped texture, that is, horizontal stripes, will be formed on the surface. For example, the greater the layer thickness, the greater the distance between the layers, that is, the height difference, the more obvious the step effect, resulting in more obvious horizontal stripes. Therefore, the distance between adjacent slice layers can be used to determine whether there are horizontal stripes.

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

[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 on the tilted surface, the actual height difference of adjacent slices is greater than the standard layer thickness. Therefore, the distance between each adjacent slice layer can be accurately determined by the tilt angle between adjacent slice layers. Exemplary, combined with Figure 3 As shown, Figure 3 A schematic diagram of a three-dimensional model in an embodiment. Figure 3 Darker areas in the middle represent greater angles; at the top and bottom of the model, the larger the surface, the greater the angle of inclination.

[0058] Step 106 , slicing the horizontal stripe area in combination with the preset segmentation interval of the distance corresponding to the horizontal stripe area.

[0059] The preset segmentation area is a plurality of segmentation intervals defined in advance, and each interval corresponds to a different segmentation strategy.

[0060] Optionally, the distance of the horizontal stripe area is matched with a preset segmentation interval to find a corresponding interval. According to the matched segmentation interval, the slicing strategy of the area is adjusted, for example, the layer thickness is reduced to eliminate the horizontal stripes.

[0061] Exemplarily, in combination with the examples in the above embodiments, matching can be performed according to the preset segmentation areas where the contour difference or the tilt angle is located, and then the horizontal stripe area can be segmented according to different segmentation strategies corresponding to the intervals.

[0062] Further, the slicing strategy can be to increase the number of slice layers or add slice layers at a specified height. Increasing the number of slice layers can reduce the thickness of each layer, making the transition between layers smoother, thereby 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 stripes, the horizontal stripe area is accurately determined by the distance between each adjacent slice layer in the three-dimensional model, and then the horizontal stripe area is sliced ​​according to the slicing strategy corresponding to the preset segmentation interval corresponding to the distance of the horizontal stripe area, which can effectively reduce the horizontal stripes and thus improve the model printing quality.

[0064] In one embodiment, a method for determining a horizontal stripe area based on a contour difference area is provided.

[0065] The horizontal stripe area is determined by the distance between each adjacent slice layer in the three-dimensional model, including: 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 determining the adjacent slices whose scaling results are not empty as the horizontal stripe area.

[0066] In this embodiment, whether adjacent slices are horizontal stripe regions is determined by using contour differences.

[0067] Alternatively, assuming that the slice contours of the model at different layer heights (Z coordinates) are known, the contour difference can be calculated by the following formula:

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

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

[0070] Exemplarily, the distance calculation is performed on the point sets of the contours of adjacent slice layers. For example, the contour coordinates of two adjacent layers, that is, the X and Y coordinates, have been extracted, and the contour difference can be calculated by comparing the boundary shapes of each layer.

[0071] Exemplarily, 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] Further, in this embodiment, if there is an initial contour difference between adjacent slices, they are offset, that is, a scaling operation is performed. The scaling operation can be an inward reduction or an outward enlargement. The inward reduction will make the new shape closer to the center of the original shape, while the outward scaling will make the new shape away from the center of the original shape.

[0073] When performing the scaling operation, scaling is performed according to the preset threshold. For example, if the initial contour difference is A1, scaling is performed using the preset threshold corresponding to A1. In other embodiments, if the initial contour difference is A2, scaling is performed using the preset threshold corresponding to A2.

[0074] After scaling the initial contour difference, a scaling result is obtained, and the scaling result refers to whether there is a contour difference. If the scaling result is not empty, that is, there is still a contour difference after the scaling operation, the adjacent slice is determined as a horizontal stripe area.

[0075] In the above embodiment, by calculating the initial contour difference, performing scaling processing, and determining the horizontal stripe area, the area where horizontal stripes are likely to be generated can be effectively identified.

[0076] Furthermore, the above-mentioned preset segmentation area includes a first preset segmentation area; the first preset segmentation area includes multiple first sub-intervals; the horizontal stripe area is sliced ​​in combination with the preset segmentation interval in which the distance of the horizontal stripe area is located, including: calculating the target contour difference between adjacent slices after scaling; determining the first sub-interval corresponding to the target contour difference in combination with the first preset segmentation interval; and increasing the number of slice layers in the horizontal stripe area according to the numerical value corresponding to the first sub-interval.

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

[0078] The first preset segmentation region includes a plurality of first sub-intervals, each of which corresponds to a value. Preset segmentation region = [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, and the initial contour difference refers to the contour difference calculated before scaling.

[0080] For example, the target contour difference is a, the first sub-interval 1 is divided into two equal parts, the first sub-interval 2 is divided into three equal parts, and the first sub-interval 3 is divided into four equal parts. If the target contour difference matches the first sub-interval 2, two slice layers are added to the horizontal stripe area, that is, slice layers are added at 1 / 3 and 2 / 3. Figure 4 As shown, Figure 4 It is a schematic diagram of the horizontal stripe area after segmentation in one embodiment.

[0081] One point that needs to be explained is that compared with the prior art, the present embodiment adopts a cyclic segmentation method, that is, the target contour difference is compared with the preset comparison threshold. If it does not meet the requirement, the horizontal stripe area is divided into two equal parts, and then the target contour difference is calculated and compared with the preset comparison threshold. If it still does not meet the requirement, the horizontal stripe area is further divided into two equal parts until the target contour difference meets the preset comparison threshold. The present embodiment avoids the process of repeated bisection and multiple comparisons by calculating the target contour difference once and directly matching the preset segmentation interval, thereby significantly reducing the number of calculations and time. In addition, by presetting the segmentation interval, it can be flexibly adjusted according to different models and printing requirements, thereby improving the applicability and accuracy of the method. Directly matching the segmentation interval according to the target contour difference can more accurately determine the area that needs to be optimized, avoid errors that may be introduced during the cyclic segmentation process, and improve the accuracy of the slices.

[0082] In the above embodiment, the target contour difference and the preset segmentation interval are combined to accurately determine the number of slice layers to increase in the horizontal stripe area, which can significantly reduce the horizontal stripes.

[0083] In yet another embodiment, a method for determining a horizontal stripe area based on a tilt angle is provided.

[0084] Among them, the distance is calculated based on the inclination angle; the horizontal stripe area is determined by the distance between each adjacent slice layer in the three-dimensional model, including: calculating the normal vector of the triangular facet between each adjacent slice; obtaining the inclination angle of the triangular facet according to the normal vector; and determining the adjacent slices with an inclination angle greater than a preset angle as the horizontal stripe area.

[0085] Among them, a triangle is composed of three vertices, and a triangle can be defined by these vertices. Figure 5 As shown, Figure 5 A schematic diagram of a triangular patch in a three-dimensional model. Figure 5 Each triangle in is a triangular patch.

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

[0087] Optionally, the angle between the normal vector and the horizontal plane normal vector is calculated by the dot product. This angle is the tilt angle of the triangle. It should be noted that the calculated angle is usually a radian value, which can be converted into an angle value for easy understanding and application.

[0088] Optionally, the tilt angle is compared with a preset angle, and if the tilt angle is greater than the preset angle, the adjacent slice where the triangle is located is considered to be a horizontal stripe area. The preset angle is obtained based on expert experience and can also be set according to actual application scenarios.

[0089] In the above embodiment, by calculating the normal vectors of the triangular facets between adjacent slices and further calculating their inclination angles, it is possible to determine which areas have inclination angles greater than a preset threshold, thereby effectively identifying areas prone to horizontal stripes.

[0090] Furthermore, the preset cutting area includes a second preset cutting area; the second preset cutting area includes multiple second sub-intervals; the horizontal stripe area is sliced ​​in combination with the preset cutting interval in which the distance of the horizontal stripe area is located, including: determining the second sub-interval corresponding to the inclination angle in combination with the second preset cutting interval; determining the height corresponding to the second sub-interval, and adding a slicing layer in the horizontal stripe area according to the height.

[0091] The second preset segmentation area includes a plurality of second sub-intervals, each of which corresponds to a height. Preset segmentation area = [second sub-interval 1, second sub-interval 2, ..., second sub-interval n].

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

[0093] It should be noted that the slice layers added to each horizontal stripe area are different and need to be determined in combination with the height of each horizontal stripe area. Figure 6 As shown, Figure 6 A schematic diagram of dividing the horizontal stripe area in another embodiment.

[0094] Exemplarily, when the tilt angle is β, the slice layer is added using the height corresponding to the second sub-interval 1.

[0095] In the above embodiment, by combining the preset segmentation intervals of distance and tilt angle, slicing adjustment is performed in the horizontal stripe area, which can significantly improve the surface quality and printing efficiency of 3D printing, and at the same time enhance the design flexibility and adaptability.

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

[0097] In this embodiment, the second sub-interval in the second preset segmentation interval is sorted in ascending order to obtain the second preset sorting interval, so as to give priority to slicing layers at a smaller height. In this way, by giving priority to slicing layers at a smaller height, the thickness of each layer can be refined, making the surface of the printed model smoother and more delicate, and reducing layer lines and irregular surface defects.

[0098] After obtaining the second preset sorting interval, the tilt angle is sequentially compared with each second sub-interval in the second preset sorting interval. At this time, there may be a tilt angle that belongs to multiple qualified sub-intervals, for example, second sub-interval 1 and second sub-interval 2.

[0099] Exemplarily, in combination 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, and it is determined that the tilt angle matches the second sub-interval 1. Continuing to compare with the next second sub-interval, β is within the angle range of the second sub-interval 2, and it is determined that β matches the second sub-interval 2, and the matching with the next second sub-interval is stopped at this time. 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, according to the height corresponding to the second sub-interval, a slice layer is added in the horizontal stripe area according to the height, including: when the inclination angle matches the current second sub-interval, a slice layer is added in the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain a first slice position; the inclination angle is compared with the next second sub-interval, and when the inclination angle matches the next second sub-interval, a slice layer is added in the horizontal stripe area 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 horizontal stripe area according to the height corresponding to the current second sub-interval. In combination with the example in the above embodiment, β includes the angle range of the second sub-interval 1, and the tilt angle is determined to match the second sub-interval 1. The height corresponding to the second sub-interval 1, i.e. 0.06, is used to add a slice layer to the horizontal stripe area and mark it as the first slice position. Continue to compare with the next second sub-interval. If β is within the angle range of the second sub-interval 2, it is determined that β matches the second sub-interval 2, and a slice layer is added based on the first slice position and the height corresponding to the second sub-interval 2. That is, a slice layer is added at the first slice position + 0.02.

[0102] In the above embodiment, by sequentially adding slice layers according to the height corresponding to the second sub-interval, the slice layer height can be refined to improve the surface smoothness and detail expression.

[0103] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0104] Based on the same inventive concept, the embodiment of the present application also provides a horizontal grain processing device for implementing the horizontal grain processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more horizontal grain processing device embodiments provided below can refer to the limitations of the horizontal grain processing method above, and will not be repeated here.

[0105] In an exemplary embodiment, Figure 7 As shown, a device for processing horizontal lines is provided, comprising: an acquisition module, a position determination module and a slicing module, wherein:

[0106] The acquisition module 710 is used to acquire a three-dimensional model of the object to be printed; the three-dimensional model includes multiple slice layers.

[0107] The position determination module 720 is used to determine the cross-striped area according to the distance between each adjacent slice layer in the three-dimensional model.

[0108] The slicing module 730 is used to slice the horizontal stripe area according to the preset segmentation interval of the distance at the horizontal stripe area.

[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 value to obtain a scaling result.

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

[0113] In one embodiment, the 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 adding unit is used to increase the number of slice layers in the horizontal stripe area 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 triangles between adjacent slices.

[0119] The angle calculation unit is used to obtain the tilt angle of the triangle according to the normal vector.

[0120] The second determining unit is configured to determine adjacent slices whose inclination angle is greater than a preset angle as a horizontal stripe area.

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

[0122] The second interval determining unit is used to determine a second sub-interval corresponding to the tilt angle in combination with the second preset segmentation interval.

[0123] The second slice adding unit is used to determine the height corresponding to the second sub-interval, and add a slice layer in the horizontal stripe area according to the height.

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

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

[0126] The comparison subunit is used to compare the tilt angle with each second sub-interval in the second preset sorting interval in sequence 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 subunit is used to add a slice layer in the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain a first slice position when the tilt angle matches the current second sub-interval.

[0129] The second position subunit is used to compare the tilt angle with the next second sub-interval, and when the tilt angle matches the next second sub-interval, add a slice layer in the horizontal stripe area according to the first slice position and the height corresponding to the next second sub-interval.

[0130] Each module in the above-mentioned horizontal stripe processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0131] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store three-dimensional model data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing horizontal stripes is implemented.

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

[0133] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a three-dimensional model of an object to be printed; the three-dimensional model includes multiple slice layers; determining a horizontal stripe area by the distance between each adjacent slice layer in the three-dimensional model; and slicing the horizontal stripe area in combination with a preset segmentation interval corresponding to the distance of the horizontal stripe area.

[0134] In one embodiment, when the processor executes the computer program, the following steps are further implemented: 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 determining the adjacent slices whose scaling results are not empty as the horizontal stripe area.

[0135] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the target contour difference between adjacent slices after scaling; determining the first sub-interval corresponding to the target contour difference in combination with the first preset segmentation interval; and increasing the number of slice layers in the horizontal stripe area according to the numerical value corresponding to the first sub-interval.

[0136] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the normal vector of the triangular facets between each adjacent slice; obtaining the inclination angle of the triangular facet according to the normal vector; and determining the adjacent slices with an inclination angle greater than a preset angle as a horizontal stripe area.

[0137] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining a second sub-interval corresponding to the tilt angle in combination with a second preset segmentation interval; determining a height corresponding to the second sub-interval, and adding a slice layer in the horizontal stripe area according to the height.

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

[0139] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the tilt angle matches the current second sub-interval, a slice layer is added in the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain a 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 in the horizontal stripe area 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, the following steps are implemented: a three-dimensional model of an object to be printed; the three-dimensional model includes multiple slice layers; the horizontal stripe area is determined by the distance between each adjacent slice layer in the three-dimensional model; and the horizontal stripe area is sliced ​​in combination with the preset segmentation interval corresponding to the distance of the horizontal stripe area.

[0141] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: 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 determining the adjacent slices whose scaling results are not empty as the horizontal stripe area.

[0142] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the target contour difference between adjacent slices after scaling; determining the first sub-interval corresponding to the target contour difference in combination with the first preset segmentation interval; and increasing the number of slice layers in the horizontal stripe area according to the numerical value corresponding to the first sub-interval.

[0143] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the normal vector of the triangular facets between each adjacent slice; obtaining the inclination angle of the triangular facet according to the normal vector; and determining the adjacent slices with an inclination angle greater than a preset angle as a horizontal stripe area.

[0144] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining a second sub-interval corresponding to the tilt angle in combination with a second preset segmentation interval; determining a height corresponding to the second sub-interval, and adding a slice layer in the horizontal stripe area according to the height.

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

[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the tilt angle matches the current second sub-interval, a slice layer is added in the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain a 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 in the horizontal stripe area 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, which, when executed by a processor, implements the following steps: obtaining a three-dimensional model of an object to be printed; the three-dimensional model includes multiple slice layers; determining a horizontal stripe area by the distance between each adjacent slice layer in the three-dimensional model; and slicing the horizontal stripe area in combination with a preset segmentation interval corresponding to the distance of the horizontal stripe area.

[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: 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 determining the adjacent slices whose scaling results are not empty as the horizontal stripe area.

[0149] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the target contour difference between adjacent slices after scaling; determining the first sub-interval corresponding to the target contour difference in combination with the first preset segmentation interval; and increasing the number of slice layers in the horizontal stripe area according to the numerical value corresponding to the first sub-interval.

[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the normal vector of the triangular facets between each adjacent slice; obtaining the inclination angle of the triangular facet according to the normal vector; and determining the adjacent slices with an inclination angle greater than a preset angle as a horizontal stripe area.

[0151] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining a second sub-interval corresponding to the tilt angle in combination with a second preset segmentation interval; determining a height corresponding to the second sub-interval, and adding a slice layer in the horizontal stripe area according to the height.

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

[0153] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the tilt angle matches the current second sub-interval, a slice layer is added in the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain a 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 in the horizontal stripe area according to the first slice position and the height corresponding to the next second sub-interval.

[0154] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0155] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for processing horizontal grains, characterized in that: The method comprises: Acquire a three-dimensional model of an object to be printed; the three-dimensional model includes a plurality of slice layers; Determine the cross-striped area by the distance between each adjacent slice layer in the three-dimensional model; The horizontal stripe area is sliced ​​according to the preset segmentation interval in which the distance corresponding to the horizontal stripe area is located.

2. The method for processing horizontal lines according to claim 1, characterized in that: Determining the horizontal stripe area by the distance between each adjacent slice layer in the three-dimensional model includes: Calculating initial contour differences between each of the adjacent slices; Scaling the initial contour difference according to a preset threshold to obtain a scaling result; The adjacent slices whose scaling results are not empty are determined as the horizontal stripe area.

3. The method for processing horizontal lines according to claim 2, characterized in that: The preset segmentation area includes a first preset segmentation area; the first preset segmentation area includes a plurality of first sub-intervals; and slicing the horizontal stripe area according to the preset segmentation interval in which the distance of the horizontal stripe area is located includes: Calculating the target contour difference between the adjacent slices after scaling; Determine the first sub-interval corresponding to the target contour difference in combination with the first preset segmentation interval; According to the value corresponding to the first sub-interval, the number of slice layers is increased in the horizontal stripe area.

4. The method for processing horizontal lines according to claim 1, characterized in that: The distance is calculated based on the tilt angle; and the step of determining the cross-striped area based on the distance between adjacent slice layers in the three-dimensional model includes: Calculate the normal vectors of the triangles between the adjacent slices; Obtaining the inclination angle of the triangular face according to the normal vector; The adjacent slices whose inclination angle is greater than a preset angle are determined as the horizontal stripe area.

5. The method for processing horizontal lines according to claim 4, characterized in that: The preset segmentation area includes a second preset segmentation area; The second preset segmentation area includes a plurality of second sub-intervals; and the step of slicing the horizontal stripe area in combination with the preset segmentation interval in which the distance of the horizontal stripe area is located includes: Determine the second sub-interval corresponding to the tilt angle in combination with the second preset segmentation interval; A height corresponding to the second sub-interval is determined, and the slice layer is added in the horizontal stripe area according to the height.

6. The method for processing horizontal lines according to claim 5, characterized in that: The determining the second sub-interval corresponding to the tilt angle in combination with the second preset segmentation interval includes: Sorting the second sub-intervals in the second preset segmentation interval in ascending order to obtain a second preset sorting interval; The tilt angle is compared with each of the second sub-intervals in the second preset sorting interval in sequence to determine the second sub-interval corresponding to the tilt angle.

7. The method for processing horizontal lines according to claim 6, characterized in that: The adding the slice layer in the horizontal stripe area according to the height corresponding to the second sub-interval and the height includes: When the tilt angle matches the current second sub-interval, adding the slice layer in the horizontal stripe area according to the height corresponding to the current second sub-interval to obtain a 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, the slice layer is added in the horizontal stripe area according to the first slice position and the height corresponding to the next second sub-interval.

8. A device for processing horizontal lines, characterized in that: The device comprises: An acquisition module, used to acquire a three-dimensional model of an object to be printed; the three-dimensional model includes a plurality of slice layers; A position determination module, used to determine the cross-striped area by the distance between each adjacent slice layer in the three-dimensional model; The slicing module is used to slice the horizontal stripe area in combination with the preset segmentation interval of the distance at the horizontal stripe area.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

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

    CN113134975A

  • Slicing method for variable layer thickness scanning

    CN113275601A

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

    CN113524688A

  • Printing 3D objects with automatic dimensional accuracy compensation

    US20170203515A1

  • 3D printing slicing method for solving tolerance problem

    US20230256677A1