Part ShapeFromMesh/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 2: Line 2:
{{Docnav/it|[[Part BoxSelection/it|Box di selezione]]|[[Part PointsFromMesh/it|Crea punti da mesh]]|[[Part_Module/it|Part]]|IconL=Part_BoxSelection.svg|IconC=Workbench_Part.svg|IconR=Part_PointsFromMesh.svg}}
{{Docnav/it|[[Part BoxSelection/it|Box di selezione]]|[[Part PointsFromMesh/it|Crea punti da mesh]]|[[Part_Module/it|Part]]|IconL=Part_BoxSelection.svg|IconC=Workbench_Part.svg|IconR=Part_PointsFromMesh.svg}}


<div class="mw-translate-fuzzy">
{{GuiCommand/it|Name=Part ShapeFromMesh|Name/it=‏‎Crea forma da mesh|MenuLocation=Part → Crea forma da mesh...|Workbenches=[[Part Workbench/it|Part]]|SeeAlso=[[Part ConvertToSolid/it|Converti in solido]], [[Part RefineShape/it|Affina forma]], [[Part PointsFromMesh/it|Crea punti da mesh]]}}
{{GuiCommand/it|Name=Part ShapeFromMesh|Name/it=‏‎Crea forma da mesh|MenuLocation=Part → Crea forma da mesh...|Workbenches=[[Part Workbench/it|Part]]|SeeAlso=[[Part ConvertToSolid/it|Converti in solido]], [[Part RefineShape/it|Affina forma]], [[Part PointsFromMesh/it|Crea punti da mesh]]}}
</div>


==Introduction==

<div class="mw-translate-fuzzy">
==Introduzione==
==Introduzione==
Questo comando crea una forma da un [[Glossary#Mesh|oggetto mesh]]. In FreeCAD gli oggetti mesh hanno limitate capacità di editing, convertendoli in forme permette di utilizzarli con molti più strumenti (vedere anche le [[#Note|Note]]).
Questo comando crea una forma da un [[Glossary#Mesh|oggetto mesh]]. In FreeCAD gli oggetti mesh hanno limitate capacità di editing, convertendoli in forme permette di utilizzarli con molti più strumenti (vedere anche le [[#Note|Note]]).
</div>


==Usage==

<div class="mw-translate-fuzzy">
==Utilizzo==
==Utilizzo==
# Selezionare un oggetto mesh.
# Selezionare un oggetto mesh.
Line 12: Line 21:
# Un menu pop-up chiede di definire la tolleranza per la chiusura (valore di default: 0,1)
# Un menu pop-up chiede di definire la tolleranza per la chiusura (valore di default: 0,1)
# Dall'oggetto mesh viene creato un nuovo oggetto forma indipendente.
# Dall'oggetto mesh viene creato un nuovo oggetto forma indipendente.
</div>


<div class="mw-translate-fuzzy">
==Limitazioni==
==Limitazioni==
Non sono disponibili l'analisi e la convalida dell'oggetto mesh.
Non sono disponibili l'analisi e la convalida dell'oggetto mesh.
</div>


After creation of a [[Shape|Shape]], it may be useful to use {{Button|[[Part_ConvertToSolid|Convert to solid]]}} (necessary for [[Part_Boolean|boolean operations]]) and {{Button|[[File:Part_RefineShape.svg|16px]] [[Part_RefineShape|Refine shape]]}}.
L'analisi e la riparazione della mesh (se sono necessarie) devono essere fatte manualmente, prima della conversione.


== Links ==
Gli strumenti appropriati sono disponibili nell'ambiente [[Image:Workbench_Mesh.svg|16px]] [[Mesh Workbench/it|Mesh]].


* [https://www.youtube.com/watch?v=5lwENZeNiNg&feature=youtu.be Edit STL Files In FreeCAD] video by AllVisuals4U.
==Note==
Dopo la creazione di una forma, può essere utile usare lo strumento [[Part ConvertToSolid/it|Converti in solido]] (necessario per usare [[Glossary#Boolean Operation/it|Operazioni booleane]]) e lo strumento [[Image:Part_RefineShape.svg|24px]] [[Part RefineShape/it|Affina forma]].


==Script==
==Script==

Creating a [[Shape|Shape]] from a [[Mesh|Mesh]] can be done by using the {{incode|makeShapeFromMesh}} method from a [[Part_TopoShape|Part TopoShape]]; you need to specify the source mesh and tolerance, and assign the result to a new [[Part_Feature|Part Feature]] object.

Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.

{{Code|code=
import FreeCAD as App
import Part

doc = App.newDocument()
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()

solid = doc.addObject("Part::Feature", "Shape")
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)

solid.Shape = shape
solid.Placement.Base = App.Vector(15, 0, 0)
solid.purgeTouched()
doc.recompute()
}}


{{Docnav/it|[[Part BoxSelection/it|Box di selezione]]|[[Part PointsFromMesh/it|Crea punti da mesh]]|[[Part_Module/it|Part]]|IconL=Part_BoxSelection.svg|IconC=Workbench_Part.svg|IconR=Part_PointsFromMesh.svg}}
{{Docnav/it|[[Part BoxSelection/it|Box di selezione]]|[[Part PointsFromMesh/it|Crea punti da mesh]]|[[Part_Module/it|Part]]|IconL=Part_BoxSelection.svg|IconC=Workbench_Part.svg|IconR=Part_PointsFromMesh.svg}}

Revision as of 21:05, 18 September 2020

‏‎Crea forma da mesh

Posizione nel menu
Part → Crea forma da mesh...
Ambiente
Part
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Converti in solido, Affina forma, Crea punti da mesh

Introduction

Introduzione

Questo comando crea una forma da un oggetto mesh. In FreeCAD gli oggetti mesh hanno limitate capacità di editing, convertendoli in forme permette di utilizzarli con molti più strumenti (vedere anche le Note).

Usage

Utilizzo

  1. Selezionare un oggetto mesh.
  2. Scegliere Part → Crea forma da mesh dal menu in alto.
  3. Un menu pop-up chiede di definire la tolleranza per la chiusura (valore di default: 0,1)
  4. Dall'oggetto mesh viene creato un nuovo oggetto forma indipendente.

Limitazioni

Non sono disponibili l'analisi e la convalida dell'oggetto mesh.

After creation of a Shape, it may be useful to use Convert to solid (necessary for boolean operations) and Refine shape.

Links

Script

Creating a Shape from a Mesh can be done by using the makeShapeFromMesh method from a Part TopoShape; you need to specify the source mesh and tolerance, and assign the result to a new Part Feature object.

Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.

import FreeCAD as App
import Part

doc = App.newDocument()
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()

solid = doc.addObject("Part::Feature", "Shape")
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)

solid.Shape = shape
solid.Placement.Base = App.Vector(15, 0, 0)
solid.purgeTouched()
doc.recompute()