Geometry2D.LocalReferenceFrame

Geometry2D.LocalReferenceFrame

説明

指定された 2D ジオメトリにおけるローカル参照フレームを取得します。

スクリプト構文

Geometry2D.LocalReferenceFrame( compIdx, XAxis, XAxisValid, YAxis, YAxisValid, ZAxis, ZAxisValid );

パラメータ

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

指定可能な値:

説明:

0 <= compIdx < 2D コンポーネントの数 compIdx は有効である必要があります。
xAxis SIVector3 戻されるときに、(compIdx)番目の 2D コンポーネントにおけるローカル参照フレームの x 軸が含まれます。
XAxisValid Boolean 戻されるときに、参照フレームの x 軸が有効な場合は True、無効な場合は false が含まれます。
YAxis SIVector3 戻されるときに、(compIdx)番目の 2Dコンポーネントにおけるローカル参照フレームのY 軸が含まれます。
YAxisValid Boolean 戻されるときに、参照フレームのY 軸が有効な場合は True、無効な場合は false が含まれます。
ZAxis SIVector3 戻されるときに、(compIdx)番目の 2Dコンポーネントにおけるローカル参照フレームの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

oNb2D = oGeometry.Nb2D

set o2DComponent = oGeometry.Geometry2D

set oXAxis = XSIMath.CreateVector3()

set oYAxis = XSIMath.CreateVector3()

set oZAxis = XSIMath.CreateVector3()

' Loop on all the 2D Component

for i = 0 to oNb2D - 1

o2DComponent.LocalReferenceFrame i, oXAxis, oXAxisValid, oYAxis, oYAxisValid, oZAxis, oZAxisValid

if oXAxisValid then

LogMessage "Component [" & i & "] X axis : " & oXAxis.x & " | " & oXAxis.y & " | " & oXAxis.z 

else

LogMessage "Component [" & i & "] INVALID X axis"

end if

if oYAxisValid then

LogMessage "Component [" & i & "] Y axis : " & oYAxis.x & " | " & oYAxis.y & " | " & oYAxis.z 

else

LogMessage "Component [" & i & "] INVALID Y axis"

end if

if oZAxisValid then

LogMessage "Component [" & i & "] Z axis : " & oZAxis.x & " | " & oZAxis.y & " | " & oZAxis.z 

else

LogMessage "Component [" & i & "] INVALID Z axis"

end if

next

関連項目

Geometry2D.AverageLocalReferenceFrame Geometry2D Geometry_V1.Nb2D SIVector3