FreeCAD and DXF Import: Difference between revisions

From FreeCAD Documentation
No edit summary
(Revised)
Line 1: Line 1:
<languages/>
<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-->
== Introduction == <!--T:1-->


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.
=== Included by default ===


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.
DXF Import support is included with FreeCAD 0.19

== How to install the legacy DXF importer and exporter == <!--T:2-->


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


<!--T:10-->
<!--T:10-->
If not already installed, go to the menu {{MenuCommand|Edit → Preferences → Import/Export → DXF}} and enable the option {{MenuCommand|Allow FreeCAD to automatically download the DXF libraries}} to make FreeCAD automatically and installing these libraries.
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-->
<!--T:11-->
For FreeCAD 0.14 or older you have to install it manually:
For FreeCAD 0.14 or older you have to install manually:


=== Manually === <!--T:12-->
=== Manually === <!--T:12-->
Line 23: Line 24:
# 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 → General → 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-->
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:8-->
<!--T:8-->
Tutorial: [[Dxf_Importer_Install|Dxf Importer Install]]
See also: [[Dxf_Importer_Install|Dxf Importer Install]]

== 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 should see an icon labeled "Import-Export" in the left column. Select that.


== 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 without problems.<br />
You can try:<br />
# Go to Edit → Preferences → Import/Export → DXF/DWG and untick the option "join geometry" and try again.
# Remember that maybe now you won't have coincident end-of-line-points. You will have to make them coincident yourself.
# You can do this with the command "Close Shape" in the sketcher workbench (needs version 0.15) or you can apply the constraints manually
You can also try:<br />
# Go to Edit → Preferences → Draf → General and adjust the value of "Tolerance" (default: 0,05)
# Try again


Sometimes DXF Files don't import although they open in other CAD-Programs without problems.
<!--T:7-->

Good luck on importing.
You can try:
# 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 will have to make them coincident yourself.
# You can do this with the [[Sketcher_CloseShape|Sketcher CloseShape]] command (since version 0.15) or you can apply the constraints manually.

You can also try:
# Go to {{MenuCommand|Edit → Preferences → Draf → General settings}} and adjust the value of {{MenuCommand|Tolerance}} (default: 0,05) and try again.

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}}

Revision as of 19:34, 28 December 2020

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 → General → 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

See also: Dxf Importer Install

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 will have to make them coincident yourself.
  3. You can do this with the Sketcher CloseShape command (since version 0.15) or you can apply the constraints manually.

You can also try:

  1. Go to Edit → Preferences → Draf → 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.