Mesh API/ja: Difference between revisions

From FreeCAD Documentation
(Created page with "Meshオブジェクトに対しては新しいファセットの追加、ファセットの削除、STLファイルからのインポート、メッシュの変換などの操...")
 
(Created page with "{{APIFunction/jp|addFacet|Facet|メッシュにファセットを追加します。| }} {{APIFunction/jp|addFacets|list|メッシュにファセットのリストを追加し...")
Line 12: Line 12:




{{APIFunction|addFacet|Facet|Adds a facet to the mesh| }}
{{APIFunction/jp|addFacet|Facet|メッシュにファセットを追加します。| }}
{{APIFunction|addFacets|list|Adds a list of facets to the mesh| }}
{{APIFunction/jp|addFacets|list|メッシュにファセットのリストを追加します。| }}
{{APIFunction|addMesh|Mesh|Combines this mesh with another mesh.| }}
{{APIFunction/jp|addMesh|Mesh|メッシュと別のメッシュをつなぎ合わせます。| }}
{{APIFunction|clear| |Clears the mesh| }}
{{APIFunction/jp|clear| |メッシュを消去します。| }}
{{APIFunction|coarsen| |Coarsens the mesh| }}
{{APIFunction/jp|coarsen| |メッシュを粗くします。| }}
{{APIFunction|collapseEdge|Edge|Removes an edge and both facets that share this edge| }}
{{APIFunction/jp|collapseEdge|Edge|エッジとエッジを共有する両側のファセットを削除します。| }}
{{APIFunction|collapseFacet|Facet|Removes a facet| }}
{{APIFunction/jp|collapseFacet|Facet|ファセットを削除します。| }}
{{APIFunction|collapseFacets|list|Removes a list of facets| }}
{{APIFunction/jp|collapseFacets|list|ファセットのリストを削除します。| }}
{{APIFunction|copy| |Creates a copy of this mesh|a Mesh object}}
{{APIFunction/jp|copy| |メッシュのコピーを作成します。|Meshオブジェクト}}
{{APIFunction|countComponents| |Get the number of topological independent areas|an integer}}
{{APIFunction/jp|countComponents| |位相的に独立した領域の数を取得します。|整数}}
{{APIFunction|countNonUniformOrientedFacets| |Get the number of wrong oriented facets|an integer}}
{{APIFunction/jp|countNonUniformOrientedFacets| |不正な方向を向いたファセットの数を取得します。|整数}}
{{APIFunction|countSegments| |Get the number of segments which may also be 0|an integer}}
{{APIFunction/jp|countSegments| |セグメントの数を取得します。0となる場合もあります。|整数}}
{{APIFunction|crossSections| |Get cross-sections of the mesh through several planes| }}
{{APIFunction/jp|crossSections| |複数の平面によっるメッシュの断面を取得します。| }}
{{APIFunction|difference|Mesh|Difference of this and the given mesh object.| }}
{{APIFunction/jp|difference|Mesh|与えられたMeshオブジェクトとの差分を計算します。| }}
{{APIFunction|fillupHoles| |Fillup holes| }}
{{APIFunction/jp|fillupHoles| |穴を埋めます。| }}
{{APIFunction|fixDeformations| |Repair deformed facets| }}
{{APIFunction/jp|fixDeformations| |歪んだファセットを修正します。| }}
{{APIFunction|fixDegenerations| |Remove degenerated facets| }}
{{APIFunction/jp|fixDegenerations| |縮退したファセットを削除します。| }}
{{APIFunction|fixIndices| |Repair any invalid indices| }}
{{APIFunction/jp|fixIndices| |全ての無効なインデックスを修正します。| }}
{{APIFunction|fixSelfIntersections| |Repair self-intersections| }}
{{APIFunction/jp|fixSelfIntersections| |自己干渉を修正します。| }}
{{APIFunction|flipNormals| |Flip the mesh normals| }}
{{APIFunction/jp|flipNormals| |メッシュの法線を反転します。| }}
{{APIFunction|foraminate| |Get a list of facet indices and intersection points| }}
{{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|Get a list of facet indices that describes a segment| }}
{{APIFunction/jp|getSegment|integer|一つのセグメントを構成するファセットのインデックスのリストを取得します。| }}
{{APIFunction|getSeparateComponents| |Returns a list containing the different components (separated areas) of the mesh as separate meshes|a list}}
{{APIFunction/jp|getSeparateComponents| |異なる構成要素(別れた領域)を保持するリストを分割されたメッシュとして返します。|リスト}}
{{APIFunction|harmonizeNormals| |Adjust wrong oriented facets| }}
{{APIFunction/jp|harmonizeNormals| |不正な向きのファセットを調整します。| }}
{{APIFunction|hasNonManifolds| |Check if the mesh has non-manifolds|a boolean}}
{{APIFunction/jp|hasNonManifolds| |メッシュにノンマニホールドな形状があるかどうかチェックします。|ブール値}}
{{APIFunction|hasNonUniformOrientedFacets| |Checks if the mesh has facets with inconsistent orientation| }}
{{APIFunction/jp|hasNonUniformOrientedFacets| |メッシュに矛盾する向きのファセットがあるかどうかチェックします。| }}
{{APIFunction|hasSelfIntersections| |Check if the mesh intersects itself| }}
{{APIFunction/jp|hasSelfIntersections| |メッシュに自己干渉があるかどうかチェックします。| }}
{{APIFunction|inner| |Get the part inside of the intersection| }}
{{APIFunction/jp|inner| |共通集合内部のパーツを取得します。| }}
{{APIFunction|insertVertex|Vertex|Inserts a vertex into a facet| }}
{{APIFunction/jp|insertVertex|Vertex|ファセットに頂点を挿入します。| }}
{{APIFunction|intersect|Mesh|Intersection of this and the given mesh object.| }}
{{APIFunction/jp|intersect|Mesh|与えられたメッシュとの共通集合を計算します。| }}
{{APIFunction|isSolid| |Check if the mesh is a solid| }}
{{APIFunction/jp|isSolid| |メッシュがソリッドとなっているかどうかをチェックします。| }}
{{APIFunction|meshFromSegment| |Create a mesh from segment| }}
{{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|Move the point along their normals| }}
{{APIFunction/jp|offset|float|法線に沿って点を動かします。| }}
{{APIFunction|offsetSpecial|float|Move the point along their normals| }}
{{APIFunction/jp|offsetSpecial|float|法線に沿って点を動かします。| }}
{{APIFunction|optimizeEdges| |Optimize the edges to get nicer facets| }}
{{APIFunction/jp|optimizeEdges| |ファセットの形が良くなるようにエッジを最適化します。| }}
{{APIFunction|optimizeTopology| |Optimize the edges to get nicer facets| }}
{{APIFunction/jp|optimizeTopology| |ファセットの形が良くなるようにエッジを最適化します。| }}
{{APIFunction|outer| |Get the part outside the intersection| }}
{{APIFunction/jp|outer| |共通集合外部のパーツを取得します。| }}
{{APIFunction|printInfo| |Get detailed information about the mesh| }}
{{APIFunction/jp|printInfo| |メッシュに関する詳細情報を取得します。| }}
{{APIFunction|read| |Read in a mesh object from file.| }}
{{APIFunction/jp|read| |ファイルからメッシュを読み込みます。| }}
{{APIFunction|refine| |Refine the mesh| }}
{{APIFunction/jp|refine| |メッシュを細かくします。| }}
{{APIFunction|removeComponents|integer|Remove components with less or equal to number of given facets| }}
{{APIFunction/jp|removeComponents|integer|与えられたファセット数より少なくなるように構成要素を削除します。| }}
{{APIFunction|removeDuplicatedFacets| |Remove duplicated facets| }}
{{APIFunction/jp|removeDuplicatedFacets| |二重定義されたファセットを削除します。| }}
{{APIFunction|removeDuplicatedPoints| |Remove duplicated points| }}
{{APIFunction/jp|removeDuplicatedPoints| |二重定義された点を削除します。| }}
{{APIFunction|removeFacets|list|Remove a list of facet indices from the mesh| }}
{{APIFunction/jp|removeFacets|list|メッシュからファセットのインデックスのリストを削除します。| }}
{{APIFunction|removeFoldsOnSurface| |Remove folds on surfaces| }}
{{APIFunction/jp|removeFoldsOnSurface| |表面上のしわを削除します。| }}
{{APIFunction|removeNonManifolds| |Remove non-manifolds| }}
{{APIFunction/jp|removeNonManifolds| |ノンマニホールドな形状を削除します。| }}
{{APIFunction|rotate| |Apply a rotation to the mesh| }}
{{APIFunction/jp|rotate| |メッシュに対して回転を適用します。| }}
{{APIFunction|setPoint|int, Vector|Sets the point at index.| }}
{{APIFunction/jp|setPoint|int, Vector|インデックスの点を設定します。| }}
{{APIFunction|smooth| |Smooth the mesh| }}
{{APIFunction/jp|smooth| |メッシュを滑らかにします。| }}
{{APIFunction|snapVertex| |Insert a new facet at the border| }}
{{APIFunction/jp|snapVertex| |縁に新しいファセットを挿入します。| }}
{{APIFunction|splitEdge| |Split edge| }}
{{APIFunction/jp|splitEdge| |エッジを分割します。| }}
{{APIFunction|splitEdges| |Split all edges| }}
{{APIFunction/jp|splitEdges| |全てのエッジを分割します。| }}
{{APIFunction|splitFacet| |Split facet| }}
{{APIFunction/jp|splitFacet| |ファセットを分割します。| }}
{{APIFunction|swapEdge| |Swap the common edge with the neighbor| }}
{{APIFunction/jp|swapEdge| |隣接ファセットと共有するエッジをスワップします。| }}
{{APIFunction|transform| |Apply a transformation to the mesh| }}
{{APIFunction/jp|transform| |メッシュに変換を適用します。| }}
{{APIFunction|transformToEigen| |Transform the mesh to its eigenbase| }}
{{APIFunction/jp|transformToEigen| |メッシュを固有基底に変換します。| }}
{{APIFunction|translate|Vector|Apply a translation to the mesh| }}
{{APIFunction/jp|translate|Vector|メッシュに変換を適用します。| }}
{{APIFunction|unite|Mesh|Union of this and the given mesh object.| }}
{{APIFunction/jp|unite|Mesh|メッシュと別のメッシュをつなぎ合わせます。| }}
{{APIFunction|write|string|Write the mesh object into file.| }}
{{APIFunction/jp|write|string|ファイルにメッシュオブジェクトを書き込みます。| }}
{{APIFunction|writeInventor| |Write the mesh in OpenInventor format to a string.|a string}}
{{APIFunction/jp|writeInventor| |OpenInventor形式のメッシュを文字列に書き込みます。|文字列}}
{{APIProperty|Area|the area of the mesh object.}}
{{APIProperty/jp|Area|メッシュオブジェクトの面積}}
{{APIProperty|CountFacets|the number of facets of the mesh object.}}
{{APIProperty/jp|CountFacets|メッシュオブジェクトのファセット数}}
{{APIProperty|CountPoints|the number of vertices of the mesh object.}}
{{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|A collection of the mesh points; With this attribute it is possible to get access to the points of the mesh: for p in mesh.Points: print p.x, p.y, p.z,p.Index.WARNING! store Points in a local variable as it is generated on the fly, each time it is accessed.}}
{{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|the volume of the mesh object.}}
{{APIProperty/jp|Volume|メッシュオブジェクトの体積}}
{{APIProperty|BoundBox|the BoundBox of the object}}
{{APIProperty/jp|BoundBox|オブジェクトのバウンディングボックス}}
{{APIProperty|Matrix|the current transformation of the object as matrix}}
{{APIProperty/jp|Matrix|行列形式でのオブジェクトの現在の変換}}
{{APIProperty|Placement|the current transformation of the object as 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