DXF

From FreeCAD Documentation
Revision as of 15:23, 7 May 2019 by Renatorivo (talk | contribs) (Created page with "Se state utilizzando la geometria importata per creare forme 3D in Part Design, provate a Convalidare lo schizzo dopo aver importato il DXF in u...")

Storia

DXF è un formato di dati CAD proprietario per disegni 2D originato con AutoCAD, ma che è compreso dalla maggior parte dei pacchetti di disegno e di plotting, poiché non era disponibile uno standard aperto alternativo durante gli anni in cui AutoCAD era dominante.

La storia di DXF è quasi identica al formato di file DOC di Microsoft Word: c'erano molte versioni incompatibili prodotte durante l'evoluzione del prodotto e tutti gli altri programmi di elaborazione testi dovevano in una certa misura leggere e scrivere questi file per sopravvivere. Spesso queste implementazioni sono incomplete, obsolete e opinabili.

Lo stesso vale per i DXF. Sentirete parlare di alcune versioni chiave di DXF, come R12 (dal 1992) o R14 (dal 1997 che aveva le spline). Versioni successive di DXF hanno elementi 3D, ma questi sono usati o implementati raramente. Il modo in cui si utilizza DXF per condividere i dati CAD tra due programmi dipende principalmente dalle limitazioni e dai bug nei lettori / importatori e scrittori / esportatori corrispondenti. Non sorprende che raramente vi sia una documentazione completa delle limitazioni e degli errori del programma, il che è una grande fonte di frustrazione.

Se state modificando dei file DXF e vi aspettate che rimangano quasi gli stessi quando li salvate, vi consigliamo di utilizzarli con LibreCAD o QCad perché le strutture dati interne di questi programmi sono compatibili con gli oggetti del file DXF.

In FreeCAD i lettori DXF devono interpretare la geometria (ad esempio una forma spline) dal file DXF nelle specifiche forme interne dell'ambiente di lavoro.

Metodi per importare i DXF in FreeCAD

Se avete intenzione di rivedere le impostazioni frequentemente, vi consigliamo di andare su Modifica → Preferenze → Import-Export → DXF e spuntare la casella "[] Mostra questa finestra di dialogo durante l'importazione e l'esportazione".

Maggiori informazioni sono sulle pagine Draft - File DXF e Importare i file DXF in FreeCAD.

Se state utilizzando la geometria importata per creare forme 3D in Part Design, provate a Convalidare lo schizzo dopo aver importato il DXF in uno schizzo.

C++ DXF importer

This implementation of fast, but skips features it doesn't recognize, such as DXF splines. It also can only import geometry into the Draft Workbench as individual entries in the Model tree. These can have the colors read from the file if you tick to enable this option. For further information, see this forum post.

Python DXF importer

This importer has to be downloaded and installed before it can be used. See Dxf Importer Install, or use the "[ ] Allow FreeCAD to automatically download and update the DXF libraries" option.

This importer has more features (such as implementing splines), and has the option of loading the DXF shapes into the Sketcher. However, be warned that all the elements of the sketch will appear individually a second time in the model tree, which can be confusing. You can delete all these individual objects and retain the single sketch (which appears as the second entry in the list of new elements).

Unfortunately, the Sketch Workbench does not implement colors, so all the geometry will appear on the same level, which is a problem if the file contains many construction lines. One work-around is to open your drawing in LibreCAD, and delete all the geometry you don't want to appear before saving a file that contains exactly the geometry that you want to load.

Macros

Keep an eye out on the FreeCAD forum or in the Macros_recipes for alternative implementations of DXF importing and cleaning up as they develop.


Saving DXF

In addition to the options under the Edit → Preferences, the TechDraw Workbench can also export drawing pages to DXF using the TechDraw SaveDXF function.