Thin-wall tubular model slicing method and system of five-axis 3D printer and printing method

文档序号:709323 发布日期:2021-04-16 浏览:10次 中文

阅读说明:本技术 五轴3d打印机的薄壁管状模型切片方法、系统及打印方法 (Thin-wall tubular model slicing method and system of five-axis 3D printer and printing method ) 是由 任晓栋 王晨希 卢泓宇 王武义 黄涛 于 2020-12-02 设计创作,主要内容包括:本发明提供了一种五轴3D打印机的薄壁管状模型切片方法、系统及打印方法,包括:建立坐标系,读取待打印工件的三维模型;提取三维模型各个高度横截面的重心,并依次连接,得到重心曲线;对工作转台进行旋转变换,使三维模型当前高度层重心曲线的曲率向量在水平面的投影为零,获取三维模型当前高度层对应的工作转台旋转姿态信息,并计算得到三维模型当前高度层的切片信息;对三维模型的当前高度层进行更新,重复至完成分层切片,得到待打印工件的分层切片信息;本发明通过对转台台面旋转变换,使三维模型当前高度层重心曲线的曲率向量在水平面的投影为零,实现了将三维模型的姿态调整为竖直向上,实现了无支撑打印,打印效果好,成型件表面精度高。(The invention provides a thin-wall tubular model slicing method, a thin-wall tubular model slicing system and a thin-wall tubular model printing method of a five-axis 3D printer, wherein the thin-wall tubular model slicing method comprises the following steps: establishing a coordinate system, and reading a three-dimensional model of a workpiece to be printed; extracting the gravity centers of all height cross sections of the three-dimensional model, and sequentially connecting to obtain a gravity center curve; performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, acquiring the rotation attitude information of the working rotary table corresponding to the current height layer of the three-dimensional model, and calculating to obtain the slice information of the current height layer of the three-dimensional model; updating the current height layer of the three-dimensional model, and repeating the operation until the layered slicing is finished to obtain the layered slicing information of the workpiece to be printed; according to the invention, through rotating and converting the table top of the turntable, the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane is zero, the posture of the three-dimensional model is adjusted to be vertical upwards, the unsupported printing is realized, the printing effect is good, and the surface precision of the formed part is high.)

1. A thin-wall tubular model slicing method of a five-axis 3D printer is characterized in that the five-axis 3D printer comprises a 3D printer body and a working rotary table, wherein the working rotary table comprises a rotary table top; the method comprises the following steps:

establishing a coordinate system, reading a three-dimensional model of a workpiece to be printed, and fixedly connecting the three-dimensional model with the table top of the rotary table;

extracting the gravity centers of all height cross sections of the three-dimensional model, and sequentially connecting to obtain a gravity center curve;

calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model;

performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and acquiring the rotation attitude information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and updating the current height layer of the three-dimensional model, acquiring the slice information of each current height layer of the three-dimensional model until the layered slice is finished, and acquiring the layered slice information of the workpiece to be printed.

2. The thin-wall tubular model slicing method for the five-axis 3D printer according to claim 1, wherein the rotary table top has a rotational degree of freedom in a horizontal direction and a rotational degree of freedom in a normal direction thereof.

3. The thin-walled tubular model slicing method for five-axis 3D printer as claimed in claim 1, wherein establishing the coordinate system comprises establishing a turntable coordinate system XYZ and establishing a fixed reference coordinate system XYZ:

when the rotating table coordinate system xyz is established, the following concrete steps are performed:

defining the circle center of the table top of the rotary table as the origin of coordinates, rotating the rotary shaft of the table top around the horizontal direction as an x-axis, and rotating the rotary shaft around the normal direction of the table top as a z-axis; determining a y axis according to a right hand rule according to the defined x axis and the defined z axis;

wherein, establish fixed reference coordinate system XYZ, specifically:

the center of a circle of the table top of the rotary table at the work zero position is taken as the origin of coordinates, the Z axis is defined as the vertical upward direction, and the X axis are superposed when the work zero position is defined; the Y axis is determined according to the right hand rule based on the defined X axis and Z axis.

4. The thin-wall tubular model slicing method of the five-axis 3D printer according to claim 1, wherein when the barycentric curve is obtained, the method specifically comprises the following steps: according to the preset layer height, carrying out layered scanning on the model from bottom to top along the height direction of the three-dimensional model, and calculating the gravity center of the cross section of each layered height of the three-dimensional model; and sequentially connecting the gravity centers of the cross sections of the three-dimensional models at each layered height to obtain a gravity center curve.

5. The method for slicing the thin-wall tubular model of the five-axis 3D printer according to claim 1, wherein the step of calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model comprises the following steps:

defining the layer height of the current height layer as layerheight and the unit layer height as unit;

layering the three-dimensional model at the layer heights of layerHeight-unit, layerHeight + unit and layerHeight +2 unit to respectively obtain a cross section layer1, a cross section layer2, a cross section layer3 and a cross section layer 4;

and (3) pointing the gravity center of the cross section layer1 to the gravity center of the cross section layer3 to obtain a curvature vector of a gravity center curve of the current height layer of the three-dimensional model.

6. The method for slicing the thin-wall tubular model of the five-axis 3D printer according to claim 5, characterized in that, in order to make the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane zero, the rotary transformation of the table top is carried out in the following way:

firstly, the table top of the turntable rotates around the x axisThen rotated about the z-axisThen rotates around the x-axisFinally rotating around the x axisWherein the content of the first and second substances,is the angle of the x-axis current elevation layer,in angular increments of rotation of the x-axis,is the angular increment of the z-axis rotation; wherein the content of the first and second substances,the value range of the (B) is-0.5 degrees,the value range of the (A) is-0.5 degrees.

7. The thin-wall tubular model slicing method of the five-axis 3D printer according to claim 6, wherein when the slice printing information of the current height layer is acquired, the method specifically comprises the following steps: rotating and transforming the barycentric coordinates of the cross section layer2 in the rotated three-dimensional model, updating the z coordinates of the rotated cross section layer2 to the layer height layerheight of the current height layer, and slicing the rotated three-dimensional model at the layer height layerheight of the current height layer to obtain the cross section of the layer to be cut;

and setting the minimum side length of the polygon for interpolation, and clockwise standardizing the polygon to obtain the slice printing information of the current height layer.

8. The method for slicing the thin-wall tubular model of the five-axis 3D printer according to claim 6, wherein the increment of the rotation angle of the table top of the turntable is increased by adopting an incremental PID algorithmCarrying out constraint;

wherein the increment of the rotation angle of the table top of the turntableThe expression of (a) is:

wherein Kp, Ki and Kd radians are PID parameters, ekFor the current increment of the angle of rotation, ek-1Error of the increment of the rotation angle of the previous step and the increment of the rotation angle of the subsequent step, ek-2The error between the increment of the rotation angle of the previous step and the increment of the rotation angle of the next step.

9. The utility model provides a thin wall tubular model section system of five 3D printers which characterized in that includes:

the building module is used for building a coordinate system, reading a three-dimensional model of a workpiece to be printed and fixedly connecting the three-dimensional model with the table top of the rotary table;

the gravity center curve module is used for extracting the gravity centers of all height cross sections of the three-dimensional model and sequentially connecting the gravity centers to obtain a gravity center curve;

the curvature vector calculation module is used for calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model;

the slice information calculation module is used for performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and obtaining the rotation posture information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and the circulating module is used for updating the current height layer of the three-dimensional model, acquiring the slice information of each current height layer of the three-dimensional model until the layered slicing is finished, and acquiring the layered slice information of the workpiece to be printed.

10. A printing method of a thin-wall tubular model of a five-axis 3D printer is characterized by comprising the following steps:

s1, reading a three-dimensional model file of the thin-wall tubular model to be processed, obtaining an associated triangular patch of the three-dimensional model, and establishing a topological relation between the triangular patches of the three-dimensional model;

s2, setting printing parameters;

s3, slicing the workpiece to be printed to obtain layered slicing information; when a workpiece to be printed is sliced, the workpiece to be printed is sliced by adopting the thin-wall tubular model slicing method of the five-axis 3D printer, which is disclosed by any one of claims 1 to 8;

and s4, generating a G code which can be executed by the five-axis 3D printer according to the layered slice information obtained in s3, importing the G code into the five-axis 3D printer, and printing on the working turntable.

Technical Field

The invention belongs to the technical field of 3D printing, and particularly relates to a thin-wall tubular model slicing method, a thin-wall tubular model slicing system and a thin-wall tubular model printing method of a five-axis 3D printer.

Background

3D printing is also called additive manufacturing, is born in the middle and later stages of the 80 th century, integrates information technology and manufacturing technology, and is considered as one of important marks of the third industrial revolution; the 3D printing technology has the advantages that a three-dimensional digital model generated by a computer can be directly utilized, and an entity with any shape is generated in a material layer-by-layer stacking mode, so that the production and the manufacturing are more convenient, and the method is more suitable for future personalized manufacturing modes. Compared with the traditional material reduction manufacturing technology, the time cost and the material loss are greatly reduced. At present, 3D printing is more and more widely applied to the fields of medical treatment, aerospace, building, food and the like.

In 3D printers of various technologies at present, a printing nozzle of the 3D printer usually has X, Y and Z three translational degrees of freedom; the adopted layering slicing method is used for layering along a single direction of the model, and then the materials are stacked layer by layer along a direction vertical to a layering plane for molding. Due to the existence of the layered thickness, when the three-axis 3D printer prints a complex curved surface, the outline curve of the curved surface is actually fitted by using a rectangle, so that a step effect is generated on the surface of the model, and the surface precision of the formed part is influenced. On the other hand, the interlayer connection of the existing printing mode only depends on the self-adhesive property of the material, and when engineering plastics such as ABS, PLA and the like are used for printing thin-wall hollow parts, the interlayer strength of the model is insufficient; when the suspension structure is printed, a supporting material needs to be added, so that the problems of extra loss of the material and complexity in removing the support after the model is processed are caused. Particularly, for a bent thin-wall hollow tubular model, the process of removing the supporting material in the inner cavity of the model is more complicated, the printing efficiency is greatly reduced, and the printing cost is increased.

Therefore, in recent years, researchers at home and abroad continuously propose to change the printing direction and the layered slicing mode by increasing the freedom of motion of printing equipment, and research and realize a more flexible 3D printing method so as to improve the surface precision of a model and solve the problem of support-free printing. Norwegian researchers have designed and developed a neotype five-axis 3D printer, through install two degree of freedom rotary platform additional on triaxial 3D printer motion platform, form five-axis 3D printing apparatus, show the flexibility that has improved 3D and print. However, according to the published report of the research, the feasibility of the mechanism design and control scheme of the proposed five-axis 3D printer is only verified by printing some simple parts, and the printing process is not deeply researched. Researchers at the university of rhode island in the united states explored a processing method for adding materials on special structures such as cylinders and hemispheres by using a 3D metal jet printing laser forming technology, but the method is easily limited by the shape of parts.

Domestic researchers have proposed a five-axis 3D printing technique for splitting a complex three-dimensional digital model into a main body and a support through an interactive segmentation algorithm to perform segmentation simplification, but some parts with complex curved surfaces, such as thin-wall revolved body parts, which cannot be re-segmented, cannot be processed. The five-axis 3D printing and machining instruction generation method specially proposed for the thin-wall revolving body parts is relatively limited in application range. In recent years, researchers successively put forward a five-axis 3D printing device and method for curved surface layered fused deposition modeling. Aiming at the bent pipe fitting, a method for obtaining a neutral skeleton curve by extracting a model neutral skeleton point set and carrying out curve fitting and slicing along a plane perpendicular to the tangential direction of the neutral skeleton curve is provided; the method can realize support-free printing and simultaneously carry out multidirectional material stacking, effectively reduces the step effect, improves the mechanical property of the formed part, but also has the problems of more complex model slice calculation process and the like.

Compared with the traditional 3D printer, the five-axis 3D printer is lack of a matched general slicing method at present, the working principle of the five-axis 3D printer generally needs to be comprehensively mastered, special design is carried out according to the characteristics of a model, and a G code which can be executed by the five-axis 3D printer is generated, so that time and labor are consumed relatively, and the five-axis 3D printer is not beneficial to popularization and application of a five-axis 3D printing technology.

Disclosure of Invention

Aiming at the technical problems in the prior art, the invention provides a thin-wall tubular model slicing method, a thin-wall tubular model slicing system and a thin-wall tubular model printing method of a five-axis 3D printer, and aims to solve the technical problems of complex slicing process and poor universality in the conventional support-free printing process.

In order to achieve the purpose, the invention adopts the technical scheme that:

the invention provides a thin-wall tubular model slicing method of a five-axis 3D printer, which is characterized in that the five-axis 3D printer comprises a 3D printer body and a working rotary table, wherein the working rotary table comprises a rotary table top; the method comprises the following steps:

establishing a coordinate system, reading a three-dimensional model of a workpiece to be printed, and fixedly connecting the three-dimensional model with the table top of the rotary table;

extracting the gravity centers of all height cross sections of the three-dimensional model, and sequentially connecting to obtain a gravity center curve;

calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model;

performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and acquiring the rotation attitude information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and updating the current height layer of the three-dimensional model until the layered slicing is finished, and obtaining the layered slicing information of the workpiece to be printed.

Furthermore, the rotary table top has a rotational degree of freedom in the horizontal direction and a rotational degree of freedom in the normal direction.

Further, establishing the coordinate system includes establishing a turntable coordinate system XYZ and establishing a fixed reference coordinate system XYZ:

when the rotating table coordinate system xyz is established, the following concrete steps are performed:

defining the circle center of the table top of the rotary table as the origin of coordinates, rotating the rotary shaft of the table top around the horizontal direction as an x-axis, and rotating the rotary shaft around the normal direction of the table top as a z-axis; determining a y axis according to a right hand rule according to the defined x axis and the defined z axis;

wherein, establish fixed reference coordinate system XYZ, specifically:

the center of a circle of the table top of the rotary table at the work zero position is taken as the origin of coordinates, the Z axis is defined as the vertical upward direction, and the X axis are superposed when the work zero position is defined; the Y axis is determined according to the right hand rule based on the defined X axis and Z axis.

Further, when obtaining the barycentric curve, specifically: according to the preset layer height, carrying out layered scanning on the model from bottom to top along the height direction of the three-dimensional model, and calculating the gravity center of the cross section of each layered height of the three-dimensional model; and sequentially connecting the gravity centers of the cross sections of the three-dimensional models at each layered height to obtain a gravity center curve.

Further, when calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model, the method includes:

defining the layer height of the current height layer as layerheight and the unit layer height as unit;

layering the three-dimensional model at the layer heights of layerHeight-unit, layerHeight + unit and layerHeight +2 unit to respectively obtain a cross section layer1, a cross section layer2, a cross section layer3 and a cross section layer 4;

and (3) pointing the gravity center of the cross section layer1 to the gravity center of the cross section layer3 to obtain a curvature vector of a gravity center curve of the current height layer of the three-dimensional model.

Further, in order to make the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane zero, the rotary transformation of the table top of the rotary table is carried out in the following way:

first, the counter table is rotated about the x-axisThen rotated about the z-axisThen rotates around the x-axisFinally rotating around the x axisWherein the content of the first and second substances,is the angle of the x-axis current elevation layer,in angular increments of rotation of the x-axis,is the angular increment of the z-axis rotation; wherein the content of the first and second substances,the value range of the (B) is-0.5 degrees,the value range of the (A) is-0.5 degrees.

Further, when acquiring the slice printing information of the current height layer, the method specifically includes: rotating and transforming the barycentric coordinates of the cross section layer2 in the rotated three-dimensional model, updating the z coordinates of the rotated cross section layer2 to the layer height layerheight of the current height layer, and slicing the rotated three-dimensional model at the layer height layerheight of the current height layer to obtain the cross section of the layer to be cut;

and setting the minimum side length of the polygon for interpolation, and clockwise standardizing the polygon to obtain the slice printing information of the current height layer.

Furthermore, the increment of the rotation angle of the table top of the rotary table is realized by adopting an incremental PID algorithmCarrying out constraint;

wherein the increment of the rotation angle of the table top of the turntableThe expression of (a) is:

wherein the content of the first and second substances,kp, Ki and Kd radians are PID parameters, ekFor the current increment of the angle of rotation, ek-1Error of the increment of the rotation angle of the previous step and the increment of the rotation angle of the subsequent step, ek-2The error between the increment of the rotation angle of the previous step and the increment of the rotation angle of the next step.

The invention also provides a thin-wall tubular model slicing system of the five-axis 3D printer, which is characterized by comprising the following components:

the building module is used for building a coordinate system, reading a three-dimensional model of a workpiece to be printed and fixedly connecting the three-dimensional model with the table top of the rotary table;

the gravity center curve module is used for extracting the gravity centers of all height cross sections of the three-dimensional model and sequentially connecting the gravity centers to obtain a gravity center curve;

the curvature vector calculation module is used for calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model;

the slice information calculation module is used for performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and obtaining the rotation posture information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and the circulating module is used for updating the current height layer of the three-dimensional model, acquiring the slice information of each current height layer of the three-dimensional model until the layered slicing is finished, and acquiring the layered slice information of the workpiece to be printed.

The invention also provides a printing method of the thin-wall tubular model of the five-axis 3D printer, which comprises the following steps:

s1, reading a three-dimensional model file of the thin-wall tubular model to be processed, obtaining an associated triangular patch of the three-dimensional model, and establishing a topological relation between the triangular patches of the three-dimensional model;

s2, setting printing parameters;

s3, slicing the workpiece to be printed to obtain layered slicing information; when a workpiece to be printed is sliced, the workpiece to be printed is sliced by adopting the thin-wall tubular model slicing method of the five-axis 3D printer;

and s4, generating a G code which can be executed by the five-axis 3D printer according to the layered slice information obtained in s3, importing the G code into the five-axis 3D printer, and printing on the working turntable.

Compared with the prior art, the invention has the beneficial effects that:

the invention provides a thin-wall tubular model layered slicing method of a five-axis 3D printer, which is characterized in that a three-dimensional model is fixedly connected with a table top of a rotary table, and the projection of a curvature vector of a gravity center curve of a current height layer of the three-dimensional model on a horizontal plane is zero through rotary transformation of the table top of the rotary table, so that the posture of the three-dimensional model is adjusted to be vertical and upward, namely the current section is in a horizontal state, unsupported printing is realized, the printing effect is effectively improved, the surface precision of a formed part is high, and the interlayer strength is better; layered slice information of the three-dimensional model is obtained through rotating posture information of the table top of the turntable, the process is simple, and different types of five-axis 3D printing equipment can be met; the method can be directly applied to five-axis 3D printing of the bent pipe shape model, and can also be popularized to the printing of bent pipe-like objects.

Further, willThe value range of the (B) is-0.5 degrees,the value range of-0.5 to 0.5 degrees, avoidAndexceed 3D print head when too big and extrude the height, improved printing precision and reliability.

Furthermore, the increment of the rotation angle of the table top of the rotary table is realized by adopting an incremental PID algorithmAnd the constraint is carried out, the printing precision is effectively improved, and the positive and negative jitter of the rotary table is reduced.

The invention also provides a printing method of the thin-wall tubular model of the five-axis 3D printer, which can directly generate a G code for the printer to execute and partially solves the problem that the five-axis 3D printer is lack of a general slicing algorithm.

In conclusion, the invention provides a thin-wall tubular model slicing method, a thin-wall tubular model slicing system and a thin-wall tubular model printing method for a five-axis 3D printer, which can be suitable for five-axis 3D printing equipment of different types, can perform rapid automatic layered slicing on various bent pipe models or models with structures similar to bent pipes, and are beneficial to popularization and application of a five-axis 3D printing technology; the algorithm for controlling the curvature vector direction of the model can effectively improve the fused deposition effect of the 3D printer, so that the surface of the model is smoother, and compared with the traditional 3D printer, the striations on the surface of a formed part can be effectively controlled; the rapid layering slicing method provided by the invention is simple in calculation, high in execution efficiency and good in transportability; the model rotation transformation used in the invention can be directly calculated by using matrix multiplication, thereby avoiding the cyclic use of programs, effectively improving the execution efficiency of the algorithm, being independent of a hardware platform and being convenient for transplantation.

Drawings

FIG. 1 is a schematic diagram of a thin-walled tubular mold printing process according to the present invention.

Detailed Description

In order to make the technical problems, technical solutions and advantageous effects of the present invention more apparent, the following embodiments further describe the present invention in detail. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The invention discloses a thin-wall tubular model slicing method of a five-axis 3D printer, wherein the five-axis 3D printer comprises a 3D printer body and a working turntable; the working rotary table comprises a rotary table top, and the rotary table top has a rotary freedom degree in the horizontal direction and a rotary freedom degree in the normal direction; the method comprises the following steps:

step 1, establishing a coordinate system, reading a three-dimensional model of a workpiece to be printed, and fixedly connecting the three-dimensional model with a table top of a rotary table;

step 2, extracting the gravity centers of all height cross sections of the three-dimensional model, and sequentially connecting to obtain a gravity center curve;

step 3, calculating curvature vectors of gravity center curves of the current height layers of the three-dimensional model;

step 4, performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and acquiring the rotation attitude information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and 5, updating the current height layer of the three-dimensional model, and repeating the steps 3-4 to complete the layered slicing to obtain the layered slicing information of the workpiece to be printed.

The slicing method disclosed by the invention has the core that the three-dimensional model of the workpiece to be printed is subjected to layered scanning from bottom to bottom in the height direction, and the posture of the three-dimensional model is adjusted to be vertical upwards by virtue of two-degree-of-freedom rotation of the table top of the rotary table, namely the current section of the three-dimensional model is in a horizontal state, so that unsupported printing is realized, and the printing effect is effectively improved; the method is characterized in that the rotation angles of two freedom degree rotating shafts on the table top of the rotary table are rapidly and accurately calculated, and the slice information of the current height layer of the three-dimensional model is obtained by utilizing the rotation posture information of the table top of the rotary table.

For the bent pipe model, the cross section obtained by slicing along the horizontal direction is approximately circular, the gravity center of each cross section is obtained by calculation, the gravity centers of the cross sections obtained by slicing along the horizontal direction at each height are sequentially connected, and the gravity center curve of the bent pipe model is obtained; the trend of the gravity center curve is the trend of the bent pipe type model, and the model is rotated to be in a vertical upward state, namely the model is converted into a state that the curvature vector of the gravity center curve is adjusted to be in a vertical upward state; respectively slicing an upper layer and a lower layer with the thickness as the height of a unit layer at the current height, obtaining three cross sections together with the cross section of the current height, calculating the gravity center of each cross section, and calculating the curvature vector of the gravity center curve of the model at the position through the three gravity centers; and rotating transformation in two directions is carried out on the table top of the rotary table, the model is adjusted to the condition that the curvature vector of the gravity curve is zero in the horizontal plane projection, the angle of the rotary table required to rotate can be obtained, and the parameters required by five-axis 3D printing can be obtained according to the rotating angle of the rotary table.

The invention also provides a thin-wall tubular model slicing system of the five-axis 3D printer, which comprises the following components:

the building module is used for building a coordinate system, reading a three-dimensional model of a workpiece to be printed and fixedly connecting the three-dimensional model with the table top of the rotary table;

the gravity center curve module is used for extracting the gravity centers of all height cross sections of the three-dimensional model and sequentially connecting the gravity centers to obtain a gravity center curve;

the curvature vector calculation module is used for calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model;

the slice information calculation module is used for performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and obtaining the rotation posture information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and the circulating module is used for updating the current height layer of the three-dimensional model, acquiring the slice information of each current height layer of the three-dimensional model until the layered slicing is finished, and acquiring the layered slice information of the workpiece to be printed.

When the slicing method or the slicing system is adopted for 3D printing, the method comprises the following steps:

reading a three-dimensional model file stored in an STL format or other data formats, obtaining an associated triangular patch of the three-dimensional model, and establishing a topological relation between the triangular patches;

setting printing parameters; the printing parameters include: the printing layer height, the number of the outer wall printing layers and the outer wall overlapping proportion;

the thin-wall tubular model slicing method or the thin-wall tubular model slicing system for the five-axis 3D printer is adopted to slice the three-dimensional model in a layering manner;

and generating a G code executable by the five-axis 3D printer, importing the G code into the five-axis 3D printer, and printing on a working turntable.

The thin-wall tubular model slicing method, the thin-wall tubular model slicing system and the thin-wall tubular model printing method of the five-axis 3D printer are used for common thin-wall tubular parts, the unsupported printing and multidirectional printing of the parts are realized, and the surface precision and the interlayer strength of a formed part can be effectively improved; the method is suitable for five-axis 3D printing equipment of different types, can be directly applied to a five-axis 3D printing method of a bent pipe shape model, can be popularized to the printing of a bent pipe-like object, and has strong universality; meanwhile, the rapid automatic layered slicing can be carried out on various bent pipe models or models with structures similar to bent pipes, so that the condition that a slicing program can only be manually designed for a single model by a professional in practical application of the conventional five-axis 3D printer is greatly improved, and the popularization and application of a five-axis 3D printing technology are facilitated; according to the invention, the fused deposition effect of the 3D printer can be effectively improved by the algorithm for controlling the curvature vector direction of the model, so that the surface of the model is smoother, and compared with the traditional 3D printer, the striations on the surface of a formed part can be effectively controlled; the layered slicing method is simple in calculation, high in execution efficiency and good in transportability; the model rotation transformation used in the invention can be directly calculated by using matrix multiplication, thereby avoiding the cyclic use of programs, effectively improving the execution efficiency of the algorithm, being independent of a hardware platform and being convenient for transplantation.

Examples

The embodiment provides a thin-wall tubular model slicing method of a five-axis 3D printer, which takes a mainstream five-axis 3D printer as an example to perform layered slicing printing on a thin-wall elbow model, wherein the five-axis 3D printer is a turntable with a double-rotation cradle type structure introduced into a traditional 3D printer gantry type three-axis movement mechanism; the double-rotation cradle type structure rotary table comprises a rotary table top, and the rotary table top has a rotary freedom degree in the horizontal direction and a rotary freedom degree in the normal direction.

The method specifically comprises the following steps:

step 1, establishing a coordinate system

Firstly, establishing a turntable coordinate system xyz, defining the circle center of a turntable table surface as a coordinate origin o, taking a rotating shaft of the turntable table surface rotating around the horizontal direction as an x axis, marking the rotating shaft as an A axis, and taking a rotating shaft rotating around the normal direction of the turntable table surface as a z axis, and marking the rotating shaft as a C axis; the y-axis is determined according to the right hand rule, based on the defined A-axis and C-axis.

Secondly, establishing a fixed reference coordinate system XYZ, defining a Z axis as a vertical upward direction by taking the circle center of the table top of the rotary table at the work zero position as a coordinate origin O, and defining an X axis and an X axis to be superposed at the work zero position; the Y axis is determined according to the right hand rule based on the defined X axis and Z axis.

In this embodiment, the turntable coordinate system xyz is fixedly connected to the turntable surface, and the three-dimensional model is fixedly connected to the turntable during the printing process.

And 2, reading a three-dimensional model file stored in an STL format or other data formats, fixedly connecting the three-dimensional model with the table top of the turntable, and storing the three-dimensional model as a vector model.

Step 3, scanning the three-dimensional model from bottom to top

According to the preset layer height, the three-dimensional model is scanned in a layering mode from bottom to top in the height direction of the three-dimensional model, the gravity center of the cross section of each layering height of the three-dimensional model is calculated, the gravity centers of the cross sections of each layering height of the three-dimensional model are connected in sequence, and a gravity center curve is obtained.

Step 4, calculating curvature vectors of gravity center curves of current height layers of the three-dimensional model

Defining the layer height of the current height layer as layerheight and the unit layer height as unit; layering the three-dimensional model at the layer heights of layerHeight-unit, layerHeight + unit and layerHeight +2 unit to respectively obtain a cross section layer1, a cross section layer2, a cross section layer3 and a cross section layer 4; and (3) pointing the gravity center of the cross section layer1 to the gravity center of the cross section layer3 to obtain a curvature vector of a gravity center curve of the current height layer of the three-dimensional model.

Step 5, performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and acquiring the rotation attitude information of the working rotary table corresponding to the current height layer of the three-dimensional model; and calculating to obtain the slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model.

The method specifically comprises the following steps:

step 51, calculating the rotation angles of the A-axis and the C-axis

Unitizing the curvature vector of the current height layer central curve of the three-dimensional model to obtain a unitized vector dir (x, y, z), and calculating the rotating angles of the A axis and the C axis by the following steps: firstly, rotating the shaft A and a three-dimensional model fixedly connected with the table top of the turntable to a horizontal initial state through rotation conversion; to rotate the unitized vector dir (x, y, z) until its projection on the XOY plane coincides with the y-axis, the C-axis needs to be rotatedWherein the content of the first and second substances,rotating the turntable coordinate system around the C axisThen rotates around the A axisThe state before the C axis needs to rotate the radian is recovered, and the A axis needs to rotate the angleWherein the content of the first and second substances,

step 52, to prevent calculationAndtoo large, exceeding the extrusion height of the 3D printer nozzle; to pairAndthe limitation of the saturation link is added,the value range of the (B) is-0.5 degrees,the value range of (A) is-0.5 degrees; due to the uncertainty of the bending direction of the unknown bent pipe model of the workpiece to be printed and the fact that the cross section of the bent pipe at a certain height is not a regular perfect circle; using calculation of the centre of gravityAndcompared with a theoretical value, the method has unforeseeable errors, and adopts an incremental PID algorithm to increment the rotation angle of the table top of the turntable before adding saturation link limitation in order to improve the printing precision and reduce the positive and negative jitter of the turntableCarrying out constraint;

wherein the increment of the rotation angle of the table top of the turntableThe expression of (a) is:

wherein Kp, Ki and Kd are PID parameters, ekFor the current increment of the angle of rotation, ek-1Error of the increment of the rotation angle of the previous step and the increment of the rotation angle of the subsequent step, ek-2The error between the increment of the rotation angle of the previous step and the increment of the rotation angle of the next step;

in this embodiment, the PID parameter of the a axis is Kp ═ 0.12, Ki ═ 0.16, and Kd ═ 0; the PID parameters of the C axis are Kp ═ 0.05, Ki ═ 0.14, and Kd ═ 0.

Step 53, rotating the three-dimensional model

In order to make the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane zero, the rotary transformation of the table top of the rotary table is carried out in the following way:

first, the counter table is rotated about the x-axisThen rotated about the z-axisThen rotates around the x-axisFinally rotating around the x axisWherein the content of the first and second substances,is the angle of the x-axis current elevation layer,is the corner of the z-axis current elevation layer,in angular increments of rotation of the x-axis,is the angular increment of the z-axis rotation;

wherein the counter-rotating table top rotates around the x-axisThe rotation matrix is recorded asThe expression of (a) is:

to the table top of the rotary table to rotate around the z axisRotation matrix memoryThe expression of (a) is:

to the table top of the rotary table rotating around the x axisThe rotation matrix is recorded asThe expression of (a) is:

to the table top of the rotary table rotating around the x axisThe rotation matrix is recorded asThe expression of (a) is:

the rotated three-dimensional model is recorded as a vector modelRot, wherein the expression of the vector modelRot is as follows:

step 54, update layer height and slice

In order to calculate the height to be cut after the three-dimensional model is rotated, the barycentric coordinates of the cross section layer2 in the rotated three-dimensional model are subjected to rotation transformation, the z coordinate of the cross section layer2 after the rotation is updated to the layer height layerheight of the current height layer, and the rotated three-dimensional model is sliced at the layer height layerheight of the current height layer to obtain the cross section of the layer to be cut.

Step 55 of generating current height layer printing information

According to the obtained cross section of the height of the layer to be cut, the cross section of the layer to be cut is a polygon, the minimum side length is set for the polygon to carry out interpolation, the polygon is subjected to clockwise standardization, the polygon is subjected to internal contraction operation, the outer wall is printed for many times, the strength is improved, and the slice printing information of the current height layer is obtained.

And 6, updating the current height layer of the three-dimensional model, repeating the step 4-5 until the cross section layer4 is empty, and finishing model scanning to finish the layered slicing to obtain the layered slicing information of the workpiece to be printed.

When the slicing method described in this embodiment is used for 3D printing, the method specifically includes:

s1, reading a three-dimensional model file of the thin-wall tubular model to be processed, obtaining an associated triangular patch of the three-dimensional model, and establishing a topological relation between the triangular patches of the three-dimensional model;

s2, setting printing parameters; the printing parameters comprise printing layer height, outer wall printing layer number and outer wall overlapping proportion;

s3, slicing the workpiece to be printed to obtain layered slicing information; when a workpiece to be printed is sliced, the workpiece to be printed is sliced by adopting the thin-wall tubular model layered slicing method of the five-axis 3D printer;

and s4, generating a G code which can be executed by the five-axis 3D printer according to the layered slice information obtained in s3, importing the G code into the five-axis 3D printer, and printing on the working turntable.

This embodiment also provides a thin wall tubular model section system of five 3D printers, includes:

the building module is used for building a coordinate system, reading a three-dimensional model of a workpiece to be printed and fixedly connecting the three-dimensional model with the table top of the rotary table;

the gravity center curve module is used for extracting the gravity centers of all height cross sections of the three-dimensional model and sequentially connecting the gravity centers to obtain a gravity center curve;

the curvature vector calculation module is used for calculating the curvature vector of the gravity center curve of the current height layer of the three-dimensional model;

the slice information calculation module is used for performing rotation transformation on the working rotary table to enable the projection of the curvature vector of the gravity center curve of the current height layer of the three-dimensional model on the horizontal plane to be zero, and obtaining the rotation posture information of the working rotary table corresponding to the current height layer of the three-dimensional model; calculating to obtain slice information of the current height layer of the three-dimensional model according to the rotating posture information of the working turntable corresponding to the current height layer of the three-dimensional model;

and the circulating module is used for updating the current height layer of the three-dimensional model, acquiring the slice information of each current height layer of the three-dimensional model until the layered slicing is finished, and acquiring the layered slice information of the workpiece to be printed.

In the embodiment, a thin-wall elbow model is taken as an example, and a test result shows that when the five-axis 3D printing is performed by adopting the layered slicing method described in the embodiment; the experimental result shows that the calculation process of the layered slice is simple and efficient, the bent pipe model can be printed without support, and the layer pattern caused by the connection of adjacent layers is effectively reduced; the method for estimating the curvature according to the trend of the adjacent layers can be directly popularized and applied to five-axis 3D printing processes of other similar models.

The above-described embodiment is only one of the embodiments that can implement the technical solution of the present invention, and the scope of the present invention is not limited by the embodiment, but includes any variations, substitutions and other embodiments that can be easily conceived by those skilled in the art within the technical scope of the present invention disclosed.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种熔丝沉积成形—射流电铸组合增材制造方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!