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

ホーム / モデリング / CGaudiBody / プロパティ / Face

Faceプロパティ

定義

Face(Index As Long) As CGaudiFace
値の取得  
値の設定   ×

引数

Index   CGaudiBodyが持つFaceのインデックス

解説

CGaudiBody の指定されたインデックスの位置にあるCGaudiFace を取得します。
Index がCGaudiBody に存在する数を超えて設定した場合エラーが発生しマクロがストップします。
またID(GetEdgeByIDGetFaceByID関数を使用)からも取得できます。

実行例

取得したFaceに境界条件を設定します
Dim Femtet As New CFemtet
Dim 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.CreateBox(Point,3,3,5)

If Body.Face(3).AddBoundary("Boundary2")=False Then
    Femtet.ShowLastError
End If