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

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

Sweep2関数

定義

Sweep2 (Vector As CGaudiVector) As Boolean

戻り値

True   成功
False   失敗

引数

Vector   引きのばしベクトル

解説

引数で指定された引きのばしベクトルに引き伸ばします。
Solidの場合はエラーとなり戻り値がFalseを返します。

実行例

Dim Femtet As New CFemtet

Dim Gaudi As CGaudi

Dim Body As CGaudiBody

Dim newBody() As CGaudiBody

Dim point As New CGaudiPoint

Dim Vector As New CGaudiVector

Dim Plane As New CGaudiPlane

 

'新規プロジェクト作成

If Femtet.OpenNewProject() = False Then

    Femtet.ShowLastError

End If

 

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

Set Gaudi = Femtet.Gaudi

 

' 作業平面をZX平面に設定します

Plane.MainDirection.SetCoord 0, 1, 0

Plane.RefDirection.SetCoord 1, 0, 0

 

If Gaudi.SetPlane(Plane) = False Then

    Femtet.ShowLastError

End If

 

Vector.SetCoord 0, 8, 0

point.SetCoord 0, 0, 0

 

Set Body = Gaudi.CreatePolygonFace(point, 10, 6)

 

'指定した引きのばしベクトルに引きのばします

If Body.Sweep2(Vector) = False Then

    Femtet.ShowLastError

End If


MACRO00000048.gif   MACRO00000049.gif