Difference between revisions of "Getting started with 2D CAD drafting"

From Wiki.OSArch
m (Correct info abount zcad)
 
(16 intermediate revisions by 4 users not shown)
Line 5: Line 5:
 
The field of 2D CAD within the AEC industry is currently dominated by [[AutoCAD]], and in particular, the proprietary [[Drawing (DWG)|DWG]] file format. Heavy reliance on AutoCAD, along with the tight control that parent company Autodesk exerts over the proprietary DWG file format, both stifles innovation and perpetuates proprietary software in our industry. In contrast [[AEC_Open_Data_Standards_Directory|open formats]] support users freedom.
 
The field of 2D CAD within the AEC industry is currently dominated by [[AutoCAD]], and in particular, the proprietary [[Drawing (DWG)|DWG]] file format. Heavy reliance on AutoCAD, along with the tight control that parent company Autodesk exerts over the proprietary DWG file format, both stifles innovation and perpetuates proprietary software in our industry. In contrast [[AEC_Open_Data_Standards_Directory|open formats]] support users freedom.
  
To make the switch away from proprietary software and file formats, there are two key ways in which you can make a difference in the industry. The first is by requesting and producing the open [[Drawing Exchange Format (DXF)|DXF]] format instead of the proprietary DWG format. The second is by switching from AutoCAD to another software entirely.
+
To make the switch away from proprietary software and file formats, there are two key ways in which you can make a difference in the industry. The first is by requesting and producing the open [[Drawing_Exchange_Format_(DXF)|DXF]] format instead of the proprietary DWG format. The second is by switching from AutoCAD to another software entirely.
  
 
= Switch from DWG to DXF =
 
= Switch from DWG to DXF =
Line 11: Line 11:
 
[[Drawing Exchange Format (DXF)]] is an open format that provides many similar features to [[Drawing (DWG)]]. In general, DXF is much more widely supported and has much better cross-platform support. It is extremely easy to switch. Almost all CAD software has the ability to read and write DXF, so it is simply a manner of making it a habit to use one instead of the other. It is also usually a good idea to specify DXF as a digital deliverable in contracts. Most BIM projects currently specify IFC as an OpenBIM format, but neglect to also specify DXF as an open format.
 
[[Drawing Exchange Format (DXF)]] is an open format that provides many similar features to [[Drawing (DWG)]]. In general, DXF is much more widely supported and has much better cross-platform support. It is extremely easy to switch. Almost all CAD software has the ability to read and write DXF, so it is simply a manner of making it a habit to use one instead of the other. It is also usually a good idea to specify DXF as a digital deliverable in contracts. Most BIM projects currently specify IFC as an OpenBIM format, but neglect to also specify DXF as an open format.
  
If a DWG file is provided, and it is not possible to ask for the provider to provide a DXF instead, you have a few options. The first is to open the DWG with QCAD or LibreCAD, and then convert it to a DXF yourself. Of the two, QCAD's support for DWG far surpasses LibreCAD, but unfortunately relies on ODA.  
+
If a DWG file is provided, and it is not possible to ask for the provider to provide a DXF instead, you have a few options. The first is to open the DWG with QCAD or [[LibreCAD|LibreCAD]], and then convert it to a DXF yourself. Of the two, QCAD's support for DWG far surpasses [[LibreCAD|LibreCAD]], but unfortunately relies on [[Open Design Alliance (ODA)]].  
  
 
FreeCAD 0.19 linux version (appimage) [https://yorik.uncreated.net/blog/2021-004-freecad-november-december can import DWG files based on LibreDWG library], and eventually export with this format too. To install this library on Windows version see this [https://wiki.freecadweb.org/FreeCAD_and_DWG_Import FreeCAD documentation].
 
FreeCAD 0.19 linux version (appimage) [https://yorik.uncreated.net/blog/2021-004-freecad-november-december can import DWG files based on LibreDWG library], and eventually export with this format too. To install this library on Windows version see this [https://wiki.freecadweb.org/FreeCAD_and_DWG_Import FreeCAD documentation].
  
If it is not possible to submit DXFs for a project, for example if a client specifically request only DWGs and you are unable to convince them otherwise (though there may be little technical reason for them to do so), QCAD may be used to save DWGs. LibreCAD is unable to create DWGs, at the moment.
+
Another CAD program using the LibreDWG library is [[SolveSpace]]. It can import DWG files up to some extend (even saved as AutoCAD 2013) and export them as DXF (2007), PDF or SVG.
 +
 
 +
If it is not possible to submit DXFs for a project, for example if a client specifically request only DWGs and you are unable to convince them otherwise (though there may be little technical reason for them to do so), QCAD may be used to save DWGs. [[LibreCAD|LibreCAD]] is unable to create DWGs, at the moment.
  
 
If you have a lot to convert, or if the conversion is unsatisfactory, or if you use neither LibreCAD or QCAD (such as if you are using Blender or programmatically generating DXFs), as a fallback option you may use the proprietary [https://www.opendesign.com/guestfiles/oda_file_converter ODA File Converter], or the proprietary [https://www.opendesign.com/oda_online_converter ODA Online Converter]. Although this is proprietary software, it is mentioned on the OSArch wiki because the [[Open Design Alliance (ODA)]] has debatably helped improve access the open data standards in the AEC industry due to their work in reverse engineering the DWG file format, and the ODA library is also used in QCAD under the hood, and it is cross-platform.
 
If you have a lot to convert, or if the conversion is unsatisfactory, or if you use neither LibreCAD or QCAD (such as if you are using Blender or programmatically generating DXFs), as a fallback option you may use the proprietary [https://www.opendesign.com/guestfiles/oda_file_converter ODA File Converter], or the proprietary [https://www.opendesign.com/oda_online_converter ODA Online Converter]. Although this is proprietary software, it is mentioned on the OSArch wiki because the [[Open Design Alliance (ODA)]] has debatably helped improve access the open data standards in the AEC industry due to their work in reverse engineering the DWG file format, and the ODA library is also used in QCAD under the hood, and it is cross-platform.
Line 57: Line 59:
 
= Switching to free/libre software =
 
= Switching to free/libre software =
  
While there are very advanced free/libre 3D geometry applications, there are very few 2D applications. By the far the most feature rich is [[LibreCAD]] is a free/libre alternative to AutoCAD
+
While there are very advanced free/libre 3D geometry applications, there are very few 2D applications with high quality drafting capabilities.
* [[QCAD]] is a free/libre multiplatform alternative to AutoCAD (QCAD Professional is the paid version, QCAD Community is libre software).
+
 +
The most advanced with paper setups, scaling and printing tools:
 +
 
 +
* [[QCAD]] Community Edition is the most feature rich libre/free software for 2D CAD. It is multi platform and supports a typical 2D CAD workflow.
 +
* [[QCAD]] Professional is the paid version of QCAD with a few more functions. Buy QCADE professional supports the development of QCAD Community Edition.
 +
* [[LibreCAD]] is a free/libre 2D CAD software. It is a fork from QCAD v2 and has seen gradual development.
 +
 
 +
There are many tools with vector drawing functionality but not really specific to 2D drafting.
 +
 
 +
* [[CAD_Sketcher]] CAD Sketcher is a constraint-based sketcher addon created for Blender
 
* [[FreeCAD]] has three workbenches useful for 2D drafting, [https://wiki.freecadweb.org/Sketcher_Workbench Sketcher], [https://wiki.freecadweb.org/Draft_Module Draft] & [https://wiki.freecadweb.org/TechDraw_Module Techdraw]. TechDraw is the most advanced and sees most development.
 
* [[FreeCAD]] has three workbenches useful for 2D drafting, [https://wiki.freecadweb.org/Sketcher_Workbench Sketcher], [https://wiki.freecadweb.org/Draft_Module Draft] & [https://wiki.freecadweb.org/TechDraw_Module Techdraw]. TechDraw is the most advanced and sees most development.
* [[Inkscape]] & [[Krita]] have been used by some for drafting. You can use Inkscape as PDF/DXF converter, for drawing edition and presentation improvement. And then, export a final PDF/DXF file.
+
* [[SolveSpace]] can import DWG files up to some extend (even saved as AutoCAD 2013). It has some basic 2D drawing tools to do some edition. Finally it can export the files as DXF (2007), PDF or SVG.
* [https://www.libreoffice.org/ Libre Office Draw] can open DXF files version 2004 or earlier, but it cannot make significant edition. Also, it only can export PDF/SVG format.
+
* [https://github.com/zamtmn/zcad ZCAD] is a small 2D CAD program that can open, edit, save DXF2000 files and has a few edition tools. ZCAD is in beta development.
* [http://lx-viewer.sourceforge.net/ LX-Viewer] (Linux Drawing Viewer) is a program that will allow you to open, view, print DXF files. But it cannot make edition.
+
* [http://lx-viewer.sourceforge.net/ LX-Viewer] (Linux Drawing Viewer) is a program that will allow you to open, view, print DXF files. But it cannot edit files.
 +
* [[Inkscape]] & [[Krita]] have been used by some for drafting. You can use Inkscape as PDF/DXF converter, for editing drawings and presentation improvement. And then, export a final PDF/DXF file.
 +
* [https://www.libreoffice.org/ Libre Office Draw] can open DXF files version 2004 or earlier, but it cannot make complex editions. It exports PDF/SVG format (no [[Drawing_Exchange_Format_(DXF)|DXF]]/[[Drawing_(DWG)|DWG]] support).
 +
* [https://github.com/zecruel/CadZinho CadZinho] is a very new 2D CAD project. You can open DXF files.
  
 
= See also =
 
= See also =

Latest revision as of 10:36, 2 August 2022

Computer Aided Drafting (CAD) in 2D is an important part of many design workflows, some would say legacy workflows. It is a digital extensions of hand made technical drawings.

The problem[edit]

The field of 2D CAD within the AEC industry is currently dominated by AutoCAD, and in particular, the proprietary DWG file format. Heavy reliance on AutoCAD, along with the tight control that parent company Autodesk exerts over the proprietary DWG file format, both stifles innovation and perpetuates proprietary software in our industry. In contrast open formats support users freedom.

To make the switch away from proprietary software and file formats, there are two key ways in which you can make a difference in the industry. The first is by requesting and producing the open DXF format instead of the proprietary DWG format. The second is by switching from AutoCAD to another software entirely.

Switch from DWG to DXF[edit]

Drawing Exchange Format (DXF) is an open format that provides many similar features to Drawing (DWG). In general, DXF is much more widely supported and has much better cross-platform support. It is extremely easy to switch. Almost all CAD software has the ability to read and write DXF, so it is simply a manner of making it a habit to use one instead of the other. It is also usually a good idea to specify DXF as a digital deliverable in contracts. Most BIM projects currently specify IFC as an OpenBIM format, but neglect to also specify DXF as an open format.

If a DWG file is provided, and it is not possible to ask for the provider to provide a DXF instead, you have a few options. The first is to open the DWG with QCAD or LibreCAD, and then convert it to a DXF yourself. Of the two, QCAD's support for DWG far surpasses LibreCAD, but unfortunately relies on Open Design Alliance (ODA).

FreeCAD 0.19 linux version (appimage) can import DWG files based on LibreDWG library, and eventually export with this format too. To install this library on Windows version see this FreeCAD documentation.

Another CAD program using the LibreDWG library is SolveSpace. It can import DWG files up to some extend (even saved as AutoCAD 2013) and export them as DXF (2007), PDF or SVG.

If it is not possible to submit DXFs for a project, for example if a client specifically request only DWGs and you are unable to convince them otherwise (though there may be little technical reason for them to do so), QCAD may be used to save DWGs. LibreCAD is unable to create DWGs, at the moment.

If you have a lot to convert, or if the conversion is unsatisfactory, or if you use neither LibreCAD or QCAD (such as if you are using Blender or programmatically generating DXFs), as a fallback option you may use the proprietary ODA File Converter, or the proprietary ODA Online Converter. Although this is proprietary software, it is mentioned on the OSArch wiki because the Open Design Alliance (ODA) has debatably helped improve access the open data standards in the AEC industry due to their work in reverse engineering the DWG file format, and the ODA library is also used in QCAD under the hood, and it is cross-platform.

A comparison table is provided to help people learn the difference between the two formats. See also the more general File format comparison

Feature DWG DXF
The majority of basic drafting, including lines, text, dimensions, hatching, colours, and layers Supported Supported
Easy to use cross-platform and across all CAD tools Not supported. DWG is inconvenient to use with free software as well as cross-platform. Users are usually required to use proprietary software to use DWG. Supported
Storage in ASCII for open data parsing Not supported Supported
Storage in binary for efficient file sizes Supported Supported (Note: A common misconception is that DXF is only ASCII. DXF actually has an ASCII and a Binary variant)
3D lines and points, common in survey drawings Supported Supported (Note: A common misconception is that DXF does not support 3D. This is not true)

Converting from PDF to DXF[edit]

In many cases, 2D drafting sheets can be found under PDF format. For these cases you can convert these files to DXF files, suitable for further edition with CAD software. Inkscape 1.0 has options to open and save both PDF and DXF files. To work as converter, Inkscape can open a PDF file and with the function "Save a copy" you will have the option of Save as type: Desktop Cutting Plotter (AutoCAD DXF R12 and R14) format. It is important to notice that the original PDF must be a vector drawing (no bitmap). Also, Inkscape 1.0 can open files with AutoCAD DXF R13 extension. Note: R14 support splines (curves), but R12 only support straight lines. It is recommended to check this post for more information.

As an option you can use Scribus to open a PDF file to be exported as SVG file. Then you can open the SVG file to save it as DXF format with Inkscape. On the other hand, you can follow this tutorial using Inkscape and pstoedit.

Switching to free/libre software[edit]

While there are very advanced free/libre 3D geometry applications, there are very few 2D applications with high quality drafting capabilities.

The most advanced with paper setups, scaling and printing tools:

  • QCAD Community Edition is the most feature rich libre/free software for 2D CAD. It is multi platform and supports a typical 2D CAD workflow.
  • QCAD Professional is the paid version of QCAD with a few more functions. Buy QCADE professional supports the development of QCAD Community Edition.
  • LibreCAD is a free/libre 2D CAD software. It is a fork from QCAD v2 and has seen gradual development.

There are many tools with vector drawing functionality but not really specific to 2D drafting.

  • CAD_Sketcher CAD Sketcher is a constraint-based sketcher addon created for Blender
  • FreeCAD has three workbenches useful for 2D drafting, Sketcher, Draft & Techdraw. TechDraw is the most advanced and sees most development.
  • SolveSpace can import DWG files up to some extend (even saved as AutoCAD 2013). It has some basic 2D drawing tools to do some edition. Finally it can export the files as DXF (2007), PDF or SVG.
  • ZCAD is a small 2D CAD program that can open, edit, save DXF2000 files and has a few edition tools. ZCAD is in beta development.
  • LX-Viewer (Linux Drawing Viewer) is a program that will allow you to open, view, print DXF files. But it cannot edit files.
  • Inkscape & Krita have been used by some for drafting. You can use Inkscape as PDF/DXF converter, for editing drawings and presentation improvement. And then, export a final PDF/DXF file.
  • Libre Office Draw can open DXF files version 2004 or earlier, but it cannot make complex editions. It exports PDF/SVG format (no DXF/DWG support).
  • CadZinho is a very new 2D CAD project. You can open DXF files.

See also[edit]