FreeCAD and DXF Import: Difference between revisions

From FreeCAD Documentation
(add link to "Dxf Importer Install")
(Removed Dxf_Importer_Install.)
 
(23 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. Why this? These libraries are published with another license than FreeCAD, so the developers of FreeCAD would not have them being bundled with the FreeCAD-Application.


== How to install == <!--T:2-->
== Background == <!--T:20-->

To install Draft-dxf-importer:
<!--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.

== Introduction == <!--T:1-->

<!--T:14-->
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.

<!--T:15-->
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 == <!--T:2-->

=== Automatically === <!--T:9-->

<!--T:10-->
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.

<!--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").
# 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.
# 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, this is normally
* In Ubuntu your macro folder is normally (the folder is hidden, you may need to unhide it):
/home/your_user_name/.FreeCAD
/home/your_user_name/.FreeCAD
* In Windows your macro folder is normally:
The directory is hidden. You may need to unhide it to make it visible.
* In Windows, your (standard) macro directory is
C:\Users\your_user_name\AppData\Roaming\FreeCAD
C:\Users\your_user_name\AppData\Roaming\FreeCAD


<!--T:6-->
== Tips and Tricks == <!--T:4-->
If you are unsure of where your macro-directory is,
# open FreeCAD and go to "Edit > Preferences",
# select "General" in the left column and select category "Macro" on the top right corner of the preferences-window. There sould be a field named "Macro Path".


<!--T:16-->
Tutorial: [[Dxf_Importer_Install|Dxf Importer Install]]
Sometimes DXF Files don't import although they open in other CAD-Programs without problems.
== Setting Options == <!--T:3-->
You can set several import options for DWG/DXF. Depending on your version you have to use a different method.
* '''FreeCAD 0.14 and older'''
# Open FreeCAD.
# Switch to the Draft Workbench. (Otherwise you won't see the options)
# Go to "Edit > Preferences" and select "Draft" in the left column.
# Select "DXF / DWG-Options" in the top right corner of the preferences-window.
* '''FreeCAD 0.15 and above'''
# Open FreeCAD.
# Switch to the Draft Workbench. (Otherwise you won't see the options)
# Go to "Edit > Preferences".
# Now you shoould see an icon labeled "Import-Export" in the left column. Select that.


== Tips and Tricks == <!--T:4-->
<!--T:17-->
You can try:
Sometimes DXF Files don't seem to import although they open up in 2D-DXF-CAD-Programs. In this case untick the option "join geometry" and try again. Often this solves the problem.
# Go to {{MenuCommand|Edit → Preferences → Import-Export → DXF}} and untick the option {{MenuCommand|Join geometry}} and try again.
But remember that maybe now you won't have coincident end-of-line-points. You will have to make them coincident yourself.
# Remember that maybe now you won't have coincident endpoints. You can make them coincident with [[Sketcher_ValidateSketch|Sketcher ValidateSketch]]


<!--T:7-->
<!--T:18-->
You can also try:
Good luck on importing.
# 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]].


<!--T:5-->
[[Category:User Documentation]]


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

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.