ホーム / モデリング / CGaudi / 関数 / CreateCylinder
CreateCylinder関数
定義
CreateCylinder (Center As CGaudiPoint, R As Double, H As Double) As CGaudiBody戻り値
成功した場合は新規に作成されたBodyが返ります。失敗した場合は、Nothingが返ります。
引数
| Center | 底面の中心点 | |
| R | 半径 | |
| H | 高さ |
解説
指定された半径と高さの円柱を作成します。高さ方向は作業平面のZ方向となります。
半径や高さが小さすぎる場合はエラーとなり、Nothingが返ります。
実行例
Dim Femtet As New CFemtetDim Gaudi As CGaudi
Dim Body As CGaudiBody
Dim Point As New CGaudiPoint
'新規プロジェクト作成
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
Set Body = Gaudi.CreateCylinder(Point, 5, 10)


