Mesh API/ja: Difference between revisions
(Created page with "Meshオブジェクトに対しては新しいファセットの追加、ファセットの削除、STLファイルからのインポート、メッシュの変換などの操...") |
(Created page with "{{APIFunction/jp|addFacet|Facet|メッシュにファセットを追加します。| }} {{APIFunction/jp|addFacets|list|メッシュにファセットのリストを追加し...") |
||
Line 12: | Line 12: | ||
{{APIFunction|addFacet|Facet| |
{{APIFunction/jp|addFacet|Facet|メッシュにファセットを追加します。| }} |
||
{{APIFunction|addFacets|list| |
{{APIFunction/jp|addFacets|list|メッシュにファセットのリストを追加します。| }} |
||
{{APIFunction|addMesh|Mesh| |
{{APIFunction/jp|addMesh|Mesh|メッシュと別のメッシュをつなぎ合わせます。| }} |
||
{{APIFunction|clear| | |
{{APIFunction/jp|clear| |メッシュを消去します。| }} |
||
{{APIFunction|coarsen| | |
{{APIFunction/jp|coarsen| |メッシュを粗くします。| }} |
||
{{APIFunction|collapseEdge|Edge| |
{{APIFunction/jp|collapseEdge|Edge|エッジとエッジを共有する両側のファセットを削除します。| }} |
||
{{APIFunction|collapseFacet|Facet| |
{{APIFunction/jp|collapseFacet|Facet|ファセットを削除します。| }} |
||
{{APIFunction|collapseFacets|list| |
{{APIFunction/jp|collapseFacets|list|ファセットのリストを削除します。| }} |
||
{{APIFunction|copy| | |
{{APIFunction/jp|copy| |メッシュのコピーを作成します。|Meshオブジェクト}} |
||
{{APIFunction|countComponents| | |
{{APIFunction/jp|countComponents| |位相的に独立した領域の数を取得します。|整数}} |
||
{{APIFunction|countNonUniformOrientedFacets| | |
{{APIFunction/jp|countNonUniformOrientedFacets| |不正な方向を向いたファセットの数を取得します。|整数}} |
||
{{APIFunction|countSegments| | |
{{APIFunction/jp|countSegments| |セグメントの数を取得します。0となる場合もあります。|整数}} |
||
{{APIFunction|crossSections| | |
{{APIFunction/jp|crossSections| |複数の平面によっるメッシュの断面を取得します。| }} |
||
{{APIFunction|difference|Mesh| |
{{APIFunction/jp|difference|Mesh|与えられたMeshオブジェクトとの差分を計算します。| }} |
||
{{APIFunction|fillupHoles| | |
{{APIFunction/jp|fillupHoles| |穴を埋めます。| }} |
||
{{APIFunction|fixDeformations| | |
{{APIFunction/jp|fixDeformations| |歪んだファセットを修正します。| }} |
||
{{APIFunction|fixDegenerations| | |
{{APIFunction/jp|fixDegenerations| |縮退したファセットを削除します。| }} |
||
{{APIFunction|fixIndices| | |
{{APIFunction/jp|fixIndices| |全ての無効なインデックスを修正します。| }} |
||
{{APIFunction|fixSelfIntersections| | |
{{APIFunction/jp|fixSelfIntersections| |自己干渉を修正します。| }} |
||
{{APIFunction|flipNormals| | |
{{APIFunction/jp|flipNormals| |メッシュの法線を反転します。| }} |
||
{{APIFunction|foraminate| | |
{{APIFunction/jp|foraminate| |ファセットのインデックスと干渉している点のリストと取得します。| }} |
||
{{APIFunction/jp|getPlanes| |全てのメッシュの平面をセグメントとして取得します。最悪の場合、各三角形が一つの平面と見なされる場合があります。つまり隣接するファセットで同一平面上に乗るものがない場合です。| }} |
|||
{{APIFunction|getPlanes| |Get all planes of the mesh as segment. In the worst case each triangle can be regarded as single plane if none of its neighbors is coplanar.| }} |
|||
{{APIFunction|getSegment|integer| |
{{APIFunction/jp|getSegment|integer|一つのセグメントを構成するファセットのインデックスのリストを取得します。| }} |
||
{{APIFunction|getSeparateComponents| | |
{{APIFunction/jp|getSeparateComponents| |異なる構成要素(別れた領域)を保持するリストを分割されたメッシュとして返します。|リスト}} |
||
{{APIFunction|harmonizeNormals| | |
{{APIFunction/jp|harmonizeNormals| |不正な向きのファセットを調整します。| }} |
||
{{APIFunction|hasNonManifolds| | |
{{APIFunction/jp|hasNonManifolds| |メッシュにノンマニホールドな形状があるかどうかチェックします。|ブール値}} |
||
{{APIFunction|hasNonUniformOrientedFacets| | |
{{APIFunction/jp|hasNonUniformOrientedFacets| |メッシュに矛盾する向きのファセットがあるかどうかチェックします。| }} |
||
{{APIFunction|hasSelfIntersections| | |
{{APIFunction/jp|hasSelfIntersections| |メッシュに自己干渉があるかどうかチェックします。| }} |
||
{{APIFunction|inner| | |
{{APIFunction/jp|inner| |共通集合内部のパーツを取得します。| }} |
||
{{APIFunction|insertVertex|Vertex| |
{{APIFunction/jp|insertVertex|Vertex|ファセットに頂点を挿入します。| }} |
||
{{APIFunction|intersect|Mesh| |
{{APIFunction/jp|intersect|Mesh|与えられたメッシュとの共通集合を計算します。| }} |
||
{{APIFunction|isSolid| | |
{{APIFunction/jp|isSolid| |メッシュがソリッドとなっているかどうかをチェックします。| }} |
||
{{APIFunction|meshFromSegment| | |
{{APIFunction/jp|meshFromSegment| |セグメントからメッシュを作成します。| }} |
||
{{APIFunction/jp|nearestFacetOnRay|tuple, tuple|直線(レイ/光線)に最も近接するファセットの交点とインデックスを取得します。一番目のパラメーターは三つのfloat値のタプルで直線の始点を、二番目のパラメーターは三つのfloat値のタプルで方向を表します。結果はインデックス付きの辞書と交点、あるいは交点がない場合は空の辞書です。|辞書}} |
|||
{{APIFunction|nearestFacetOnRay|tuple, tuple|Get the index and intersection point of the nearest facet to a ray. The first parameter is a tuple of three floats the base point of the ray, the second parameter is ut uple of three floats for the direction. The result is a dictionary with an index and the intersection point or an empty dictionary if there is no intersection.|a dictionary}} |
|||
{{APIFunction|offset|float| |
{{APIFunction/jp|offset|float|法線に沿って点を動かします。| }} |
||
{{APIFunction|offsetSpecial|float| |
{{APIFunction/jp|offsetSpecial|float|法線に沿って点を動かします。| }} |
||
{{APIFunction|optimizeEdges| | |
{{APIFunction/jp|optimizeEdges| |ファセットの形が良くなるようにエッジを最適化します。| }} |
||
{{APIFunction|optimizeTopology| | |
{{APIFunction/jp|optimizeTopology| |ファセットの形が良くなるようにエッジを最適化します。| }} |
||
{{APIFunction|outer| | |
{{APIFunction/jp|outer| |共通集合外部のパーツを取得します。| }} |
||
{{APIFunction|printInfo| | |
{{APIFunction/jp|printInfo| |メッシュに関する詳細情報を取得します。| }} |
||
{{APIFunction|read| | |
{{APIFunction/jp|read| |ファイルからメッシュを読み込みます。| }} |
||
{{APIFunction|refine| | |
{{APIFunction/jp|refine| |メッシュを細かくします。| }} |
||
{{APIFunction|removeComponents|integer| |
{{APIFunction/jp|removeComponents|integer|与えられたファセット数より少なくなるように構成要素を削除します。| }} |
||
{{APIFunction|removeDuplicatedFacets| | |
{{APIFunction/jp|removeDuplicatedFacets| |二重定義されたファセットを削除します。| }} |
||
{{APIFunction|removeDuplicatedPoints| | |
{{APIFunction/jp|removeDuplicatedPoints| |二重定義された点を削除します。| }} |
||
{{APIFunction|removeFacets|list| |
{{APIFunction/jp|removeFacets|list|メッシュからファセットのインデックスのリストを削除します。| }} |
||
{{APIFunction|removeFoldsOnSurface| | |
{{APIFunction/jp|removeFoldsOnSurface| |表面上のしわを削除します。| }} |
||
{{APIFunction|removeNonManifolds| | |
{{APIFunction/jp|removeNonManifolds| |ノンマニホールドな形状を削除します。| }} |
||
{{APIFunction|rotate| | |
{{APIFunction/jp|rotate| |メッシュに対して回転を適用します。| }} |
||
{{APIFunction|setPoint|int, Vector| |
{{APIFunction/jp|setPoint|int, Vector|インデックスの点を設定します。| }} |
||
{{APIFunction|smooth| | |
{{APIFunction/jp|smooth| |メッシュを滑らかにします。| }} |
||
{{APIFunction|snapVertex| | |
{{APIFunction/jp|snapVertex| |縁に新しいファセットを挿入します。| }} |
||
{{APIFunction|splitEdge| | |
{{APIFunction/jp|splitEdge| |エッジを分割します。| }} |
||
{{APIFunction|splitEdges| | |
{{APIFunction/jp|splitEdges| |全てのエッジを分割します。| }} |
||
{{APIFunction|splitFacet| | |
{{APIFunction/jp|splitFacet| |ファセットを分割します。| }} |
||
{{APIFunction|swapEdge| | |
{{APIFunction/jp|swapEdge| |隣接ファセットと共有するエッジをスワップします。| }} |
||
{{APIFunction|transform| | |
{{APIFunction/jp|transform| |メッシュに変換を適用します。| }} |
||
{{APIFunction|transformToEigen| | |
{{APIFunction/jp|transformToEigen| |メッシュを固有基底に変換します。| }} |
||
{{APIFunction|translate|Vector| |
{{APIFunction/jp|translate|Vector|メッシュに変換を適用します。| }} |
||
{{APIFunction|unite|Mesh| |
{{APIFunction/jp|unite|Mesh|メッシュと別のメッシュをつなぎ合わせます。| }} |
||
{{APIFunction|write|string| |
{{APIFunction/jp|write|string|ファイルにメッシュオブジェクトを書き込みます。| }} |
||
{{APIFunction|writeInventor| | |
{{APIFunction/jp|writeInventor| |OpenInventor形式のメッシュを文字列に書き込みます。|文字列}} |
||
{{APIProperty|Area| |
{{APIProperty/jp|Area|メッシュオブジェクトの面積}} |
||
{{APIProperty|CountFacets| |
{{APIProperty/jp|CountFacets|メッシュオブジェクトのファセット数}} |
||
{{APIProperty|CountPoints| |
{{APIProperty/jp|CountPoints|メッシュオブジェクトの頂点数}} |
||
{{APIProperty/jp|Facets|ファセットのコレクション。この属性を使うと次のようにしてメッシュのファセットにアクセスできます。for p in mesh.Facets: print p}} |
|||
{{APIProperty|Facets|A collection of facets; With this attribute it is possible to get access to the facets of the mesh: for f in mesh.Facets: print f. Facet.Points is a list of coordinate-tupels for the vertices. Facet.PointIndices is a list of indice for the vertices of the facet. WARNING! store Facets in a local variable as it is generated on the fly, each time it is accessed.}} |
|||
{{APIProperty|Points| |
{{APIProperty/jp|Points|メッシュの点のコレクション。この属性を使うと次のようにしてメッシュの点にアクセスできます。for p in mesh.Points: print p.x, p.y, p.z}} |
||
{{APIProperty/jp|Topology|タプルでの点と面のインデックス}} |
|||
{{APIProperty|Topology|the points and face indices as tuple. Topology[0] is a list of all vertices. Each being a tuple of 3 coordinates. Topology[1] is a list of all polygons. Each being a list of vertex indice into Topology[0] WARNING! store Topology in a local variable as it is generated on the fly, each time it is accessed.}} |
|||
{{APIProperty|Volume| |
{{APIProperty/jp|Volume|メッシュオブジェクトの体積}} |
||
{{APIProperty|BoundBox| |
{{APIProperty/jp|BoundBox|オブジェクトのバウンディングボックス}} |
||
{{APIProperty|Matrix| |
{{APIProperty/jp|Matrix|行列形式でのオブジェクトの現在の変換}} |
||
{{APIProperty|Placement| |
{{APIProperty/jp|Placement|Placement形式でのオブジェクトの現在の変換}} |
||
Revision as of 10:07, 17 January 2019
Meshオブジェクトに対しては新しいファセットの追加、ファセットの削除、STLファイルからのインポート、メッシュの変換などの操作を行うことができます。何ができるのかを全て概観するにはメッシュモジュールドキュメントも参照してください。メッシュオブジェクトを既存のドキュメントに直接追加することはできません。それを行うにはドキュメントにメッシュをサポートするプロパティクラスを持つオブジェクトを作成する必要があります。
m = Mesh.Mesh()
... # Manipulate the mesh
d = FreeCAD.activeDocument() # Get a reference to the actie document
f = d.addObject("Mesh::Feature", "Mesh") # Create a mesh feature
f.Mesh = m # Assign the mesh object to the internal property
d.recompute()
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIFunction/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp
Template:APIProperty/jp