DXF/de: Difference between revisions

From FreeCAD Documentation
(Created page with "== Methoden zum Importieren von DXF in FreeCAD ==")
(Created page with "Mehr Informationen gibt es auf den Seiten Draft DXF und FreeCAD und DXF Import.")
Line 16: Line 16:
If you intend to review the settings frequently, we recommend you go to Edit → Preferences → Import-Export → DXF and tick the box "[ ] Show this dialog when importing and exporting".
If you intend to review the settings frequently, we recommend you go to Edit → Preferences → Import-Export → DXF and tick the box "[ ] Show this dialog when importing and exporting".


More information is on the pages [[Draft DXF]] and [[FreeCAD and DXF Import]].
Mehr Informationen gibt es auf den Seiten [[Draft DXF/de|Draft DXF]] und [[FreeCAD and DXF Import/de|FreeCAD und DXF Import]].


If you are using the imported geometry to build 3D shapes in the Part Design Workbench, try the [[Sketcher Validate]] after you have imported the DXF into a sketch.
If you are using the imported geometry to build 3D shapes in the Part Design Workbench, try the [[Sketcher Validate]] after you have imported the DXF into a sketch.

Revision as of 21:06, 24 February 2019

Hintergrundgeschichte

DXF ist ein proprietäres CAD-Datenformat für zweidimensionale Zeichnungen, das von AutoCAD stammt, aber von den meisten Zeichen- und Plot-Paketen verstanden wird, weil kein alternativen offenen Standard während der Zeit gab, in der AutoCAD marktbeherrschend war.

Die Geschichte von DXF ist fast die gleiche wie die des DOC-Dateiformats bei Microsoft Word: es gab viele inkompatible Versionen während der Entwicklung des Products und alle anderen Textverarbeitungsprogramme mussten diese Dateien bis zu einem gewissen Grad lesen und schreiben können, um zu überleben. Oftmals sind diese Implementationen unvollständig, veraltet und fehlerhaft.

Das gleiche trifft auf DXF zu. Es gibt gewisse Schlüsselversionen von DXF wie R12 (ab 1992) oder R14 (ab 1997 mit Splines). Später DXF-Versionen hatten 3D-Elemente, diese werden aber selten verwendet oder implementiert. Wie DXF zum Datenaustausch zwischen zwei Programmen verwendet wird, hängt hauptsächlich von den Einschränkungen und Fehler der verwendeten Lese-/Import- und Schreib-/Export-Modulen ab. Es ist nicht überraschend, dass es selten komplette Dokumentationen der Programmeinschränkungen und -fehler gibt, was eine Hauptursache der Frustration darstellt.

Wenn Du DXF-Dateien bearbeitest und erwartest, dass sie fast die gleichen bleiben, wenn Du sie speicherst, dann empfehlen wir die Nutzung von LibreCAD oder QCad, weil die internen Datenstrukturen dieser Programme kompatibel zu den Objekten in der DXF-Datei sind.

In FreeCAD the DXF readers must interpret the geometry (eg a spline shapes) from the DXF file into the specific internal forms of the Workbench.

Methoden zum Importieren von DXF in FreeCAD

If you intend to review the settings frequently, we recommend you go to Edit → Preferences → Import-Export → DXF and tick the box "[ ] Show this dialog when importing and exporting".

Mehr Informationen gibt es auf den Seiten Draft DXF und FreeCAD und DXF Import.

If you are using the imported geometry to build 3D shapes in the Part Design Workbench, try the Sketcher Validate after you have imported the DXF into a sketch.

C++ DXF importer

This implementation of fast, but skips features it doesn't recognize, such as DXF splines. It also can only import geometry into the Draft Workbench as individual entries in the Model tree. These can have the colors read from the file if you tick to enable this option. For further information, see this forum post.

Python DXF importer

This importer has to be downloaded and installed before it can be used. See Dxf Importer Install, or use the "[ ] Allow FreeCAD to automatically download and update the DXF libraries" option.

This importer has more features (such as implementing splines), and has the option of loading the DXF shapes into the Sketcher. However, be warned that all the elements of the sketch will appear individually a second time in the model tree, which can be confusing. You can delete all these individual objects and retain the single sketch (which appears as the second entry in the list of new elements).

Unfortunately, the Sketch Workbench does not implement colors, so all the geometry will appear on the same level, which is a problem if the file contains many construction lines. One work-around is to open your drawing in LibreCAD, and delete all the geometry you don't want to appear before saving a file that contains exactly the geometry that you want to load.

Macros

Keep an eye out on the FreeCAD forum or in the Macros_recipes for alternative implementations of DXF importing and cleaning up as they develop.


Saving DXF

In addition to the options under the Edit → Preferences, the TechDraw Workbench can also export drawing pages to DXF using the TechDraw SaveDXF function.