ホーム / モデリング / CGaudiBody / 関数 / Unite
Unite関数
定義
Unite (Tool( ) As CGaudiBody,newBody( ) As CGaudiBody,bResultOnly As Boolean) As Boolean
[Python]
Unite_py(CGaudiBody[] Tool, bool bResultOnly)
戻り値
| True | 成功 | |
| False | 失敗 |
[Python]
| [0] | True:成功、False:失敗 | |
| [1][0~結合されたボディ数-1] | 結合されたCGaudiBody(配列) |
引数
| Tool( ) | 結合するCGaudiBody(配列) | |
| newBody( ) | 結合されたCGaudiBody(配列) | |
| bResultOnly | 結果のみ残すかどうか [True:結果のみ残す/False:元の形状も残す] |
[Python]
| Tool( ) | 結合するCGaudiBody(配列) | |
| bResultOnly | 結果のみ残すかどうか [True:結果のみ残す/False:元の形状も残す] |
解説
引数で指定されたCGaudiBodyを結合します(和ブーリアン)。Booleanは結果のみ残すかどうかを設定します。結合されたCGaudiBodyはnewBody(i)に設定されます。FaceとSolid以外は戻り値がFalseを返します。実行例
Dim Femtet As New CFemtetDim Gaudi As CGaudi
Dim Body(1)As CGaudiBody
Dim Box(0)As CGaudiBody
Dim Point(0)As New CGaudiPoint
Dim newBody()As CGaudiBody
'新規プロジェクト作成
If Femtet.OpenNewProject() = False Then
Femtet.ShowLastError
End If
'Femtet.Gaudiを変数Gaudiに代入して使いやすくする
Set Gaudi = Femtet.Gaudi
Point(0).X =0
Point(0).Y =0
Point(0).Z =0
Set Body(0)=Gaudi.CreateCylinder(Point(0),5,10)
Set Body(1)=Gaudi.CreateCylinder(Point(0),2.5,15)
Set Box(0)=Gaudi.CreatePolygonCylinder(Point(0),8,6,6)
If Box(0).Unite(Body,newBody,True)=False Then
Femtet.ShowLastError
End If



