[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN108327287A - A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile - Google Patents

A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile Download PDF

Info

Publication number
CN108327287A
CN108327287A CN201810040995.2A CN201810040995A CN108327287A CN 108327287 A CN108327287 A CN 108327287A CN 201810040995 A CN201810040995 A CN 201810040995A CN 108327287 A CN108327287 A CN 108327287A
Authority
CN
China
Prior art keywords
slice
quadrilateral
line segment
sliced
grid
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.)
Granted
Application number
CN201810040995.2A
Other languages
Chinese (zh)
Other versions
CN108327287B (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201810040995.2A priority Critical patent/CN108327287B/en
Publication of CN108327287A publication Critical patent/CN108327287A/en
Application granted granted Critical
Publication of CN108327287B publication Critical patent/CN108327287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B29WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
    • B29CSHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
    • B29C64/00Additive manufacturing, i.e. manufacturing of three-dimensional [3D] objects by additive deposition, additive agglomeration or additive layering, e.g. by 3D printing, stereolithography or selective laser sintering
    • B29C64/30Auxiliary operations or equipment
    • B29C64/386Data acquisition or data processing for additive manufacturing
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B33ADDITIVE MANUFACTURING TECHNOLOGY
    • B33YADDITIVE MANUFACTURING, i.e. MANUFACTURING OF THREE-DIMENSIONAL [3-D] OBJECTS BY ADDITIVE DEPOSITION, ADDITIVE AGGLOMERATION OR ADDITIVE LAYERING, e.g. BY 3-D PRINTING, STEREOLITHOGRAPHY OR SELECTIVE LASER SINTERING
    • B33Y50/00Data acquisition or data processing for additive manufacturing

Landscapes

  • Chemical & Material Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Materials Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • Mechanical Engineering (AREA)
  • Optics & Photonics (AREA)

Abstract

本发明公开了一种三周期极小曲面三维打印切片轮廓快速生成方法,包括输入待切片的三周期极小曲面表达式、切片厚度以及切片四边形网格分辨率;根据三周期极小曲面坐标分布范围及切片厚度,生成曲面对应区域的切片四边形网格;根据曲面表达式,线性插值计算曲面和每层切片四边形网格的切片线段;保存切片线段与对应切片四边形网格中四边形的拓扑关系;对所有的切片线段进行排序;最终将所有排序后生成的切片轮廓以CLI文件格式输出保存。本发明利用切片四边形网格实现对三周期极小曲面的快速切片以及切片散乱线段的快速排序,快速生成三维打印切片轮廓,避免了传统方法必须生成STL模型消耗大量时间和内存空间的缺点。

The invention discloses a method for quickly generating slice outlines of three-period minimal curved surfaces for three-dimensional printing, which includes inputting the three-period minimal curved surface expression to be sliced, slice thickness, and slice quadrilateral grid resolution; according to the three-period minimal curved surface coordinate distribution Range and slice thickness, generate a sliced quadrilateral grid of the corresponding area of the surface; according to the surface expression, linear interpolation calculates the slice line segment of the surface and each layer of the sliced quadrilateral grid; saves the topological relationship between the slice line segment and the quadrilateral in the corresponding sliced quadrilateral grid; Sort all the slice line segments; finally save all the slice contours generated after sorting in CLI file format. The present invention utilizes sliced quadrilateral grids to realize quick slices of three-period minimal surfaces and quick sorting of sliced scattered line segments, quickly generate three-dimensional printing slice outlines, and avoid the shortcomings of traditional methods that consume a lot of time and memory space for generating STL models.

Description

一种三周期极小曲面三维打印切片轮廓的快速生成方法A fast generation method of three-period minimal surface 3D printing slice outline

技术领域technical field

本发明涉及三维打印计算机辅助制造(Computer aided manufacturing,CAM)技术领域,尤其是涉及一种三周期极小曲面三维打印切片轮廓的快速生成方法。The present invention relates to the technical field of three-dimensional printing computer aided manufacturing (Computer aided manufacturing, CAM), in particular to a method for rapidly generating slice outlines of three-period minimal curved surfaces for three-dimensional printing.

背景技术Background technique

三维打印技术是一种基于层片叠加的先进制造技术,又被称为快速原型技术或增材制造技术。不同于传统机加工等不断削减材料以得到设计形状的工艺方法,三维打印技术利用各类材料,借助计算机辅助设备层层叠加得到设计模型,特别适合复杂结构的快速制造成型。三维打印切片轮廓生成是影响制造最终精度与效率的关键环节。3D printing technology is an advanced manufacturing technology based on layer stacking, also known as rapid prototyping technology or additive manufacturing technology. Different from traditional machining and other methods that continuously cut materials to obtain the design shape, 3D printing technology uses various materials and superimposes the design model with the help of computer-aided equipment, which is especially suitable for rapid manufacturing of complex structures. 3D printing slice contour generation is a key link that affects the final accuracy and efficiency of manufacturing.

为了在精度与效率之间找到比较理想的平衡点,国内外学者在切片轮廓生成方面做了大量的工作,针对不同的三维模型数据,提出了各类切片生成方法。当前在三维打印领域,STL是最为常用的模型数据格式。STL用大量的三角面片逼近设计模型形状,数据结构简单,便于处理。但是为了提高建模精度,必须大大增加面片数量,进而消耗大量的内存和处理时间。特别在建模复杂拓扑结构时,STL的劣势表现的更为明显,大量的面片和一些难以处理的面片缺陷经常会导致切片轮廓生成的失败。In order to find an ideal balance between precision and efficiency, scholars at home and abroad have done a lot of work on slice contour generation, and proposed various slice generation methods for different 3D model data. Currently in the field of 3D printing, STL is the most commonly used model data format. STL approximates the shape of the design model with a large number of triangular faces, and the data structure is simple and easy to handle. But in order to improve the modeling accuracy, the number of facets must be greatly increased, which consumes a lot of memory and processing time. Especially when modeling complex topological structures, the disadvantages of STL are more obvious. A large number of patches and some difficult-to-handle patch defects often lead to the failure of slice contour generation.

三周期极小曲面TPMS(Triply Periodic Minimal Surfaces)是一种具有复杂拓扑结构的隐式曲面。其光滑的表面以及内外连通的孔洞结构在工程领域有着广泛的应用。三维打印具有制造此类复杂结构的天然优势。Melchels等人将设计的TPMS结构保存为STL文件利用三维打印工艺进行制造,进而作为组织工程支架进行细胞培养(参见Melchels FP W,Bertoldi K,Gabbrielli R,et al.Mathematically defined tissue engineeringscaffold architectures prepared by stereolithography[J].Biomaterials,2010,31(27):6909-6916.);Li等人生成STL格式的TPMS结构作为三维打印模型的填充结构,实现打印轻量化目的(参见Li D,Dai N,Jiang X,et al.Interior structural optimizationbased on the density-variable shape modeling of 3D printed objects[J].TheInternational Journal of Advanced Manufacturing Technology,2016,83(9-12):1627-1635)。切片线段排序处理方面,Kim提出了一种网格模型的切片轮廓暴力生成方法,方法实施简单但时间复杂度高达O(n2)(参见Kim H C.Tool path generation forcontour parallel milling with incomplete mesh model[J].The InternationalJournal of Advanced Manufacturing Technology,2010,48(5):443-454);Lin等人提出了一种针对STL切片线段的优化排序算法,时间复杂度O(nlogn)(参见Lin Z,Fu J,Shen H,et al.Efficient cutting area detection in roughing process for meshedsurfaces[J].The International Journal of Advanced Manufacturing Technology,2013,69(1-4):525-530)。Triply Periodic Minimal Surfaces TPMS (Triply Periodic Minimal Surfaces) is an implicit surface with complex topology. Its smooth surface and interconnected pore structure have a wide range of applications in the engineering field. 3D printing has a natural advantage in fabricating such complex structures. Melchels et al. saved the designed TPMS structure as an STL file and manufactured it using a three-dimensional printing process, and then used it as a tissue engineering scaffold for cell culture (see Melchels FP W, Bertoldi K, Gabbrielli R, et al. Mathematically defined tissue engineering scaffold architectures prepared by stereolithography [J].Biomaterials,2010,31(27):6909-6916.); Li et al. generated the TPMS structure in STL format as the filling structure of the 3D printing model to achieve the purpose of printing lightweight (see Li D, Dai N, Jiang X, et al. Interior structural optimization based on the density-variable shape modeling of 3D printed objects [J]. The International Journal of Advanced Manufacturing Technology, 2016, 83(9-12):1627-1635). In terms of slice line segment sorting, Kim proposed a brute force generation method for slice contours of mesh models. The method is simple to implement but has a time complexity as high as O(n 2 ) (see Kim H C. Tool path generation for contour parallel milling with incomplete mesh model [J]. The International Journal of Advanced Manufacturing Technology, 2010, 48 (5): 443-454); Lin et al. proposed an optimized sorting algorithm for STL slice line segments, with a time complexity of O(nlogn) (see Lin Z , Fu J, Shen H, et al. Efficient cutting area detection in roughing process for meshed surfaces [J]. The International Journal of Advanced Manufacturing Technology, 2013, 69(1-4):525-530).

根据文献分析可知,当前利用三维打印技术制造三周期极小曲面均需先生成STL模型,再进行基于STL的切片。由于结构错综复杂,一般生成的STL模型文件较大,需要消耗很多内存和处理时间。当前的一些切片线段排序算法在处理大数据量下排序问题时效率低下,无法高效生成切片轮廓。此外,未发现任何关于三周期极小曲面切片轮廓生成方法的文献。According to literature analysis, it is known that the current use of 3D printing technology to manufacture three-period minimal surfaces requires first generating an STL model, and then performing STL-based slicing. Due to the intricate structure, the generally generated STL model file is relatively large, which consumes a lot of memory and processing time. Some current slice line segment sorting algorithms are inefficient when dealing with the sorting problem under a large amount of data, and cannot efficiently generate slice outlines. In addition, no literature was found on the generation method of three-period minimal surface slice contours.

发明内容Contents of the invention

为了解决现有基于STL模型的三周期极小曲面三维打印切片效率低、消耗内存大的缺点,本发明提供了一种三周期极小曲面三维打印切片轮廓的快速生成方法。通过构建切片四边形网格,快速实现三周期极小曲面的直接切片分层,避免传统方法STL模型的生成。同时充分利用切片四边形网格和切片线段的拓扑关系,快速进行切片线段排序生成最终切片轮廓,时间复杂度仅为线性O(n)。该方法稳定可靠,可以实现三周期极小曲面三维打印切片轮廓的快速生成。In order to solve the shortcomings of low efficiency and large memory consumption of the existing three-period minimal curved surface 3D printing slice based on the STL model, the present invention provides a method for quickly generating the outline of a three-period minimal curved surface 3D printed slice. By constructing a sliced quadrilateral mesh, the direct slice layering of three-period minimal surfaces can be quickly realized, avoiding the generation of the traditional STL model. At the same time, make full use of the topological relationship between the sliced quadrilateral grid and the sliced line segments, quickly sort the sliced line segments to generate the final slice outline, and the time complexity is only linear O(n). The method is stable and reliable, and can realize the rapid generation of three-period minimal surface 3D printing slice contours.

为实现上述发明目的,本发明提供以下技术方案:In order to realize the above-mentioned purpose of the invention, the present invention provides the following technical solutions:

一种三周期极小曲面三维打印切片轮廓的快速生成方法,包括以下步骤:A method for quickly generating slice outlines of three-period minimal surfaces for 3D printing, comprising the following steps:

步骤1:输入待切片的三周期极小曲面的表达式f(x,y,z)=c,,切片厚度h,切片四边形网格分辨率n,其中c为曲面临界值常数,x∈[a0,a1],y∈[b0,b1],z∈[c0,c1];Step 1: Input the expression f(x,y,z)=c of the three-period minimal surface to be sliced, slice thickness h, slice quadrilateral grid resolution n, where c is the surface boundary value constant, x∈[ a 0 , a 1 ], y∈[b 0 ,b 1 ], z∈[c 0 ,c 1 ];

步骤2:根据三周期极小曲面的坐标分布范围及切片厚度,生成曲面对应区域的切片四边形网格;Step 2: According to the coordinate distribution range and slice thickness of the three-period minimal surface, generate a sliced quadrilateral grid for the corresponding area of the surface;

步骤3:根据三周期极小曲面表达式f(x,y,z)=c,线性插值计算曲面和每层切片四边形网格的切片线段;Step 3: According to the three-period minimal surface expression f(x, y, z)=c, linear interpolation calculates the slice line segment of the surface and each layer of slice quadrilateral grid;

步骤4:保存切片线段和与该切片线段对应的切片四边形网格中四边形的拓扑关系;Step 4: Save the slice line segment and the topological relationship of the quadrilaterals in the slice quadrilateral grid corresponding to the slice line segment;

步骤5:根据切片线段和与该切片线段对应的切片四边形网格中四边形的拓扑关系,对切片线段进行排序;Step 5: Sorting the slice line segments according to the topological relationship between the slice line segment and the quadrilaterals in the slice quadrilateral grid corresponding to the slice line segment;

步骤6:将所有排序后生成的切片轮廓以CLI文件格式输出保存。Step 6: Output and save all sorted slice profiles in CLI file format.

其中,所述生成曲面对应区域的切片四边形网格的具体过程为:Wherein, the specific process of generating the slicing quadrilateral mesh of the corresponding area of the curved surface is as follows:

首先,根据切片厚度h,将曲面对应区域分成个平面;First, according to the slice thickness h, the corresponding area of the surface is divided into a plane;

然后对于平面根据切片四边形网格分辨率n,分别沿x、y方向分别生成j个平行线,其中:Then for the plane According to the grid resolution n of the sliced quadrilateral, generate j parallel lines along the x and y directions respectively, where:

平行线 parallel lines

平行线 parallel lines

平行线xj和平行线yj正交,生成曲面对应区域的切片四边形网格。The parallel line x j is orthogonal to the parallel line y j , generating a sliced quadrilateral mesh of the corresponding area of the surface.

优选地,所述步骤3的具体过程为:Preferably, the specific process of said step 3 is:

将每层切片四边形网格的顶点坐标代入三周期极小曲面函数表达式中,对于四边形边P1P2,其中两个顶点的三维坐标为P1(x1,y1,z1),P2(x2,y2,z2),利用线性插值方法计算得到切片线段端点P0Substitute the vertex coordinates of each sliced quadrilateral grid into the expression of the three-period minimal surface function. For the quadrilateral side P 1 P 2 , the three-dimensional coordinates of two vertices are P 1 (x 1 ,y 1 ,z 1 ), P 2 (x 2 ,y 2 ,z 2 ), using the linear interpolation method to calculate the end point P 0 of the slice segment:

即可得到曲面和所有切片四边形网格的切片线段。The surface and all slicing line segments of the slicing quadrilateral mesh are obtained.

利用该方法即可得到曲面和所有切片层四边形网格的切片线段。Using this method, the surface and the slice line segments of the quadrilateral meshes of all slice layers can be obtained.

优选地,所述步骤4的具体过程为:Preferably, the specific process of said step 4 is:

建立切片线段数据结构和四边形数据结构,切片线段数据结构保存切片线段的2个顶点信息和与切片线段对应的相交四边形信息,四边形数据结构保存四边形的4个顶点信息和与四边形对应的切片线段信息,以此建立所有切片线段和与该切片线段对应的四边形的对应拓扑关系。Establish slice line segment data structure and quadrilateral data structure. The slice line segment data structure stores the two vertex information of the slice line segment and the intersecting quadrilateral information corresponding to the slice line segment. The quadrilateral data structure stores the four vertex information of the quadrilateral and the slice line segment information corresponding to the quadrilateral , so as to establish the corresponding topological relationship between all slice line segments and the quadrilaterals corresponding to the slice line segments.

优选地,所述步骤5的具体过程为:Preferably, the specific process of said step 5 is:

步骤5-1:对于一条未排序的切片线段,找到与该切片线段对应的相交四边形;Step 5-1: For an unsorted slice line segment, find the intersecting quadrilateral corresponding to the slice line segment;

步骤5-2:根据该四边形坐标,在四边形网格中找到与该四边形相邻的四边形;Step 5-2: According to the coordinates of the quadrilateral, find the quadrilateral adjacent to the quadrilateral in the quadrilateral grid;

步骤5-3:判断该相邻的四边形中是否存在与该相邻的四边形对应的切片线段;Step 5-3: judging whether there is a slice line segment corresponding to the adjacent quadrilateral in the adjacent quadrilateral;

步骤5-4:找到和当前切片线段拥有相同坐标的相邻线段;Step 5-4: Find the adjacent line segment with the same coordinates as the current slice line segment;

步骤5-5:重复步骤5-1至步骤5-4即可完成切片线段的排序,有序的切片线段即为最终的切片轮廓。Step 5-5: Repeat steps 5-1 to 5-4 to complete the sorting of the slice line segments, and the ordered slice line segments are the final slice contours.

与现有技术相比,本发明具有的优点为:Compared with the prior art, the present invention has the advantages of:

利用分层切片网格,根据三周期极小曲面的函数表达式、坐标分布范围以及切片厚度直接生成分层切片线段,避免了传统方法需要首先生成STL网格模型再切片的缺点,节省了处理时间与内存消耗。此外,充分利用切片线段与切片网格四边形的拓扑关系,快速排序切片线段生成切片轮廓,时间复杂度仅为线性O(n)。本发明方法稳定可靠,可以高效生成三周期极小曲面的三维打印切片轮廓。Using the layered slice grid, the layered slice line segment is directly generated according to the function expression of the three-period minimal surface, the coordinate distribution range, and the slice thickness, avoiding the shortcomings of the traditional method that first generates the STL grid model and then slices, saving processing Time and memory consumption. In addition, by making full use of the topological relationship between the slice line segment and the slice grid quadrilateral, the slice line segment is quickly sorted to generate the slice outline, and the time complexity is only linear O(n). The method of the invention is stable and reliable, and can efficiently generate three-dimensional printing slice outlines of three-period minimal curved surfaces.

附图说明Description of drawings

图1为实施例提供的三周期极小曲面三维打印切片轮廓快速生成方法的流程图;Fig. 1 is a flow chart of a method for quickly generating a three-period minimal curved surface 3D printing slice outline provided by an embodiment;

图2为实施例提供的生成曲面对应区域的切片四边形网格;Fig. 2 is the slicing quadrilateral grid of generating the corresponding area of the curved surface provided by the embodiment;

图3为实施例提供的快速切片结果示意图:(a)为P曲面和四边形网格插值直接生成的切片线段,(b)为切片结果的左视图,(c)为单层切片网格插值计算得到的切片线段;Figure 3 is a schematic diagram of the fast slicing results provided by the embodiment: (a) is the slice line segment directly generated by P surface and quadrilateral grid interpolation, (b) is the left view of the slicing result, (c) is the interpolation calculation of the single-layer slice grid The resulting slice segment;

图4为实施例提供的快速切片时间结果;Fig. 4 is the fast slicing time result that embodiment provides;

图5为实施例提供的切片线段排序时间结果:(a)为小数据量下的排序时间结果,(b)为大数据量下的排序时间结果。Fig. 5 is the result of sorting time of slice line segment provided by the embodiment: (a) is the result of sorting time under small amount of data, (b) is the result of sorting time under large amount of data.

具体实施方式Detailed ways

为使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不限定本发明的保护范围。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, and do not limit the protection scope of the present invention.

图1为实施例提供的三周期极小曲面三维打印切片轮廓快速生成方法的流程图。如图1所示,本实施例提供的方法包括以下步骤:Fig. 1 is a flow chart of a method for quickly generating a three-period minimal curved surface 3D printing slice outline provided by the embodiment. As shown in Figure 1, the method provided in this embodiment includes the following steps:

步骤101:输入待切片的三周期极小曲面的表达式f(x,y,z)=c,切片厚度h,切片四边形网格分辨率n。Step 101: Input the expression f(x, y, z)=c of the three-period minimal surface to be sliced, slice thickness h, and slice quadrilateral grid resolution n.

以三周期极小曲面P曲面为例,函数表达式为f(x,y,z)=cos(0.25πx)+cos(0.25πy)+cos(0.25πz)=0,切片厚度h=0.2mm,网格分辨率n=16,x∈[0,8],y∈[0,8],z∈[0,8]。Taking the three-period minimal surface P as an example, the function expression is f(x,y,z)=cos(0.25πx)+cos(0.25πy)+cos(0.25πz)=0, slice thickness h=0.2mm , grid resolution n=16, x∈[0,8], y∈[0,8], z∈[0,8].

步骤102:根据三周期极小曲面的坐标分布范围及切片厚度,生成曲面对应区域的切片四边形网格。Step 102: According to the coordinate distribution range and slice thickness of the three-period minimal surface, generate a sliced quadrilateral mesh of the corresponding area of the surface.

由于步骤101中确定三周期极小曲面的表达式f(x,y,z)=c时,不仅确定了表达式f(x,y,z)=c的方程式,还确定了每个自变量的取值范围,这样,三周期极小曲面的坐标分布范围就相应确定了,再根据切片厚度,即可获得曲面对应区域。Since the expression f(x, y, z)=c of the three-period minimal surface is determined in step 101, not only the equation of the expression f(x, y, z)=c is determined, but each independent variable In this way, the coordinate distribution range of the three-period minimal surface is determined accordingly, and then the corresponding area of the surface can be obtained according to the slice thickness.

如图2所示,根据切片厚度h=0.2mm,分别在zi=i×0.2,(i=1,…,40)的平面上根据切片四边形网格分辨率n=16,在x、y方向分别生成x=j×0.5,(j=0,…,16)、y=j×0.5,(j=0,…,16)的平行线,平行线正交生成曲面对应区域的切片四边形网格。As shown in Figure 2, according to the slice thickness h=0.2mm, respectively on the plane z i =i×0.2, (i=1,...,40) according to the slice quadrilateral grid resolution n=16, in x, y The directions generate parallel lines of x=j×0.5, (j=0,…,16), y=j×0.5, (j=0,…,16) respectively, and the parallel lines are orthogonal to generate a slice quadrilateral network of the corresponding area of the surface grid.

步骤103:根据三周期极小曲面表达式f(x,y,z)=c,线性插值计算曲面和每层切片四边形网格的切片线段。Step 103: According to the three-period minimal surface expression f(x, y, z)=c, linear interpolation is used to calculate the surface and slice line segments of each layer of sliced quadrilateral grids.

具体地,将每层切片四边形网格顶点坐标代入三周期极小曲面函数表达式f(x,y,z)=c中,对于四边形边P1P2,其中两个顶点的三维坐标为P1(x1,y1,z1),P2(x2,y2,z2),利用线性插值方法计算得到切片线段的端点P0Specifically, substituting the vertex coordinates of each slice quadrilateral grid into the three-period minimal surface function expression f(x, y, z)=c, for the quadrilateral side P 1 P 2 , the three-dimensional coordinates of the two vertices are P 1 (x 1 , y 1 , z 1 ), P 2 (x 2 , y 2 , z 2 ), use the linear interpolation method to calculate the endpoint P 0 of the slice segment:

利用上述方法即可得到曲面和所有切片层四边形网格的切片线段。Using the method above, the surface and all the slice line segments of the quadrilateral mesh of the slice layer can be obtained.

如图3(a)即为P曲面和切片四边形网格插值直接生成的切片线段,如图3(b)为切片结果的左视图,如图3(c)为单层切片网格插值计算得到的切片线段。Figure 3(a) is the slice line segment directly generated by the interpolation of the P surface and the sliced quadrilateral grid, Figure 3(b) is the left view of the slice result, and Figure 3(c) is calculated by the single-layer slice grid interpolation slice line segment.

步骤104:保存切片线段和与该切片线段对应的切片四边形网格中四边形的拓扑关系。Step 104: Save the topological relationship between the slice line segment and the quadrilaterals in the slice quadrilateral grid corresponding to the slice line segment.

具体地,建立切片线段数据结构和四边形数据结构,切片线段数据结构保存切片线段的2个顶点信息和与切片线段对应的相交四边形信息,四边形数据结构保存四边形的4个顶点信息和与四边形对应的切片线段信息,以此建立所有切片线段和与该切片线段对应的四边形的对应拓扑关系。Specifically, a slice line segment data structure and a quadrilateral data structure are established. The slice line segment data structure stores two vertex information of the slice line segment and the intersecting quadrilateral information corresponding to the slice line segment. The quadrilateral data structure stores four vertex information of the quadrilateral and the corresponding Slice line segment information, so as to establish the corresponding topological relationship between all slice line segments and the quadrilateral corresponding to the slice line segment.

步骤105:根据切片线段和与该切片线段对应的切片四边形网格中四边形的拓扑关系,对切片线段进行排序。Step 105: Sorting the slice line segments according to the topological relationship between the slice line segment and the quadrilaterals in the slice quadrilateral grid corresponding to the slice line segment.

步骤105的具体步骤如下:The concrete steps of step 105 are as follows:

步骤105-1:对于一条未排序的切片线段,找到与该切片线段对应的相交四边形;Step 105-1: For an unsorted slice line segment, find the intersecting quadrilateral corresponding to the slice line segment;

步骤105-2:根据该四边形坐标,在四边形网格中找到与该四边形相邻的四边形;Step 105-2: According to the coordinates of the quadrilateral, find the quadrilateral adjacent to the quadrilateral in the quadrilateral grid;

步骤105-3:判断该相邻的四边形中是否存在与该相邻的四边形对应的切片线段;Step 105-3: judging whether there is a slice line segment corresponding to the adjacent quadrilateral in the adjacent quadrilateral;

步骤105-4:找到和当前切片线段拥有相同坐标的相邻线段;Step 105-4: Find an adjacent line segment that has the same coordinates as the current slice line segment;

步骤105-5:重复步骤105-1至步骤105-4即可完成切片线段的排序,有序的切片线段即为最终的切片轮廓。Step 105-5: Repeat steps 105-1 to 105-4 to complete the sorting of slice line segments, and the ordered slice line segments are the final slice contours.

步骤106:将所有排序后生成的切片轮廓以CLI文件格式输出保存。Step 106: Output and save all sorted slice contours in CLI file format.

本发明的典型实施实例如下:Typical implementation examples of the present invention are as follows:

输入待切片的三周期极小曲面P曲面函数表达式为f(x,y,z)=cos(0.25πx)+cos(0.25πy)+cos(0.25πz)=0,x∈[0,8],y∈[0,8],z∈[0,8],切片厚度h=0.2mm,设置不同的网格分辨率n得到不同数目的切片线段,切片线段排序后得到不同精度的切片轮廓,生成层片CLI文件保存。Input the three-period minimal surface P surface function expression to be sliced as f(x,y,z)=cos(0.25πx)+cos(0.25πy)+cos(0.25πz)=0, x∈[0,8 ], y∈[0,8], z∈[0,8], slice thickness h=0.2mm, set different grid resolutions n to get different numbers of slice line segments, and get slice contours with different precision after sorting the slice line segments , to generate a slice CLI file and save it.

在英特尔至强CPU@3.40GHz,8GB内存的电脑上测试快速切片方法和传统切片方法的切片时间差异。如图4所示,快速切片明显比传统先生成三周期极小曲面STL模型再切片的方法效率更高,同时也节省了保存STL文件的内存消耗。Test the slicing time difference between the fast slicing method and the traditional slicing method on a computer with an Intel Xeon CPU@3.40GHz and 8GB of memory. As shown in Figure 4, fast slicing is obviously more efficient than the traditional method of first generating a three-period minimal surface STL model and then slicing, and it also saves the memory consumption of saving STL files.

此外,在切片线段排序方面,如图5(a)所示,较小切片线段数据量下快速排序O(n)方法耗时明显少于Kim提出的暴力排序O(n2)方法,快速排序O(n)方法与Lin等人提出的优化排序O(nlogn)方法差异不大;如图5(b)所示,较大切片线段数据量下,快速排序O(n)方法与优化排序O(nlogn)方法的排序耗时在算法效率拐点处基本一致,此后随着切片线段数目的增大,快速排序方法相比O(nlogn)方法会节省越来越多的排序时间。三周期极小曲面结构复杂,一般产生的切片线段数据量较大,本发明方法可以快速对曲面进行切片,进而快速对散乱切片线段排序生成切片轮廓。In addition, in terms of slice line sorting, as shown in Figure 5(a), the quick sort O(n) method consumes significantly less time than the violent sort O(n 2 ) method proposed by Kim under a small slice line segment data volume, and the quick sort There is little difference between the O(n) method and the optimized sorting O(nlogn) method proposed by Lin et al.; The sorting time of the (nlogn) method is basically the same at the inflection point of the algorithm efficiency. After that, as the number of slice line segments increases, the quick sorting method will save more and more sorting time than the O(nlogn) method. The structure of the three-period minimal curved surface is complex, and the amount of slice line segment data generally generated is large. The method of the present invention can quickly slice the surface, and then quickly sort the scattered slice line segments to generate a slice outline.

以上所述的具体实施方式对本发明的技术方案和有益效果进行了详细说明,应理解的是以上所述仅为本发明的最优选实施例,并不用于限制本发明,凡在本发明的原则范围内所做的任何修改、补充和等同替换等,均应包含在本发明的保护范围之内。The above-mentioned specific embodiments have described the technical solutions and beneficial effects of the present invention in detail. It should be understood that the above-mentioned are only the most preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, supplements and equivalent replacements made within the scope shall be included in the protection scope of the present invention.

Claims (5)

1.一种三周期极小曲面三维打印切片轮廓的快速生成方法,其特征在于,包括以下步骤:1. A method for rapidly generating three-period minimal curved surface three-dimensional printing slice outlines, characterized in that it comprises the following steps: 步骤1:输入待切片的三周期极小曲面的表达式f(x,y,z)=c,,切片厚度h,切片四边形网格分辨率n,其中c为曲面临界值常数,x∈[a0,a1],y∈[b0,b1],z∈[c0,c1];Step 1: Input the expression f(x,y,z)=c of the three-period minimal surface to be sliced, slice thickness h, slice quadrilateral grid resolution n, where c is the surface boundary value constant, x∈[ a 0 , a 1 ], y∈[b 0 ,b 1 ], z∈[c 0 ,c 1 ]; 步骤2:根据三周期极小曲面的坐标分布范围及切片厚度,生成曲面对应区域的切片四边形网格;Step 2: According to the coordinate distribution range and slice thickness of the three-period minimal surface, generate a sliced quadrilateral grid for the corresponding area of the surface; 步骤3:根据三周期极小曲面表达式f(x,y,z)=c,线性插值计算曲面和每层切片四边形网格的切片线段;Step 3: According to the three-period minimal surface expression f(x, y, z)=c, linear interpolation calculates the slice line segment of the surface and each layer of slice quadrilateral grid; 步骤4:保存切片线段和与该切片线段对应的切片四边形网格中四边形的拓扑关系;Step 4: Save the slice line segment and the topological relationship of the quadrilaterals in the slice quadrilateral grid corresponding to the slice line segment; 步骤5:根据切片线段和与该切片线段对应的切片四边形网格中四边形的拓扑关系,对切片线段进行排序;Step 5: Sorting the slice line segments according to the topological relationship between the slice line segment and the quadrilaterals in the slice quadrilateral grid corresponding to the slice line segment; 步骤6:将所有排序后生成的切片轮廓以CLI文件格式输出保存。Step 6: Output and save all sorted slice profiles in CLI file format. 2.如权利要求1所述的三周期极小曲面三维打印切片轮廓的快速生成方法,其特征在于,所述生成曲面对应区域的切片四边形网格的具体过程为:2. The rapid generation method of three-period minimal curved surface 3D printing slice outline as claimed in claim 1, is characterized in that, the specific process of the slice quadrilateral grid of described generation curved surface corresponding area is: 首先,根据切片厚度h,将曲面对应区域分成个平面;First, according to the slice thickness h, the corresponding area of the surface is divided into a plane; 然后对于平面根据切片四边形网格分辨率n,分别沿x、y方向分别生成j个平行线,其中:Then for the plane According to the grid resolution n of the sliced quadrilateral, generate j parallel lines along the x and y directions respectively, where: 平行线 parallel lines 平行线xj和平行线yj正交,生成曲面对应区域的切片四边形网格。The parallel line x j is orthogonal to the parallel line y j , generating a sliced quadrilateral mesh of the corresponding area of the surface. 3.如权利要求1所述的三周期极小曲面三维打印切片轮廓的快速生成方法,其特征在于,所述步骤3的具体过程为:3. The rapid generation method of three-period minimal curved surface 3D printing slice outline as claimed in claim 1, characterized in that, the specific process of the step 3 is: 将每层切片四边形网格的顶点坐标代入三周期极小曲面函数表达式中,对于四边形边P1P2,其中两个顶点的三维坐标为P1(x1,y1,z1),P2(x2,y2,z2),利用线性插值方法计算得到切片线段端点P0Substitute the vertex coordinates of each sliced quadrilateral grid into the expression of the three-period minimal surface function. For the quadrilateral side P 1 P 2 , the three-dimensional coordinates of two vertices are P 1 (x 1 ,y 1 ,z 1 ), P 2 (x 2 ,y 2 ,z 2 ), using the linear interpolation method to calculate the end point P 0 of the slice segment: 即可得到曲面和所有切片四边形网格的切片线段。The surface and all slicing line segments of the slicing quadrilateral mesh are obtained. 利用该方法即可得到曲面和所有切片层四边形网格的切片线段。Using this method, the surface and the slice line segments of the quadrilateral meshes of all slice layers can be obtained. 4.如权利要求1所述的三周期极小曲面三维打印切片轮廓的快速生成方法,其特征在于,所述步骤4的具体过程为:4. The rapid generation method of three-period minimal curved surface 3D printing slice outline as claimed in claim 1, characterized in that, the specific process of the step 4 is: 建立切片线段数据结构和四边形数据结构,切片线段数据结构保存切片线段的2个顶点信息和与切片线段对应的相交四边形信息,四边形数据结构保存四边形的4个顶点信息和与四边形对应的切片线段信息,以此建立所有切片线段和与该切片线段对应的四边形的对应拓扑关系。Establish slice line segment data structure and quadrilateral data structure. The slice line segment data structure stores the two vertex information of the slice line segment and the intersecting quadrilateral information corresponding to the slice line segment. The quadrilateral data structure stores the four vertex information of the quadrilateral and the slice line segment information corresponding to the quadrilateral , so as to establish the corresponding topological relationship between all slice line segments and the quadrilaterals corresponding to the slice line segments. 5.如权利要求1所述的三周期极小曲面三维打印切片轮廓的快速生成方法,其特征在于,所述步骤5的具体过程为:5. The rapid generation method of three-period minimal curved surface 3D printing slice contour as claimed in claim 1, characterized in that, the specific process of the step 5 is: 步骤5-1:对于一条未排序的切片线段,找到与该切片线段对应的相交四边形;Step 5-1: For an unsorted slice line segment, find the intersecting quadrilateral corresponding to the slice line segment; 步骤5-2:根据该四边形坐标,在四边形网格中找到与该四边形相邻的四边形;Step 5-2: According to the coordinates of the quadrilateral, find the quadrilateral adjacent to the quadrilateral in the quadrilateral grid; 步骤5-3:判断该相邻的四边形中是否存在与该相邻的四边形对应的切片线段;Step 5-3: judging whether there is a slice line segment corresponding to the adjacent quadrilateral in the adjacent quadrilateral; 步骤5-4:找到和当前切片线段拥有相同坐标的相邻线段;Step 5-4: Find the adjacent line segment with the same coordinates as the current slice line segment; 步骤5-5:重复步骤5-1至步骤5-4即可完成切片线段的排序,有序的切片线段即为最终的切片轮廓。Step 5-5: Repeat steps 5-1 to 5-4 to complete the sorting of the slice line segments, and the ordered slice line segments are the final slice contours.
CN201810040995.2A 2018-01-16 2018-01-16 A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile Active CN108327287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810040995.2A CN108327287B (en) 2018-01-16 2018-01-16 A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810040995.2A CN108327287B (en) 2018-01-16 2018-01-16 A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile

Publications (2)

Publication Number Publication Date
CN108327287A true CN108327287A (en) 2018-07-27
CN108327287B CN108327287B (en) 2019-06-25

Family

ID=62925088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810040995.2A Active CN108327287B (en) 2018-01-16 2018-01-16 A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile

Country Status (1)

Country Link
CN (1) CN108327287B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109228353A (en) * 2018-08-06 2019-01-18 上海大学 A kind of Dynamic Slicing algorithm without support 3D printing method
CN109466065A (en) * 2018-11-05 2019-03-15 山东大学 Method and system for generating support-free non-uniform three-period minimal surface for 3D printing
CN109622958A (en) * 2018-12-20 2019-04-16 华中科技大学 A method of titanium alloy implant is prepared using minimal surface porous structure
CN109977507A (en) * 2019-03-15 2019-07-05 浙江大学 A kind of complex topography porous support efficiently produces method
CN110179570A (en) * 2019-06-13 2019-08-30 上海交通大学 A kind of gradient porous cervical fusion cage and its design method
CN111062166A (en) * 2019-12-16 2020-04-24 浙江大学 Three-period minimum curved surface porous structure topology optimization method based on variable density method
CN111695259A (en) * 2020-06-12 2020-09-22 重庆大学 Machining method of continuous gradient wall thickness TPMS structure based on 3D printing
CN112069730A (en) * 2020-09-02 2020-12-11 彭涛 Three-dimensional curve acquisition method and device for 3D printing
CN112687253A (en) * 2020-12-31 2021-04-20 广州大学 Light sound insulation structure based on triple-period extremely-small curved surface and preparation method thereof
CN114228154A (en) * 2021-11-30 2022-03-25 西安交通大学 Gradient void structure modeling slicing method and system based on three-dimensional section characteristics

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608744A (en) * 2015-12-24 2016-05-25 重庆塞拉雷利科技有限公司 Internal pore design method of simulation periodic minimum surface based on tetrahedral mesh
CN106200559A (en) * 2016-07-11 2016-12-07 湖南大学 A kind of rapid generation printing section for 3d
CN106547969A (en) * 2016-11-02 2017-03-29 浙江大学 A kind of 3 D-printing dicing method based on T spline surfaces
CN106903889A (en) * 2015-12-21 2017-06-30 姜海涛 A kind of rapid section algorithm of STL models
CN107145682A (en) * 2017-06-01 2017-09-08 浙江大学 Design method of three-period minimal surface porous scaffold based on T-spline entity

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106903889A (en) * 2015-12-21 2017-06-30 姜海涛 A kind of rapid section algorithm of STL models
CN105608744A (en) * 2015-12-24 2016-05-25 重庆塞拉雷利科技有限公司 Internal pore design method of simulation periodic minimum surface based on tetrahedral mesh
CN106200559A (en) * 2016-07-11 2016-12-07 湖南大学 A kind of rapid generation printing section for 3d
CN106547969A (en) * 2016-11-02 2017-03-29 浙江大学 A kind of 3 D-printing dicing method based on T spline surfaces
CN107145682A (en) * 2017-06-01 2017-09-08 浙江大学 Design method of three-period minimal surface porous scaffold based on T-spline entity

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109228353A (en) * 2018-08-06 2019-01-18 上海大学 A kind of Dynamic Slicing algorithm without support 3D printing method
CN109466065A (en) * 2018-11-05 2019-03-15 山东大学 Method and system for generating support-free non-uniform three-period minimal surface for 3D printing
CN109466065B (en) * 2018-11-05 2019-12-27 山东大学 Support-free non-uniform three-period extremely-small curved surface generation method and system for 3D printing
CN109622958B (en) * 2018-12-20 2020-06-02 华中科技大学 Method for preparing titanium alloy implant by adopting minimum curved surface porous structure
CN109622958A (en) * 2018-12-20 2019-04-16 华中科技大学 A method of titanium alloy implant is prepared using minimal surface porous structure
CN109977507A (en) * 2019-03-15 2019-07-05 浙江大学 A kind of complex topography porous support efficiently produces method
CN109977507B (en) * 2019-03-15 2020-10-13 浙江大学 Efficient generation method of porous scaffold with complex morphology
CN110179570B (en) * 2019-06-13 2021-08-03 上海交通大学 A design method of a gradient porous cervical interbody cage
CN110179570A (en) * 2019-06-13 2019-08-30 上海交通大学 A kind of gradient porous cervical fusion cage and its design method
CN111062166A (en) * 2019-12-16 2020-04-24 浙江大学 Three-period minimum curved surface porous structure topology optimization method based on variable density method
CN111695259A (en) * 2020-06-12 2020-09-22 重庆大学 Machining method of continuous gradient wall thickness TPMS structure based on 3D printing
CN111695259B (en) * 2020-06-12 2024-04-30 重庆大学 Processing method of TPMS structure with continuous gradient wall thickness based on 3D printing
CN112069730A (en) * 2020-09-02 2020-12-11 彭涛 Three-dimensional curve acquisition method and device for 3D printing
CN112069730B (en) * 2020-09-02 2024-01-02 彭涛 Three-dimensional curve acquisition method and device for 3D printing
CN112687253A (en) * 2020-12-31 2021-04-20 广州大学 Light sound insulation structure based on triple-period extremely-small curved surface and preparation method thereof
CN114228154A (en) * 2021-11-30 2022-03-25 西安交通大学 Gradient void structure modeling slicing method and system based on three-dimensional section characteristics

Also Published As

Publication number Publication date
CN108327287B (en) 2019-06-25

Similar Documents

Publication Publication Date Title
CN108327287B (en) A kind of rapid generation of three periods minimal surface 3 D-printing slicing profile
Minetto et al. An optimal algorithm for 3D triangle mesh slicing
CN107767457B (en) STL digital-analog generating method based on point cloud rapid reconstruction
CN106373184B (en) A kind of 3 D-printing model puts required amount of support Method of fast estimating
CN105183405B (en) A kind of 3D printing method of self-definition model surface hollow-out
Yang et al. Fractal scanning path generation and control system for selective laser sintering (SLS)
Tang et al. A hybrid geometric modeling method for lattice structures fabricated by additive manufacturing
CN106200559A (en) A kind of rapid generation printing section for 3d
CN106547969A (en) A kind of 3 D-printing dicing method based on T spline surfaces
CN103970949B (en) A kind of rapid shaping intermediate cam patch model by side layered approach
CN106650085B (en) Method for generating hollow model by entity model based on finite element mesh
CN110188423A (en) A kind of linear engineering structure fast B IM modeling method based on FEM meshing
CN107067471A (en) A kind of adaptive scanning speed method for improving pendant body model forming quality
CN108320327B (en) Three-cycle extremely-small-curved-surface equal-wall-thickness layered filling area generation method
CN101510086A (en) Multi-shaft numerical control machining knife rail generating method for product triangle grid model
CN113119451B (en) 3D printing path planning method for surface cladding porous lightweight structures
CN101403909B (en) NC tool path generation method for triangular mesh subdivision surface
CN106903889A (en) A kind of rapid section algorithm of STL models
CN103366069A (en) Hierarchical algorithm of selective laser sintering
CN106445981B (en) STL grid model slice data adaptive compression method based on wavelet transformation
CN101303774A (en) A Quadrilateral Finite Element Mesh Generation Method Based on 3D Solid Model
CN109325316B (en) Efficient Parallel Slicing Method for STL Model Based on Common Point Welding Sorting
CN103480534A (en) Robot spray workpiece surface modeling method
CN106293547A (en) A kind of support automatic generation method printed for 3D
Wang et al. An adaptive slicing algorithm and data format for functionally graded material objects

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