Research on Fast Compression Algorithms and Visualization of STL

Page 1

Electrical Engineering and Automation June 2015, Volume 4, Issue 2, PP.13-17

Research on Fast Compression Algorithms and Visualization of STL Zhengxu Zhao 1, Denghui Zhang 2# 1. School of Information Science and Technology, Shijiazhuang Tiedao University, Shijiazhuang 050043, China 2. School of Mechanical Engineering, Shandong University, Jinan 250061, China #

Email: zhang.dh@outlook.com

Abstract As the standard file format of 3D printing, STL plays a very important role. The paper discusses several algorithms to remove redundancy vertices fast in STL files, and a hash function constructor of data compression algorithm is given. Lost light information is reconstructed by Gouraud Shading in the model rendering. OpenGL display lists and buffer object have been used to accelerate the visualization in the system which is developed in Linux. The result showed that the system is more efficient and visualizes the STL model smoother. Keywords: STL; Data Compress; Visualization

STL 模型的快速压缩算法与可视化研究 赵正旭 1,张登辉 2 1. 石家庄铁道大学,河北 石家庄 050043 2. 山东大学,山东 济南 250061 摘 要:STL 作为 3D 打印的标准文件格式,有着非常重要的作用。在深入研究 STL 文件存储特点的基础之上,给出了数 据压缩算法中的哈希函数构造方法。针对模型冗余过滤后光照信息损失的问题,提出了一种基于 Gouraud 插值的法向量 重建方法。在 Linux 平台上使用 OpenGL 开发了一套 STL 真实感显示系统,测试结果表明系统具有较高的时间效率和良 好的可视化效果。 关键词:STL;数据压缩;可视化

引言 近年来,制造业不断向智能化方向发展。作为智能制造的代表,3D 打印技术越来越受到人们的重视[1]。 3D 打印机领域有自己的行业标准文件格式 STL。STL 文件是由 SL 打印的发明者,3D 系统公司创始人查克. 赫尔于 20 世纪 80 年代创造。 STL 的数据压缩与可视化是 3D 打印后续工作的基本环节。STL 存储顶点数据的方式导致了每个顶点被 重复存储 6 次,产生大量的数据冗余,因而有必要采取快速,高效的压缩算法去除冗余顶点。压缩 STL 数 据后,部分顶点的法向量信息丢失,为了提高 STL 模型的真实感显示效果,必需重建每个顶点的法向量。 本文在综合考虑各种数据压缩算法后,选择了哈希表算法,针对 STL 数据存储的特点设计了哈希函数,并 给出了性能测试结果。在 STL 可视化过程中,采用 Gouraud 插值算法提高了模型的光滑度,综合利用 OpenGL 的缓冲区对象,显示列表技术加速了渲染效率。

1

STL 文件格式 STL 文件是由若干个三角形面片组合而成,三角面片相互拼接近似表示模型曲面。STL 只存储了模型的 - 13 www.ivypub.org/eea


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.