ホーム / モデリング / CGaudiBody / 関数 / CutWithSurface
CutWithSurface関数
定義
CutWithSurface (Face As CGaudiFace,newBody( ) As CGaudiBody,bReverseNormal As Boolean,bNormalOnly As Boolean) As Boolean
[Python]
CutWithSurface_py (CGaudiFace Face, bool bReverseNormal, bool bNormalOnly)
戻り値
| True | 成功 | |
| False | 失敗 |
[Python]
| [0] | True:成功、False:失敗 | |
| [1][0~作成されたボディ数-1] | 切断によって作成されたCGaudiBody(配列) |
引数
| Face | 切断に使用する曲面 | |
| newBody( ) | 切断によって作成されたCGaudiBody(配列) | |
| bReverseNormal | 切断面の法線を反転 | |
| bNormalOnly | 切断面の法線方向のボディのみを残す(True)、又は全て残す(False) |
[Python]
| Face | 切断に使用する曲面 | |
| bReverseNormal | 切断面の法線を反転 | |
| bNormalOnly | 切断面の法線方向のボディのみを残す(True)、又は全て残す(False) |
解説
引数で指定した曲面でボディを切断します。実行例
Dim Femtet As New CFemtet
Dim Gaudi As CGaudi
'新規プロジェクト作成
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, 1, 1, 1)
'------- CreateCylinder -------
Dim Body1 As CGaudiBody
Dim Point1 As new CGaudiPoint
Point1.SetCoord 0.5, 0.5, 0
Set Body1 = Gaudi.CreateCylinder(Point1, 0.5, 1)
'------- CutWithSurface -------
Dim BodyArray0() As CGaudiBody
Dim Face0 As CGaudiFace
Set Face0 = Body1.GetFaceByID(2)
If Body0.CutWithSurface( Face0, BodyArray0, False, False ) = False Then
Femtet.ShowLastError
End If
|
|
|
|
|
実行前 |
実行後 |




