ホーム / モデリング / CGaudiBody / 関数 / Rotate2
Rotate2関数
定義
Rotate2 (P As CGaudiPoint,bSizeBoxCenter As Boolean,Axis As CGaudiVector,Angle As Double)As Boolean戻り値
| True | 成功 | |
| False | 失敗 |
引数
| P | 回転軸上の点 | |
| bSizeBoxCenter | 回転軸上の点を回転対象のサイズボックスの中心とするか | |
| Axis | 回転軸の方向ベクトル | |
| Angle | 回転角[deg] |
解説
引数で指定された回転軸上の点(P)と回転軸の方向ベクトル(Axis)と回転角(Angle)[deg]でCGaudiBodyを回転させます。実行例
Dim Femtet As New CFemtetDim Gaudi As CGaudi
Dim Body As CGaudiBody
Dim Point As New CGaudiPoint
Dim Vector As New CGaudiVector
Dim Copy As CGaudiBody
'新規プロジェクト作成
If Femtet.OpenNewProject() = False Then
Femtet.ShowLastError
End If
'Femtet.Gaudiを変数Gaudiに代入して使いやすくする
Set Gaudi = Femtet.Gaudi
Point.X = 0
Point.Y = 0
Point.Z = 0
Vector.X = 0
Vector.Y = 10
Vector.Z = 0
Set Body = Gaudi.CreateCone(Point, 5, 7, 3)
Set Copy = Body.CreateReplica
If Copy.Rotate2(Point, False, Vector, 60) = False Then
Femtet.ShowLastError
End If
![]() |
![]() |




