Draft Module/zh-cn

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

The created 2D objects can be used for general drafting in a way similar to Inkscape or Autocad. These 2D shapes can also be used as the base components of 3D objects created with other workbenches, for example, the Part and Arch Workbenches. Conversion of Draft objects to Sketches is also possible, which means that the shapes can also be used with the PartDesign Workbench for the creation of solid bodies.

FreeCAD is primarily a 3D modelling application, and thus its 2D tools aren't as advanced as in other drawing programs. If your primary goal is the production of complex 2D drawings and DXF files, and you don't need 3D modelling, you may wish to consider a dedicated software program for technical drafting such as LibreCAD, QCad, TurboCad, and others.



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


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

Utility tools
Additional tools available from the menu, or via the right-click context menu, depending on the selected object.


 * [[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_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.

Preferences

 * [[Image:Preferences-draft.svg|32px]] Preferences: general preferences for the working plane and the drawing tools.
 * [[Image:Preferences-import-export.svg|32px]] Import-Export Preferences: preferences available for importing from and exporting to different file formats.

File formats
The Draft module provides FreeCAD with importers and exporters for the following file formats:


 * Autodesk .DXF: imports and exports Drawing Exchange Format files created with 2D CAD applications. See also FreeCAD and DXF Import.
 * Autodesk .DWG: imports and exports DWG files via the DXF importer, when the ODA Converter utility is installed. See also FreeCAD and DWG Import.
 * SVG: imports and exports Scalable Vector Graphics files created with vector drawing applications.
 * Open Cad format .OCA: imports and exports OCA/GCAD files, a potentially new open CAD file format.
 * Airfoil Data Format .DAT: imports DAT files describing Airfoil profiles.

Additional features

 * Coordinates: enter coordinates instead of clicking on the 3D view to define a new point.
 * Constraining: limit the pointer to horizontal or vertical movements relative to a previous point.
 * Snapping: place new points on special places on existing objects or on the grid.

Scripting
The Draft tools can be used in macros and from the Python console by using the Draft API.

Tutorials

 * Draft tutorial
 * Draft tutorial Outdated
 * Draft ShapeString tutorial