バウンディングボックスの取得(ANSYS ICEM CFD)†
ANSYS ICEM CFDでは、スクリプト処理などで、物体に対するバウンディングボックスを取得したい場合がしばしば起きます。
存在する物体全体のバウンディングボックス†
ビューア上に見えていない物体も含めて、存在する全ての物体のバウンディングボックスを取得する場合は、関数
ic_geo_model_bounding_box
を使用して、以下のようにして、バウンディングボックスの最小点と最大点を取得します。
set bb [ic_geo_model_bounding_box] set min [lindex $bb 0] set max [lindex $bb 1]
見えている物体のバウンディングボックス†
ビューア上に見えている物体に対するバウンディングボックスの取得方法は以下の通りです。
set w [tdv_what_window current] set bbox [$w bbox visible] tdv_mess "Visible images:\n" tdv_mess " min: [eval format \"%g %g %g\" [lindex $bbox 0]]\n" tdv_mess " max: [eval format \"%g %g %g\" [lindex $bbox 1]]\n"
Last-modified: 2015-03-20 (金) 13:37:10