胡銘 王荻



摘 ?要: 為了將虛擬現實(VR)技術與傳統CAD工業產品建模進行有效結合,設計一種基于虛擬現實技術的機械產品CAD三維造型系統,可以有效解決傳統產品開發所面臨的問題。采用非均勻有理B樣條曲線構造實體幾何模型,并對立體視覺模型的投影進行變換設計,從而在有限硬件條件下減少計算所需的時間。給出虛擬環境系統的具體軟硬件參數。開發語言采用Visual C#,并采用工業級模擬開發軟件Vega實現CAD數據轉換。系統運行結果顯示,設計系統能夠有效實現機械產品零部件的輔助設計,節省了設計研發時間。
關鍵詞: 虛擬現實; 仿真技術; 產品造型; 軟硬件體系; CAD; 產品開發
中圖分類號: TN99?34; TP391.72 ? ? ? ? ? ? ? ? ? ? 文獻標識碼: A ? ? ? ? ? ? ? ? ?文章編號: 1004?373X(2019)09?0142?03
Virtual reality technology based CAD three?dimensional modeling system
of mechanical industry product
HU Ming, WANG Di
(Wuxi Taihu University, Wuxi 214064, China)
Abstract: In order to effectively combine the virtual reality (VR) technology with traditional CAD industrial product modeling, a virtual reality technology based CAD three?dimensional modeling system for mechanical products is designed, which can effectively solve the problems of traditional product development. The non?uniform rational B?spline curve is used to construct the solid geometry model, and the projection of the stereo vision model is transformed, so as to reduce the calculation time under limited hardware conditions. The specific hardware and software parameters of the virtual environment system are given. The development language Visual C# and industrial?level simulation development software Vega are used to realize the CAD data conversion. The system operation results show that the design system can effectively realize the auxiliary design of mechanical parts and components, and save the design and development time.
Keywords: virtual reality; simulation technology; product modeling; software and hardware system; CAD; product development
0 ?引 ?言
通過將虛擬現實技術(Virtual Reality,VR)應用到企業產品造型設計工作中,不但能夠有利于產品外觀優化設計、人機交互設計,還能夠有助于產生更多的創新設計理念[1?2]。產品設計工程師通過VR技術能夠和產品對象進行更自然和更直觀的交互,從而擺脫傳統顯示器、鍵盤和鼠標的約束[3]。VR技術在產品造型設計領域有著廣泛的應用前景。
文獻[4]對基于用戶體驗的旅游景點虛擬現實項目進行研究,分析了虛擬現實網絡化遇到的問題,結合現代虛擬現實與前沿計算機網絡技術給出相應解決方案。文獻[5]對面向汽車產品設計的虛擬現實服務平臺展開研究,設計了一種基于云計算模式的應用服務架構,并給出其服務模型和邏輯架構,從而為VR技術在汽車產品創新設計中的應用部署和快速服務提供了理論指導和有力支撐。文獻[6]提出基于三維虛擬現實的便攜式3C產品外觀仿真設計,對3C產品外觀仿真設計系統的總體結構進行了分析并給出具體模塊設計,所設計產品外觀造型效果較好,有效地提高了設計人員的工作效率。
通過以上分析,可知VR技術在產品造型設計領域已經成為熱點研究方向。但是,如何將VR技術有效引入到機械產品造型設計中,是目前富有挑戰性的研究領域。因此,本文對基于VR技術的產品造型設計進行具體研究分析。首先,建立基于桌面機的虛擬環境系統的軟硬件體系結構,提高建模的工作效率;然后,對機械產品虛擬優化設計與分析流程進行介紹。通過VR與CAD的有機結合,優化產品結構的動態性能。
1 ?立體視覺模型設計
1.1 ?三維實體表示方法
在VR系統中,實體模型常見的有構造實體幾何(CSG),如圖1所示。

本文采用在高級三維建模中廣泛支持的非均勻有理B樣條曲線(Non?Uniform Rational B?Splines,NURBS)進行虛擬環境的三維建模,其構建公式如下:
1.2 ?視角定義
產品測量過程中,通過相關運算能夠在視網膜上將視角[θ]轉換成為產品的投影大小,如圖2所示。

1.3 ?立體視覺處理
為在VR環境中生成立體視覺效果,需要運用人體的雙眼視覺和視運動知覺技術。人類對所見物體的立體感主要來源于雙目視差。因此,立體視覺模型需要分別計算兩個試點,以便產生兩個單目視圖。在立體視覺模型中,如果把三維空間物體上的點[I(Xi,Yi,Zi)]投影在[Z]平面上產生2個點[Il(Xsl,Ysl)],[Ir(Xsr,Ysr)]。則有[7]:
式中:[d]表示雙目間的距離;[k]表示視點與投影平面之間的長度。通過上述模型的運算方法對投影進行變換,能夠在有限硬件條件下減少計算所需的時間。
2 ?桌面虛擬環境系統的軟硬件配置
2.1 ?系統的硬件配置
VR技術需要通過計算機技術實現,包括模擬環境、感知、自然技能和傳感設備數據處理等多方面功能。PC主機的CPU為AMD FX?8350,內存為8 GB,硬盤為 200 GB,圖形顯示器為HKC P4000 23.8寸電腦顯示器。VR系統硬件的核心顯卡設備為NVIDIA GeForce GTX1080Ti,DRAM為11 GB,顯存位寬為352 bit,核心頻率為1 480/1 733 MHz,顯存頻率為11 000 MHz。
2.2 ?系統的軟件配置
桌面虛擬環境采用的操作系統為Windows 10。系統支撐平臺采用美國Multi Gen?Paradigm公司開發的工業級模擬開發軟件Vega。開發語言采用Visual C#。三維實體建模軟件為Auto CAD。
3 ?基于CAD構建3D模型實例
3.1 ?機械產品虛擬優化設計
在虛擬現實環境下,設計人員可以進行產品造型的結構優化設計,完成機械產品的動態分析、造型優化和性能預測。本文采用的機械產品虛擬優化設計與分析流程如圖3所示。

3.2 ?實例效果演示
在產品造型設計的工作中,一般首先采用Auto CAD繪制工業產品圖形并以ASCⅡ格式DXF文件保存。以機械變速箱的CAD零件數據為例,圖4為系統所用VR眼鏡設備實物,圖5顯示了機械變速箱的幾何圖形和 VR環境的3D效果。


4 ?結 ?語
本文對基于VR技術的產品造型設計進行了具體研究分析。采用三維實體表示方法和立體視覺處理技術建立基于桌面機的虛擬環境系統,并給出具體軟硬件參數。通過有機結合VR與CAD,實現了產品結構動態性能的優化,提高建模的工作效率。最后,以機械變速箱的CAD零件為例,對基于CAD構建交互式VR模型進行實例演示,為促進VR技術和機械產品造型設計在我國的進一步發展提供了借鑒。
參考文獻
[1] BURDEA G, COIFFET P. Virtual reality technology [J]. Digital technology & application, 2015, 95(6): 663?664.
[2] SAMPAIO A Z, MARTINS O P. The application of virtual reality technology in the construction of bridge: the cantilever and incremental launching methods [J]. Automation in construction, 2014, 37(1): 58?67.
[3] HUANG Y C, BACKMAN K F, BACKMAN S J, et al. Exploring the implications of virtual reality technology in tourism marketing: an integrated research framework [J]. International journal of tourism research, 2015, 18(2): 116?128.
[4] 李輝熠,鐘山,張立里.基于用戶體驗的旅游景點虛擬現實項目設計研究[J].數字技術與應用,2013(3):87.
LI Huiyi, ZHONG Shan, ZHANG Lili. Research on virtual reality project design of tourist attractions based on user experience [J]. Digital technology & applications, 2013(3): 87.
[5] 張林鍹,辛獻杰,崔冰,等.面向汽車產品設計的虛擬現實服務平臺研究[J].系統仿真學報,2014,26(10):2407?2411.
ZHANG Linxuan, XIN Xianjie, CUI Bing, et al. Research on virtual reality service platform for automotive product design [J]. Journal of system simulation, 2014, 26(10): 2407?2411.
[6] 袁媚.基于三維虛擬現實的便攜式3C產品外觀仿真設計與實現[J].現代電子技術,2016,39(22):85?88.
YUAN Mei. Design and implementation of portable 3C product appearance simulation based on 3D virtual reality [J]. Modern electronics technique, 2016, 39(22): 85?88.
[7] FU Zhaoguo, WANG Tianwei, NI Xiaopeng, et al. The virtual reality technology and its application in special equipment education based on Virtools [J]. Computer engineering & science, 2012, 34(6): 97?100.
[8] REN P, WANG W J, BAI X F. Reconstruction of Imperial University of Shanxi based on virtual reality technology [J]. Computer simulation, 2012, 29(11): 19?20.
[9] 張慧敏,陳啟祥.工業設計加工產品零件視角精度優化控制[J].計算機仿真,2018,35(1):197?200.
ZHANG Huimin, CHEN Qixiang. Industrial design processing product parts visual angle accuracy optimization control [J]. Computer simulation, 2018, 35(1): 197?200.
[10] 龍薜岳,秦興盛.基于三維視覺的產品虛擬設計方法研究[J].現代電子技術,2018,41(2):10?13.
LONG Biyue, QIN Xingsheng. Research on virtual product design method based on 3D vision [J]. Modern electronics technique, 2018, 41(2): 10?13.