Mesh API/it: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
⚫ | |||
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 [[Mesh Module/it|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: |
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 [[Mesh Module/it|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: |
||
Line 11: | Line 12: | ||
<div class="mw-translate-fuzzy"> |
|||
{{APIFunction|addFacet|Facet|Adds a facet to the mesh| }} |
|||
{{APIFunction| |
{{APIFunction|addFacet|Facet|Aggiunge una sfaccettatura alla maglia| }} |
||
{{APIFunction| |
{{APIFunction|addFacets|list|Aggiunge un elenco di sfaccettature alla maglia| }} |
||
{{APIFunction| |
{{APIFunction|addMesh|Mesh|Combina questa mesh con un'altra mesh.| }} |
||
{{APIFunction| |
{{APIFunction|clear| |Cancella la mesh| }} |
||
{{APIFunction| |
{{APIFunction|coarsen| |Rende grossolana la mesh| }} |
||
{{APIFunction|collapseEdge|Edge|Rimuove un bordo e entrambe le sfaccettature che condividono questo bordo| }} |
|||
{{APIFunction|collapseFacet|Facet|Removes a facet| }} |
|||
{{APIFunction| |
{{APIFunction|collapseFacet|Facet|Rimuove una sfaccettatura| }} |
||
{{APIFunction| |
{{APIFunction|collapseFacets|list|Rimuove una seriea di sfaccettature| }} |
||
{{APIFunction| |
{{APIFunction|copy| |Crea una copia di questa maglia | un oggetto Mesh}} |
||
{{APIFunction| |
{{APIFunction|countComponents| |Ottiene il numero di aree topologiche indipendenti | un intero}} |
||
{{APIFunction| |
{{APIFunction|countNonUniformOrientedFacets| |Ottiene il numero di sfaccettature orientate male | un intero}} |
||
{{APIFunction| |
{{APIFunction|countSegments| |Ottiene il numero di segmenti che possono essere anche 0 | un numero intero}} |
||
{{APIFunction| |
{{APIFunction|crossSections| |Ottiene sezioni trasversali della rete attraverso diversi piani| }} |
||
{{APIFunction| |
{{APIFunction|difference|Mesh|Differenze tra questo oggetto e l'oggetto mesh dato.| }} |
||
{{APIFunction| |
{{APIFunction|fillupHoles| |Riempie i fori| }} |
||
{{APIFunction| |
{{APIFunction|fixDeformations| |Ripara le faccette deformate| }} |
||
{{APIFunction| |
{{APIFunction|fixDegenerations| |Rimuove le sfaccettature degenerate| }} |
||
{{APIFunction| |
{{APIFunction|fixIndices| |Ripara eventuali indici non validi| }} |
||
{{APIFunction| |
{{APIFunction|fixSelfIntersections| |Ripara le autointersezioni| }} |
||
{{APIFunction| |
{{APIFunction|flipNormals| |Inverte le normali delle mesh| }} |
||
{{APIFunction|foraminate| |Ottiene un elenco di indici delle faccette e dei punti di intersezione| }} |
|||
{{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|getPlanes| |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.| }} |
|||
{{APIFunction|getSegment|integer| |
{{APIFunction|getSegment|integer|Ottiene un elenco di indici delle faccette che descrivono un segmento| }} |
||
{{APIFunction|getSeparateComponents| |Returns a list containing the different components (separated areas) of the mesh as separate meshes|a list}} |
|||
{{APIFunction|getSeparateComponents| |Restituisce una lista contenente le diverse componenti (aree separate) della rete come mesh separate |una lista}} |
|||
{{APIFunction|harmonizeNormals| |Adjust wrong oriented facets| }} |
|||
{{APIFunction| |
{{APIFunction|harmonizeNormals| |Regola le sfaccettature orientate male| }} |
||
{{APIFunction| |
{{APIFunction|hasNonManifolds| |Controlla se la mesh contiene non-manifolds | un booleano}} |
||
{{APIFunction| |
{{APIFunction|hasNonUniformOrientedFacets| |Verifica se la rete ha dellle sfaccettature con orientamento incoerente| }} |
||
{{APIFunction| |
{{APIFunction|hasSelfIntersections| |Controlla se la mesh si interseca| }} |
||
{{APIFunction| |
{{APIFunction|inner| |Ottiene la parte interna all'intersezione| }} |
||
{{APIFunction| |
{{APIFunction|insertVertex|Vertex|Inserisce un vertice in una sfaccettatura| }} |
||
{{APIFunction| |
{{APIFunction|intersect|Mesh|Intersezione tra questo oggetto e l'oggetto mesh dato.| }} |
||
{{APIFunction| |
{{APIFunction|isSolid| |Controlla se la mesh è un solido| }} |
||
{{APIFunction|meshFromSegment| |Creare una mesh da un segmento| }} |
|||
{{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|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|offset|float|Sposta il punto lungo le sue normali| }} |
||
{{APIFunction|offsetSpecial|float| |
{{APIFunction|offsetSpecial|float|Sposta il punto lungo le sue normali| }} |
||
{{APIFunction|optimizeEdges| | |
{{APIFunction|optimizeEdges| |Ottimizza i bordi per ottenere delle faccette migliori| }} |
||
{{APIFunction|optimizeTopology| | |
{{APIFunction|optimizeTopology| |Ottimizza i bordi per ottenere delle faccette migliori| }} |
||
{{APIFunction|outer| | |
{{APIFunction|outer| |Ottiene la parte al di fuori l'intersezione| }} |
||
{{APIFunction|printInfo| | |
{{APIFunction|printInfo| |Ottiene informazioni dettagliate sulla mesh| }} |
||
{{APIFunction|read| |Read in a mesh object from file.| }} |
{{APIFunction|read| |Read in a mesh object from file.| }} |
||
{{APIFunction|refine| |Refine the mesh| }} |
{{APIFunction|refine| |Refine the mesh| }} |
||
Line 76: | Line 78: | ||
{{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 |
{{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 p}} |
||
{{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}} |
||
{{APIProperty|Topology|the points and face indices as tuple.}} |
|||
{{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|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> |
|||
[[Category:API/it]] |
[[Category:API/it]] |
||
{{clear}} |
|||
⚫ |
Revision as of 19:08, 6 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 p
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