FreeCAD and DWG Import: Difference between revisions
(Kill redundant inner <translate> marks) |
mNo edit summary |
||
Line 64: | Line 64: | ||
zypper install libredwg0 libredwg-tools |
zypper install libredwg0 libredwg-tools |
||
}} |
}} |
||
You may need to set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]]. |
You may need to set the path to the executable manually. See [[Import_Export_Preferences#DWG|Import Export Preferences]]. |
Revision as of 15:32, 25 October 2021
Why is it hard to support DWG Files in FreeCAD?
The DWG format is a closed source binary file format that is not directly supported by FreeCAD. It requires an external 3rd party file converter to first convert then import the conversion into FreeCAD for use.
What do I need to be able to import DWG files?
LibreDWG
- homepage: https://www.gnu.org/software/libredwg/
- license: GPLv2-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 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 may 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 may need to set the path to the executable manually. See Import Export Preferences.
ODA File Converter
- homepage: https://www.opendesign.com/guestfiles/oda_file_converter
- license: freeware
- optional, used to enable import and export of DWG files
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
- homepage: https://qcad.org/en/qcad-command-line-tools#dwg2dwg
- license: commercial
- optional, used to enable import and export of DWG files
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, 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.
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.
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
![](/images/thumb/9/94/User_hub.png/24px-User_hub.png)
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub