FreeCAD and DWG Import/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "Zaleca się, aby bezpośrednio pobrać pakiety binarne. Następnie wybierz właściwą dystrybucję dla zainstalowanego openSUSE OS.")
(Created page with "W dowolnym terminalu / konsoli ''(wymagane prawa roota)'' instalacja zostanie przeprowadzona za pomocą:")
Line 55: Line 55:
Zaleca się, aby bezpośrednio pobrać pakiety binarne. Następnie wybierz właściwą dystrybucję dla zainstalowanego openSUSE OS.
Zaleca się, aby bezpośrednio pobrać pakiety binarne. Następnie wybierz właściwą dystrybucję dla zainstalowanego openSUSE OS.


W dowolnym terminalu / konsoli ''(wymagane prawa roota)'' instalacja zostanie przeprowadzona za pomocą:
In any terminal/console (root rights required) the installation will be carried out with:


{{Code|code=
{{Code|code=

Revision as of 15:22, 1 July 2023


Dlaczego trudno jest obsługiwać pliki DWG w FreeCAD?

Format DWG jest zamkniętym formatem plików binarnych, który nie jest bezpośrednio obsługiwany przez FreeCAD. Wymaga zewnętrznego konwertera plików do konwersji plików DWG na DXF i odwrotnie.

Czego potrzebuję, aby móc importować pliki DWG?

LibreDWG

GNU LibreDWG to darmowa biblioteka C do obsługi plików DWG. Ma ona być darmowym zamiennikiem bibliotek Open Design Alliance Drawings SDK. Należy pamiętać, że ponieważ libreDWG jest w trakcie opracowywania, nie obsługuje niektórych elementów DWG.

Instalacja Windows

Pobierz i rozpakuj odpowiedni prekompilowany plik binarny Windows. Umieść plik wykonywalny w ścieżce wyszukiwania systemu operacyjnego, os.getenv("PATH"), w celu automatycznego wykrycia (dostępne w wersji 0.21), lub ustaw ścieżkę ręcznie. Zobacz stronę Ustawienia Importu i Eksportu.

Instalacja w systemach Linux / Unix

git clone --recurse-submodules https://git.savannah.gnu.org/git/libredwg.git
cd libredwg
mkdir build
cd build
cmake ..
make
make install # lub użyj checkinstall, lub po prostu zlokalizuj i skopiuj dwg2dxf
             # do lokalizacji plików wykonywalnych, zostanie ono automatycznie wykryte przez FreeCAD

Umieść plik wykonywalny w ścieżce wyszukiwania systemu operacyjnego, os.getenv("PATH"), w celu automatycznego wykrywania (dostępne w wersji 0.21), lub ustaw ścieżkę ręcznie. Zobacz stronę Ustawienia Importu i Eksportu.

Instalacja openSUSE

Aby uniknąć problemów, należy użyć pakietu LibreDWG skompilowanego dla zainstalowanej dystrybucji openSUSE OS. LibreDWG jest zwykle instalowany z YAST (skrót od Yet another Setup Tool), narzędziem instalacyjnym i konfiguracyjnym systemu operacyjnego Linux.

Bardziej doświadczony użytkownik otrzymuje najpierw przegląd możliwych pakietów. Uwaga: openSUSE ma kilka opcji do wyboru podczas pobierania LibreDWG. Aby zobaczyć te opcje, przejdź na stronę Survey of provided LibreDWG packages on openSUSE.

W przypadku np. 64-bitowych komputerów stacjonarnych, laptopów i serwerów Intel lub AMD należy wybrać wersję (x86_64). Tak więc libredwg0 i libredwg-tools są właściwym wyborem do zainstalowania.

Zaleca się, aby bezpośrednio pobrać pakiety binarne. Następnie wybierz właściwą dystrybucję dla zainstalowanego openSUSE OS.

W dowolnym terminalu / konsoli (wymagane prawa roota) instalacja zostanie przeprowadzona za pomocą:

zypper install libredwg0 libredwg-tools

Place the executable in the OS search path, os.getenv("PATH"), for automatic detection (introduced in version 0.21), or set the path manually. See Import Export Preferences.

ODA File Converter

The ODA File Converter is a small freely available utility that allows to convert between several versions of DWG and DXF files. FreeCAD can use it to offer DWG import and export, by converting DWG files to the DXF format under the hood, then using its standard DXF importer to import the file contents. The restrictions of the DXF importer apply.

Installation

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

If the utility is not found automatically by FreeCAD after installation (introduced in version 0.21), you need to set the path to the bash file (Linux and macOS) or batch file (Windows) 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.

What are the alternatives?

DoubleCAD XT

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.

Export your AutoCAD files in friendly format

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.

It is important to note that there is no difference between the contents of a file saved in DWG or DXF formats, provided it is the same version (ex. DWG 2014 vs. DXF 2014). Both formats are maintained by Autodesk, and they both support exactly the same features. The difference is that DWG is closed (machine-encoded) while DXF is open.

What can I do to help?

Promote the use of alternative formats

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.