Cubit Python API  17.10

ボリュームのオブジェクトを定義し、ほとんどがCubitのRefVolumeクラスと並行しています。 詳細...

ボリュームの遺産グラフ:
GeomEntity Entity

公開メンバ関数

def  センター (self)
  セントロイドを手に入れる Volume. 詳細...

 
def  color (self)
  これからRGBAの色を得る Volume エンティティ 詳細...

 
def  principal_axes (self)
  これらの主な軸を取り戻す。 Volume エンティティ 詳細...

 
def  principal_moments (self)
  主な瞬間を手に入れる Volume. 詳細...

 
def  set_color (self, value)
  この色のRGBAを設定する Volume エンティティ 詳細...

 
def  volume (self)
  この3次元のボリュームを計算する Volume エンティティ 詳細...

 
- 継承された公開メンバ関数 GeomEntity
def  bodies (self)
  ジオメトリのエンティティに含まれるボディを取り戻す。 詳細...

 
def  カーブ (self)
  Retrieve カーブ (エッジ) 関連するジオメトリエンティティ. 詳細...

 
def  dimension (self)
  ジオメトリのエンティティのトポロジーの次元を得る。 詳細...

 
def  entity_name (self)
  ジオメトリのエンティティの主な名前を取り戻す。 詳細...

 
def  entity_names (self)
  ジオメトリのエンティティに割り当てられたすべての名前を返します。 詳細...

 
def  is_meshed (self)
  現在のメッシュの状態を回復する。 GeomEntity. 詳細...

 
def  is_transparent (self)
  ジオメトリのエンティティの透明性の状態を得る。 詳細...

 
def  is_visible (self)
  ジオメトリのエンティティの視覚状態を取得します。 詳細...

 
def  mesh (self)
  メッシュを生成するA GeomEntity メッシングの状態を確認する。 詳細...

 
def  num_names (self)
  ジオメトリのエンティティに割り当てられた名前の数を取得します。 詳細...

 
def  remove_entity_name (self, name)
  ジオメトリのエンティティから特定の名前を削除します。 詳細...

 
def  remove_entity_names (self)
  ジオメトリのエンティティからすべての非デフォルト名を削除します。 詳細...

 
def  remove_mesh (self)
  ジオメトリのエンティティに関連するメッシュを削除します。 詳細...

 
def  set_entity_name (self, name)
  ジオメトリのエンティティに名前を付けます。 詳細...

 
def  set_transparent (self, transparency_flag)
  ジオメトリのエンティティの透明性状態を設定します。 詳細...

 
def  set_visible (self, visibility_flag)
  ジオメトリのエンティティの可視性状態を設定して確認します。 詳細...

 
def  smooth (self)
  メッシュを「A」に GeomEntity 「要素品質」を向上させる 詳細...

 
def  サーフェス (self)
  Retrieve サーフェス関連するジオメトリエンティティ。 詳細...

 
def  頂点 (self)
  「頂点」(ポイント)をジオメトリのエンティティと関連付けます。 詳細...

 
def  ボリューム (self)
  ジオメトリのエンティティと関連するボリュームを取り戻す。 詳細...

 
- 継承された公開メンバ関数 Entity
def  bounding_box (self)
  次のエンティティの軸平行バウンディングボックスを返します: Entity. 詳細...

 
def  center_point (self)
  次のエンティティの幾何学的中心点を返します: Entity. 詳細...

 
def  id (self)
  次のエンティティの一意な識別子を取得します: Entity. 詳細...

 

詳細説明

ボリュームのオブジェクトを定義し、ほとんどがCubitのRefVolumeクラスと並行しています。

メンバ関数ドキュメント

◆ centroid()

def centroid (   self )

セントロイドを手に入れる Volume .

.. code-block:: python

centroid = volume.centroid()
     @n return type of : std:: array< double,3 >
戻り値
ボリュームの中心部の座標のベクトル(またはリスト)とベクトルの指標は、以下の値に合致する。
0 x 座標
1と座標
2 z 座標

◆ color()

def color (   self )

これからRGBAの色を得る Volume エンティティ

ボリュームの現在のディスプレイ色をRGBAチャンネルとしてリトレートします。

注
特定の色が明示的に適用されていない場合は、この機能が戻ってくる(0.0、0.0、0.0、0.0)。

例は半径1の領域を作成し、黄色の色(コマンドまたはAPIを介して)を適用し、その色を取り戻します。

         .. code-block:: python
# Create a sphere of radius 1
cubit.cmd ("sphere rad 1" )
# Obtain the Volume object for ID 1
vol_obj = cubit.volume (1)
# Method 1: apply yellow via command interface
cubit.cmd ("color vol 1 yellow" )
# Method 2: apply yellow via API call
vol_obj.set_color([1.0, 1.0, 0.0, 1.0])
# Get the RGBA color
col = vol_obj.color()
print("Color RGBA:" , col) # Expected output: [1.0, 1.0, 0.0, 1.0]
        @n return type of : std:: array< double,4 >
戻り値
ボリュームの色のRGBAチャンネルを表す4つのダブルの連続。

◆ principal_axes()

def principal_axes (   self )

これらの主な軸を取り戻す。 Volume エンティティ

ボリュームの3つの主な方向(軸)を返し、その主な瞬間に合致し、フラットされた3x3マトリックスとして返します。

例は単位領域を作成し、その主軸(単位ベクトルX、Y、Zに沿って)を得る。

         .. code-block:: python
# Create a sphere of radius 1
cubit.cmd ("sphere rad 1" )
# Obtain the Volume object for ID 1
vol_obj = cubit.volume (1)
# Retrieve principal axes
axes = vol_obj.principal_axes()
print("Axes:" , axes) # Expected: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
        @n return type of : std:: array< double,9 >
戻り値
: 主軸指数x0x2 = axisx1 (x、y、z)、3x5 = axisx2、6x8 = axisx3を表す9つのダブルの範囲。

◆ principal_moments()

def principal_moments (   self )

主な瞬間を手に入れる Volume .

.. code-block:: python

moments = volume.principal_moments()
     @n return type of : std:: array< double,3 >
戻り値
ボリュームの主な瞬間のベクトル(またはリスト)とベクトルの指標は、以下の値に合致する。
0 x 瞬間
1 瞬間
2 瞬間

◆ set_color()

def set_color (   self,
  value 
)

この色のRGBAを設定する Volume エンティティ

赤、緑、青、アルファ(オパシー)チャンネルを使用して表示色を適用します。

注
アルファチャンネルは、オパシーをコントロールします(0.0 = 完全透明、1.0 = 完全オパシー)。

例は半径1のスペースを作成し、コマンドとAPIを通じて黄色(完全・半透明)の色を適用し、グラフィックの更新を強制します。

         .. code-block:: python
# Create a sphere of radius 1
cubit.cmd ("sphere rad 1" )
# Obtain the Volume object for ID 1
vol_obj = cubit.volume (1)
# Method 1: set yellow via command interface (opaque)
cubit.cmd ("color vol 1 yellow" )
# Force graphics update
cubit.cmd ("display" )
# Method 2: set semi-transparent yellow via API (alpha = 0.5)
vol_obj.set_color([1.0, 1.0, 0.0, 0.5])
# Force graphics update
cubit.cmd ("display" )
        @n type of value:  std::array< double,4 >, in
パラメータ
value 4つのdouble値 [R,G,B,A] の配列です。各値は [0,1] の範囲で、Aは不透明度を制御します。

◆ volume()

def volume (   self )

この3次元のボリュームを計算する Volume エンティティ

ジオメトリのボリュームを計算する Volume 対象です。

例はコマンド線を通じて半径1の領域を作成し、その領域を取得します。 Volume オブジェクト、そしてそのボリュームを測る。

         .. code-block:: python
# Create a sphere of radius 1
cubit.cmd ("sphere rad 1" )
# Obtain the Volume object for ID 1
vol_obj = cubit.volume (1)
# Compute the geometric volume
geo_vol = vol_obj.volume()
print("Computed volume:" , geo_vol) # Expected output: 4.18879
        @n return type of :  float
戻り値
計算された3次元のボリューム