Draft Workbench/zh-cn

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

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

The Draft Workbench also provides tools to define a working plane, a grid, and a snapping system to precisely control the position of geometry.

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



Drafting

 * [[Image:Draft_Line.svg|32px]] Line: creates a straight line.


 * [[Image:Draft_Wire.svg|32px]] Polyline: creates a polyline, a sequence of several connected line segments.


 * [[Image:Draft_Fillet.svg|32px]] Fillet: creates a fillet, a rounded corner, or a chamfer, a straight edge, between two Draft Lines.


 * [[Image:Draft_Arc.svg|32px]] Arc tools


 * [[Image:Draft_Arc.svg|32px]] Arc: creates a circular arc from a center, a radius, a start angle and an aperture angle.


 * [[Image:Draft_Arc_3Points.svg|32px]] Arc by 3 points: creates a circular arc from three points that define its circumference.


 * [[Image:Draft_Circle.svg|32px]] Circle: creates a circle from a center and a radius.


 * [[Image:Draft_Ellipse.svg|32px]] Ellipse: creates an ellipse from two points defining a rectangle in which the ellipse will fit.


 * [[Image:Draft_Rectangle.svg|32px]] Rectangle: creates a rectangle from two points.


 * [[Image:Draft_Polygon.svg|32px]] Polygon: creates a regular polygon from a center and a radius.


 * [[Image:Draft_BSpline.svg|32px]] B-spline: creates a B-spline curve from several points.


 * [[Image:Draft_CubicBezCurve.svg|32px]] Bézier tools


 * [[Image:Draft_CubicBezCurve.svg|32px]] Cubic Bézier curve: creates a Bézier curve of the third degree.


 * [[Image:Draft_BezCurve.svg|32px]] Bézier curve: creates a Bézier curve from several points.


 * [[Image:Draft_Point.svg|32px]] Point: creates a simple point.


 * [[Image:Draft_Facebinder.svg|32px]] Facebinder: creates a surface object from selected faces.


 * [[Image:Draft_ShapeString.svg|32px]] ShapeString: creates a compound shape that represents a text string.


 * [[Image:Draft_Hatch.svg|32px]] Hatch: creates hatches on the planar faces of a selected object.

Annotation

 * [[Image:Draft_Text.svg|32px]] Text: creates a multi-line text at a given point.


 * [[Image:Draft_Dimension.svg|32px]] Dimension: creates a linear dimension, a radial dimension or an angular dimension.


 * [[Image:Draft_Label.svg|32px]] Label: creates a multi-line text with a 2-segment leader line and an arrow.


 * [[Image:Draft_AnnotationStyleEditor.svg|32px]] Annotation styles...: allows you to define styles that affect the visual properties of annotation-like objects.

Modification

 * [[Image:Draft_Move.svg|32px]] Move: moves or copies selected objects from one point to another.


 * [[Image:Draft_Rotate.svg|32px]] Rotate: rotates or copies selected objects around a center point by a given angle.


 * [[Image:Draft_Scale.svg|32px]] Scale: scales or copies selected objects around a base point.


 * [[Image:Draft_Mirror.svg|32px]] Mirror: creates mirrored copies from selected objects.


 * [[Image:Draft_Offset.svg|32px]] Offset: offsets each segment of a selected object over a given distance, or creates an offset copy of the selected object.


 * [[Image:Draft_Trimex.svg|32px]] Trimex: trims or extends a selected object.


 * [[Image:Draft_Stretch.svg|32px]] Stretch: stretches objects by moving selected points.


 * [[Image:Draft_Clone.svg|32px]] Clone: creates linked copies, clones, of selected objects.


 * [[Image:Draft_OrthoArray.svg|32px]] Array tools


 * [[Image:Draft_OrthoArray.svg|32px]] Array: creates an orthogonal array from a selected object. It can optionally create a Link array.


 * Draft_PolarArray.svg Polar array: creates an array from a selected object by placing copies along a circumference. It can optionally create a Link array.


 * Draft_CircularArray.svg Circular array: creates an array from a selected object by placing copies along concentric circumferences. It can optionally create a Link array.


 * [[Image:Draft_PathArray.svg|32px]] Path array: creates an array from a selected object by placing copies along a path.


 * [[Image:Draft_PathLinkArray.svg|32px]] Path Link array: idem, but create a Link array instead of a regular array.


 * [[Image:Draft_PointArray.svg|32px]] Point Array: creates an array from a selected object by placing copies at the points from a point compound.


 * Draft_PointLinkArray.svg Point Link array: idem, but create a Link array instead of a regular array.


 * [[Image:Draft_Edit.svg|32px]] Edit: puts selected objects in Draft Edit mode. In this mode the properties of objects can be edited graphically.


 * [[Image:Draft_SubelementHighlight.svg|32px]] Subelement highlight: temporarily highlights selected objects, or the base objects of selected objects.


 * [[Image:Draft_Join.svg|32px]] Join: joins Draft Lines and Draft Wires into a single wire.


 * [[Image:Draft_Split.svg|32px]] Split: splits a Draft Line or Draft Wire at a specified point or edge.


 * [[Image:Draft_Upgrade.svg|32px]] Upgrade: upgrades selected objects.


 * [[Image:Draft_Downgrade.svg|32px]] Downgrade: downgrades selected objects.


 * [[Image:Draft_WireToBSpline.svg|32px]] Wire to B-spline: converts Draft Wires to Draft BSplines and vice versa.


 * [[Image:Draft_Draft2Sketch.svg|32px]] Draft to Sketch: converts Draft objects to Sketcher Sketches and vice versa.


 * [[Image:Draft_Slope.svg|32px]] Set slope: slopes selected Draft Lines or Draft Wires by increasing, or decreasing, the Z coordinate of all points after the first one.


 * [[Image:Draft_FlipDimension.svg|32px]] Flip dimension: rotates the dimension text of selected Draft Dimensions 180° around the dimension line.


 * [[Image:Draft_Shape2DView.svg|32px]] Shape 2D view: creates 2D projections from selected objects.

Draft Tray
The Draft Tray allows selecting the working plane, defining style settings, toggling construction mode, and specifying the active layer or group.




 * [[Image:Draft_tray_button_plane.png]] Select Plane: selects the current Draft working plane. Also available in the menu:.


 * [[Image:Draft_tray_button_style.png]] Set style: sets the default style for new objects. Also available in the menu:.


 * [[Image:Draft_tray_button_construction.png]] Toggle construction mode: switches Draft construction mode on or off. Also available in the menu:.


 * [[Image:Draft_tray_button_layer.png]] AutoGroup: changes the active Draft Layer or, optionally, the active Std Group or group-like Arch object.

Draft annotation scale widget
With the Draft annotation scale widget the Draft annotation scale can be specified.



Draft snap widget
The Draft snap widget can be used as an alternative for the Draft Snap toolbar.



Draft Snap toolbar
The Draft Snap toolbar allows selecting the active snap options. The buttons belonging to active options stay depressed. For general information about snapping see: Draft Snap.


 * [[Image:Draft_Snap_Lock.svg|32px]] Snap Lock: enables or disables snapping globally.


 * [[Image:Draft_Snap_Endpoint.svg|32px]] Snap Endpoint: snaps to the endpoints of edges.


 * [[Image:Draft_Snap_Midpoint.svg|32px]] Snap Midpoint: snaps to the midpoint of straight and circular edges.


 * [[Image:Draft_Snap_Center.svg|32px]] Snap Center: snaps to the center point of faces and circular edges, and to the point of Draft WorkingPlaneProxies and Arch BuildingParts.


 * [[Image:Draft_Snap_Angle.svg|32px]] Snap Angle: snaps to the special cardinal points on circular edges, at multiples of 30° and 45°.


 * [[Image:Draft_Snap_Intersection.svg|32px]] Snap Intersection: snaps to the intersection of two edges.


 * [[Image:Draft_Snap_Perpendicular.svg|32px]] Snap Perpendicular: snaps to the perpendicular point on edges.


 * [[Image:Draft_Snap_Extension.svg|32px]] Snap Extension: snaps to an imaginary line that extends beyond the endpoints of straight edges.


 * [[Image:Draft_Snap_Parallel.svg|32px]] Snap Parallel: snaps to an imaginary line parallel to straight edges.


 * [[Image:Draft_Snap_Special.svg|32px]] Snap Special: snaps to special points defined by the object.


 * [[Image:Draft_Snap_Near.svg|32px]] Snap Near: snaps to the nearest point on faces or edges.


 * [[Image:Draft_Snap_Ortho.svg|32px]] Snap Ortho: snaps to imaginary lines that cross the previous point at 0°, 45°, 90° and 135°.


 * [[Image:Draft_Snap_Grid.svg|32px]] Snap Grid: snaps to the intersections of grid lines.


 * [[Image:Draft_Snap_WorkingPlane.svg|32px]] Snap WorkingPlane: projects the snap point onto the current working plane.


 * [[Image:Draft_Snap_Dimensions.svg|32px]] Snap Dimensions: shows temporary X and Y dimensions.


 * [[Image:Draft_ToggleGrid.svg|32px]] Toggle Grid: switches the grid on or off.

实用工具

 * [[Image:Draft_Layer.svg|32px]] Layer: creates a Draft Layer.


 * [[Image:Draft_AddNamedGroup.svg|32px]] Add a new named group: creates a named Std Group and moves selected objects to that group.


 * [[Image:Draft_AddToGroup.svg|32px]] Move to group...: moves objects to a Std Group. It can also ungroup objects.


 * [[Image:Draft_SelectGroup.svg|32px]] Select group: selects the content of Draft Layers, Std Groups or group-like Arch objects.


 * [[Image:Draft_AddConstruction.svg|32px]] Add to Construction group: moves objects to the Draft construction group.


 * [[Image:Draft_ToggleDisplayMode.svg|32px]] Toggle normal/wireframe display: switches the property of selected objects between  and.


 * [[Image:Draft_WorkingPlaneProxy.svg|32px]] Create working plane proxy: creates a working plane proxy to save the current Draft working plane.

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


 * [[Image:Draft_ApplyStyle.svg|32px]] Apply current style: applies the current style settings to selected objects.


 * [[Image:Draft_Heal.svg|32px]] Heal: heals problematic Draft objects found in very old files.


 * [[Image:Draft_ToggleContinueMode.svg|32px]] Toggle continue mode: switches continue mode on or off.


 * [[Image:Draft_ShowSnapBar.svg|32px]] Show snap toolbar: shows the Draft Snap toolbar.

其他功能

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

Tree view context menu
The following additional options are available in the Tree view context menu:

Default options
If there is an active document the context menu contains one additional sub-menu:
 * : a subset of the tools available in the main Draft Utilities menu.

Wire options
For a Draft Wire, Draft BSpline, Draft CubicBezCurve and Draft BezCurve this additional option is available:


 * [[Image:Draft_Edit.svg|32px]] Flatten this wire: flattens the wire based on its internal geometry. This option currently does not work properly.

Layer container options
For a Draft LayerContainer these additional options are available:


 * [[Image:Draft_Layer.svg|32px]] Merge layer duplicates: merges all layers with the same base label. This does not work in FreeCAD version 0.19.


 * [[Image:Draft_NewLayer.svg|32px]] Add new layer: adds a new layer to the current document.

Layer options
For a Draft Layer these additional options are available:


 * [[Image:button_right.svg|32px]] Activate this layer: activates the selected layer.


 * [[Image:Draft_SelectGroup.svg|32px]] Select layer contents: selects the objects inside the selected layer.

Working plane proxy options
For a Draft WorkingPlaneProxy these additional options are available:


 * [[Image:Draft_SelectPlane.svg|32px]] Write camera position: updates the property of the working plane proxy with the current 3D view camera settings.


 * [[Image:Draft_SelectPlane.svg|32px]] Write objects state: updates the property of the working plane proxy with the current visibility state of objects in the document.

3D view context menu
The following additional options are available in the 3D view context menu:

Default options
If there is an active document the context menu contains one additional sub-menu:
 * : a subset of the tools available in the main Draft Utilities menu.

Obsolete tools
These commands are obsolete but still available:


 * [[Image:Draft_Array.svg|32px]] Array: creates an orthogonal array from a selected object. The created array can be turned into a polar array or a circular array by changing its property.


 * [[Image:Draft_Drawing.svg|32px]] Drawing: inserts views of selected objects into a drawing page.

首选项

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


 * [[Image:Preferences-import-export.svg|32px]] Import Export Preferences: preferences available for importing from and exporting to different file formats.

文件格式
底图模块为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.

Unit tests
See also: 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 can help to understand the programming interface.

有关教程

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