Draft Workbench: Difference between revisions

From FreeCAD Documentation
(Test with <span id="Arc_tools">Arc tools</span>)
mNo edit summary
(31 intermediate revisions by 5 users not shown)
Line 5: Line 5:
{{Docnav
{{Docnav
|[[Arch_Workbench|Arch Workbench]]
|[[Arch_Workbench|Arch Workbench]]
|[[Drawing_Workbench|Drawing Workbench]]
|[[FEM_Workbench|FEM Workbench]]
|IconL=Workbench_Arch.svg
|IconL=Workbench_Arch.svg
|IconR=Workbench_Drawing.svg
|IconR=Workbench_FEM.svg
}}
}}


Line 45: Line 45:


<!--T:113-->
<!--T:113-->
* [[Image:Draft_Wire.svg|32px]] [[Draft_Wire|Polyline]]: creates a polyline, a sequence of several connected line segments.
* [[Image:Draft_Wire.svg|32px]] [[Draft_Wire|Polyline]]: creates a polyline (also called wire), a sequence of several connected line segments.


<!--T:114-->
<!--T:114-->
* [[Image:Draft_Fillet.svg|32px]] [[Draft_Fillet|Fillet]]: creates a fillet, a rounded corner, or a chamfer, a straight edge, between two [[Draft_Line|Draft Lines]]. {{Version|0.19}}
* [[Image:Draft_Fillet.svg|32px]] [[Draft_Fillet|Fillet]]: creates a fillet, a rounded corner, or a chamfer, a straight edge, between two [[Draft_Line|Draft Lines]].


<!--T:115-->
<!--T:194-->
* <span id="Draft_ArcTools">[[Image:Draft_Arc.svg|x32px]][[Image:Toolbar_flyout_arrow_blue_background.svg|x32px]] Arc tools:</span><!--Do not edit span id: the Draft_ArcTools pages redirect here-->
* [[Image:Draft_Arc.svg|32px]] <span id="Arc_tools">Arc tools</span>


<!--T:116-->
<!--T:116-->
Line 57: Line 57:


<!--T:117-->
<!--T:117-->
:* [[Image:Draft_Arc_3Points.svg|32px]] [[Draft_Arc_3Points|Arc by 3 points]]: creates a circular arc from three points that define its circumference. {{Version|0.19}}
:* [[Image:Draft_Arc_3Points.svg|32px]] [[Draft_Arc_3Points|Arc by 3 points]]: creates a circular arc from three points that define its circumference.


<!--T:118-->
<!--T:118-->
Line 74: Line 74:
* [[Image:Draft_BSpline.svg|32px]] [[Draft_BSpline|B-spline]]: creates a B-spline curve from several points.
* [[Image:Draft_BSpline.svg|32px]] [[Draft_BSpline|B-spline]]: creates a B-spline curve from several points.


<!--T:123-->
<!--T:195-->
* [[Image:Draft_CubicBezCurve.svg|32px]] Bézier tools
* <span id="Draft_BezierTools">[[Image:Draft_CubicBezCurve.svg|x32px]][[Image:Toolbar_flyout_arrow_blue_background.svg|x32px]] Bézier tools:</span><!--Do not edit span id: the Draft_BezierTools pages redirect here-->


<!--T:124-->
<!--T:124-->
:* [[Image:Draft_CubicBezCurve.svg|32px]] [[Draft_CubicBezCurve|Cubic Bézier curve]]: creates a Bézier curve of the third degree. {{Version|0.19}}
:* [[Image:Draft_CubicBezCurve.svg|32px]] [[Draft_CubicBezCurve|Cubic Bézier curve]]: creates a Bézier curve of the third degree.


<!--T:125-->
<!--T:125-->
Line 107: Line 107:


<!--T:133-->
<!--T:133-->
* [[Image:Draft_AnnotationStyleEditor.svg|32px]] [[Draft_AnnotationStyleEditor|Annotation styles...]]: allows you to define styles that affect the visual properties of annotation-like objects. {{Version|0.19}}
* [[Image:Draft_AnnotationStyleEditor.svg|32px]] [[Draft_AnnotationStyleEditor|Annotation styles...]]: allows you to define styles that affect the visual properties of annotation-like objects.


== Modification == <!--T:134-->
== Modification == <!--T:134-->
Line 135: Line 135:
* [[Image:Draft_Clone.svg|32px]] [[Draft_Clone|Clone]]: creates linked copies, clones, of selected objects.
* [[Image:Draft_Clone.svg|32px]] [[Draft_Clone|Clone]]: creates linked copies, clones, of selected objects.


<!--T:143-->
<!--T:196-->
* [[Image:Draft_OrthoArray.svg|32px]] Array tools
* <span id="Draft_ArrayTools">[[Image:Draft_OrthoArray.svg|x32px]][[Image:Toolbar_flyout_arrow_blue_background.svg|x32px]] Array tools:</span><!--Do not edit span id: the Draft_ArrayTools pages redirect here-->


<!--T:144-->
<!--T:144-->
:* [[Image:Draft_OrthoArray.svg|32px]] [[Draft_OrthoArray|Array]]: creates an orthogonal array from a selected object. It can optionally create a [[App_Link|Link]] array. {{Version|0.19}}
:* [[Image:Draft_OrthoArray.svg|32px]] [[Draft_OrthoArray|Array]]: creates an orthogonal array from a selected object. It can optionally create a [[App_Link|Link]] array.


<!--T:145-->
<!--T:145-->
:* [[File:Draft_PolarArray.svg|32px]] [[Draft_PolarArray|Polar array]]: creates an array from a selected object by placing copies along a circumference. It can optionally create a [[App_Link|Link]] array. {{Version|0.19}}
:* [[File:Draft_PolarArray.svg|32px]] [[Draft_PolarArray|Polar array]]: creates an array from a selected object by placing copies along a circumference. It can optionally create a [[App_Link|Link]] array.


<!--T:146-->
<!--T:146-->
:* [[File:Draft_CircularArray.svg|32px]] [[Draft_CircularArray|Circular array]]: creates an array from a selected object by placing copies along concentric circumferences. It can optionally create a [[App_Link|Link]] array. {{Version|0.19}}
:* [[File:Draft_CircularArray.svg|32px]] [[Draft_CircularArray|Circular array]]: creates an array from a selected object by placing copies along concentric circumferences. It can optionally create a [[App_Link|Link]] array.


<!--T:147-->
<!--T:147-->
Line 151: Line 151:


<!--T:148-->
<!--T:148-->
:* [[Image:Draft_PathLinkArray.svg|32px]] [[Draft_PathLinkArray|Path Link array]]: idem, but create a [[App_Link|Link]] array instead of a regular array. {{Version|0.19}}
:* [[Image:Draft_PathLinkArray.svg|32px]] [[Draft_PathLinkArray|Path Link array]]: idem, but create a [[App_Link|Link]] array instead of a regular array.


<!--T:149-->
<!--T:149-->
Line 157: Line 157:


<!--T:150-->
<!--T:150-->
:* [[File:Draft_PointLinkArray.svg|32px]] [[Draft_PointLinkArray|Point Link array]]: idem, but create a [[App_Link|Link]] array instead of a regular array. {{Version|0.19}}
:* [[File:Draft_PointLinkArray.svg|32px]] [[Draft_PointLinkArray|Point Link array]]: idem, but create a [[App_Link|Link]] array instead of a regular array.


<!--T:151-->
<!--T:151-->
Line 205: Line 205:


<!--T:76-->
<!--T:76-->
* [[Image:Draft_tray_button_style.png]] [[Draft_SetStyle|Set style]]: sets the default style for new objects. Also available in the menu: {{MenuCommand|Draft → Utilities → [[Image:Draft_SetStyle.svg|16px]] Set style}}. {{Version|0.19}}
* [[Image:Draft_tray_button_style.png]] [[Draft_SetStyle|Set style]]: sets the default style for new objects. Also available in the menu: {{MenuCommand|Draft → Utilities → [[Image:Draft_SetStyle.svg|16px]] Set style}}.


<!--T:77-->
<!--T:77-->
Line 216: Line 216:


<!--T:70-->
<!--T:70-->
With the [[Draft_annotation_scale_widget|Draft annotation scale widget]] the Draft annotation scale can be specified. {{Version|0.19}}
With the [[Draft_annotation_scale_widget|Draft annotation scale widget]] the Draft annotation scale can be specified.


</translate>
</translate>
Line 225: Line 225:


<!--T:73-->
<!--T:73-->
The [[Draft_snap_widget|Draft snap widget]] can be used as an alternative for the [[#Draft_Snap_toolbar|Draft Snap toolbar]]. {{Version|0.19}}
The [[Draft_snap_widget|Draft snap widget]] can be used as an alternative for the [[#Draft_snap_toolbar|Draft snap toolbar]].


</translate>
</translate>
Line 231: Line 231:
<translate>
<translate>


== Draft Snap toolbar == <!--T:60-->
== Draft snap toolbar == <!--T:60-->


<!--T:61-->
<!--T:61-->
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|Draft Snap]].
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|Draft Snap]].


<!--T:162-->
<!--T:162-->
Line 255: Line 255:


<!--T:168-->
<!--T:168-->
* [[Image:Draft_Snap_Perpendicular.svg|32px]] [[Draft_Snap_Perpendicular|Snap Perpendicular]]: snaps to the perpendicular point on edges.
* [[Image:Draft_Snap_Perpendicular.svg|32px]] [[Draft_Snap_Perpendicular|Snap Perpendicular]]: snaps to the perpendicular points on faces ({{Version|0.21}}) and edges.


<!--T:169-->
<!--T:169-->
Line 267: Line 267:


<!--T:172-->
<!--T:172-->
* [[Image:Draft_Snap_Near.svg|32px]] [[Draft_Snap_Near|Snap Near]]: snaps to the nearest point on faces or edges.
* [[Image:Draft_Snap_Near.svg|32px]] [[Draft_Snap_Near|Snap Near]]: snaps to the nearest point on faces and edges.


<!--T:173-->
<!--T:173-->
* [[Image:Draft_Snap_Ortho.svg|32px]] [[Draft_Snap_Ortho|Snap Ortho]]: snaps to imaginary lines that cross the previous point at 0°, 45°, 90° and 135°.
* [[Image:Draft_Snap_Ortho.svg|32px]] [[Draft_Snap_Ortho|Snap Ortho]]: snaps to imaginary lines that cross the previous point at multiples of 45°.


<!--T:174-->
<!--T:174-->
Line 276: Line 276:


<!--T:175-->
<!--T:175-->
* [[Image:Draft_Snap_WorkingPlane.svg|32px]] [[Draft_Snap_WorkingPlane|Snap WorkingPlane]]: projects the snap point onto the current [[Draft_SelectPlane|working plane]].
* [[Image:Draft_Snap_WorkingPlane.svg|32px]] [[Draft_Snap_WorkingPlane|Snap WorkingPlane]]: projects snap points onto the current [[Draft_SelectPlane|working plane]].


<!--T:176-->
<!--T:176-->
Line 286: Line 286:
== Draft utility tools toolbar == <!--T:22-->
== Draft utility tools toolbar == <!--T:22-->


<!--T:178-->
<!--T:201-->
* [[Image:Draft_Layer.svg|32px]] [[Draft_Layer|Layer]]: creates a [[Draft_Layer|Draft Layer]]. {{Version|0.19}}
* [[Image:Draft_LayerManager.svg|32px]] [[Draft_LayerManager|Manage layers...]]: allows to manage the layers in a document. {{Version|0.21}}


<!--T:191-->
<!--T:191-->
Line 314: Line 314:
<!--T:186-->
<!--T:186-->
* [[Image:Draft_ApplyStyle.svg|32px]] [[Draft_ApplyStyle|Apply current style]]: applies the current style settings to selected objects.
* [[Image:Draft_ApplyStyle.svg|32px]] [[Draft_ApplyStyle|Apply current style]]: applies the current style settings to selected objects.

<!--T:178-->
* [[Image:Draft_Layer.svg|32px]] [[Draft_Layer|Layer]]: creates a [[Draft_Layer|Draft Layer]]. Available in the [[Draft_Workbench#Draft_utility_tools_toolbar|Draft utility tools toolbar]] in {{VersionMinus|0.20}}.


<!--T:184-->
<!--T:184-->
Line 322: Line 325:


<!--T:187-->
<!--T:187-->
* [[Image:Draft_ShowSnapBar.svg|32px]] [[Draft_ShowSnapBar|Show snap toolbar]]: shows the [[#Draft_Snap_toolbar|Draft Snap toolbar]].
* [[Image:Draft_ShowSnapBar.svg|32px]] [[Draft_ShowSnapBar|Show snap toolbar]]: shows the [[#Draft_snap_toolbar|Draft snap toolbar]].


== Additional features == <!--T:6-->
== Additional features == <!--T:6-->
Line 339: Line 342:


=== Default options === <!--T:192-->
=== Default options === <!--T:192-->

<!--T:197-->
For most Draft objects the following option is available:

<!--T:198-->
* Edit: edits the object. Depending on the object type either [[Draft_Edit|Draft Edit]] or a dedicated edit solution is used. {{Version|0.21}}

<!--T:199-->
If there is an active document the context menu contains an additional sub-menu:


<!--T:82-->
<!--T:82-->
* Utilities: a subset of the tools available in the main Draft Utilities menu.
If there is an active document the context menu contains one additional sub-menu:
* {{MenuCommand|Utilities}}: a subset of the tools available in the main Draft Utilities menu.


=== Wire options === <!--T:83-->
=== Wire options === <!--T:83-->


<!--T:84-->
<!--T:84-->
For a [[Draft_Wire|Draft Wire]], [[Draft_BSpline|Draft BSpline]], [[Draft_CubicBezCurve|Draft CubicBezCurve]] and [[Draft_BezCurve|Draft BezCurve]] this additional option is available:
For a [[Draft_Line|Draft Line]] and a [[Draft_Wire|Draft Wire]] this additional option is available:


<!--T:85-->
<!--T:85-->
* [[Image:Draft_Edit.svg|32px]] Flatten this wire: flattens the wire based on its internal geometry. This option currently does not work properly.
* [[Image:Draft_Edit.svg|32px]] Flatten: flattens the wire on the current [[Draft_SelectPlane|Draft working plane]]. This option does not work properly in {{VersionMinus|0.19}}.


=== Layer container options === <!--T:86-->
=== Layer container options === <!--T:86-->
Line 358: Line 369:


<!--T:88-->
<!--T:88-->
* [[Image:Draft_Layer.svg|32px]] [[Draft_Layer#Layer_container_options|Merge layer duplicates]]: merges all layers with the same base label. This does not work in FreeCAD version 0.19.
* [[Image:Draft_Layer.svg|32px]] [[Draft_Layer#Layer_container_options|Merge layer duplicates]]: merges all layers with the same base label.


<!--T:89-->
<!--T:89-->
Line 392: Line 403:
=== Default options === <!--T:193-->
=== Default options === <!--T:193-->


<!--T:101-->
<!--T:200-->
If there is an active document the context menu contains one additional sub-menu:
If there is an active document the context menu contains one additional sub-menu:
* {{MenuCommand|Utilities}}: a subset of the tools available in the main Draft Utilities menu.


== Obsolete tools == <!--T:65-->
<!--T:101-->
* Utilities: a subset of the tools available in the main Draft Utilities menu.


<!--T:66-->
== Obsolete tools == <!--T:65-->
These commands are obsolete but still available:


<!--T:67-->
<!--T:67-->
* [[Image:Draft_Array.svg|32px]] [[Draft_Array|Array]]: creates an orthogonal array from a selected object. The created array can be turned into a [[Draft_PolarArray|polar array]] or a [[Draft_CircularArray|circular array]] by changing its {{PropertyData|Array Type}} property. {{Obsolete|0.19}}
* [[Image:Draft_Array.svg|32px]] [[Draft_Array|Array]]: creates an orthogonal array from a selected object. The created array can be turned into a [[Draft_PolarArray|polar array]] or a [[Draft_CircularArray|circular array]] by changing its {{PropertyData|Array Type}} property. Not available in {{VersionPlus|0.21}}.


<!--T:104-->
<!--T:104-->
* [[Image:Draft_Drawing.svg|32px]] [[Draft_Drawing|Drawing]]: inserts views of selected objects into a [[Drawing_Workbench|drawing]] page. {{Obsolete|0.17}}
* [[Image:Draft_Drawing.svg|32px]] [[Draft_Drawing|Drawing]]: inserts views of selected objects into a [[Drawing_Workbench|drawing]] page. Not available in {{VersionPlus|0.21}}.


== Preferences == <!--T:25-->
== Preferences == <!--T:25-->
Line 447: Line 457:


<!--T:42-->
<!--T:42-->
The workbench includes a module to create samples of all objects in a new document. {{Version|0.19}}
The workbench includes a module to create samples of all objects in a new document.


<!--T:43-->
<!--T:43-->
Line 472: Line 482:
{{Docnav
{{Docnav
|[[Arch_Workbench|Arch Workbench]]
|[[Arch_Workbench|Arch Workbench]]
|[[Drawing_Workbench|Drawing Workbench]]
|[[FEM_Workbench|FEM Workbench]]
|IconL=Workbench_Arch.svg
|IconL=Workbench_Arch.svg
|IconR=Workbench_Drawing.svg
|IconR=Workbench_FEM.svg
}}
}}



Revision as of 08:35, 20 May 2023

Draft workbench icon

Introduction

The Draft Workbench is primarily focused on the creation and modification of 2D objects in FreeCAD. But it is not restricted to the XY plane of the global coordinate system. Its objects can have any orientation and position in 3D space, and some Draft objects can either be planar or non-planar.

Draft objects can be used for general drafting, similar to what can be done with Inkscape or AutoCAD. But they can also form the base for the creation of 3D objects in other workbenches. A Draft Wire may define the path of an Arch Wall, a Draft Polygon can be extruded with Part Extrude, etc. Many of the Draft modifier tools can be applied to 2D and 3D objects created with other workbenches as well. You can, for example, move a Sketch or create a Draft OrthoArray from a Part object.

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

If your primary goal is the production of complex 2D drawings and DXF files, and you don't need 3D modelling, FreeCAD may not be the right choice for you. You may wish to consider a dedicated software program for technical drafting instead, such as LibreCAD or QCad.

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 tools:
  • 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.
  • Bézier tools:
  • Point: creates a simple point.
  • Facebinder: creates a surface object from selected faces.
  • ShapeString: creates a compound shape that represents a text string.

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.
  • Array tools:
  • Array: creates an orthogonal array from a selected object. It can optionally create a Link array.
  • 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.
  • Point Array: creates an array from a selected object by placing copies at the points from a point compound.
  • 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.
  • Upgrade: upgrades 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: selects 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.

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 Angle: snaps to the special cardinal points on circular edges, at multiples of 30° and 45°.
  • 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.

Draft utility tools toolbar

Additional tools

The Draft → Utilities menu contains several tools. Most of them can also be accessed from toolbars or the Draft Tray and have already been mentioned above. For the following tools this is not the case:

  • Heal: heals problematic Draft objects found in very old files.

Additional features

  • Working plane: the plane in the 3D view where new Draft objects are created.
  • Snapping: select exact geometric points on, or defined by, existing objects or the grid.
  • Constraining: for each subsequent point you can constrain the movement of the cursor to the X, Y, or Z direction.
  • Construction mode: places new Draft objects in a dedicated group making it easier to hide or delete them.
  • Pattern: Draft objects with a DataMake Face property can display an SVG pattern instead of a solid face color.

Tree view context menu

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

Default options

For most Draft objects the following option is available:

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.

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.

Layer container options

For a Draft LayerContainer these additional options are available:

Layer options

For a Draft Layer these additional options are available:

Working plane proxy options

For a Draft WorkingPlaneProxy these additional options are available:

  • Write objects state: updates the ViewVisibility Map 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:

  • Utilities: a subset of the tools available in the main Draft Utilities menu.

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 DataArray 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.

Preferences

  • Preferences: general preferences for the Draft Workbench.

File formats

The Draft Workbench provides FreeCAD with importers and exporters for several file formats. These are used by the Std Import and Std Export commands.

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

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

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