matlab stl分层代码,一种基于MATLAB的STL文件分层切片算法

2018年 3月 第 46卷 第 5期 机床与液压 MACHINE T00L & HYDRAULICS Mar.2018 Vo1.46 No.5 DOI:10.3969/j.issn.1001—3881.2018.05.025 一 种基于 MATLAB的 STL文件分层切 片算法 丁华锋 ,王卓 ,刘婧芳 ,孙龙 ,张良安 (1.北京工业大学机械 工程及应用电子 学院,北京 100124; 2.安徽工业大学机械工程学院,安徽 马鞍山 243032) 摘要:STL文件的分层算法是 3D打印最基本也是最重要的一环。在已有的切片算法的基础上,提出了一种基于 MAT— LAB软件对 STL文件的新的分层切片优化算法,可以保证精度和稳定性 。此方法的实现过程是:先对三角面片排序,找到 所在分层的三角形 ;然后建立所筛选出这些三角的邻接关系;最后求出交点依次相连,就能直接提取出轮廓线。该算法运 用 MATLAB软件最基本的编程代码,可以快速准确地提取出轮廓环。通过一个例子来验证该算法的准确性和稳定性。 关键词:分层 :MATLAB:STL;轮廓线 中图分类 号 :TH16;TP312 文献标 志码 :A 文章编号 :1001—3881(2018)05-102—4 An Algorithm of Slicing STL M odel Based on M ATLAB DING Huafeng ,WANG Zhuo ,LIU Jingfang ,SUN Long ,ZHANG Liang’an (1.College of Mechanical Engineering and Applied Electronics Technology,Beijing University of Technology ,Beijing 100124,China;2.College of Mechanical Engineering,Anhui University of Technology,Maanshan Anhui 243032,China) Abstract:The layered algorithm of stereolithography(STL)file is the most basic and most important thing for Three Dimensional (3D)printing.A new optimal algorithm based on MTALAB software is proposed to guarantee the accuracy and stability based on the existing algorithm.The implement process of method was firstly,the triangles were sorted to find in a layered triangle; secondly, the adjacency relations of these triangles were built;thirdly,the intersection point was found that can be directly extracted contour lines. The algorithm uses the most basic programming code in MATLAB software,which concisely an d effectively

你可能感兴趣的:(matlab,stl分层代码)