CN112464446B - Metal additive manufacturing path filling method based on interlayer information inheritance - Google Patents

Metal additive manufacturing path filling method based on interlayer information inheritance Download PDF

Info

Publication number
CN112464446B
CN112464446B CN202011250212.7A CN202011250212A CN112464446B CN 112464446 B CN112464446 B CN 112464446B CN 202011250212 A CN202011250212 A CN 202011250212A CN 112464446 B CN112464446 B CN 112464446B
Authority
CN
China
Prior art keywords
layer
contour
line segment
path
current layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011250212.7A
Other languages
Chinese (zh)
Other versions
CN112464446A (en
Inventor
马良
吴陈浩
李慧贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN202011250212.7A priority Critical patent/CN112464446B/en
Publication of CN112464446A publication Critical patent/CN112464446A/en
Application granted granted Critical
Publication of CN112464446B publication Critical patent/CN112464446B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/10Additive manufacturing, e.g. 3D printing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a metal additive manufacturing path filling method based on interlayer information inheritance. And adding the offset between the outlines of the two layers to the end point of the path generated by the previous layer by using the characteristic that the information between the two adjacent layers can be inherited to generate the path of the next layer. The intersection points of each parallel line and the outline do not need to be calculated and connected into a path, so that the calculated amount is reduced, the algorithm operation speed is accelerated, and the model processing time is shortened. The path filling process in the metal additive manufacturing model data processing can be accelerated, and the data processing time is shortened. For the CAD model with large data volume, the method reduces the calculation amount and shortens the time spent by the path filling process.

Description

Metal additive manufacturing path filling method based on interlayer information inheritance
[ technical field ] A method for producing a semiconductor device
The invention belongs to the technical field of metal additive manufacturing, and particularly relates to a metal additive manufacturing path filling method based on interlayer information inheritance.
[ background ] A method for producing a semiconductor device
Metal Additive Manufacturing (MAM) is an emerging, layer-by-layer build-up Manufacturing technology, and the data processing algorithm of a part model is the key point of the Manufacturing technology. Through a model data processing algorithm, a CAD (Computer Aided Design) model of the part can be converted into a Gcode code which can be identified by an additive manufacturing machine, so that the machine is controlled to complete the additive manufacturing process. In the field of metal additive manufacturing, a part model to be manufactured is more and more fine, the data volume of a CAD model is more and more huge, if an original algorithm is still used for processing the model, the efficiency of processing the model is relatively low, and the CAD model represented by a GB-level STL (stereolithography) file needs to be processed into a geocode which can be understood by a printer for at least several hours, so that the requirement of industrial production cannot be met.
The most important and time-consuming of the various steps of the model data processing in the metal additive manufacturing process is the path filling process. The document "algorithm for rapid generation of laser scanning path in laser rapid prototyping [ J ]. Proceedings of computer aided design and graphics, 1998 (3): 260-265" discloses a parallel line filling algorithm. The algorithm is now an algorithm that is widely used in metal additive manufacturing path filling processes. The parallel line filling method uses a group of equidistant parallel lines and a section contour line of a slice to calculate intersection points, only the entity part parallel line segments in the section contour line are reserved, and finally, the line segments are changed into filling paths in an end-to-end mode. Firstly, calling or inputting contour point data finished by STL model slicing, and then specifying the filling space size according to the nozzle parameters set according to the process requirements. And then, calculating an initial filling point in the X direction or the Y direction, completing the circular intersection task of the parallel line set and the contour line, and continuing circular intersection in the next layer, and repeating the steps until the intersection of all the layer sheet contours is finished. And finally, connecting the contour points of each layer and the intersection points of the filling paths in sequence to obtain paths. The calculation amount of the model layer upon layer is very large, and much time is spent. Since the thickness of the model slice is very small, many slice profiles are equal or similar, and many iterations are performed during the path generation process, increasing the number of calculations.
[ summary of the invention ]
The invention discloses a metal additive manufacturing path filling method based on interlayer information inheritance, and aims to solve the problems that in the prior art, the thickness of a model slice is small, the outlines of a plurality of slice layers are equal or similar, and the calculation amount is large in the path generation process.
In order to achieve the purpose, the invention adopts the following technical scheme to realize the purpose:
the metal additive manufacturing path filling method based on interlayer information inheritance comprises the following steps:
step 1, establishing an array for storing variables;
step 2, performing splitting operation on the additive manufactured model, and comparing the contour of the current layer with the contour of the previous layer in the splitting process;
if equal, the classification mark is 1; if so, the classification label is 2; otherwise, a new split is created, the current layer is set as the initial layer of the new split, and the classification mark is 0;
step 3, if the classification mark is 0, generating a filling path of the current layer through a parallel filling algorithm, otherwise, executing step 4;
step 4, calculating the offset of each line segment in the current layer contour relative to the corresponding line segment in the previous layer contour;
step 5, if the classification mark of the current layer is 1, adding the offset to all path endpoints in the contour of the previous layer to generate a path of the current layer, returning to the step 3, and filling the next layer;
if the classification mark of the current layer is 2, comparing the length of the contour line segment of the current layer with the length of the contour line segment of the previous layer, and if the length of the contour line segment of the current layer is smaller than the length of the contour line segment of the previous layer, using a corresponding partial path in the path of the previous layer as the path of the current layer; if the length of the contour line segment of the current layer is greater than that of the contour line segment of the previous layer, calculating subsequent end points through the generated end points after all paths of the previous layer are used, and completing the establishment of all paths of the current layer; and returning to the step 3, and filling the next layer.
The invention is further improved in that:
preferably, in step 1, the four arrays are respectively used for storing the number of contours of the slice, the length of the contour line segment, the slope of the contour line segment, and the classification result of the contour.
Preferably, the process of step 2 is:
step 2.1, calling the sliced contour point data, and storing the contour number of the current layer into a contour array in the four arrays; calculating the lengths of all contour line segments and the slopes of the contour line segments in the current layer, and respectively storing the lengths and slopes in four arrays;
step 2.2, starting from the layer 2, comparing the contour of the current layer with the contour of the previous layer; if equal or similar, the current layer and the previous layer are classified into the same sub-body.
Preferably, the length calculation formula of the contour line segment is:
Figure BDA0002771345250000031
in the formula, l represents the length of a line segment and is a positive integer; a and b represent two end points of a line segment, the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction; x, b.X represents coordinate values of two end points of a and b in the X direction; y, b.y represents coordinate values of two endpoints a and b in the Y direction;
the slope calculation formula of the contour line segment is as follows:
k=(b.Y-a.Y)/(b.X-a.X),(b.X-a.X)≠0#(2)
in the formula, k represents the slope of a line segment and is a positive rational number; a and b represent two end points of the line segment; the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction; and a.X, b.X represents coordinate values of two end points of a and b in the X direction, and a.Y, b.Y represents coordinate values of two end points of a and b in the Y direction.
Preferably, in step 2.2, the specific process of comparison is as follows:
(1) comparing the number of the contours of the current layer and the previous layer; if the two phases are the same, performing (2); if not, performing (8);
(2) comparing whether the number of the contour line segments of the current layer is the same as that of the contour line segments of the previous layer or not; if the two are the same, performing (3); if not, performing (8);
(3) comparing the slope of the line segment of the contour of the current layer with the slope of the line segment corresponding to the contour of the previous layer; if the two are the same, performing (4); if not, performing (8);
(4) and comparing the length of each line segment of the current layer contour with the corresponding line segment of the previous layer contour, calculating the length ratio of the line segments corresponding to the two layers of contours at the same time, and storing the ratio into a temporary array. If the lengths are the same, performing (6); if not, performing (5);
(5) comparing the length ratios of the line segments stored in the step (4), and if the absolute value of the subtraction of any two ratios is within the range of a set value, performing the step (7); if the range is exceeded, performing (8);
(6) adding the layer number at the end of the array for storing the split layer number, marking the layer number as 1, and indicating that the current layer contour is equal to the previous layer contour; reading the next layer of data and returning to the step (1);
(7) adding the layer number at the end of the array for storing the split layer number, marking the layer number as 2, and indicating that the outline of the current layer is similar to the outline of the previous layer; reading the next layer of data and returning to the step (1);
(8) newly adding a split, wherein the layer is used as an initial layer of the newly added split and is marked as 0; and (4) reading the next layer of data and returning to the step (1).
Preferably, in step 4, the offset amount calculation formula is as follows:
x diff =p1.X-p2.X#(3)
y diff =p1.Y-p2.Y#(4)
in the formula, the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction. x is the number of diff Denotes the amount of offset in the X direction, y diff Representing the amount of offset in the Y direction. p1 represents the end point of the contour line segment of the current layer, and p2 represents the corresponding end point of the contour line segment of the previous layer.
Preferably, in step 5, the specific processing procedure for the contour labeled as 2 in the classification is as follows:
(1) reading the outlines from the current layer data according to the numbering sequence, and executing (6) if all the outlines are processed;
(2) reading line segments from the outline in sequence, and returning to the step (1) if all the line segments are processed;
(3) and calculating the number of the path end points predicted by the line segment in the current layer, and comparing the number with the number of the path end points of the corresponding line segment in the previous layer. If the length of each contour line segment of the current layer is smaller than that of the contour line segment of the path corresponding to the previous layer, using the corresponding partial path in the path of the previous layer; and (4) if the length of any contour line segment of the current layer is greater than that of the contour line segment of the path corresponding to the previous layer, using all paths of the previous layer and executing.
(4) Two adjacent end points are taken out from the generated end points, and the difference value in the X and Y directions between the two end points is calculated. And adding the difference value to the X and Y coordinates of the last endpoint in the generated endpoints to calculate the next endpoint, and calculating the subsequent endpoints by analogy to complete the establishment of all paths.
Preferably, step 5 is followed by step 6, which comprises the following steps:
and if the number of the current layer outlines is more than 1, reconstructing the storage structure after the path generation is finished.
Preferably, the array of storage paths is copied first, in the array, the columns with the membership greater than 2 in the array are split, the redundant part is added to the end of the array, and each column stores one path.
Compared with the prior art, the invention has the following beneficial effects:
the invention discloses a metal additive manufacturing path filling method based on interlayer information inheritance. And adding the offset between the outlines of the two layers to the end point of the path generated by the previous layer by using the characteristic that the information between the two adjacent layers can be inherited to generate the path of the next layer. The intersection points of each parallel line and the outline do not need to be calculated and connected into a path, so that the calculated amount is reduced, the operation speed of the algorithm is increased, and the model processing time is shortened. The path filling process in the metal additive manufacturing model data processing can be accelerated, and the data processing time is shortened. For the CAD model with large data volume, the method reduces the calculation amount and shortens the time spent by the path filling process.
[ description of the drawings ]
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flow chart of the model splitting step of the present invention;
FIG. 3 is a diagram illustrating the path endpoint offset when the previous layer contour is larger than the current layer contour;
FIG. 4 is a diagram illustrating the path endpoint offset when the previous layer contour is smaller than the current layer contour;
FIG. 5 is a diagram of a path number and path final storage structure;
FIG. 6 is a diagram of a path number and path temporary storage structure;
FIG. 7 is a flow chart for generating a fill path;
FIG. 8 is a comparative graph of an experiment;
[ detailed description ] embodiments
The invention is described in further detail below with reference to the accompanying drawings:
in the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention; the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance; furthermore, unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly and encompass, for example, both fixed and removable connections; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in a specific case to those of ordinary skill in the art.
The invention improves on the basis of a parallel line path filling algorithm. Firstly, the model is divided into a plurality of groups according to geometric characteristics, and any two layers of outlines in each group are similar or equal, namely line segments corresponding to two adjacent layers of outlines in one group are mutually parallel. And calculating the offset between the two layers of corresponding line segments, and adding the offset between the two line segments to the endpoint of the path generated by the previous layer of contour line segment to obtain the endpoint of the path filled by the line segment corresponding to the next layer of contour. Compared with a parallel line filling algorithm, the method for calculating the intersection point of the scanning line and the outline reduces the calculation amount and improves the algorithm efficiency.
The technical scheme adopted by the invention for solving the technical problems is as follows: a metal additive manufacturing path filling method based on interlayer information inheritance is characterized by comprising the following steps:
step 1, four arrays of contours, lengths, slopes and sort are established and are respectively used for storing the number of the outlines of the slices, the length of the outline line segment, the slope and the final grouping result. For the same model, because there may be gaps (breaks) inside it, each contour is defined as a continuous line, and therefore a layer in a model may include a plurality of contours, each contour including a plurality of contour line segments. contour is used to store the number of profiles in a layer.
And 2, carrying out split operation on the whole model.
And 2.1, calling contour point data finished by STL model slicing, and reading slice data from the contour point data in sequence. Each layer slice is composed of a plurality of contour ending joints, the contour number of the current layer slice is read and stored in a corresponding contour array, the length and the slope of all contour line segments of the layer slice are calculated and respectively stored in an array length and a slope.
(1) And (4) a line segment length calculation formula.
Figure BDA0002771345250000071
In the formula, l represents the length of the line segment and is a positive integer (in the calculation process, the coordinate value of the contour point is enlarged by 1000 times). a and b represent the two end points of the line segment. The horizontal axis is the X coordinate direction and the vertical axis is the Y coordinate direction. X, b.x represents coordinate values of two endpoints a and b in the X direction; y, b.y represent coordinate values of both end points a and b in the Y direction.
(2) And calculating the slope of the line segment.
k=(b.Y-a.Y)/(b.X-a.X),(b.X-a.X)≠0 (2)
In the formula, k represents the slope of the line segment, is a positive rational number and reserves three bits after the decimal point. a and b represent the two end points of the line segment. The horizontal axis is the X coordinate direction and the vertical axis is the Y coordinate direction. and a.X, b.X represents coordinate values of two end points of a and b in the X direction, and a.Y, b.Y represents coordinate values of two end points of a and b in the Y direction.
And 2.2, starting from the layer 2, comparing the number of the outlines of the current layer and the previous layer, and judging whether the number of the outlines of the current layer and the previous layer is equal. If the number of the layers is not equal to the number of the components, a split is newly built, the layer is used as an initial layer of the split, and the layer is marked as 0; if the two layers of outlines are equal, comparing and judging whether the two layers of corresponding outlines are similar or equal, if so, classifying the two layers of corresponding outlines into the same sub-body, wherein the equal mark is 1, and the similar mark is 2; if not, newly building a split, taking the layer as the initial layer of the split, and marking 0. And returning to the step one after the operation is finished, and finishing the split operation of the whole model by reciprocating.
And 3, after splitting is finished, generating a filling path. The profile data for each layer is sequentially retrieved from the stored data and the label for that layer is viewed. If the layer is marked as 0, the layer is an initial layer of a certain split, and a filling path of the layer is generated by using a parallel line filling algorithm; if not, step 4 and step 5 are performed.
And 4, calculating the offset between two layers of corresponding line segments, wherein the X and Y coordinates of the end points of each line segment of the outline are known, and the offset between the two line segments can be obtained only by calculating the offset between the end points corresponding to the line segments. The offset calculation formula is as follows:
x diff =p1.X-p2.X (3)
y diff =p1.Y-p2.Y (4)
in the formula, the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction. x is the number of diff Denotes the amount of offset in the X direction, y diff Representing the amount of offset in the Y direction. p1 represents the end point of the current layer segment and p2 represents the corresponding end point of the previous layer segment.
And 5, if the current layer is marked as 1, representing that the current layer outline is equal to the previous layer outline. And adding the offset to the end points of all the paths of the previous layer to generate the path of the current layer. If the current layer is marked as 2, the contour of the current layer is similar to the contour of the previous layer. The length between line segments needs to be judged before generating the path end points. If the contour line segment of the current layer is shorter than the contour line segment of the previous layer, adding the offset to the corresponding partial path in the path of the previous layer; when the contour line segment of the current layer is longer than the contour line segment of the previous layer, all corresponding paths in the path of the previous layer are used, and the end points of the excessive line segments are calculated by using the difference between the generated end points of the previous part. And returning to the fourth step, and reciprocating to generate paths of all the laminas.
Examples
Reference is made to figure 1. The metal additive manufacturing path filling method based on interlayer information inheritance comprises the following specific steps:
step 1, establishing contour, length, slope and sort arrays which are respectively used for storing the number of the outlines of the slices, the length of the outline line segment, the slope and the final grouping result. The four arrays are two-dimensional arrays, the three arrays including the constant, length and slope store the number of contours, the length of contour line segments and the slope of each slice in each column. The sort array stores the serial numbers of all slices of a partition per column.
Step 2, carrying out split operation on the whole model
And 2.1, calling contour point data finished by STL model slicing, reading slice data from the contour point data in sequence, and storing the contour number of the slice into a contour array. And reading coordinates of two end points of each line segment, calculating the length and the slope of all contour line segments of the layer slice, and storing the length and the slope into length arrays and slope arrays respectively in sequence.
(1) And (4) a line segment length calculation formula.
Figure BDA0002771345250000091
In the formula, k represents a segment length and is a positive integer (in the calculation process, the coordinate values of the contour points are enlarged by 1000 times). a and b represent the two end points of the line segment. The horizontal axis is the X coordinate direction and the vertical axis is the Y coordinate direction. and a.X, b.X represents coordinate values of two end points of a and b in the X direction, and a.Y, b.Y represents coordinate values of two end points of a and b in the Y direction.
(2) And calculating the slope of the line segment.
k=(b.Y-a.Y)/(b.X-a.X),(b.X-a.X)≠0 (2)
In the formula, k represents the slope of the line segment, is a positive rational number and reserves three bits after the decimal point. a and b represent the two end points of the line segment. The horizontal axis is the X coordinate direction and the vertical axis is the Y coordinate direction. and a.X, b.X represents coordinate values of two end points of a and b in the X direction, and a.Y, b.Y represents coordinate values of two end points of a and b in the Y direction.
And 2.2, referring to fig. 2, starting from the layer 2, comparing the number of the contours of the current layer and the previous layer, and judging whether the contours are equal. If the number of the split bodies is not equal, a split body is newly built, the layer is used as an initial layer of the split body, and the layer is marked as 0; if the two layers of outlines are equal, comparing and judging whether the two layers of corresponding outlines are similar or equal, if so, classifying the two layers of corresponding outlines into the same sub-body, wherein the equal mark is 1, and the similar mark is 2; and if the two layers are not similar, newly building a split, taking the layer as the initial layer of the split, marking 0, and after the split is completed, implementing the step 2.2 on the next layer so as to complete the split operation of the whole model in a reciprocating manner. The method comprises the following specific steps:
(1) the number of profiles of this layer is compared with the previous layer. If the two phases are the same, performing (2); if not, proceed to (8).
(2) Comparing the layer contour with the previous layer contour, and comparing whether the line segments of the two layers of corresponding contours are the same or not. If the two phases are the same, performing (3); if not, proceed to (8).
(3) The slope of each line segment of the layer profile is compared with the corresponding line segment of the previous layer profile. If the two phases are the same, performing (4); if not, (8) the same representative slope in this step is within the set error range, and the error in this embodiment is not more than 2%.
(4) The length of each line segment of the layer of contour is compared with the corresponding line segment of the previous layer of contour, and meanwhile, the length ratio of the line segments corresponding to the two layers of contours is calculated and stored in a temporary array, as shown in fig. 6. If the lengths are the same, performing (6); if not, the step (5) is carried out.
(5) Comparing the line segment length ratios stored in the step (4), and if the absolute value of the subtraction of any two ratios is within the range of a set value (the set value is set to be 0.06), performing the step (7); if the range is exceeded, the process proceeds to (8).
(6) The layer number is added at the end of the array for storing the split layer number, is marked as 1, and represents that the contour of the current layer is equal to the contour of the previous layer. And (4) reading the next layer of data and returning to the step (1).
(7) The layer number is added at the end of the array storing the split layer number and is marked as 2, and the current layer outline is similar to the previous layer outline. And (4) reading the next layer of data and returning to the step (1).
(8) A new subdivision is added, which serves as the initial layer of the newly added subdivision and is marked 0. And (4) reading the next layer of data and returning to the step (1).
The flow chart of the model split is shown in the attached figure 2.
And 3, after splitting is finished, generating a filling path. Sequentially taking out the contour data of each layer from the stored data, checking the mark of the layer, and if the mark of the layer is 0, generating a filling path by using a parallel line filling algorithm; if the layer is marked as 1 or 2, steps 4 and 5 are performed.
And 4, calculating the offset between the line segments. The offset amount is divided into an offset amount in the X direction and an offset amount in the Y direction. The X, Y coordinates of the end points of each line segment of the outline are known and parallel between the corresponding line segments. The offset between two line segments can be obtained by only calculating the offset between the corresponding end points of the line segments. The offset calculation formula is as follows:
x diff =p1.X-p2.X (3)
y diff =p1.Y-p2.Y (4)
in the formula, the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction. x is the number of diff Denotes the amount of offset in the X direction, y diff Representing the amount of offset in the Y direction. p1 represents the end point of the current layer segment and p2 represents the corresponding end point of the previous layer segment.
Step 5, referring to fig. 7, if the current layer is marked as 1, which represents that the current layer contour is equal to the previous layer contour, the end points of all paths in the previous layer are added with the offsets in the X and Y directions to generate the path of the current layer. And returning to the step 3, and filling the next layer. If the current layer is marked as 2, the length between line segments needs to be judged before generating the path end point. If the contour line segment of the current layer is shorter than the contour line segment of the previous layer, using the corresponding partial path in the path of the previous layer; if the current layer contour line segment is longer than the previous layer contour line segment, the difference value between the generated end points of the previous part is also used for calculating the end points of the excessive part of line segments. Referring to fig. 7, the specific steps are as follows:
(1) the contours are read from the current layer data in the order of the numbers. If all the contour processing is finished, executing (6).
(2) The line segments are read from the contour in sequence. And (4) if all the line segments are processed, returning to the step (1).
(3) And calculating the number of the path end points predicted by the line segment, namely the number of the scanning lines intersected with the line segment, and comparing the number with the number of the path end points of the corresponding line segment of the previous layer. Referring to fig. 4, if all the line segments in the contour are smaller than the contour line segment of the previous layer corresponding path, only the corresponding partial path in the previous layer path needs to be used; referring to fig. 3, if any line segment in the contour is larger than the contour line segment of the previous layer corresponding path, all paths of the previous layer are used, and (4) is performed.
(4) Two adjacent end points are taken out from the generated end points, and the difference value between the two end points in the X and Y directions is calculated. And adding the difference value to the X and Y coordinates of the last endpoint in the generated endpoints to calculate the next endpoint, and calculating the subsequent endpoints by analogy to complete the establishment of all paths.
And (3) sorting the end points of each column in the array from large to small according to the value of the Y coordinate, wherein the step is simultaneously carried out in the process of generating the path end points, and the step (2) is returned.
And 6, if the number of the current layer outlines is more than 1, reconstructing the storage structure after the path generation is finished. Firstly, an array of storage paths is copied, and an original array needs to be used in the generation process of a path of a next layer. In the array, the intersection points of each scan line with the contour (i.e., the end points of the path) have been arranged from large to small according to the value of the Y coordinate. Splitting the columns with the membership greater than 2 in the array, adding redundant parts to the end of the array, ensuring that the number of the endpoints in each column is 2, namely, storing a path in each column, and returning to the step 3 as shown in fig. 5.
If the number of the current layer outlines is less than 1, the path generation is finished, and the step 3 is returned.
Referring to fig. 8, the parallel line filling algorithm and the present algorithm are compared through experiments, and under the condition of the same slice thickness, the filling processing is performed on the equal cube, the trapezoidal table and the curved cuboid model by using the two filling algorithms, and the comparison result of the filling performance is shown in fig. 8. The algorithm has a good acceleration effect, and the filling efficiency is greatly improved compared with a parallel line filling algorithm. Has great significance for the actual industrial manufacturing requirement.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. The metal additive manufacturing path filling method based on interlayer information inheritance is characterized by comprising the following steps of:
step 1, establishing an array for storing variables;
step 2, performing splitting operation on the additive manufactured model, and comparing the contour of the current layer with the contour of the previous layer in the splitting process;
if equal, the classification mark is 1; if so, the classification label is 2; otherwise, a new split is created, the current layer is set as the initial layer of the new split, and the classification mark is 0;
step 3, if the classification mark is 0, generating a filling path of the current layer through a parallel filling algorithm, otherwise, executing step 4;
step 4, calculating the offset of each line segment in the current layer contour relative to the corresponding line segment in the previous layer contour;
step 5, if the classification mark of the current layer is 1, adding the offset to all path endpoints in the contour of the previous layer to generate a path of the current layer, returning to the step 3, and filling the next layer;
if the classification mark of the current layer is 2, comparing the length of the contour line segment of the current layer with the length of the contour line segment of the previous layer, and if the length of the contour line segment of the current layer is smaller than the length of the contour line segment of the previous layer, using a corresponding partial path in the path of the previous layer as the path of the current layer; if the length of the contour line segment of the current layer is greater than that of the contour line segment of the previous layer, calculating subsequent endpoints through the generated endpoints after all paths of the previous layer are used, and completing the establishment of all paths of the current layer; and returning to the step 3, and filling the next layer.
2. The method for filling the metal additive manufacturing path based on the interlayer information inheritance of claim 1, wherein in the step 1, the four arrays are respectively used for storing the number of the outlines of the layer pieces, the lengths of the outline line segments, the slopes of the outline line segments and the classification results of the outlines.
3. The method for filling the metal additive manufacturing path based on the interlayer information inheritance of claim 1, wherein the process of the step 2 is as follows:
step 2.1, calling the sliced contour point data, and storing the contour number of the current layer into a contour array in the four arrays; calculating the lengths of all contour line segments and the slopes of the contour line segments in the current layer, and respectively storing the lengths and slopes in four arrays;
step 2.2, starting from the layer 2, comparing the contour of the current layer with the contour of the previous layer; if equal or similar, the current layer and the previous layer are classified into the same sub-body.
4. The method of claim 3, wherein the calculation formula of the length of the contour line segment is as follows:
Figure FDA0002771345240000021
in the formula, l represents the length of a line segment and is a positive integer; a and b represent two end points of a line segment, the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction; x, b.x represents coordinate values of two endpoints a and b in the X direction; y, b.y represents coordinate values of two endpoints a and b in the Y direction;
the slope calculation formula of the contour line segment is as follows:
k=(b.Y-a.Y)/(b.X-a.X),(b.X-a.X)≠0#(2)
in the formula, k represents the slope of a line segment and is a positive rational number; a and b represent two end points of the line segment; the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction; and a.X, b.X represents coordinate values of two end points of a and b in the X direction, and a.Y, b.Y represents coordinate values of two end points of a and b in the Y direction.
5. The method for filling the metal additive manufacturing path based on the interlayer information inheritance of claim 1, wherein in the step 2.2, the specific process of comparison is as follows:
(1) comparing the number of the contours of the current layer and the previous layer; if the two are the same, performing (2); if not, performing (8);
(2) comparing whether the number of the contour line segments of the current layer is the same as that of the contour line segments of the previous layer or not; if the two phases are the same, performing (3); if not, performing (8);
(3) comparing the slope of the line segment of the contour of the current layer with the slope of the line segment corresponding to the contour of the previous layer; if the two phases are the same, performing (4); if not, performing (8);
(4) comparing the length of each line segment of the current layer contour with the corresponding line segment of the previous layer contour, simultaneously calculating the length ratio of the line segments corresponding to the two layers of contours, and storing the length ratio into a temporary array; if the lengths are the same, performing (6); if not, performing (5);
(5) comparing the length ratios of the line segments stored in the step (4), and if the absolute value of the subtraction of any two ratios is within the range of a set value, performing the step (7); if the range is exceeded, performing (8);
(6) adding the layer number at the end of the array for storing the split layer number, marking the layer number as 1, and indicating that the current layer contour is equal to the previous layer contour; reading the next layer of data and returning to the step (1);
(7) adding the layer number at the end of the array for storing the split layer number, marking the layer number as 2, and indicating that the outline of the current layer is similar to the outline of the previous layer; reading the next layer of data, and returning to the step (1);
(8) newly adding a split, wherein the layer is used as an initial layer of the newly added split and is marked as 0; and (4) reading the next layer of data and returning to the step (1).
6. The method for filling metal additive manufacturing path based on interlayer information inheritance according to claim 1, wherein in the step 4, the offset calculation formula is as follows:
x diff =p1.X-p2.X#(3)
y diff =p1.Y-p2.Y#(4)
wherein, the horizontal axis is the X coordinate direction, and the vertical axis is the Y coordinate direction; x is the number of diff Denotes the amount of offset in the X direction, y diff Represents the offset in the Y direction; p1 represents the end point of the contour line segment of the current layer, and p2 represents the corresponding end point of the contour line segment of the previous layer.
7. The method for filling the metal additive manufacturing path based on the interlayer information inheritance of claim 1, wherein the specific processing procedure for the contour with the classification mark of 2 in the step 5 is as follows:
(1) reading the outlines from the current layer data according to the numbering sequence, and executing (6) if all the outlines are processed;
(2) reading line segments from the outline in sequence, and returning to the step (1) if all the line segments are processed;
(3) calculating the number of path end points predicted by the line segment in the current layer, and comparing the number with the number of the path end points of the corresponding line segment in the previous layer; if the length of each contour line segment of the current layer is smaller than that of the contour line segment of the corresponding path of the previous layer, using the corresponding partial path in the path of the previous layer; if the length of any contour line segment of the current layer is larger than that of the contour line segment of the corresponding path of the previous layer, using all paths of the previous layer and executing the step (4);
(4) taking two adjacent end points out of the generated end points, and calculating the difference value between the two end points in the X direction and the Y direction; and adding a difference value to the X and Y coordinates of the last endpoint in the generated endpoints, calculating the latter endpoint, and calculating the subsequent endpoints by analogy to complete the establishment of all paths.
8. The method for filling the metal additive manufacturing path based on the interlayer information inheritance of claim 1, wherein the step 5 is further followed by a step 6, which is carried out by:
and if the number of the current layer outlines is more than 1, reconstructing the storage structure after the path generation is finished.
9. The method as claimed in claim 8, wherein the array of storage paths is first copied, columns in the array with a membership greater than 2 are split, and redundant parts are added to the end of the array, and each column stores one path.
CN202011250212.7A 2020-11-10 2020-11-10 Metal additive manufacturing path filling method based on interlayer information inheritance Active CN112464446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011250212.7A CN112464446B (en) 2020-11-10 2020-11-10 Metal additive manufacturing path filling method based on interlayer information inheritance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011250212.7A CN112464446B (en) 2020-11-10 2020-11-10 Metal additive manufacturing path filling method based on interlayer information inheritance

Publications (2)

Publication Number Publication Date
CN112464446A CN112464446A (en) 2021-03-09
CN112464446B true CN112464446B (en) 2022-10-14

Family

ID=74825384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011250212.7A Active CN112464446B (en) 2020-11-10 2020-11-10 Metal additive manufacturing path filling method based on interlayer information inheritance

Country Status (1)

Country Link
CN (1) CN112464446B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114722571B (en) * 2022-03-10 2024-02-09 西北工业大学 CPU-GPU cooperative additive manufacturing parallel scanning line filling method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108556365B (en) * 2018-03-12 2021-06-22 中南大学 Composite filling optimization method and system of rapid prototyping machine
CN108859128B (en) * 2018-06-14 2019-07-09 武汉理工大学 The path planning fill method of complicated more hole regions

Also Published As

Publication number Publication date
CN112464446A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
Zwier et al. Design for additive manufacturing: Automated build orientation selection and optimization
CN110126279A (en) It is a kind of to cut layer and paths planning method with the shape towards curved surface 3D printing
Kulkarni et al. A review of process planning techniques in layered manufacturing
Gogate et al. Intelligent layout planning for rapid prototyping
CN109522585A (en) A kind of adaptive layered method preventing 3D printing model characteristic offset
US20200110383A1 (en) System, method and computer program for creating united cellular lattice structure
CN109325316B (en) STL model efficient parallel layer cutting method based on concurrent welding sequencing
CN110956699B (en) GPU (graphics processing unit) parallel slicing method for triangular mesh model
CN112464446B (en) Metal additive manufacturing path filling method based on interlayer information inheritance
Fok et al. An ACO-based tool-path optimizer for 3-D printing applications
CN109551768A (en) A kind of data processing method of the 3D printing file based on STL
CN111290283A (en) Additive manufacturing single machine scheduling method for selective laser melting process
Brant et al. A novel electrochemical micro additive manufacturing method of overhanging metal parts without reliance on support structures
US20210303743A1 (en) Methods and systems for generating an instant design for manufacturability of a part at a computing device
CN115047825A (en) Method for displaying numerical control machining milling in real time
CN111400798B (en) Building 3D slice construction method and 3D printing device
Guan et al. Development of 3D printing entity slicing software
CN113591208B (en) Ship feature extraction-based ultra-large model light-weight method and electronic equipment
Weidong Optimal path planning in rapid prototyping based on genetic algorithm
CN111666689A (en) Characteristic line tracking method, reactor core neutron physical calculation method and device
CN114834043B (en) Laser three-dimensional processing model slice data processing method
CN111353187B (en) Method for acquiring spatial linear level curve elements
CN112590219B (en) 3D printing filling path generation method based on random points
CN114207535B (en) Method and device for determining processing conditions
CN116246048A (en) Lattice filling algorithm based on B-rep solid model of wire frame representation for 3D printing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant