|
Cubit Python API 17.10
|
Body
ボディのオブジェクトを定義し、そのほとんどが「Cubit」と並行している。 Body クラス 詳細...
ボディの遺産グラフ:
公開メンバ関数 |
|
| def | get_mass_props (self) |
| 重力の中心を獲得する Body. 詳細... |
|
| def | is_sheet_body (self) |
| 得るか、得るか Body ボディとかボディとか。 詳細... |
|
| def | point_containment (self, loc_in) |
| コンテンツに関連するポイントの定義 Body. 詳細... |
|
| def | volume (self) |
| ボリュームを取得する Body. 詳細... |
|
継承された公開メンバ関数 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」と並行している。 Body クラス
メンバ関数ドキュメント
◆ get_mass_props()
| def get_mass_props | ( | self | ) |
重力の中心を獲得する Body .
これを計算し、その大量の特性を返す。 Body 特に重力の中心は座標です。
.. code-block:: python
# Create and unite two bricks: a cube and a long rectangular brick
cubit.cmd
("brick x 1 y 1 z 1"
)
cubit.cmd
("brick x 10 y 1 z 1"
)
cubit.cmd
("vol 2 move x 10"
)
cubit.cmd
("unite vol all"
)
# Retrieve the unified body
b = cubit.body
(1)
# Get geometric center and center of gravity
center_pt = b.center_point()
cg = b.get_mass_props()
print("Geometric center:"
, center_pt)
print("Center of gravity:"
, cg)
# Expected: geometric center != center of gravity
@n return type of : std:: array< double,3 >
- 戻り値
- : A std::range of three double values the x, y, and z 座標 of the Body重力の中心です。
◆ is_sheet_body()
| def is_sheet_body | ( | self | ) |
得るか、得るか Body ボディとかボディとか。
これが決定する場合 Body 表(2D)はジオメトリではなくボリューム(3D)を表しています。
.. code-block:: python
# Create a 3D brick (volume)
cubit.cmd
("reset"
)
vol_body = cubit.brick
(1)
print("Is sheet body?"
, vol_body.is_sheet_body()) # Expected output: False
# Create a 2D rectangular sheet via command
cubit.cmd
("reset"
)
cubit.cmd
("create surface rectangle width 1"
)
surf = cubit.surface
(1)
# Extract the sheet body from the surface
sheet_bodies = surf.bodies()
sheet_body = sheet_bodies[0]
print("Is sheet body?"
, sheet_body.is_sheet_body()) # Expected output: True
@n return type of : boolean
- 戻り値
- 真実なら、その Body それはボディの葉であり、偽りである。
◆ point_containment()
| def point_containment | ( | self, | |
| loc_in | |||
| ) |
コンテンツに関連するポイントの定義 Body .
この点の内部、上、または外にあるかどうかを確認する。 Body
.. code-block:: python
# Create a unit cube body (1x1x1) centered at origin (extends -0.5 to 0.5)
b = cubit.brick
(1)
# Point strictly inside the volume
print("Inside:"
, b.point_containment([0.0, 0.0, 0.0])) # Expected output: 1
# Point on the boundary
print("On:"
, b.point_containment([0.5, 0.0, 0.0])) # Expected output: 2
# Point outside the volume
print("Outside:"
,b.point_containment([1.0, 0.0, 0.0])) # Expected output: 0
@n type of loc_in: std::array< double,3 >, in
- パラメータ
-
loc_in 3つの要素の順序で、ポイントの座標(x、y、z)を指定します。
戻り値の型:int
- 戻り値
- 全コード -1 未知の場合、0 外の場合、1 内の場合、または 2 外の場合 Body.
◆ volume()
| def volume | ( | self | ) |
ボリュームを取得する Body .
この機能が利用可能なのは、 Body 物体
Returns the computed geometric volume of this Body.
.. code-block:: python
# Create a unit cube body (1x1x1)
b = cubit.brick
(1)
# Compute and print its volume
vol = b.volume()
print("Body volume:"
, vol) # Expected output: 1.0
@n return type of : float
- 戻り値
- ボリュームは、 Body.
継承された公開メンバ関数