Mesh API/it: Difference between revisions
(Updating to match new version of source page) |
No edit summary |
||
(10 intermediate revisions by 4 users not shown) | |||
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 |
||
{{VeryImportantMessage|(Novembre 2018) Queste informazioni potrebbero essere incomplete e obsolete. Per l'ultima API, vedere la pagina [https://www.freecadweb.org/api Documentazione API autogenerata].}} |
|||
⚫ | 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 dell'[[Mesh_Workbench/it|Ambiente 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: |
||
{{Code|code= |
{{Code|code= |
||
Line 11: | Line 15: | ||
{{APIFunction|addFacet|Facet| |
{{APIFunction|addFacet|Facet|Aggiunge una sfaccettatura alla maglia| }} |
||
{{APIFunction|addFacets|list| |
{{APIFunction|addFacets|list|Aggiunge un elenco di sfaccettature alla maglia| }} |
||
{{APIFunction|addMesh|Mesh| |
{{APIFunction|addMesh|Mesh|Combina questa mesh con un'altra mesh.| }} |
||
{{APIFunction|clear| | |
{{APIFunction|clear| |Cancella la mesh| }} |
||
{{APIFunction|coarsen| | |
{{APIFunction|coarsen| |Rende grossolana la mesh| }} |
||
{{APIFunction|collapseEdge|Edge| |
{{APIFunction|collapseEdge|Edge|Rimuove un bordo e entrambe le sfaccettature che condividono questo bordo| }} |
||
{{APIFunction|collapseFacet|Facet| |
{{APIFunction|collapseFacet|Facet|Rimuove una sfaccettatura| }} |
||
{{APIFunction|collapseFacets|list| |
{{APIFunction|collapseFacets|list|Rimuove una seriea di sfaccettature| }} |
||
{{APIFunction|copy| | |
{{APIFunction|copy| |Crea una copia di questa maglia | un oggetto Mesh}} |
||
{{APIFunction|countComponents| | |
{{APIFunction|countComponents| |Ottiene il numero di aree topologiche indipendenti | un intero}} |
||
{{APIFunction|countNonUniformOrientedFacets| | |
{{APIFunction|countNonUniformOrientedFacets| |Ottiene il numero di sfaccettature orientate male | un intero}} |
||
{{APIFunction|countSegments| | |
{{APIFunction|countSegments| |Ottiene il numero di segmenti che possono essere anche 0 | un numero intero}} |
||
{{APIFunction|crossSections| | |
{{APIFunction|crossSections| |Ottiene sezioni trasversali della rete attraverso diversi piani| }} |
||
{{APIFunction|difference|Mesh| |
{{APIFunction|difference|Mesh|Differenze tra questo oggetto e l'oggetto mesh dato.| }} |
||
{{APIFunction|fillupHoles| | |
{{APIFunction|fillupHoles| |Riempie i fori| }} |
||
{{APIFunction|fixDeformations| | |
{{APIFunction|fixDeformations| |Ripara le faccette deformate| }} |
||
{{APIFunction|fixDegenerations| | |
{{APIFunction|fixDegenerations| |Rimuove le sfaccettature degenerate| }} |
||
{{APIFunction|fixIndices| | |
{{APIFunction|fixIndices| |Ripara eventuali indici non validi| }} |
||
{{APIFunction|fixSelfIntersections| | |
{{APIFunction|fixSelfIntersections| |Ripara le autointersezioni| }} |
||
{{APIFunction|flipNormals| | |
{{APIFunction|flipNormals| |Inverte le normali delle mesh| }} |
||
{{APIFunction|foraminate| | |
{{APIFunction|foraminate| |Ottiene un elenco di indici delle faccette e dei punti di intersezione| }} |
||
{{APIFunction|getPlanes| | |
{{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| | |
{{APIFunction|getSeparateComponents| |Restituisce una lista contenente le diverse componenti (aree separate) della rete come mesh separate |una lista}} |
||
{{APIFunction|harmonizeNormals| | |
{{APIFunction|harmonizeNormals| |Regola le sfaccettature orientate male| }} |
||
{{APIFunction|hasNonManifolds| | |
{{APIFunction|hasNonManifolds| |Controlla se la mesh contiene non-manifolds | un booleano}} |
||
{{APIFunction|hasNonUniformOrientedFacets| | |
{{APIFunction|hasNonUniformOrientedFacets| |Verifica se la rete ha dellle sfaccettature con orientamento incoerente| }} |
||
{{APIFunction|hasSelfIntersections| | |
{{APIFunction|hasSelfIntersections| |Controlla se la mesh si interseca| }} |
||
{{APIFunction|inner| | |
{{APIFunction|inner| |Ottiene la parte interna all'intersezione| }} |
||
{{APIFunction|insertVertex|Vertex| |
{{APIFunction|insertVertex|Vertex|Inserisce un vertice in una sfaccettatura| }} |
||
{{APIFunction|intersect|Mesh| |
{{APIFunction|intersect|Mesh|Intersezione tra questo oggetto e l'oggetto mesh dato.| }} |
||
{{APIFunction|isSolid| | |
{{APIFunction|isSolid| |Controlla se la mesh è un solido| }} |
||
{{APIFunction|meshFromSegment| | |
{{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 74: | Line 78: | ||
{{APIFunction|writeInventor| |Write the mesh in OpenInventor format to a string.|a string}} |
{{APIFunction|writeInventor| |Write the mesh in OpenInventor format to a string.|a string}} |
||
{{APIProperty|Area|the area of the mesh object.}} |
{{APIProperty|Area|the area of the mesh object.}} |
||
{{APIProperty|CountEdges|the number of vertices of the mesh object.}} |
|||
{{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 |
{{APIProperty|CountPoints|the number of points 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 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|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. 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.}} |
||
Line 85: | Line 90: | ||
{{Userdocnavi{{#translation:}}}} |
|||
[[Category:API |
[[Category:API{{#translation:}}]] |
||
[[Category:Poweruser Documentation{{#translation:}}]] |
|||
{{clear}} |
{{clear}} |
||
⚫ |
Latest revision as of 22:03, 18 September 2022
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 dell'Ambiente 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.
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub