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

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

GetEdgeBoundary関数

定義

GetEdgeBoundary(szBoundary as String, result() as CGaudiEdge) as Boolean
 


[Python]
 GetEdgeBoundary_py(str szBoundary)

戻り値

True   検索の結果有り
False   検索の結果なし
 


[Python]
[0]   True:検索の結果有り、False:結果なし
[1][0~検索された辺の数-1]   検索結果のCGaudiEdgeが格納される配列

引数

szBoundary   検索する境界条件名
result   検索結果のEdgeが格納される配列
 


[Python]
szBoundary   検索する境界条件名

解説

Bodyを構成するEdgeの内、szBoundaryを境界条件に持つEdgeを検索する。

実行例

Dim Femtet As New CFemtet
Dim Gaudi As CGaudi
Dim Box As CGaudiBody
Dim Point As New CGaudiPoint

'----新規プロジェクト作成----
If Femtet.OpenNewProject() = False Then
    Femtet.ShowLastError
End If

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

'----新規モデル作成----


'------- CreateBox -------
Dim Body0 As CGaudiBody
Dim Point0 As New CGaudiPoint
Point0.SetCoord 0, 0, 0
Set Body0 = Gaudi.CreateBox(Point0, 5, 5, 5)

'------- AddBoundary -------
Dim Edge0 As CGaudiEdge
Set Edge0 = Body0.GetEdgeByID(24)
Edge0.AddBoundary "B3"

'------- GetEdgeBoundary -------
Dim Result() As CGaudiEdge
If Body0.GetEdgeBoundary("B3", Result) = False Then
    Femtet.ShowLastError
End If

'------- 境界条件の付いた面にメッシュサイズを設定 -------
Dim i As Integer
For i = LBound(Result) To UBound(Result)
    Result(i).MeshSize = 2
Next i