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）: 设置一个箭头指向选定元素的标签.

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

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


 * [[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）: 拉伸选定的对象.

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


 * [[Image:Draft_SelectPlane.svg|32px]] Set working plane: sets a working plane from a standard view or a selected face.
 * [[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:Draft_ToggleConstructionMode.svg|32px]] Toggle construction mode: toggles the Draft construction mode on or off.
 * [[Image:Draft_ToggleContinueMode.svg|32px]] Toggle continue mode: toggles the Draft continue mode on or off.
 * [[Image:Draft_ApplyStyle.svg|32px]] Apply style: applies the current style and color to selected objects.
 * [[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_ToggleSnap.svg|32px]] Toggle snap: toggles object snapping on or off.
 * [[Image:Draft_ToggleGrid.svg|32px]] Toggle grid: toggles the visibility of the grid on or off.
 * [[Image:Draft_ShowSnapBar.svg|32px]] Show snap bar: shows or hides the Draft Snap toolbar.
 * [[Image:Draft_Heal.svg|32px]] Heal: heals problematic Draft objects found in very old files.
 * [[Image:Draft_FlipDimension.svg|32px]] Flip Dimension: flips the orientation of the text of a Draft Dimension.
 * [[Image:Draft_VisGroup.svg|32px]] VisGroup: creates a VisGroup in the current document.
 * [[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_Slope.svg|32px]] Slope: changes the elevation slope of the currently selected Draft Line or Draft Wire.
 * [[Image:Draft_AutoGroup.svg|32px]] AutoGroup: automatically place new objects in a given Std Group or Draft VisGroup.
 * [[Image:Draft_SetWorkingPlaneProxy.svg|32px]] Set Working Plane Proxy: create a proxy object to store the current Working Plane position.
 * [[Image:Draft_AddConstruction.svg|32px]] Add to Construction group: add selected objects to the Construction group.

首选项

 * [[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教程