Geometry0D.AverageLocalReferenceFrame

説明

指定された 0D コンポーネントの平均法線を取得します。

スクリプト構文

Geometry0D.AverageLocalReferenceFrame( compIdxArray, XAxis, XAxisValid, YAxis, YAxisValid, ZAxis, ZAxisValid );

パラメータ

パラメータ タイプ 説明
compIdxArray Integer値のArray 0D コンポーネントのインデックスの配列

指定可能な値:

説明:

0 <= compIdxArray(i) < 0D コンポーネントの数 配列内の各インデックスは有効である必要があります。
xAxis SIVector3 戻されるときに、指定された 0D コンポーネントの平均ローカル参照フレームの x軸が含まれます。
XAxisValid Boolean 戻されるときに、参照フレームの x 軸が有効な場合は True、無効な場合は false が含まれます。
YAxis SIVector3 戻されるときに、指定された0Dコンポーネントの平均ローカル参照フレームのY 軸が含まれます。
YAxisValid Boolean 戻されるときに、参照フレームのY 軸が有効な場合は True、無効な場合は false が含まれます。
ZAxis SIVector3 戻されるときに、指定された0Dコンポーネントの平均ローカル参照フレームのZ 軸が含まれます。
ZAxisValid Boolean 戻されるときに、参照フレームのZ 軸が有効な場合は True、無効な場合は false が含まれます。

VBScript の例

'Create a cube

CreatePrim "Cube", "MeshSurface"

set oSelList = GetValue("SelectionList")

set oItem = oSelList(0)

set oGeometry = oItem.obj

oNb0D = oGeometry.Nb0D

set o0DGeometry = oGeometry.Geometry0D

set oXAxis = XSIMath.CreateVector3()

set oYAxis = XSIMath.CreateVector3()

set oZAxis = XSIMath.CreateVector3()

' Construct an array containing the indices 0,1,2,3

dim oIndicesArray

oIndicesArray = Array( 0, 1, 2, 3 )

o0DGeometry.AverageLocalReferenceFrame oIndicesArray, oXAxis, oXAxisValid, oYAxis, oYAxisValid, oZAxis, oZAxisValid

if oXAxisValid then

LogMessage "Component (0, 1, 2, 3) average X axis : " & oXAxis.x & " | " & oXAxis.y & " | " & oXAxis.z 

else

LogMessage "Component (0, 1, 2, 3) INVALID average X axis"

end if

if oYAxisValid then

LogMessage "Component (0, 1, 2, 3) average Y axis : " & oYAxis.x & " | " & oYAxis.y & " | " & oYAxis.z 

else

LogMessage "Component (0, 1, 2, 3) INVALID average Y axis"

end if

if oZAxisValid then

LogMessage "Component (0, 1, 2, 3) average Z axis : " & oZAxis.x & " | " & oZAxis.y & " | " & oZAxis.z 

else

LogMessage "Component (0, 1, 2, 3) INVALID average Z axis"

end if

関連項目

Geometry0D.LocalReferenceFrame Geometry0D SIVector3