﻿ 船体三维模型切片数据处理平台设计
 舰船科学技术  2020, Vol. 42 Issue (8): 183-186    DOI: 10.3404/j.issn.1672-7649.2020.08.034 PDF

Design of ship 3D model slice data processing platform
JING Qian-feng, YIN Yong, SHEN He-long, WANG Zhi-zhou
Dalian Maritime University, Dalian 116026, China
Abstract: The ship profile data is widely used, while the detailed data is mainly depending on the interpolation. In order to avoid the complicated interpolation and the error caused by human interference, the model slicing technology in 3D printing is introduced, the slicing method with different directions and quantities on ship 3D model is realized which is encapsulated into an interface class as well. The ship 3D model slice data processing platform is developed based on the class. The platform can read ship STL models and perform slicing operations. The slice data can be observed from the three-dimensional or two-dimensional window in real time and the data is verified by the calculation examples to be highly consistent. A redundant filtering algorithm is applied to reduce the high redundancy of the original slice data, the filtered data has the characteristics of high precision and small amount. All slice data are well organized and easy to reuse, which provides good conditions for further research on ship hydrodynamics.
Key words: ship 3D model     STL slice     3D printing     redundancy filtering
0 引　言

1 船体三维模型处理平台 1.1 平台架构

 图 1 平台架构 Fig. 1 Platform suructure
1.2 平台界面

 图 2 平台交互界面 Fig. 2 Platform user interface
2 关键技术 2.1 三维模型读取模块

STL文件格式是一种三维模型中最通用的接口协议，本平台主要针对STL格式的模型进行处理。STL文件又称立体光造型文件，是三维实体模型经过三角化后得到的模型文件，其文件内容无序地列出了构成实体表面的所有三角形面片的信息。每个三角形由3个顶点坐标以及三角形平面的法矢量信息表示。STL文件分为ASCII和二进制2种格式，三维模型读取模块首先确定STL模型文件的格式，然后依据固定格式读取并保存模型中的三角面片数据，船体模型及三角面片如图3所示。

 图 3 KVLCC2船体STL模型 Fig. 3 STL model of KVLCC2
2.2 切片处理模块

 图 4 切片流程图 Fig. 4 Slice flowchart

 图 5 KVLCC2船体切片数据 Fig. 5 Slice data of KVLCC2
2.3 切片数据存取模块

2.4 数据冗余滤除模块

 图 6 冗余滤除前后数据对比 Fig. 6 Redundant filtering comparison
2.5 数据可视化模块

3 数据验证

 图 7 部分椭球体模型及切片数据 Fig. 7 Ellipsoid model and slice data

 $V = \frac{4}{3}{\text{π}}abc\text{。}$ (1)

 $\frac{1}{4}V = \int_0^L {{S_{2D}}} dL\text{。}$ (2)

 图 8 体积相对误差 Fig. 8 Relative error of volume

4 结　语

 [1] 马山, 宋竞正, 段文洋. 二维半理论和切片法的数值比较研究[J]. 船舶力学, 2004, 8(1): 35-43. DOI:10.3969/j.issn.1007-7294.2004.01.005 [2] 马山, 段文洋, 马卫星. 基于二维半理论的船舶水动压力预报方法研究[J]. 船舶力学, 2011, 15(1): 1-10. DOI:10.3969/j.issn.1007-7294.2011.01.001 [3] 张海彬, 任慧龙, 宋竞正, 等. 一种船体三维湿表面网格自动生成方法[J]. 中国造船, 2001, 42(4): 61-65. DOI:10.3969/j.issn.1000-4882.2001.04.011 [4] 刘春雷, 尹勇, 孙霄峰, 等. 基于STL模型的船舶吃水转换功能实现[J]. 舰船科学技术, 2016, 38(9): 69-73. [5] 王智洲, 孙霄峰, 尹勇, 等. 基于三维设计数据的船舶湿面积计算[J]. 船舶工程, 2016(5): 5-8. [6] 贺强, 程涵, 杨晓强. 面向3D打印的三维模型处理技术研究综述[J]. 制造技术与机床, 2016(6): 54-57. [7] [8]