底图模块
Introduction
简介
您可以利用底图工作台来绘制简单的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以及其他类似程序。
The image shows the grid aligned with the XY plane.
On the left, in white, several planar objects.
On the right a non-planar Draft Wire used as the Path Object of a Draft PathArray.
Drafting
Line: creates a straight line.
Polyline: creates a polyline (also called wire), a sequence of several connected line segments.
Fillet: creates a fillet, a rounded corner, or a chamfer, a straight edge, between two Draft Lines.
Arc: creates a circular arc from a center, a radius, a start angle and an aperture angle.
Arc by 3 points: creates a circular arc from three points that define its circumference.
Circle: creates a circle from a center and a radius.
Ellipse: creates an ellipse from two points defining a rectangle in which the ellipse will fit.
Rectangle: creates a rectangle from two points.
Polygon: creates a regular polygon from a center and a radius.
B-spline: creates a B-spline curve from several points.
Cubic Bézier curve: creates a Bézier curve of the third degree.
Bézier curve: creates a Bézier curve from several points.
Point: creates a simple point.
Facebinder: creates a surface object from selected faces.
Shape from text: creates a compound shape that represents a text string.
Hatch: creates hatches on the planar faces of a selected object. introduced in version 0.20
Annotation
Text: creates a multi-line text at a given point.
Dimension: creates a linear dimension, a radial dimension or an angular dimension.
Label: creates a multi-line text with a 2-segment leader line and an arrow.
Annotation styles...: allows you to define styles that affect the visual properties of annotation-like objects.
Modification
Move: moves or copies selected objects from one point to another.
Rotate: rotates or copies selected objects around a center point by a given angle.
Scale: scales or copies selected objects around a base point.
Mirror: creates mirrored copies from selected objects.
Offset: offsets each segment of a selected object over a given distance, or creates an offset copy of the selected object.
Trimex: trims or extends a selected object.
Stretch: stretches objects by moving selected points.
Clone: creates linked copies, clones, of selected objects.
Polar array: creates an array from a selected object by placing copies along a circumference. It can optionally create a Link array.
Circular array: creates an array from a selected object by placing copies along concentric circumferences. It can optionally create a Link array.
Path array: creates an array from a selected object by placing copies along a path.
Path link array: idem, but create a Link array instead of a regular array.
Point array: creates an array from a selected object by placing copies at the points from a point compound.
Point link array: idem, but create a Link array instead of a regular array.
Edit: puts selected objects in Draft Edit mode. In this mode the properties of objects can be edited graphically.
Subelement highlight: temporarily highlights selected objects, or the base objects of selected objects.
Join: joins Draft Lines and Draft Wires into a single wire.
Split: splits a Draft Line or Draft Wire at a specified point or edge.
Upgrade: upgrades selected objects.
Downgrade: downgrades selected objects.
Wire to B-spline: converts Draft Wires to Draft BSplines and vice versa.
Draft to sketch: converts Draft objects to Sketcher Sketches and vice versa.
Set slope: slopes selected Draft Lines or Draft Wires by increasing, or decreasing, the Z coordinate of all points after the first one.
Flip dimension: rotates the dimension text of selected Draft Dimensions 180° around the dimension line.
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.
Select plane: defines the current Draft working plane. Also available in the menu: Draft → Utilities →
Select Plane.
Set style: sets the default style for new objects. Also available in the menu: Draft → Utilities →
Set style.
Toggle construction mode: switches Draft construction mode on or off. Also available in the menu: Draft → Utilities →
Toggle construction mode.
AutoGroup: changes the active Draft Layer or, optionally, the active Std Group or group-like BIM 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.
Snap lock: enables or disables snapping globally.
Snap endpoint: snaps to the endpoints of edges.
Snap midpoint: snaps to the midpoint of edges.
Snap center: snaps to the center point of faces and circular edges, and to the 数据Placement point of Draft WorkingPlaneProxies and Arch BuildingParts.
Snap angle: snaps to the special cardinal points on circular edges, at multiples of 30° and 45°.
Snap intersection: snaps to the intersection of two edges.
Snap perpendicular: snaps to the perpendicular points on faces (introduced in version 0.21) and edges.
Snap extension: snaps to an imaginary line that extends beyond the endpoints of straight edges.
Snap parallel: snaps to an imaginary line parallel to straight edges.
Snap special: snaps to special points defined by the object.
Snap near: snaps to the nearest point on faces and edges.
Snap ortho: snaps to imaginary lines that cross the previous point at multiples of 45°.
Snap grid: snaps to the intersections of grid lines.
Snap working plane: projects snap points onto the current working plane.
Snap dimensions: shows temporary X and Y dimensions.
Toggle grid: changes the visibility of the grid.
实用工具
Manage layers...: allows to manage the layers in a document. introduced in version 0.21
Add a new named group: creates a named Std Group and moves selected objects to that group. introduced in version 0.20
Move to group...: moves objects to a Std Group. It can also ungroup objects.
Select group: selects the contents of Std Groups or group-like BIM objects.
Add to construction group: moves objects to the Draft construction group.
Toggle normal/wireframe display: switches the 视图Display Mode property of selected objects between
Flat Lines
andWireframe
.
Create working plane proxy: creates a working plane proxy to save the current Draft working plane.
Additional tools
其他工具可从Draft → Utilities菜单处找到。或者右击当前的环境菜单(context menu),具体可用工具取决于当前所选对象。
Apply current style: applies the current style settings to selected objects.
Layer: creates a Draft Layer. Available in the Draft utility tools toolbar in version 0.20 and below.
Heal: heals problematic Draft objects found in very old files.
Show snap toolbar: shows the Draft snap toolbar.
其他功能
- 底图坐标: 利用输入坐标的方式取代点击3D视图来定义一个新的点。
- 底图约束(Constraining): 限制鼠标指针在相对于前一个点的水平方向或垂直方向上移动。
- 底图捕捉(Snapping): 将新添加的点定位于已存在对象上的特定位置或网格上。
The following additional options are available in the Tree view context menu:
Default options
For most Draft objects the following option is available:
- Edit: edits the object. Depending on the object type either Draft Edit or a dedicated edit solution is used. introduced in version 0.21
If there is an active document the context menu contains an additional sub-menu:
- Utilities: a subset of the tools available in the main Draft Utilities menu.
Layer container options
For a Draft LayerContainer these additional options are available:
Merge layer duplicates: merges all layers with the same base label.
Add new layer: adds a new layer to the current document.
Layer options
For a Draft Layer these additional options are available:
Activate this layer: activates the selected layer.
Select layer contents: selects the objects inside the selected layer.
Text options
For a Draft Text and a Draft Label that contains one or more hyperlinks, to a local or remote file or an URL, this additional option is available:
- Open hyperlinks: the hyperlinks are opened in the appropriate application (as defined by the OS). There is a warning in the case of multiple hyperlinks. introduced in version 1.0
Wire options
For a Draft Line and a Draft Wire this additional option is available:
Flatten: flattens the wire on the current Draft working plane. This option does not work properly in version 0.19 and below.
Working plane proxy options
For a Draft WorkingPlaneProxy these additional options are available:
Write camera position: updates the 视图View Data property of the working plane proxy with the current 3D view camera settings.
Write objects state: updates the 视图Visibility Map property of the working plane proxy with the current visibility state of objects in the document.
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:
- Utilities: a subset of the tools available in the main Draft Utilities menu.
Text options
See above.
Obsolete tools
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 数据Array Type property. Not available in version 0.21 and above.
Drawing: inserts views of selected objects into a drawing page. Not available in version 0.21 and above.
Toggle continue mode: switches continue mode on or off. Not available in version 1.0 and above.
首选项
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:
freecad -t TestDraft
脚本
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:
import drafttests.draft_test_objects as dto
doc = dto.create_test_file()
Inspecting the code of this module can help to understand the programming interface.
Tutorials
有关教程
- 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

- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub