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.
- 2What Do I Need To Be Able To Import DWG Files?
- 2.1ODA Converter (formerly Teigha Converter)
- 2.3FreeCAD v0.19 and LibreDWG
- 3What Are The Alternatives?
- 4What Can I Do To Help?
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.
Note that at this time, it is not possible to import 3D DWG in FreeCAD. 3D data is embedded as binary .SAT (ACIS) data, a proprietary and undocumented format.
What Do I Need To Be Able To Import DWG Files?
ODA Converter (formerly Teigha Converter)
- homepage: https://www.opendesign.com/guestfiles/oda_file_converter
- license: freeware
- optional, used to enable import and export of DWG files
The ODA 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
On all platforms, only by installing the appropriate package from https://www.opendesign.com/guestfiles/oda_file_converter. After installation, if the utility is not found automatically by FreeCAD, you might need to set the path to the converter executable manually. open Edit → Preferences → Import-Export → DWG and fill 'Path to Teigha File Converter' appropriately.
For more detailed instruction see this tutorial.
Usage
The program may be used with the command line interface or the graphical interface.Be sure to convert the DWG files to an ASCII-Format.
Command Line Format is:
- 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')
Example for Linux
The second number (audit) needs to be 1 otherwise it fails
Example for Windows
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.
FreeCAD v0.19 and LibreDWG
As from 0.19, FreeCAD doesn't need the ODA converter anymore and can use libreDWG directly. Be aware that, since libreDWG is a work-in-progress, depending on your file, the results might not be the same.
- 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.
Installation
Doublecad Xt V5 Download Mac
LibreDWG is included in v 0.19_pre appimages[1]
LibreDWG can be configured to work on Windows by downloading and unzipping the appropriate pre-compiled windows binary and adding the folder to your Windows versions system path.
On Linux:
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 know that, contrarily to popular belief, 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.
Draft- Basics:Coordinates, Constraining, Snapping(Near, Extension, Parallel, Grid, Endpoint, Midpoint, Perpendicular, Angle, Center, Ortho, Intersection, Special, Dimensions, Working plane)
- Drawing:Line, Polyline, Fillet, Circle, Arc, Arc 3 points, Ellipse, Polygon, Rectangle, Text, Dimension, BSpline, Point, ShapeString, Facebinder, Cubic Bezier Curve, Bezier Curve, Label
- Modifying:Move, Rotate, Offset, Trimex, Join, Split, Upgrade, Downgrade, Scale, Edit, SubelementHighlight, Wire to BSpline, Add point, Delete point, Shape 2D View, Draft to Sketch, Array, LinkArray, Polar Array, Circular Array, Path Array, Path LinkArray, Point Array, Clone, Drawing, Mirror, Stretch
- Utilities:Set working plane, Finish line, Close line, Undo line, Toggle construction mode, Toggle continue mode, Apply style, Toggle display mode, Add to group, Select group contents, Toggle snap, Toggle grid, Show snap bar, Heal, Flip Dimension, VisGroup, Slope, AutoGroup, Set Working Plane Proxy, Add to Construction group
- Additional:Preferences, Import Export Preferences (DXF/DWG, SVG, OCA, DAT); Draft API
- 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; Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Points, Raytracing, Reverse Engineering, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Deprecated or unmaintained workbenches:Complete, Drawing, Robot
- Addons:Addon Manager, External workbenches, Scripting and macros
- Hubs:User hub, Power users hub, Developer hub