Import from STL or OBJ/it: Difference between revisions

From FreeCAD Documentation
(Created page with "==Il modello== Per questo tutorial è possibile utilizzare un proprio file STL o creare un file demo in questo modo: *Avviare FreeCAD *Creare un nuovo documento *Passare nell'...")
(Created page with "== Pulizia e riparazione del file STL / OBJ per prepararlo all'importazione == In genere, FreeCAD può importare qualsiasi file STL / OBJ. Ma il nostro obiettivo è quello di...")
Line 27: Line 27:
Per importare un file STL o OBJ in FreeCAD, creare un nuovo documento di FreeCAD e poi, dal menu principale, scegliere {{KEY| File}} → {{KEY| Importa}}.
Per importare un file STL o OBJ in FreeCAD, creare un nuovo documento di FreeCAD e poi, dal menu principale, scegliere {{KEY| File}} → {{KEY| Importa}}.


== Cleaning and repairing the STL/OBJ-File for preparing import ==
== Pulizia e riparazione del file STL / OBJ per prepararlo all'importazione ==
Basically, FreeCAD would import any STL/OBJ-File.
In genere, FreeCAD può importare qualsiasi file STL / OBJ.
Ma il nostro obiettivo è quello di avere un solido che possa essere misurato e modificato (con l'aggiunta di estrusioni, scavi, ecc ..).
But our goal is to have a solid which can be measured and changed (adding pads/pockets ..).
Per la conversione da mesh a solido si deve fare in modo che la mesh sia "a tenuta stagna", cioè senza buchi o non abbia altri errori.
For a successful conversion from mesh to solid we need to make sure that the mesh is “water-tight”
(has no holes) or doesn’t have any other errors.
<br />
<br />
L'obiettivo di FreeCAD non è quello di essere un buon modellatore di mesh, esso è stato progettato per essere un modellatore di solidi.
FreeCAD’s aim is not to be a good mesh modeler, it is designed to be a solid modeler.
FreeCAD ha alcune funzionalità per le operazioni su mesh negli ambienti Mesh e OpenSCAD (Alcune operazioni richiedono che OpenSCAD sia stato installato e configurato nelle preferenze di FreeCAD).
FreeCAD has some capabilities for mesh operation in mesh workbench and OpenSCAD workbench
(some operations need OpenSCAD to be installed and configured in the FreeCAD-preferences).
<br />
<br />
Ad alcuni utenti piace utilizzare software di terze parti per la pulizia e la riparazione delle mesh, ad esempio
Some users like to use third-party software for cleaning and repairing meshes, for example
* [http://www.netfabb.com/downloadcenter.php?basic=1 Netfabb Basic] (Windows/Linux/Mac) - free for personal use (automatic mesh repair available)
* [http://www.netfabb.com/downloadcenter.php?basic=1 Netfabb Basic] (Windows/Linux/Mac) - free per uso personale (è disponibile la riparazione automatica delle mesh)
* [http://meshlab.sourceforge.net/ Meshlab] (Windows/Linux/Mac) - Open Source
* [http://meshlab.sourceforge.net/ Meshlab] (Windows/Linux/Mac) - Open Source
<br />
<br />
In this tutorial we will use the mesh workbench within FreeCAD to clean/repair/verify the mesh of our sample file.
In questo tutorial si usa l'ambiente Mesh incorporato in FreeCAD per pulire / riparare / verificare le mesh del file di esempio.


===Automatic testing and repairing===
===Automatic testing and repairing===

Revision as of 21:37, 19 June 2016

Tutorial
Argomento
Importare da STL o OBJ
Livello di difficoltà
Base
Tempo di esecuzione
30 minuti
Autori
r-frank
Versione di FreeCAD
0.16.6703
Files di esempio
Vedere anche
Nessuno

Introduzione

In questo tutorial ci occuperemo di come importare i file STL / OBJ in FreeCAD. Dato che il formato mesh STL / OBJ è adimensionale, nell'importazione di questi file FreeCAD assume che l'unità utilizzata nel modello sia il mm. Se non è così, bisogna scalare il proprio modello nell'applicazione con cui è stato creato, prima di esportarlo, oppure scalare il modello in FreeCAD dopo l'importazione e la conversione in solido.

Il modello

Per questo tutorial è possibile utilizzare un proprio file STL o creare un file demo in questo modo:

  • Avviare FreeCAD
  • Creare un nuovo documento
  • Passare nell'ambiente mesh
  • Inserire un toro cliccando su MeshesFile:Mesh RegularSolid.png Solido regolare... Toro , e poi selezionare queste impostazioni:
    • Raggio 1: 10 mm
    • Raggio 2: 2 mm
    • Campionatura: 50
  • Cliccare su Crea e poi su Chiudi
  • Salvare il file con File Salva per avere un file di FreeCAD contenente un oggetto mesh


Per importare un file STL o OBJ in FreeCAD, creare un nuovo documento di FreeCAD e poi, dal menu principale, scegliere File Importa.

Pulizia e riparazione del file STL / OBJ per prepararlo all'importazione

In genere, FreeCAD può importare qualsiasi file STL / OBJ. Ma il nostro obiettivo è quello di avere un solido che possa essere misurato e modificato (con l'aggiunta di estrusioni, scavi, ecc ..). Per la conversione da mesh a solido si deve fare in modo che la mesh sia "a tenuta stagna", cioè senza buchi o non abbia altri errori.
L'obiettivo di FreeCAD non è quello di essere un buon modellatore di mesh, esso è stato progettato per essere un modellatore di solidi. FreeCAD ha alcune funzionalità per le operazioni su mesh negli ambienti Mesh e OpenSCAD (Alcune operazioni richiedono che OpenSCAD sia stato installato e configurato nelle preferenze di FreeCAD).
Ad alcuni utenti piace utilizzare software di terze parti per la pulizia e la riparazione delle mesh, ad esempio

  • Netfabb Basic (Windows/Linux/Mac) - free per uso personale (è disponibile la riparazione automatica delle mesh)
  • Meshlab (Windows/Linux/Mac) - Open Source


In questo tutorial si usa l'ambiente Mesh incorporato in FreeCAD per pulire / riparare / verificare le mesh del file di esempio.

Automatic testing and repairing

  • Open FreeCAD and the sample FreeCAD file containing the mesh object
  • Switch to mesh workbench
  • Make sure that your mesh object is selected in the tree view
  • Choose Meshes Analyze Evaluate & Repair mesh... from the top menu
  • Make sure the pull down menu on the top right corner displays the name of your mesh object
  • With the last point in the list reading "All above tests together" click on Analyze
  • The texts beside the tick boxes will change to reflect results of the different tests
  • If errors had been detected the corresponding check-boxes will be ticked and you will be able to select Repair
  • Choose Close to close the menu

Harmonizing normals

Harmonizing normals of a mesh object can be done by

  • Selecting your mesh object in the tree view
  • Choose Meshes Harmonize normals from the top menu.

Tip: By choosing the mesh object in the tree view, going to the view tab in the property view and changing "Lighting" from "Two Side" to "One Side" you can identify triangles with flipped normals. If the normals point into the mesh the triangle will be shown in black.

Closing holes

You can also manually close holes in your mesh object by

  • Selecting your mesh object in the tree view
  • Choose Meshes Fill holes... from the top menu
  • Specify maximum number of edges to be filled (3 is default)
  • Since STL and OBJ are meshes consisting of triangles the default number of edges should be sufficient


Another method of manually closing holes in your mesh object would be

  • Selecting your mesh object in the tree view
  • Choose Meshes Close hole from the top menu
  • Select one of the edges of the hole in the mesh object in the 3D view
  • Right-Click in 3D view and choose Leave hole-filling mode to exit the command

Conversion mesh to solid

  • Switch to part workbench
  • Make sure your mesh object is selected in the tree view, otherwise select it
  • Choose Part Create shape from mesh ... from top menu
  • Specify tolerance for sewing shape (0,1 is default)
  • A new object will be created in the tree view (with blue shape icon, instead of green mesh icon)
  • Select the newly created object in the tree view
  • Choose Part Refine shape from the top menu
  • A new object will be created in the tree view and the previous one will be made invisible
  • Select the newly created object in the tree view
  • Choose Part Convert to solid from the top menu
  • A new object will be created in the tree view, bearing "(Solid)" in its name, to indicate it is a solid


Since the created solid has no history and no editable features (like a simple copy in FreeCAD) you could delete all previous objects from the tree view. This would keep your file size small ...