Mesh API/it: Difference between revisions
(Updating to match new version of source page) |
Renatorivo (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
<div class="mw-translate-fuzzy"> |
|||
{{APIFunction|addFacet|Facet|Aggiunge una sfaccettatura alla maglia| }} |
{{APIFunction|addFacet|Facet|Aggiunge una sfaccettatura alla maglia| }} |
||
{{APIFunction|addFacets|list|Aggiunge un elenco di sfaccettature alla maglia| }} |
{{APIFunction|addFacets|list|Aggiunge un elenco di sfaccettature alla maglia| }} |
||
Line 78: | Line 77: | ||
{{APIProperty|CountFacets|the number of facets of the mesh object.}} |
{{APIProperty|CountFacets|the number of facets of the mesh object.}} |
||
{{APIProperty|CountPoints|the number of vertices of the mesh object.}} |
{{APIProperty|CountPoints|the number of vertices of the mesh object.}} |
||
{{APIProperty|Facets|A collection of facets; With this attribute it is possible to get access to the facets of the mesh: for p in mesh.Facets: print |
{{APIProperty|Facets|A collection of facets; With this attribute it is possible to get access to the facets of the mesh: for p 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}} |
{{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|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|Topology|the points and face indices as tuple.}} |
|||
{{APIProperty|Volume|the volume of the mesh object.}} |
{{APIProperty|Volume|the volume of the mesh object.}} |
||
{{APIProperty|BoundBox|the BoundBox of the object}} |
{{APIProperty|BoundBox|the BoundBox of the object}} |
||
{{APIProperty|Matrix|the current transformation of the object as matrix}} |
{{APIProperty|Matrix|the current transformation of the object as matrix}} |
||
{{APIProperty|Placement|the current transformation of the object as placement}} |
{{APIProperty|Placement|the current transformation of the object as placement}} |
||
</div> |
|||
Revision as of 19:45, 28 August 2018
Gli oggetti mesh possono essere manipolati aggiungendo nuove sfaccettature, cancellando delle sfaccettature, importando da un file STL, trasformando la rete e in molti altri modi. Per una panoramica completa di ciò che si può fare vedere anche la documentazione del Modulo Mesh. Un oggetto mesh non può essere aggiunto direttamente ad un documento esistente. Pertanto, il documento deve creare un oggetto con una classe appropriataa che supporta le mesh. Esempio:
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()
Description: Rimuove un bordo e entrambe le sfaccettature che condividono questo bordo
Returns:
Description: Ottiene il numero di aree topologiche indipendenti
Returns: un intero
Description: Ottiene il numero di sfaccettature orientate male
Returns: un intero
Description: Ottiene il numero di segmenti che possono essere anche 0
Returns: un numero intero
Description: Ottiene sezioni trasversali della rete attraverso diversi piani
Returns:
Description: Ottiene un elenco di indici delle faccette e dei punti di intersezione
Returns:
Description: Ottiene tutti i piani della rete come segmento. Nel caso peggiore ogni triangolo può essere considerato come unico piano se nessuno dei suoi vicini è complanare.
Returns:
Description: Ottiene un elenco di indici delle faccette che descrivono un segmento
Returns:
Description: Restituisce una lista contenente le diverse componenti (aree separate) della rete come mesh separate
Returns: una lista
Description: Verifica se la rete ha dellle sfaccettature con orientamento incoerente
Returns:
Description: 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.
Returns: a dictionary
Description: Remove components with less or equal to number of given facets
Returns:
Returns: A collection of facets; With this attribute it is possible to get access to the facets of the mesh: for p 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.
Returns: 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.
Returns: 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.