Femtet2026.0マクロヘルプ/マニュアル
 

ホーム / モデリング / CGaudiBody / 関数 / Spin

Spin関数

定義

Spin (P As CGaudiPoint,Axis As CGaudiVector,Angle As Double) As Boolean

戻り値

True   成功
False   失敗

引数

P   回転軸上の点
Axis   回転軸の方向ベクトル
Angle   回転角[deg]

解説

引数で指定された回転軸上の点(P)と回転軸の方向ベクトル(Axis)と回転角(Angle)[deg]でCGaudiBodyを引き伸ばします。
Solidの場合はエラーとなり戻り値がFalseを返します。

実行例

Dim Femtet As New CFemtet
Dim Gaudi As CGaudi
Dim Body As CGaudiBody
Dim point As New CGaudiPoint
Dim Vector As New CGaudiVector

'新規プロジェクト作成
If Femtet.OpenNewProject() = False Then
    Femtet.ShowLastError
End If

'Femtet.Gaudiを変数Gaudiに代入して使いやすくする
Set Gaudi = Femtet.Gaudi



Vector.X = 0
Vector.Y = 10
Vector.Z = 0

point.X = 0
point.Y = 0
point.Z = 0

Set Body = Gaudi.CreateRect(point, 3, 4)

If Body.Spin(point, Vector, 60) = False Then
    Femtet.ShowLastError
End If
MACRO00000051.gif

MACRO00000052.gif