FreeCAD and DWG Import/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{TOCright}}

{{Fake heading|sub=4|< Back to [[FreeCAD Howto Import Export]]}}

<div class="mw-translate-fuzzy">
== Perché non è possibile importare i file DWG in FreeCAD? ==
== Perché non è possibile importare i file DWG in FreeCAD? ==
</div>

<div class="mw-translate-fuzzy">
Il formato DWG è un formato di file binario closed source che non è supportato direttamente da FreeCAD. Prima deve essere convertito usando un'applicazione esterna e dopo si può importare la conversione in FreeCAD e utilizzarla.
Il formato DWG è un formato di file binario closed source che non è supportato direttamente da FreeCAD. Prima deve essere convertito usando un'applicazione esterna e dopo si può importare la conversione in FreeCAD e utilizzarla.
</div>


<div class="mw-translate-fuzzy">
Notare che al momento non è possibile importare DWG 3D in FreeCAD. I dati 3D sono incorporati come dati binari .SAT (ACIS), un formato proprietario e non documentato.

== Cosa serve per poter importare i file DWG? ==
== Cosa serve per poter importare i file DWG? ==
</div>


===LibreDWG===

* homepage: https://www.gnu.org/software/libredwg/
* license: [https://savannah.gnu.org/projects/libredwg/ GPLv3-or-later]
* optional, used to enable import and export of DWG files

GNU LibreDWG is a free C library to handle DWG files. It aims to be a free replacement for the Open Design Alliance Drawings SDK libraries. Be aware that, since libreDWG is a work-in-progress, it lacks support for some DWG entities.

==== Installation Windows ====

Downloading and unzip the appropriate [https://github.com/LibreDWG/libredwg/releases pre-compiled Windows binary] and then set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]].

==== Installation Linux/Unix systems ====

git clone https://git.savannah.gnu.org/git/libredwg.git
cd libredwg
mkdir build
cd build
cmake ..
make
make install (or use checkinstall, or simply locate & copy the dwg2dxf utility to your executables path, it will be then autodetected by FreeCAD)

You need to set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]].

==== Installation openSUSE ====

To prevent problems you must use LibreDWG package compiled for the installed openSUSE OS distribution.
LibreDWG is typically installed with '''YAST''' (abbr. Yet another Setup Tool), the Linux operating system's setup and configuration tool.

The more experienced user first gets an overview of possible packages provided.
'''Note:''' openSUSE has several options to choose from when downloading LibreDWG.
To view these options, visit [https://software.opensuse.org/search?utf8=%E2%9C%93&baseproject=ALL&q=libredwg Survey of provided LibreDWG packages on openSUSE].

For e.g. Intel or AMD 64-bit desktops, laptops, and servers the (x86_64) release is the one to select. So '''libredwg0''' and '''libredwg-tools''' are of the right choice to install.

It is recommended to grab the binary packages directly. Then select the correct distribution for your installed openSUSE OS.

In any terminal/console (root rights required) the installation will be carried out with:

{{Code|code=
zypper install libredwg0 libredwg-tools
}}

You need to set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]].

<div class="mw-translate-fuzzy">
===ODA Converter (anteriormente Teigha Converter)===
===ODA Converter (anteriormente Teigha Converter)===
* homepage: https://www.opendesign.com/guestfiles/oda_file_converter
* homepage: https://www.opendesign.com/guestfiles/oda_file_converter
* licenza: freeware
* licenza: freeware
* optional, usato per abilitare l'importazione e l'esportazione dei file DWG
* optional, usato per abilitare l'importazione e l'esportazione dei file DWG
</div>

* homepage: https://www.opendesign.com/guestfiles/oda_file_converter
* license: freeware
* optional, used to enable import and export of DWG files


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Il convertitore Teigha è una piccola utility liberamente disponibile che consente di convertire tra diverse versioni i file DWG e DXF. FreeCAD può usarlo per offrire l'importazione e l'esportazione dei file DWG, convertendo prima i formati DWG in DXF al suo interno, e poi importando il contenuto dei file tramite il suo importatore DXF standard. Si applicano le restrizioni di [[Draft_DXF/it|importazione di DXF]].
Il convertitore ODA è una piccola utility liberamente disponibile che consente di convertire tra diverse versioni i file DWG e DXF. FreeCAD può usarlo per offrire l'importazione e l'esportazione dei file DWG, convertendo prima i formati DWG in DXF al suo interno, e poi importando il contenuto dei file tramite il suo importatore DXF standard. Si applicano le restrizioni di [[Draft_DXF/it|importazione di DXF]].
</div>
</div>


Line 19: Line 79:
=== Installazione ===
=== Installazione ===


Su tutte le piattaforme, basta installare il pacchetto appropriato da https://www.opendesign.com/guestfiles/teigha_file_converter . Se, dopo l'installazione, l'utility non viene trovata automaticamente da FreeCAD, può essere necessario impostare manualmente il percorso del file eseguibile del converter. Attivare l'ambiente Draft, poi nelle opzioni del menu Modifica -> Preferenze -> Draft -> Importa/Esporta -> DWG inserire il percorso per l'eseguibile Teigha File Converter.
Su tutte le piattaforme, basta installare il pacchetto appropriato da https://www.opendesign.com/guestfiles/oda_file_converter. Se, dopo l'installazione, l'utility non viene trovata automaticamente da FreeCAD, può essere necessario impostare manualmente il percorso del file eseguibile del converter. Attivare l'ambiente Draft, poi nelle opzioni del menu Modifica Preferenze Draft Importa/Esporta DWG inserire il percorso per l'eseguibile Teigha File Converter.
</div>
</div>


If the utility is not found automatically by FreeCAD after installation, you need to set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]].
Per maggiori dettagli sull'installazione vedere [[Dxf_Importer_Install/it| questo tutorial]].


=== QCAD pro ===
<div class="mw-translate-fuzzy">
====Uso====
Il programma può essere utilizzato da riga di comando o dall'interfaccia grafica.
Accertarsi di convertire i file dwg in un formato ASCII.
</div>


{{Version|0.20}}
Il formato da riga di comando è:
# Quoted Input Folder
# Quoted Output Folder
# Output_version {"ACAD9","ACAD10","ACAD12", "ACAD13","ACAD14", "ACAD2000","ACAD2004", "ACAD2007","ACAD2010"}
# Output File type {"DWG","DXF","DXB"}
# Recurse Input Folder {"0","1"}
# Audit each file {"0","1"}
# [optional] Input file filter (default:"*.DWG;*.DXF")


* homepage: https://qcad.org/en/qcad-command-line-tools#dwg2dwg
<div class="mw-translate-fuzzy">
* license: commercial
'''Esempio per Linux'''<br />
* optional, used to enable import and export of DWG files
TeighaFileConverter "/home/dwg-data" "/home/dxf-data" "ACAD2010" "DXF" "0" "1" "test.dwg"
Il secondo numero (audit) deve essere 1 altrimenti l'operazione fallisce
</div>


QCAD is a well-known open-source DXF-based 2D CAD platform. It also offers a paid pro version, which is basically the open-source version plus support for the DWG format. When buying the pro version, QCAD also includes a DWG to DXF conversion utility that can be used by FreeCAD.
<div class="mw-translate-fuzzy">
'''Esempio per Windows'''<br />
"C:\Program Files\ODA\Teigha File Converter 3.08.2\TeighaFileConverter.exe" "Path-To-Input-Directory" "Path-To-Output-Directory" "ACAD2010" "DXF" "0" "1" "Name-Of-A-Test-File.dwg"
</div>


====Installation====
== Quali sono le alternative? ==

You need to set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]].

=== CADExchanger Workbench ===

Installing the CADExchanger Workbench allows for working with DWG files through integration with the paid commercial file converter product [https://cadexchanger.com/ CADExchanger]. Just follow the instructions in the [https://github.com/yorikvanhavre/CADExchanger GitHub repository]. You can discuss this workbench on [https://forum.freecadweb.org/viewtopic.php?f=9&t=22227&p=462421 its forum thread].

At the moment, the CADExchanger way is the only one that allows to work with 3D DWG files, by converting them to other 3D formats.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
== Quali sono le alternative? ==
===DraftSight===
C'è un programma commerciale gratuito chiamato Draft Sight (http://www.3ds.com/products-services/draftsight/overview/) che può importare la maggior parte dei file DWG e può salvare ed esportare in formati compatibili con FreeCAD. Draftsight funziona su
* Windows 32 bit
* Windows 64 bit
* Mac OS X
* Linux Fedora
* Linux Ubuntu
Per attivare il programma è richiesta la registrazione gratuita.
</div>
</div>


Line 68: Line 113:
Il programma è gratuito per uso personale e commerciale.
Il programma è gratuito per uso personale e commerciale.
Si richiede una iscrizione gratuita per ricevere il codice di attivazione via e-mail.
Si richiede una iscrizione gratuita per ricevere il codice di attivazione via e-mail.
Questo programma è solo per Windows.
Questo programma è solo per Windows. Nota: non sembra essere stato aggiornato per anni.
</div>
</div>


There is also DoubleCAD XT (https://www.turbocad.com/content/doublecad-xt-v5). The program is free for personal and commercial use. It requires a free sign-up to receive an activation code via E-Mail. This Program is windows-only. Note: it does not seem to have been updated for years.

===NanoCAD 5.0===

There is also nanoCAD 5.0 (https://nanocad.com/products/nanoCAD/download/). The program is free for personal and commercial use. It requires a free sign-up to receive an activation code via E-Mail. This Program is windows-only.

<div class="mw-translate-fuzzy">
===Esportare i file di AutoCAD in Formati Amichevoli===
===Esportare i file di AutoCAD in Formati Amichevoli===
Esportare i file di AutoCAD in un formato più ''amichevole'' a FreeCAD, come DXF R12 o R14, SVG, e se la versione lo supporta, IGES. Tutti questi formati sono delle alternative migliori al formato DWG quando si utilizza FreeCAD.
Esportare i file di AutoCAD in un formato più ''amichevole'' a FreeCAD, come DXF R12 o R14, SVG, e se la versione lo supporta, IGES. Tutti questi formati sono delle alternative migliori al formato DWG quando si utilizza FreeCAD.
</div>


Exporting your AutoCAD files in a more FreeCAD friendly format, like DXF R12 or R14, SVG, and if version supports it, IGES. All are better alternatives to the DWG format when using FreeCAD.

<div class="mw-translate-fuzzy">
È importante sapere che, contrariamente alla credenza popolare, non vi è alcuna differenza tra il contenuto di un file salvato in formato DWG o DXF, a condizione che sia la stessa versione (es. DWG 2014 o DXF 2014). Entrambi i formati sono mantenuti da Autodesk, ed entrambi supportano esattamente le stesse caratteristiche. La differenza è che DWG è chiuso (codice-macchina), mentre DXF è aperto.
È importante sapere che, contrariamente alla credenza popolare, non vi è alcuna differenza tra il contenuto di un file salvato in formato DWG o DXF, a condizione che sia la stessa versione (es. DWG 2014 o DXF 2014). Entrambi i formati sono mantenuti da Autodesk, ed entrambi supportano esattamente le stesse caratteristiche. La differenza è che DWG è chiuso (codice-macchina), mentre DXF è aperto.
</div>


<div class="mw-translate-fuzzy">
==Cosa posso fare per dare un aiuto? ==
==Cosa posso fare per dare un aiuto? ==
</div>


<div class="mw-translate-fuzzy">
===Promuovere l'uso dei formati alternativi===
===Promuovere l'uso dei formati alternativi===
In poche parole, smettere di accettare il lavoro svolto in formato DWG. Nella pratica, spesso questo è più facile a dirsi che a farsi. Tuttavia, per gli utenti e i sostenitori di FreeCAD non sarebbe una cattiva pratica quella di evitare e respingere il formato DWG, quando possibile.
In poche parole, smettere di accettare il lavoro svolto in formato DWG. Nella pratica, spesso questo è più facile a dirsi che a farsi. Tuttavia, per gli utenti e i sostenitori di FreeCAD non sarebbe una cattiva pratica quella di evitare e respingere il formato DWG, quando possibile.
</div>

Simply put, stop accepting work done in DWG format. In practice, this is often easier said than done. Still, it would not be bad practice for users and supporters of FreeCAD to avoid and reject the DWG format whenever possible.


===Use the LibreDWG library and file bug reports===


In development version as mentioned above you can switch from the proprietary ODA Converter to the free software LibreDWG library for DWG (and DXF) files. Please do this and report any problems you encounter.
[[Category:User Documentation/it]]




{{Draft Tools navi{{#translation:}}}}
{{clear}}
{{Userdocnavi{{#translation:}}}}
[[Category:File_Formats{{#translation:}}]]
[[Category:Common Questions{{#translation:}}]]

Revision as of 08:15, 16 February 2022


Perché non è possibile importare i file DWG in FreeCAD?

Il formato DWG è un formato di file binario closed source che non è supportato direttamente da FreeCAD. Prima deve essere convertito usando un'applicazione esterna e dopo si può importare la conversione in FreeCAD e utilizzarla.

Cosa serve per poter importare i file DWG?

LibreDWG

GNU LibreDWG is a free C library to handle DWG files. It aims to be a free replacement for the Open Design Alliance Drawings SDK libraries. Be aware that, since libreDWG is a work-in-progress, it lacks support for some DWG entities.

Installation Windows

Downloading and unzip the appropriate pre-compiled Windows binary and then set the path to the executable manually. See Import Export Preferences.

Installation Linux/Unix systems

git clone https://git.savannah.gnu.org/git/libredwg.git
cd libredwg
mkdir build
cd build
cmake ..
make
make install (or use checkinstall, or simply locate & copy the dwg2dxf utility to your executables path, it will be then autodetected by FreeCAD)

You need to set the path to the executable manually. See Import Export Preferences.

Installation openSUSE

To prevent problems you must use LibreDWG package compiled for the installed openSUSE OS distribution. LibreDWG is typically installed with YAST (abbr. Yet another Setup Tool), the Linux operating system's setup and configuration tool.

The more experienced user first gets an overview of possible packages provided. Note: openSUSE has several options to choose from when downloading LibreDWG. To view these options, visit Survey of provided LibreDWG packages on openSUSE.

For e.g. Intel or AMD 64-bit desktops, laptops, and servers the (x86_64) release is the one to select. So libredwg0 and libredwg-tools are of the right choice to install.

It is recommended to grab the binary packages directly. Then select the correct distribution for your installed openSUSE OS.

In any terminal/console (root rights required) the installation will be carried out with:

zypper install libredwg0 libredwg-tools

You need to set the path to the executable manually. See Import Export Preferences.

ODA Converter (anteriormente Teigha Converter)

Il convertitore ODA è una piccola utility liberamente disponibile che consente di convertire tra diverse versioni i file DWG e DXF. FreeCAD può usarlo per offrire l'importazione e l'esportazione dei file DWG, convertendo prima i formati DWG in DXF al suo interno, e poi importando il contenuto dei file tramite il suo importatore DXF standard. Si applicano le restrizioni di importazione di DXF.

Installazione

Su tutte le piattaforme, basta installare il pacchetto appropriato da https://www.opendesign.com/guestfiles/oda_file_converter. Se, dopo l'installazione, l'utility non viene trovata automaticamente da FreeCAD, può essere necessario impostare manualmente il percorso del file eseguibile del converter. Attivare l'ambiente Draft, poi nelle opzioni del menu Modifica → Preferenze → Draft → Importa/Esporta → DWG inserire il percorso per l'eseguibile Teigha File Converter.

If the utility is not found automatically by FreeCAD after installation, you need to set the path to the executable manually. See Import Export Preferences.

QCAD pro

introduced in version 0.20

QCAD is a well-known open-source DXF-based 2D CAD platform. It also offers a paid pro version, which is basically the open-source version plus support for the DWG format. When buying the pro version, QCAD also includes a DWG to DXF conversion utility that can be used by FreeCAD.

Installation

You need to set the path to the executable manually. See Import Export Preferences.

CADExchanger Workbench

Installing the CADExchanger Workbench allows for working with DWG files through integration with the paid commercial file converter product CADExchanger. Just follow the instructions in the GitHub repository. You can discuss this workbench on its forum thread.

At the moment, the CADExchanger way is the only one that allows to work with 3D DWG files, by converting them to other 3D formats.

Quali sono le alternative?

DoubleCAD XT

C'è anche DoubleCAD XT (https://www.turbocad.com/content/doublecad-xt-v5). Il programma è gratuito per uso personale e commerciale. Si richiede una iscrizione gratuita per ricevere il codice di attivazione via e-mail. Questo programma è solo per Windows. Nota: non sembra essere stato aggiornato per anni.

There is also DoubleCAD XT (https://www.turbocad.com/content/doublecad-xt-v5). The program is free for personal and commercial use. It requires a free sign-up to receive an activation code via E-Mail. This Program is windows-only. Note: it does not seem to have been updated for years.

NanoCAD 5.0

There is also nanoCAD 5.0 (https://nanocad.com/products/nanoCAD/download/). The program is free for personal and commercial use. It requires a free sign-up to receive an activation code via E-Mail. This Program is windows-only.

Esportare i file di AutoCAD in Formati Amichevoli

Esportare i file di AutoCAD in un formato più amichevole a FreeCAD, come DXF R12 o R14, SVG, e se la versione lo supporta, IGES. Tutti questi formati sono delle alternative migliori al formato DWG quando si utilizza FreeCAD.

Exporting your AutoCAD files in a more FreeCAD friendly format, like DXF R12 or R14, SVG, and if version supports it, IGES. All are better alternatives to the DWG format when using FreeCAD.

È importante sapere che, contrariamente alla credenza popolare, non vi è alcuna differenza tra il contenuto di un file salvato in formato DWG o DXF, a condizione che sia la stessa versione (es. DWG 2014 o DXF 2014). Entrambi i formati sono mantenuti da Autodesk, ed entrambi supportano esattamente le stesse caratteristiche. La differenza è che DWG è chiuso (codice-macchina), mentre DXF è aperto.

Cosa posso fare per dare un aiuto?

Promuovere l'uso dei formati alternativi

In poche parole, smettere di accettare il lavoro svolto in formato DWG. Nella pratica, spesso questo è più facile a dirsi che a farsi. Tuttavia, per gli utenti e i sostenitori di FreeCAD non sarebbe una cattiva pratica quella di evitare e respingere il formato DWG, quando possibile.

Simply put, stop accepting work done in DWG format. In practice, this is often easier said than done. Still, it would not be bad practice for users and supporters of FreeCAD to avoid and reject the DWG format whenever possible.

Use the LibreDWG library and file bug reports

In development version as mentioned above you can switch from the proprietary ODA Converter to the free software LibreDWG library for DWG (and DXF) files. Please do this and report any problems you encounter.