Draft Workbench/zh-cn

简介
您可以利用底图工作台来绘制简单的2D对象，再利用其提供的其他工具来修改这些对象. 此工作台提供了工具来定义工作平面、网格. 另外，还有一个snapping系统可助您精确地控制几何体的位置.

用户创建的2D对象能以类似于Inkscape或Autocad中的方式用于通用绘图. 这些2D图形也可用作零件工作台与建筑工作台等其他工作台所创3D对象的基本组件. 另外，也可以将底图对象转换至构图工作台，这意味着能够在零件设计工作台中利用这些图形来创建实体.

FreeCAD是一款以3D建模为主的应用软件，这使它的2D工具并非如其他绘图程序那样高级. 如果您的主要目的是复杂的2D绘图与处理DXF文件，并不是3D建模，那么不妨考虑一款关于技术制图的专用软件，例如LibreCAD, QCad, TurboCad以及其他类似程序.



绘制对象
下面来介绍一些用于创建对象的工具.


 * [[Image:Draft_Line.svg|32px]] 线段（Line）: 绘制两点间的线段.
 * [[Image:Draft_Wire.svg|32px]] 连线（Wire）: 绘制一条由多条线段构成的折线(polyline).
 * [[Image:Draft_Circle.svg|32px]] 圆形（Circle）: 根据中心点与半径来绘制一个圆形.
 * [[Image:Draft_Arc.svg|32px]] 弧（Arc）: 根据中心点、半径、起始角度与结束角度来绘制一条弧.
 * [[Image:Draft_Arc_3Points.svg|32px]] 3点绘弧（Arc 3Points）: 根据圆周上的3点来绘制一条弧线段.
 * [[Image:Draft_Ellipse.svg|32px]] 椭圆形（Ellipse）: 根据两个角点来绘制一个椭圆形.
 * [[Image:Draft_Polygon.svg|32px]] 多边形（Polygon）: 根据中心点、半径与边数来绘制一个规则的多边形.
 * [[Image:Draft_Rectangle.svg|32px]] 矩形（Rectangle）: 根据两个角点来绘制一个多边形.
 * [[Image:Draft_Text.svg|32px]] 文本（Text）: 绘制一个多行文本注解.
 * [[Image:Draft_Dimension.svg|32px]] 维度注解（Dimension）: 绘制一个维度注解.
 * [[Image:Draft_BSpline.svg|32px]] B样条（BSpline）: 根据一系列点来绘制一个B样条.
 * [[Image:Draft_Point.svg|32px]] 点（Point）: 插入一个点对象.
 * [[Image:Draft_ShapeString.svg|32px]] ShapeString: 在给定位置插入一个由复合图形构成的字符串.
 * [[Image:Draft_Facebinder.svg|32px]] Facebinder: 根据已存在对象上所选定的面来创建一个新对象.
 * [[Image:Draft_BezCurve.svg|32px]] 贝塞尔曲线（Bezier Curve）: 根据一系列点来绘制一条贝塞尔曲线.
 * [[Image:Draft_CubicBezCurve.svg|32px]] 三次贝塞尔曲线（Cubic Bezier Curve）: 通过拖动两个点来绘制一条三次贝塞尔曲线.
 * [[Image:Draft_Label.svg|32px]] 标签（Label）: 设置一个箭头指向选定元素的标签.

Annotation objects

 * [[Image:Draft_Text.svg|32px]] Text: draws a multi-line text annotation.
 * [[Image:Draft_Dimension.svg|32px]] Dimension: draws a dimension annotation.
 * [[Image:Draft_Label.svg|32px]] Label: places a label with an arrow pointing to a selected element.
 * [[Image:Draft_AnnotationStyleEditor.svg|32px]] Annotation style editor: opens an editor to change the annotation style of these objects.

修改对象
以下这些工具用来修改已存在的对象. 这写工具处理的是用户选定的对象，如果没有选择待处理对象，系统会提醒你选择一个.

许多工具(移动, 旋转, 阵列等)也可用于处理实体对象(零件, 零件设计, 建筑等).


 * [[Image:Draft_Move.svg|32px]] 移动（Move）: 将对象移动到另一个地方.
 * [[Image:Draft_Rotate.svg|32px]] 旋转（Rotate）: 将对象从起始角度旋转到结束角度.
 * [[Image:Draft_Offset.svg|32px]] 偏移（Offset）: 将对象中的线段按特定距离进行偏移.
 * [[Image:Draft_Trimex.svg|32px]] Trim/Extend (Trimex): trims or extends an object.
 * [[Image:Draft_Join.svg|32px]] Join: joins lines together into a single wire.
 * [[Image:Draft_Split.svg|32px]] Split: splits a wire into two at a point.
 * [[Image:Draft_Upgrade.svg|32px]] Upgrade: upgrades objects into a higher-level object.
 * [[Image:Draft_Downgrade.svg|32px]] Downgrade: downgrades objects into lower-level objects.
 * [[Image:Draft_Scale.svg|32px]] Scale: scales selected objects around a base point.
 * [[Image:Draft_Edit.svg|32px]] Edit: edits a selected object.
 * [[Image:Draft_Edit_Improved.svg|32px]] Edit Improved: enters an edit mode that allows editing different objects.
 * [[Image:Draft_WireToBSpline.svg|32px]] Wire to BSpline: converts a wire to a B-Spline and vice-versa.
 * [[Image:Draft_AddPoint.svg|32px]] Add point: adds a point to a wire or B-Spline.
 * [[Image:Draft_DelPoint.svg|32px]] Delete point: deletes a point from a wire or B-Spline.
 * [[Image:Draft_Shape2DView.svg|32px]] Shape 2D View: creates a 2D object which is a flattened 2D view of a 3D object.
 * [[Image:Draft_Draft2Sketch.svg|32px]] Draft to Sketch: converts a Draft object to a Sketcher Workbench Sketch and vice-versa.
 * [[Image:Draft_Array.svg|32px]] Array: creates a polar or rectangular array from selected objects.
 * [[Image:Draft_PathArray.svg|32px]] Path Array: creates an array of objects by placing the copies along a path.
 * [[Image:Draft_PointArray.svg|32px]] Point Array: creates an array of objects by placing the copies at certain points.
 * [[Image:Draft_Clone.svg|32px]] 克隆（Clone）: 对选定的对象进行克隆操作.
 * [[Image:Draft_PutOnSheet.svg|32px]] 绘制（Drawing）: 将选定的对象写入工程制图工作台页面.
 * [[Image:Draft_Mirror.svg|32px]] 镜像（Mirror）: 对选定的对象进行镜像操作.
 * [[Image:Draft_Stretch.svg|32px]] 拉伸（Stretch）: 拉伸选定的对象.


 * [[Image:Draft_Clone.svg|32px]] Clone: clones the selected objects.
 * [[Image:Draft_Array.svg|32px]] Array tools.
 * [[Image:Draft_OrthoArray.svg|32px]] Ortho Array: creates an orthogonal array from the selected object. It can also create App Link copies.
 * Draft_PolarArray.svg Polar Array: creates an array in a polar pattern, that is, sweeping an angle. It can also create App Link copies.
 * Draft_CircularArray.svg Circular Array: creates an array in a circular pattern, that is, starting from a center and moving outwards radially. It can also create App Link copies.
 * [[Image:Draft_PathArray.svg|32px]] Path Array: creates an array of objects by placing the copies along a path.
 * [[Image:Draft_PathLinkArray.svg|32px]] Path LinkArray: like [[Image:Draft_PathArray.svg|32px]] Path Array, but creates App Links instead of regular copies.
 * [[Image:Draft_PointArray.svg|32px]] Point Array: creates an array of objects by placing the copies at certain points.
 * Draft_PointLinkArray.svg Point LinkArray: like [[Image:Draft_PointArray.svg|32px]] Point Array, but creates App Links instead of regular copies.


 * [[Image:Draft_Edit.svg|32px]] Edit: edits a selected object.
 * [[Image:Draft_SubelementHighlight.svg|32px]] Subelement highlight: enters an edit mode that allows editing different objects.


 * [[Image:Draft_Join.svg|32px]] Join: joins lines together into a single wire.
 * [[Image:Draft_Split.svg|32px]] Split: splits a wire into two at a point.
 * [[Image:Draft_Upgrade.svg|32px]] Upgrade: upgrades objects into a higher-level object.
 * [[Image:Draft_Downgrade.svg|32px]] Downgrade: downgrades objects into lower-level objects.


 * [[Image:Draft_WireToBSpline.svg|32px]] Wire to BSpline: converts a wire to a B-Spline and vice-versa.
 * [[Image:Draft_Draft2Sketch.svg|32px]] Draft to Sketch: converts a Draft object to a Sketcher Workbench Sketch and vice-versa.
 * [[Image:Draft_Slope.svg|32px]] Slope: changes the elevation slope of the currently selected Draft Line or Draft Wire.
 * [[Image:Draft_FlipDimension.svg|32px]] Flip Dimension: flips the orientation of the text of a Draft Dimension.


 * [[Image:Draft_Shape2DView.svg|32px]] Shape 2D View: creates a 2D object which is a flattened 2D view of a 3D object.

Obsolete
This command is considered obsolete because the Drawing Workbench is obsolete. However, the command itself is still available.
 * [[Image:Draft_Drawing.svg|32px]] Drawing: writes selected objects to a Drawing Workbench page.

These commands have been removed from the interface.
 * [[Image:Draft_AddPoint.svg|32px]] Add point: adds a point to a wire or B-Spline.
 * [[Image:Draft_DelPoint.svg|32px]] Delete point: deletes a point from a wire or B-Spline.
 * [[Image:Draft_Array.svg|32px]] Array: creates a polar or rectangular array from selected objects.

Draft Tray toolbar
The Draft tray toolbar appears when the workbench is started, and allows selecting the working plane, together with some visual properties like the line color, shape color, text size, line width, and automatic group.


 * [[Image:Draft_SelectPlane.svg|32px]] Working plane: sets a working plane from a standard view or a selected face.
 * [[Image:Draft_ToggleConstructionMode.svg|32px]] Construction mode: toggles the Draft construction mode on or off.
 * [[Image:Draft_ApplyStyle.svg|32px]] Style settings: Set default styles for new objects, and applies the current style and color to selected objects.
 * [[Image:Draft_AutoGroup.svg|32px]] AutoGroup: automatically place new objects in a given Std_Group.svg Std Group, Draft_Layer.svg Draft Layer, or one of the group-like objects of the Arch Workbench, like Arch_BuildingPart.svg Arch BuildingPart.

Draft Snap toolbar
The Draft Snap toolbar allows selecting the currently snapping mode. Its button keep depressed when a mode is active.


 * [[Image:Draft_Snap_Lock.svg|32px]] Toggle snap: toggles object snapping globally on or off.
 * [[Image:Draft_Snap_Endpoint.svg|32px]] Endpoint: snaps to the endpoints of line, arc and spline segments.
 * [[Image:Draft_Snap_Midpoint.svg|32px]] Midpoint: snaps to the middle point of line and arc segments.
 * [[Image:Draft_Snap_Center.svg|32px]] Center: snaps to the center point of arcs and circles.
 * [[Image:Draft_Snap_Angle.svg|32px]] Angle: snaps to the special cardinal points of circles and arcs, at 45° and 90°.
 * [[Image:Draft_Snap_Intersection.svg|32px]] Intersection: snaps to the intersection of two line or arc segments. Hover the mouse over the two desired objects to activate their intersection snaps.
 * [[Image:Draft_Snap_Perpendicular.svg|32px]] Perpendicular: on line and arc segments, snaps perpendicularly to the latest point.
 * [[Image:Draft_Snap_Extension.svg|32px]] Extension: snaps on an imaginary line that extends beyond the endpoints of line segments. Hover the mouse over the desired object to activate its extension snap.
 * [[Image:Draft_Snap_Parallel.svg|32px]] Parallel: snaps on an imaginary line parallel to a line segment. Hover the mouse over the desired object to activate its parallel snap.
 * [[Image:Draft_Snap_Special.svg|32px]] Special: snaps on special points defined by the object.
 * [[Image:Draft_Snap_Near.svg|32px]] Near: snaps to the closest point or edge on the nearest object.
 * [[Image:Draft_Snap_Ortho.svg|32px]] Ortho: snaps on imaginary lines that cross the last point, and extend at 0°, 45° and 90°.
 * [[Image:Draft_Snap_Grid.svg|32px]] Grid: snaps to the intersections of the grid lines, if the grid is visible.
 * [[Image:Draft_Snap_WorkingPlane.svg|32px]] Working plane: always places the snapped point on the current working plane, even if you snap to a point outside that working plane.
 * [[Image:Draft_Snap_Dimensions.svg|32px]] Dimensions: shows temporary X and Y dimensions while snapping.
 * [[Image:Draft_ToggleGrid.svg|32px]] Toggle grid: toggles the visibility of the grid on or off.

实用工具

 * [[Image:Draft_Layer.svg|32px]] Layer: creates a Layer in the current document, to which objects can be added to control object visibility and color. It replaces VisGroup.
 * [[Image:Draft_SetWorkingPlaneProxy.svg|32px]] Working Plane Proxy: create a proxy object to store the current Working Plane position.
 * [[Image:Draft_ToggleDisplayMode.svg|32px]] Toggle display mode: switches the display mode of selected objects between "Flat Lines" and "Wireframe".
 * [[Image:Draft_AddToGroup.svg|32px]] Add to group: quickly adds selected objects to an existing Std Group or Draft VisGroup.
 * [[Image:Draft_SelectGroup.svg|32px]] Select group contents: selects the contents of a selected Std Group or Draft VisGroup.
 * [[Image:Draft_AddConstruction.svg|32px]] Add to Construction group: add selected objects to the Construction group.
 * [[Image:Draft_Heal.svg|32px]] Heal: heals problematic Draft objects found in very old files.

Utility menu
其他工具可从菜单处找到. 或者右击当前的环境菜单（context menu），具体可用工具取决于当前所选对象.


 * [[Image:Draft_ToggleContinueMode.svg|32px]] Toggle continue mode: toggles the Draft continue mode on or off.
 * [[Image:Draft_ShowSnapBar.svg|32px]] Show snap bar: shows or hides the Draft Snap toolbar.

Obsolete
These tools were removed from the interface in v0.19 because they no longer had any purpose.


 * [[Image:Draft_VisGroup.svg|32px]] VisGroup: creates a VisGroup in the current document. This was replaced by [[Image:Draft_Layer.svg|32px]] Layer.
 * [[Image:Draft_FinishLine.svg|32px]] Finish line: ends the drawing of the current Draft Wire or Draft BSpline, without closing it.
 * [[Image:Draft_CloseLine.svg|32px]] Close line: ends the drawing of the current Draft Wire or Draft BSpline, and closes it.
 * [[Image:Draft_UndoLine.svg|32px]] Undo line: undoes the last segment of a Draft Wire.

首选项

 * [[Image:Preferences-draft.svg|32px]] 底图首选项: 针对工作平面与绘制工具的一般设置.
 * [[Image:Preferences-import-export.svg|32px]] 导入-导出首选项: 导入或导出不同格式文件的相关选项.

文件格式
底图模块为FreeCAD提供了下列格式文件的导出、导出服务：


 * Autodesk .DXF: 导入或导出由2D CAD应用程序创建的图形交换文件. 参见FreeCAD and DXF Import.
 * Autodesk .DWG: 在ODA转换器安装完成后，通过DXF导入工具导入或导出DWG文件. 参见FreeCAD and DWG Import.
 * SVG: 导入或导出由矢量绘图应用程序创建的可伸缩矢量图形文件.
 * Open Cad format .OCA: 导入或导出OCA/GCAD文件，这是一种潜在的新式开放CAD文件格式.
 * Airfoil Data Format .DAT: 导入DAT文件，此格式详情可参见Airfoil profiles.

Install importers

 * FreeCAD and DWG Import: Imports and exports DWG files
 * FreeCAD and DXF Import: Imports and exports DXF files

其他功能

 * 底图坐标（Coordinates）: 利用输入坐标的方式取代点击3D视图来定义一个新的点.
 * 底图约束（Constraining）: 限制鼠标指针在相对于前一个点的水平方向或垂直方向上移动.
 * 底图捕捉（Snapping）: 将新添加的点定位于已存在对象上的特定位置或网格上.

Unit tests
Test Workbench.

To run the unit tests of the workbench execute the following from the operating system terminal.

脚本
借助Draft API即可在宏与Python控制台中使用各种底图工具.

The workbench includes a module to create samples of all objects in a new document.

Use this to test that all objects are produced correctly.

Inspecting the code of this module is useful to understand how to use the programming interface.

Where is the toplevel directory where the software was installed; for example, in Linux it may be.



有关教程

 * 底图教程
 * 底图教程（过期）
 * 底图ShapeString教程