ホーム / モデリング / CGaudi / 関数 / CreateCone
CreateCone関数
定義
CreateCone (Center As CGaudiPoint, R1 As Double, H As Double, R2 As Double) As CGaudiBody戻り値
成功した場合は新規に作成されたBodyが返ります。失敗した場合は、Nothingが返ります。
引数
| Center | 底面の中心点 | |
| R1 | 底面の半径 | |
| H | 高さ | |
| R2 | 上面の半径 |
解説
指定された半径と高さの円錐を作成します。高さ方向は作業平面のZ方向となります。
底面半径と上面半径のどちらも0以下の場合はエラーとなり、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.CreateCone(Point, 8,10, 3)


