›› 2009, Vol. 30 ›› Issue (10): 3037-3042.

• 岩土工程研究 • 上一篇    下一篇

基于Python的三维建模可视化系统的研究

刘振平1,贺怀建1,李 强2,朱发华1   

  1. 1.中国科学院 武汉岩土力学研究所,武汉 430071;2.长江水利委员会 三峡勘测研究院有限公司,武汉 430070
  • 收稿日期:2009-04-01 出版日期:2009-10-10 发布日期:2009-12-23
  • 作者简介:刘振平,男,1981年生,博士研究生,目前主要从事岩土工程三维可视化技术研究

Study of the technology of 3D modeling and visualization system based on Python

LIU Zhen-ping1, HE Huai-jian1, LI Qiang2, ZHU Fa-hua1   

  1. 1. Institute of Rock and Soil Mechanics, Chinese Academy of Sciences, Wuhan 430071, China; 2. Three Gorges Geotechnical Consultants Co., Ltd., Changjiang Water Resources Commission, Wuhan 430070, China
  • Received:2009-04-01 Online:2009-10-10 Published:2009-12-23

摘要:

将Python语言作为粘合剂,用wxPython做界面,实现了对Python自带一些计算模块的调用,同时也实现了通过Swig对C以及C++模块的调用。结合VTK以及PyOpenGL两个开源图形库,对复合三维可视化建模系统的建立进行了深入地研究,并且以Quad-Edge数据结构为原型,实现了拓扑结构更加紧凑、查询效率更高的一种数据结构模型。然后以此为基础,通过对投影面的设置,实现了空间离散点任意投影面的Delaunay三角剖分,并且充分利用此种数据结构的拓扑特性,实现了一种高效地检索任意约束影响域中的三角形、边、以及顶点的算法,最终实现了三角网任意约束的插入。到目前为止,系统已经初步实现了从DXF、Excel、TXT等文件以及Access和SQL Server数据库中读取相应模型几何数据、信息以及其他数据库相关操作的功能,还实现了空间点的距离反比、Kriging以及3次样条插值、离散点集的Delaunay三角剖分,任意形状约束的插入、两个TIN之间的互相切割等许多三维可视化建模的通用功能。

关键词: 三维可视化, python语言, 约束Delaunay三角化, Swig

Abstract:

It is studied profoundly that the compound 3D visualization modeling system can be built up with the open-sourced graphic libraries PYOpenGL and VTK. In this process, the computational models written by Python and other models written by C or C++ can be invoked successfully when we use the python language as a kind of adhesive and wxPython as GUI with the help of swig. Moreover, a kind of data structure is implemented using the Quad-edge data structure as prototype, which makes the topology more compact and queries more efficient. Then based-on this data structure, spatial discrete points Delaunay triangulation in any plane is accomplished through the setting of projection plane. Taking full advantage of the topology characteristic, a kind of algorithm which can search interrelated triangles, segments and vertexes efficiently is obtained; and the object of inserting any constraint is reached. Up to now, the function of loading geometry data and other information stored in the format of DXF, Excel or TXT files or access and SQL Server DB is made reality. Also in the system, many general 3D modeling functions as interpolations of inverse distance, Kriging and cubic spline, Delaunay triangulation, constraints insertion, intersections with two TIN and so on are accomplished.

Key words: 3D visualization, Python language, constrained Delaunay triangulation, Swig

中图分类号: 

  • TP 391
[1] 朱良峰 ,李自成 ,朱 仝 ,李明江,. 基于数字地球平台的地质钻孔三维模拟与可视化[J]. , 2014, 35(11): 3310-3316.
[2] 朱良峰 ,孙建中 ,张成娟 . 沉积地层系统三维实体模型构建方法[J]. , 2012, 33(11): 3243-3250.
[3] 朱发华 ,贺怀建 ,刘 强. 基于GIS的工程地质信息管理与三维可视化[J]. , 2009, 30(S2): 404-407.
[4] 刘振平,贺怀建,朱发华. 基于钻孔数据的三维可视化快速建模技术的研究[J]. , 2009, 30(S1): 260-266.
[5] 朱发华,贺怀建. 基于地质雷达和钻孔数据的三维地层建模[J]. , 2009, 30(S1): 267-270.
[6] 王明华,白 云. 层状岩体三维可视化构模与数值模拟的集成研究[J]. , 2005, 26(7): 1123-1126.
[7] 夏艳华,白世伟,倪才胜. 某水利枢纽厂房开挖三维可视化与数值模拟耦合研究[J]. , 2005, 26(6): 968-972.
[8] 夏艳华,白世伟. 层状地质体与地下工程开挖三维可视化[J]. , 2004, 25(12): 1928-1932.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 姚仰平,侯 伟. 土的基本力学特性及其弹塑性描述[J]. , 2009, 30(10): 2881 -2902 .
[2] 徐金明,羌培,张鹏飞. 粉质黏土图像的纹理特征分析[J]. , 2009, 30(10): 2903 -2907 .
[3] 向天兵,冯夏庭,陈炳瑞,江 权,张传庆. 三向应力状态下单结构面岩石试样破坏机制与真三轴试验研究[J]. , 2009, 30(10): 2908 -2916 .
[4] 石玉玲,门玉明,彭建兵,黄强兵,刘洪佳. 地裂缝对不同结构形式桥梁桥面的破坏试验研究[J]. , 2009, 30(10): 2917 -2922 .
[5] 夏栋舟,何益斌,刘建华. 土-结构动力相互作用体系阻尼及地震反应分析[J]. , 2009, 30(10): 2923 -2928 .
[6] 徐速超,冯夏庭,陈炳瑞. 矽卡岩单轴循环加卸载试验及声发射特性研究[J]. , 2009, 30(10): 2929 -2934 .
[7] 张力霆,齐清兰,魏静,霍倩,周国斌. 淤填黏土固结过程中孔隙比的变化规律[J]. , 2009, 30(10): 2935 -2939 .
[8] 易 俊,姜永东,鲜学福,罗 云,张 瑜. 声场促进煤层气渗流的应力-温度-渗流压力场的流固动态耦合模型[J]. , 2009, 30(10): 2945 -2949 .
[9] 黄润秋,徐德敏. 岩石(体)渗透性测试的体变量法研究[J]. , 2009, 30(10): 2961 -2964 .
[10] 孙 勇. 滑坡面下双排抗滑结构的计算方法研究[J]. , 2009, 30(10): 2971 -2977 .