Geometry2D.CenterPosition

説明

指定された2Dジオメトリの位置を取得します。

スクリプト 構文

Geometry2D.CenterPosition( compIdx, compPos );

パラメータ

パラメータ タイプ 詳細
compIdx Integer コンポーネントのインデックス

指定可能な値:

説明:

0 <= compIdx < 2D コンポーネントの数 compIdx は有効である必要があります。
compPos SIVector3 戻されるときに、(compIdx)番目の 2Dコンポーネントの位置が含まれます。

VBScript の例

'Create a cube
CreatePrim "Cube", "MeshSurface"
set oSelList = GetValue("SelectionList")
set oItem = oSelList(0)
set oGeometry = oItem.obj
oNb2D = oGeometry.Nb2D
set o2DComponent = oGeometry.Geometry2D
set oPos = XSIMath.CreateVector3()
' Loop on all the 2D Component
for i = 0 to oNb2D - 1
o2DComponent.CenterPosition i, oPos
LogMessage "Component [" & i & "] center position : " & oPos.x & " | " & oPos.y & " | " & oPos.z 
next

関連項目

Geometry2D.AveragePosition Geometry2D Geometry_V1.Nb2D SIVector3