FreeCAD and DXF Import: Difference between revisions

From FreeCAD Documentation
(Created page with "<translate> == Legal Notice == <!--T:1--> To be able to import DXF-Files you have to manually install several files.<br /> Why this ?<br /> These libraries are published with ...")
 
(Removed Dxf_Importer_Install.)
 
(27 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<languages/>
{{TOCright}}
<translate>
<translate>
== Legal Notice == <!--T:1-->
To be able to import DXF-Files you have to manually install several files.<br />
Why this ?<br />
These libraries are published with another license than FreeCAD, so the developers of FreeCAD<br />
would not have them being bundled with the FreeCAD-Application.


== How to install == <!--T:2-->
== Background == <!--T:20-->
Go to [https://github.com/yorikvanhavre/Draft-dxf-importer Yorik's Github account] and download thes files (on the right side you can choose "download as ZIP").<br />
<br />
The Files must be put in your macro folder.<br />
<br />
In Ubuntu, this is normally<br />
/home/your_user_name/.FreeCAD<br />
the directory is hidden. You may need to unhide it to make it visible.<br />
In Windows, your (standard) macro directory is<br />
<br />
C:\Users\your_user_name\AppData\Roaming\FreeCAD<br />
If you are unsure of where your macro-directory is, open FreeCAD and go to "Edit > Preferences".<br />
Select "General" in the left column and select category "Macro" on the top right corner of the preferences-window.<br />
There sould be a field named "Macro Path".<br />


== Setting Options == <!--T:3-->
<!--T:21-->
DXF is a proprietary CAD data format for 2D drawings that originated with AutoCAD. More details can be found on the [[DXF|DXF]] wiki page.
You can set several import options for DWG/DXF.<br />

Depending on your version you have to use a different method.<br />
== Introduction == <!--T:1-->
<br />

'''FreeCAD 0.14 and older'''<br />
<!--T:14-->
Open FreeCAD.<br />
Since FreeCAD version 0.18 there is a new C++ DXF importer, and since version 0.19 also a new C++ DXF exporter. These new components are installed with FreeCAD.
Switch to the Draft Workbench. (Otherwise you won't see the options)<br />

Go to "Edit > Preferences" and select "Draft" in the left column.
<!--T:15-->
Then select "DXF / DWG-Options" in the top right corner of the preferences-window.
To use the older, legacy, DXF importer and exporter you need to install several files. These files cannot be included with FreeCAD since they use libraries published under a license that is not compatible with FreeCAD.
<br />

'''FreeCAD 0.15 and above'''<br />
== How to install the legacy DXF importer and exporter == <!--T:2-->
Open FreeCAD.<br />

Switch to the Draft Workbench. (Otherwise you won't see the options)<br />
=== Automatically === <!--T:9-->
Go to "Edit > Preferences".<br />

Now you shoould see an icon labeled "Import-Export" in the left column.<br />
<!--T:10-->
Select that.<br />
If the files are not already installed, go to the menu {{MenuCommand|Edit → Preferences → Import-Export → DXF}} and enable the option {{MenuCommand|Allow FreeCAD to automatically download and update the DXF libraries}} to make FreeCAD automatically download and install them.
<br />

<!--T:11-->
For FreeCAD 0.14 or older you have to install manually:

=== Manually === <!--T:12-->

<!--T:13-->
# Go to [https://github.com/yorikvanhavre/Draft-dxf-importer Yorik's Github account] and download these files (on the right side you can choose "download as ZIP").
# Put the files in your macro folder.
# If you are unsure where this folder is, go to {{MenuCommand|Edit → Preferences → Python → Macro}} and check the field named {{MenuCommand|Macro Path}}.
* In Ubuntu your macro folder is normally (the folder is hidden, you may need to unhide it):
/home/your_user_name/.FreeCAD
* In Windows your macro folder is normally:
C:\Users\your_user_name\AppData\Roaming\FreeCAD


== Tips and Tricks == <!--T:4-->
== Tips and Tricks == <!--T:4-->
Sometimes DXF Files don't seem to import although they open up in 2D-DXF-CAD-Programs.<br />
In this case untick the option "join geometry" and try again. Often this solves the problem.<br />
But remember that maybe now you won't have coincident end-of-line-points.<br />
You will have to make them coincident yourself.<br />
Good luck on importing.<br />


<!--T:16-->
</translate>
Sometimes DXF Files don't import although they open in other CAD-Programs without problems.
<!--T:5-->
[[Category:User Documentation]]


<!--T:17-->
{{clear}}
You can try:
<languages/>
# Go to {{MenuCommand|Edit → Preferences → Import-Export → DXF}} and untick the option {{MenuCommand|Join geometry}} and try again.
# Remember that maybe now you won't have coincident endpoints. You can make them coincident with [[Sketcher_ValidateSketch|Sketcher ValidateSketch]]

<!--T:18-->
You can also try:
# Go to {{MenuCommand|Edit → Preferences → Draft → General settings}} and adjust the value of {{MenuCommand|Tolerance}} (default: 0,05) and try again.

<!--T:19-->
For an overview of all DXF related preferences see [[Import_Export_Preferences#DXF|Import Export Preferences]].


</translate>
[[Category:User_Documentation{{#translation:}}]]
[[Category:File_Formats{{#translation:}}]]

Latest revision as of 19:58, 22 November 2023

Background

DXF is a proprietary CAD data format for 2D drawings that originated with AutoCAD. More details can be found on the DXF wiki page.

Introduction

Since FreeCAD version 0.18 there is a new C++ DXF importer, and since version 0.19 also a new C++ DXF exporter. These new components are installed with FreeCAD.

To use the older, legacy, DXF importer and exporter you need to install several files. These files cannot be included with FreeCAD since they use libraries published under a license that is not compatible with FreeCAD.

How to install the legacy DXF importer and exporter

Automatically

If the files are not already installed, go to the menu Edit → Preferences → Import-Export → DXF and enable the option Allow FreeCAD to automatically download and update the DXF libraries to make FreeCAD automatically download and install them.

For FreeCAD 0.14 or older you have to install manually:

Manually

  1. Go to Yorik's Github account and download these files (on the right side you can choose "download as ZIP").
  2. Put the files in your macro folder.
  3. If you are unsure where this folder is, go to Edit → Preferences → Python → Macro and check the field named Macro Path.
  • In Ubuntu your macro folder is normally (the folder is hidden, you may need to unhide it):
/home/your_user_name/.FreeCAD 
  • In Windows your macro folder is normally:
C:\Users\your_user_name\AppData\Roaming\FreeCAD

Tips and Tricks

Sometimes DXF Files don't import although they open in other CAD-Programs without problems.

You can try:

  1. Go to Edit → Preferences → Import-Export → DXF and untick the option Join geometry and try again.
  2. Remember that maybe now you won't have coincident endpoints. You can make them coincident with Sketcher ValidateSketch

You can also try:

  1. Go to Edit → Preferences → Draft → General settings and adjust the value of Tolerance (default: 0,05) and try again.

For an overview of all DXF related preferences see Import Export Preferences.