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

ホーム / モデリング / CGaudi / 関数 / DrawCrossSection

DrawCrossSection関数

定義

DrawCrossSection ( Point As CGaudiPoint,Vector As CGaudiVector ) As Boolean

戻り値

True   成功
False   失敗

引数

Point   切断面上の点
Vector   切断面の法線ベクトル

解説

切断面上の点と法線ベクトルで指定された平面でボディを切断して表示します。
表示状態の変更であり、モデルの形状には変更を加えません。
モデルの形状に変更を加える場合は、CGaudiBodyクラスのCut関数をご利用ください。

実行例

Dim Femtet As New CFemtet
Dim Gaudi As CGaudi
Dim Point As New CGaudiPoint
Dim Vector As New CGaudiVector

'プロジェクトを開く
If Femtet.LoadProject("C:\test\test.femprj", True) = False Then
  Femtet.ShowLastError
End If

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

'切断面上の点
Point.SetCoord 0, 0, 0
 
'切断面の法線ベクトル
Vector.SetCoord 0, 1, 0

'断面表示実行
If Gaudi.DrawCrossSection(Point, Vector) = False Then
  Femtet.ShowLastError
End If