Draft DXF/ru: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 9: | Line 9: | ||
{{GuiCommand |
{{GuiCommand |
||
|Name=Draft DXF |
|Name=Draft DXF |
||
|MenuLocation=- |
|||
|MenuLocation={{StdMenu|[[Std File Menu|File]]}} → Export → Autodesk DXF 2D (*.dxf) |
|||
|Workbenches=[[Draft Workbench|Draft]] |
|Workbenches=[[Draft Workbench|Draft]] |
||
|Shortcut= |
|Shortcut=- |
||
|SeeAlso=[[FreeCAD and DXF Import]], [[FreeCAD and DWG Import]] |
|SeeAlso=[[FreeCAD and DXF Import]], [[FreeCAD and DWG Import]] |
||
|Empty=1 |
|Empty=1 |
||
}} |
}} |
||
== |
==Description== |
||
{{Emphasis|See also:}} [[FreeCAD and DXF Import|FreeCAD and DXF Import]] and [[FreeCAD and DWG Import|FreeCAD and DWG Import]]. |
|||
Draft DXF is a software module used by the [[File:Std_Open.svg|24px]] [[Std_Open|Std Open]], [[File:Std_Import.svg|24px]] [[Std_Import|Std Import]] and [[File:Std_Export.svg|24px]] [[Std_Export|Std Export]] commands to handle the DXF file format. |
|||
This function opens a [[DXF|DXF]] file, any version from 12 to 2007, to a new document. |
|||
[[Image:Screenshot qcad.jpg]] |
[[Image:Screenshot qcad.jpg]] |
||
Line 41: | Line 40: | ||
</div> |
</div> |
||
DXF versions R12 - 2007 are supported. |
|||
The following DXF objects can be imported: |
|||
* lines |
* lines |
||
* polylines and lwpolylines |
* polylines and lwpolylines |
||
Line 50: | Line 51: | ||
* dimensions |
* dimensions |
||
* blocks (only geometry. texts, dims and attributes inside blocks will be skipped) |
* blocks (only geometry. texts, dims and attributes inside blocks will be skipped) |
||
* points |
* points |
||
* leaders |
* leaders |
||
* ... (list is incomplete). |
|||
Other DXF entities are currently not imported because there is no corresponding FreeCAD object. As new functionality gets implemented, it will be possible to import more entity types. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
<div class="mw-translate-fuzzy"> |
|||
====Автоматически==== |
|||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
Начиная с версии 0.15 достаточно включить опцию Правка -> Параметры -> Импорт/экспорт -> DXF/DWG -> "Автоматически загружать и обновлять библиотеки DXF" для автоматической загрузки и установки данных библиотек. Для более старых версий, требуются ручные действия. |
|||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
====Вручную==== |
|||
</div> |
|||
Библиотеки должны быть загружены из https://github.com/yorikvanhavre/Draft-dxf-importer . |
|||
Полный пошаговый [[Dxf_Importer_Install|учебник]], объясняющий необходимые действия. |
|||
<div class="mw-translate-fuzzy"> |
|||
===Импорт=== |
|||
Импорт работает таким же образом, как и открытие, но добавляет содержимое файла DXF в активный документ, вместо создания нового документа. |
|||
</div> |
|||
Учебник: [[Dxf_Importer_Install|Установка Импорта DXF]] |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
Line 97: | Line 67: | ||
</div> |
</div> |
||
Files are exported in the R12 DXF format which can be handled by many applications. |
|||
⚫ | |||
The following FreeCAD objects can be exported: |
|||
The following parameters can be specified in the [[Preferences Editor|Preferences Editor]], in the menu {{MenuCommand|Edit → Preferences → Import-Export}}. |
|||
* lines and wires (polylines) |
|||
* Import style: This lets you choose the way objects from the dxf file will be drawn in FreeCAD. You can choose between: |
|||
* arcs and circles |
|||
** None: this is the faster way, there is no conversion, all objects will be black with 2px width (FreeCAD default) |
|||
* texts |
|||
** Use default color and linewidth: All imported dxf objects will take current linewidth/color from the draft command bar |
|||
* colors are mapped from objects RGB colors to autocad color index (ACI). Black will always be "by layer" |
|||
** Original color and linewidth: Objects will keep the color and linewidth (if specified) they have in the dxf file |
|||
* layers are mapped from group names. When groups are nested, the deepest group gives the layer name. |
|||
* dimensions, which are exported with "Standard" dimstyle. |
|||
* Color mapping file: This allows you to specify a mapping file to be used for translating dxf colors to color and linewidth, the same way as a plot style works in Autocad. The mapping file must be a tab-separated text file. There is a nice free utility called [http://www.noliturbare.com/TablePrintGUI.php Plot style viewer] that can convert Autocad CTB or STB (plot styles) files to tab-separated mapping files ready to use in FreeCAD. Alternatively, we have a couple of [[Draft_mapping_files|home-made mapping files]] available here. |
|||
* ... (list is incomplete). |
|||
* Import texts: This allows you to specify whether you want to import dxf texts and dimensions. Many texts might make your work in FreeCAD very difficult, so you might want to use this option some time. |
|||
* Import layout objects: Turn this on if you want to import paper space object. They will be merged in the same document as model space objects. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
For more information see: [[Import_Export_Preferences|Import Export Preferences]]. |
|||
⚫ | |||
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]]. |
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]]. |
||
Line 135: | Line 116: | ||
{{Draft Tools navi{{#translation:}}}} |
{{Draft Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{Draft Tools navi{{#translation:}}}} |
|||
[[Category:Formats{{#translation:}}]] |
[[Category:Formats{{#translation:}}]] |
||
{{clear}} |
{{clear}} |
Revision as of 20:47, 12 March 2020
Draft DXF |
Menu location |
---|
- |
Workbenches |
Draft |
Default shortcut |
- |
Introduced in version |
- |
See also |
FreeCAD and DXF Import, FreeCAD and DWG Import |
Description
Draft DXF is a software module used by the Std Open, Std Import and Std Export commands to handle the DXF file format.
Qcad drawing exported to DXF, which is subsequently opened in FreeCAD
Открытие
Данная функция открывает файл DXF (любую версию от 12 до 2007) в новом документе. В настоящее время поддерживаются следующие типы объектов DXF:
- линии
- полилинии и LW-полилинии (простые полилинии)
- окружности
- дуги
- слои (слои содержащие объекты преобразуются в группы FreeCAD)
- текст и M-текст
- размеры
- блоки (только геометрия, текст, размеры и атрибуты внутри блока будут пропущены)
- точки introduced in version 0.13
- выноски introduced in version 0.13
Остальные элементы DXF в настоящее время не импортируются, так как им нет соответствующих объектов FreeCAD. По мере добавления нового функционала, станет возможным импортировать остальные элементы DXF.
DXF versions R12 - 2007 are supported.
The following DXF objects can be imported:
- lines
- polylines and lwpolylines
- circles
- arcs
- layers (layers containing objects are converted to FreeCAD Groups)
- texts and mtexts
- dimensions
- blocks (only geometry. texts, dims and attributes inside blocks will be skipped)
- points
- leaders
- ... (list is incomplete).
Экспорт
Экспортируемый файл DXF совместим с Autocad версии 12 и новее, поэтому он должен открываться в практически любом приложении поддерживающем формат DXF. В настоящее время поддерживается экспорт следующих объектов FreeCAD:
- линии и многоточечные линии (полилинии)
- дуги и окружности
- текст
- цвета отображаются из RGB в цветовой индекс Autocad (ACI). Чёрный всегда будет отображён в цвет "по слою"
- слои отображаются по именам групп. При вложенных группах, имя слою даёт самая глубоко вложенная группа.
- размеры, которые экспортируются со стилем "стандартный"
Files are exported in the R12 DXF format which can be handled by many applications.
The following FreeCAD objects can be exported:
- lines and wires (polylines)
- arcs and circles
- texts
- colors are mapped from objects RGB colors to autocad color index (ACI). Black will always be "by layer"
- layers are mapped from group names. When groups are nested, the deepest group gives the layer name.
- dimensions, which are exported with "Standard" dimstyle.
- ... (list is incomplete).
Установка
Внимание! По причине лицензирования библиотеки импорта и экспорта DXF более не входят в исходный код FreeCAD. Поэтому данные библиотеки должны быть установлены пользователем, после установки FreeCAD. Это может быть сделано автоматически или вручную.
Preferences
For more information see: Import Export Preferences.
Scripting
See also: Draft API and FreeCAD Scripting Basics.
You can export elements to DXF by using the following function:
importDXF.export(objectslist, filename, nospline=False, lwPoly=False)
Example:
import Draft, importDXF
Polygon1 = Draft.makePolygon(3, radius=500)
Polygon2 = Draft.makePolygon(5, radius=1500)
objects = [Polygon1, Polygon2]
importDXF.export(objects, "/home/user/Pictures/myfile.dxf")
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework