FreeCAD Logo FreeCAD 1.0
  • Angličtina Afrikánština Arabština Běloruština Katalánština Čeština Němčina Řečtina Španělština Španělština Baskičtina Finština Filipínština Francouzština Galicijština Chorvatština Maďarština Indonéština Italština Japonština Kabylština Korejština Litevština Holandština Norština Bokmål Polština Portugalština Portugalština Rumunština Ruština Slovenština Slovinština Srbština Švédština Turečtina Ukrajinština Valencijština Vietnamština Čínština Čínština
  • Funkce
  • Stáhnout
  • Blog
  • Dokumentace
    Hlavní strana dokumentace Začínáme Uživatelská dokumentace Příručka FreeCAD Dokumentace pracovních prostředí Dokumentace o skriptování v Pythonu Dokumentace o programování v C++ Tutoriály Často kladené otázky Zásady ochrany soukromí O FreeCADu
  • Zapojte se
    Jak pomoci Sponsor Nahlásit chybu Vytvořit žádost o změnu Pracovní místa a financování Pokyny pro příspěvky Příručka pro vývojáře Překlady
  • Komunita
    Etický kodex Fórum The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Kalendář
  • ♥ Donate

Donate

$
SEPA informace
Nastavte prosím Váš SEPA bankovní převod na:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Bankovní agentura: BNP Paribas Fortis
Adresa: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

Preferences
Scalable Vector Graphics .SVG
Draft

Description

Draft DXF is a software module used by the Std Open, Std Import and Std Export commands to handle the DXF file format.

From the user's point of view, the DXF import/export module will be loaded automatically when any of those commands are invoked and the file to open, import or export is a DXF file. The main difference between Std Open and the import command is that the former will create a new FreeCAD document and then do the import, whereas the later will import the DXF file and insert the result in the currently active document.

QCAD drawing exported to DXF, which is subsequently opened in FreeCAD

Otevírání

Tato funkce otevírá soubory DXF (jakoukoliv verzi od 12 do 2007) v novém výkresu. V současné době jsou podporovány následující objekty DXF:

  • přímky
  • lomené čáry a lwpolylines
  • kružnice
  • oblouky
  • vrstvy (vrstvy obsahující objekty jsou konvertovány do skupin FreeCADu)
  • texty a mtexty
  • kótování
  • bloky (pouze konstrukce; texty, kóty a atributy uvnitř bloků jsou přeskočeny)
  • body introduced in 0.13
  • vynášecí čáry introduced in 0.13

Ostatní DXF entity nejsou v současné době importovány, protože zatím nejsou ve FreeCADU implementovány korespondující objekty. Jakmile budou implementovány nové funkcionality, bude pravděpodobně možné importovat více typů entit.

Two importers are available, which one is used can be specified under Edit → Preferences → Import-Export → DXF. One is built-in, C++-based and fast, the other is legacy, coded in Python, slower, and requires the installation of an add-on, but can handle some entities better and can create more refined FreeCAD objects. Both support all DXF versions starting from R12.

3D solids inside a DXF file are stored under a binary ACIS/SAT blob, which at the moment cannot be read by FreeCAD.


DXF importer entity support comparison
Entity C++ importer Legacy importer
Lines ✓ ✓
Polylines (and LWPOLYLINES) ✓ ✓
Arcs ✓ ✓
Circles ✓ ✓
Ellipses ✓ ✓
Splines ✓ ✓
Texts & MTexts ✓ ✓
Leaders ✗ ✓
Layers ✓ ✓
Points ✓ ✓
Dimensions ✓ ✓
Blocks ✓
(Geometry only; texts, dimensions, and attributes inside blocks are skipped)
✓
Paper space objects ✓ ✓
3D Faces ✗ ✓

Exportování

Exportovaný DXF je kompatibilní s Autocadem verze 12 a vyšší, takže by mělo být možné jej otevřít v jakékoliv aplikaci, která podporuje DXF formát. V současnosti jsou exportovány následující objekty FreeCADu:

  • přímky a dráty (lomené čáry)
  • oblouky a kružnice
  • texty
  • barvy jsou mapovány z RGB barev objektů na indexy barev Autocadu (ACI). Černá bude vždy "podle vrstvy"
  • vrstvy jsou mapovány z názvů skupin. Jsou-li skupiny "zahnízděny" (skupina ve skupině), pak je jméno vrstvy podle nejhlubší skupiny.
  • kóty, které jsou exportovány ve "Standardním" stylu kót

There are also two exporters. The legacy exporter exports to the R12 DXF format, the C++ exporter to the R14 DXF format. Both formats can be handled by many applications.

DXF exporter entity support comparison
Feature C++ exporter (R14) Legacy exporter (R12)
Supported 2D Geometry All except Bezier curves. Ellipses and Splines are exported natively. All except Points. Ellipses and B-splines may be inaccurate or exported as polylines.
Points ✓
(If the "Export points" preference is enabled)
✗
3D Objects Edges from faces are exported. Curved edges only if on XY plane. May create duplicate lines. Exported as flattened 2D views.
Texts and Dimensions ✗ ✓
Colors ✗ ✓
(Based on object line color)
Layers ✓
(Mapped from object names)
✓
(Mapped from layers and nested groups)
Compounds ✗ ✓
(Exported as blocks)

Installing

For licensing reasons, the required DXF import/export libraries needed by the legacy version of the importer are not part of the FreeCAD source code. For more information see: FreeCAD and DXF Import.

Preferences

See Import Export Preferences.

DWG

Because the DWG format is a proprietary, closed and undocumented format it is hard for open-source projects like FreeCAD to support it. That is why FreeCAD relies on external converters to read and write DWG files. To import a DWG file a converter is used to create a DXF first, which can then be processed by the FreeCAD DXF importer. When exporting to DWG the opposite conversion happens: the DXF created by the FreeCAD DXF exporter is turned into a DWG.

Note that the DXF format allows a 1:1 conversion of the DWG format. All applications that can read and write DWG files can do the same with DXF files, with no data loss. So asking for DXF files instead of DWG files, and supplying DXF files in turn, should not cause any problems.

There is built-in support for the following DWG converters:

  • LibreDWG (open-source, lacks support for some DWG entities).
  • ODA File Converter (free).
  • QCAD pro (commercial).

See Import Export Preferences and FreeCAD and DWG Import for more information.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To export objects to DXF use the export method of the importDXF module.

importDXF.export(objectslist, filename, nospline=False, lwPoly=False)
  • For the Windows OS: use a / (forward slash) as the path separator in filename.

Example:

import FreeCAD as App
import Draft
import importDXF

doc = App.newDocument()

polygon1 = Draft.make_polygon(3, radius=500)
polygon2 = Draft.make_polygon(5, radius=1500)

doc.recompute()

objects = [polygon1, polygon2]
importDXF.export(objects, "/home/user/Pictures/myfile.dxf")


Tato stránka je načtena z https://wiki.freecad.org/Draft_DXF

Buďte v kontaktu!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© Tým FreeCAD. Autorství obrázků úvodní stránky (od zhora dolů): ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

Tento projekt podporují: , KiCad Services Corp. a ostatní sponzoři

GitHubVylepšete tuto stránku na GitHubu