ホーム / モデリング / CGaudiBody / 関数 / GetFaceBoundary
GetFaceBoundary関数
定義
GetFaceBoundary(szBoundary as String, result() as CGaudiFace) as Boolean
[Python]
GetFaceBoundary_py(str szBoundary)
戻り値
| True | 検索の結果有り | |
| False | 検索の結果なし |
[Python]
|
[0] |
True:検索の結果有り、False:結果なし | |
|
[1][0~検索された面の数-1] |
検索結果のCGaudiFaceが格納される配列 |
引数
| szBoundary | 検索する境界条件名 | |
| result | 検索結果のFaceが格納される配列 |
[Python]
| szBoundary | 検索する境界条件名 |
解説
Bodyを構成するFaceの内、szBoundaryを境界条件に持つFaceを検索する。実行例
Dim Femtet As New CFemtetDim 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, 10, 10, 10)
'------- CreateBox -------
Dim Body1 As CGaudiBody
Dim Point1 As New CGaudiPoint
Point1.SetCoord 2, 2, 2
Set Body1 = Gaudi.CreateBox(Point1, 6, 6, 10)
'------- HoleBoundary -------
Dim BodyArray0(0) As CGaudiBody
Dim BodyArray1() As CGaudiBody
Set BodyArray0(0) = Body1
Body0.HoleBoundary BodyArray0, BodyArray1, "B3", True
'------- GetFaceBoundary -------
Dim Result() As CGaudiFace
If Body0.GetFaceBoundary("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


