Draft Edit: Difference between revisions

From FreeCAD Documentation
(Alt + Left click)
No edit summary
 
(132 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:16-->
<!--T:16-->
{{Docnav
{{Docnav
|[[Draft_PointLinkArray|PointLinkArray]]
|[[Draft_Scale|Scale]]
|[[Draft_SubelementHighlight|Subelement highlight]]
|[[Draft_SubelementHighlight|SubelementHighlight]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Scale.svg
|IconL=Draft_PointLinkArray.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_SubelementHighlight.svg
|IconR=Draft_SubelementHighlight.svg
|IconC=Workbench_Draft.svg
}}
}}


Line 14: Line 15:
{{GuiCommand
{{GuiCommand
|Name=Draft Edit
|Name=Draft Edit
|MenuLocation=Draft → Edit
|MenuLocation=Modification → Edit
|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
|Shortcut={{KEY|D}} {{KEY|E}}
|Shortcut={{KEY|D}} {{KEY|E}}
|SeeAlso=[[Std Edit|Std Edit]], [[Draft AddPoint|Draft AddPoint]], [[Draft DelPoint|Draft DelPoint]]
|SeeAlso=[[Std_Edit|Std Edit]]
|Version=
}}
}}


Line 24: Line 24:


<!--T:3-->
<!--T:3-->
The [[Image:Draft_Edit.svg|24px]] '''Draft Edit''' command puts selected objects in Draft Edit mode. In this mode the properties of objects can be edited graphically. Typically nodes can be moved and in some cases context menu options can be selected. The command can handle most Draft objects, but also some other objects. See [[#Supported_objects|Supported objects]]. Supported Draft objects can also be put in Draft Edit mode with the [[Std_Edit|Std Edit]] command.
The {{Button|[[Image:Draft_Edit.svg|16px]] [[Draft Edit|Draft Edit]]}} tool allows you to graphically edit certain properties of the selected object, such as:
* the vertices of a {{Button|[[Image:Draft_Wire.svg|16px]] [[Draft Wire|Draft Wire]]}}
* the length and width of a {{Button|[[Image:Draft_Rectangle.svg|16px]] [[Draft Rectangle|Draft Rectangle]]}}
* the radius of a {{Button|[[Image:Draft_Circle.svg|16px]] [[Draft Circle|Draft Circle]]}}

<!--T:10-->
It does nothing more than enter the object's edit mode. Another way to edit the object is by double clicking on the element in the tree view.


</translate>
</translate>
[[Image:Draft edit example.jpg|400px]]
[[Image:Draft_Edit_example.png]]
<translate>
<translate>
<!--T:11-->
<!--T:26-->
{{Caption|Editing a wire, an arc and a cubic bezier curve. Context menu is displayed for a knot of the curve}}
{{Caption|4 objects in Draft Edit mode: a Draft Wire (red), a Draft Arc (black), a Draft BSpline (green) and a Draft BezCurve (magenta)}}


==Usage== <!--T:4-->
==Usage== <!--T:27-->


<!--T:5-->
<!--T:28-->
See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
# Select an object.
# Press the {{Button|[[Image:Draft_Edit.svg|16px]] [[Draft Edit|Draft Edit]]}} button, or double-click the object in the tree view, or use the {{Button|[[Image:Std Edit.png|16px]] [[Std Edit]]}} tool.
# Click on a point that you wish to move.
# Click another point on the 3D view, or type a [[Draft_Coordinates|coordinate]] and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button.
# Press {{KEY|Esc}} or the {{Button|Close}} button to complete the current command.


<!--T:12-->
<!--T:29-->
# Optionally select one or more objects. Note that although multiple objects can be in Draft Edit mode, objects can only be edited one at a time.
Version 0.19 added new functionalities to Draft Edit such as multiple object editing and custom context menu. To display the context menu, user can press {{KEY|E}} key or {{KEY|Alt}}+{{KEY|Left click}} while overing an edit node or an edited object. Beware not every object contains custom options, so the context menu will be only displayed for supported objects.
# There are several ways to invoke the command:

#* If you have not yet selected an object: double-click an object in the [[Tree_view|Tree view]]. This only works for supported Draft objects.
<!--T:13-->
#* Press the {{Button|[[Image:Draft_Edit.svg|16px]] [[Draft_Edit|Edit]]}} button.
The tool mostly works on Draft objects: [[Draft Wire|Draft Wires]], [[Draft Line|Draft Lines]], [[Draft Rectangle|Draft Rectangles]], [[Draft Circle|Draft Circles]], [[Draft Arc|Draft Arcs]], [[Draft Polygon|Draft Polygons]], and [[Draft BSpline|Draft BSplines]]. Other object types must first be converted to these objects.
#* Select the {{MenuCommand|Modification → [[Image:Draft_Edit.svg|16px]] Edit}} option from the menu.
#* Use the keyboard shortcut: {{KEY|D}} then {{KEY|E}}.
#* For a single object: select the {{MenuCommand|Edit}} option from the [[Tree_view|Tree view]] context menu. This only works for supported Draft objects. {{Version|0.21}}
# If you have not yet selected an object: select an object in the [[3D_view|3D view]].
# The selected objects are marked with temporary nodes, and the [[#Main_task_panel|Main task panel]] opens. See [[#Options|Options]] for more information.
# Optionally use a node or edge context menu. These context menus are only available for some Draft objects. See [[#Supported_objects|Supported objects]] for more information.
#* Do one of the following:
#** On all operating systems: hold down {{KEY|E}} and click the node or edge. To use {{KEY|E}} you may have to click in the [[3D_view|3D view]] once to ensure that it has the focus.
#** On Windows: hold down {{KEY|Alt}} and click the node or edge.
#** On Linux: hold down {{KEY|Shift}}+{{KEY|Alt}}, {{KEY|Ctrl}}+{{KEY|Alt}} or {{KEY|Alt}}, and click the node or edge.
#** On macOS: hold down {{KEY|Option}} and click the node or edge.
#* Select an option from the context menu.
#* If the selected option requires point input:
#** The [[#Edit_node_task_panel|Edit node task panel]] opens. See [[#Options|Options]] for more information.
#** Pick a point in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
# Optionally move a node:
#* Click the node in the [[3D_view|3D view]].
#* The [[#Edit_node_task_panel|Edit node task panel]] opens. See [[#Options|Options]] for more information.
#* Pick a point in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
#* The result depends on the object and the selected node.
# Press {{KEY|Esc}} or the {{Button|Close}} button (the button at the top of the task panel, without the image) to finish the command.


==Options== <!--T:6-->
==Options== <!--T:6-->

<!--T:30-->
The single character keyboard shortcuts available in the task panel can be changed. See [[Draft_Preferences|Draft Preferences]]. The shortcuts mentioned here are the default shortcuts.

===Main task panel=== <!--T:31-->

<!--T:32-->
* Press {{KEY|Esc}} or the {{Button|Close}} button to finish the command.

===Edit node task panel=== <!--T:33-->


<!--T:7-->
<!--T:7-->
* To manually enter coordinates enter the X, Y and Z component, and press {{KEY|Enter}} after each. Or you can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button when you have the desired values. It is advisable to move the pointer out of the [[3D_view|3D view]] before entering coordinates.
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after a point to constrain the next point on the given axis.
* To use polar coordinates enter a value for the {{MenuCommand|Length}} and a value for the {{MenuCommand|Angle}}, and press {{KEY|Enter}} after each.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component. You can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button when you have the desired values to insert the point.
* Check the {{MenuCommand|Angle}} checkbox to constrain the pointer to the specified angle.
* Hold {{KEY|Ctrl}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Press {{KEY|R}} or click the {{MenuCommand|Relative}} checkbox to toggle relative mode. If relative mode is on, the coordinates of the picked point are relative to the original point, else they are relative to the coordinate system origin. {{Version|0.22}}
* Hold {{KEY|Shift}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the last one.
* Press {{KEY|G}} or click the {{MenuCommand|Global}} checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the [[Draft_SelectPlane|working plane]] coordinate system. {{Version|0.20}}
* Press {{KEY|Esc}} or the {{button|Close}} button or the {{Button|[[Image:Draft Edit.svg|16px]] [[Draft Edit|Draft Edit]]}} button again to finish editing.
* Press {{KEY|S}} to switch [[Draft_Snap|Draft snapping]] on or off.


<!--T:14-->
==Supported objects== <!--T:34-->
Some objects allow you to insert or delete points:
* Press the {{Button|[[Image:Draft AddPoint.svg|16px]] [[Draft AddPoint|add point]]}} button, and then click on the wire or spline to add a new point.
* Press the {{Button|[[Image:Draft DelPoint.svg|16px]] [[Draft DelPoint|remove point]]}} button, and then click on a point along the wire or spline to remove it.


===[[Image:Draft_Line.svg|24px]] [[Draft_Line|Draft Line]] and [[Image:Draft_Wire.svg|24px]] [[Draft_Wire|Draft Wire]]=== <!--T:35-->
==Scripting== <!--T:8-->

{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
<!--T:36-->
* If the start or end node of an open wire is moved so that they coincide, the wire is closed.
* Node context menu: {{Value|Delete point}}. At least two points must remain.
* Edge context menu: {{Value|Add point}}, {{Value|Open wire}}/{{Value|Close wire}} ({{Version|0.21}}) and {{Value|Reverse wire}} ({{Version|0.20}}).

===[[Image:Draft_Arc.svg|24px]] [[Draft_Arc|Draft Arc]] and [[Image:Draft_Arc_3Points.svg|24px]] [[Draft_Arc_3Points|Draft Arc 3Points]]=== <!--T:37-->

<!--T:38-->
* Center node context menu: {{Value|Move arc}}.
* Start node context menu: {{Value|Set first angle}}.
* End node context menu: {{Value|Set last angle}}.
* Mid node context menu: {{Value|Set radius}}.
* Edge context menu: {{Value|Invert arc}}.

===[[Image:Draft_Circle.svg|24px]] [[Draft_Circle|Draft Circle]]=== <!--T:39-->

<!--T:40-->
* No context menus for this object.

===[[Image:Draft_Ellipse.svg|24px]] [[Draft_Ellipse|Draft Ellipse]]=== <!--T:41-->

<!--T:42-->
* No context menus for this object.

===[[Image:Draft_Rectangle.svg|24px]] [[Draft_Rectangle|Draft Rectangle]]=== <!--T:43-->

<!--T:44-->
* No context menus for this object.

===[[Image:Draft_Polygon.svg|24px]] [[Draft_Polygon|Draft Polygon]]=== <!--T:45-->

<!--T:46-->
* No context menus for this object.

===[[Image:Draft_BSpline.svg|24px]] [[Draft_BSpline|Draft BSpline]]=== <!--T:47-->

<!--T:48-->
* If the start or end node of an open spline is moved so that they coincide, the spline is closed.
* Node context menu: {{Value|Delete point}}. At least two points must remain for an open spline. For a closed spline the minimum number of points is three.
* Edge context menu: {{Value|Add point}}, {{Value|Open wire}}/{{Value|Close wire}} ({{Version|0.21}}) and {{Value|Reverse spline}} ({{Version|0.21}}).

===[[Image:Draft_CubicBezCurve.svg|24px]] [[Draft_CubicBezCurve|Draft CubicBezCurve]] and [[Image:Draft_BezCurve.svg|24px]] [[Draft_BezCurve|Draft BezCurve]]=== <!--T:49-->

<!--T:50-->
* If the start or end node of an open curve is moved so that they coincide, the curve is closed.
* Node context menu: {{Value|Delete point}}, {{Value|Make sharp}}, {{Value|Make tangent}} and {{Value|Make symmetric}}.
* Edge context menu: {{Value|Add point}}, {{Value|Open wire}}/{{Value|Close wire}} ({{Version|0.21}}) and {{Value|Reverse curve}} ({{Version|0.21}}).

===[[Image:Draft_Dimension.svg|24px]] [[Draft_Dimension|Draft Dimension]]=== <!--T:51-->

<!--T:52-->
* Angular dimensions cannot be edited.
* The start and end nodes of parametric dimensions cannot be moved.
* No context menus for this object.

===[[Image:Arch_Wall.svg|24px]] [[Arch_Wall|Arch Wall]]=== <!--T:53-->

<!--T:54-->
* A single node to control the height of the wall is displayed above the {{PropertyData|Placement}} of the wall.
* No context menus for this object.

===[[Image:Arch_Structure.svg|24px]] [[Arch_Structure|Arch Structure]]=== <!--T:55-->

<!--T:56-->
* No context menus for this object.

===[[Image:Arch_Window.svg|24px]] [[Arch_Window|Arch Window]]=== <!--T:57-->

<!--T:58-->
* No context menus for this object.

===[[Image:Arch_Space.svg|24px]] [[Arch_Space|Arch Space]]=== <!--T:59-->

<!--T:60-->
* No context menus for this object.

===[[Image:Arch_Panel_Cut.svg|24px]] [[Arch_Panel_Cut|Arch Panel Cut]]=== <!--T:61-->

<!--T:62-->
* No context menus for this object.

===[[Image:Arch_Panel_Sheet.svg|24px]] [[Arch_Panel_Sheet|Arch Panel Sheet]]=== <!--T:63-->

<!--T:64-->
* No context menus for this object.

===[[Image:Part_Box.svg|24px]] [[Part_Box|Part Box]]=== <!--T:65-->

<!--T:66-->
* No context menus for this object.

===[[Image:Part_Cylinder.svg|24px]] [[Part_Cylinder|Part Cylinder]]=== <!--T:67-->

<!--T:68-->
* No context menus for this object.

===[[Image:Part_Sphere.svg|24px]] [[Part_Sphere|Part Sphere]]=== <!--T:69-->

<!--T:70-->
* No context menus for this object.

===[[Image:Part_Cone.svg|24px]] [[Part_Cone|Part Cone]]=== <!--T:71-->

<!--T:72-->
* No context menus for this object.

===[[Image:Part_Line.svg|24px]] [[Part_Line|Part Line]]=== <!--T:73-->

<!--T:74-->
* No context menus for this object.

===[[Image:Sketcher_NewSketch.svg|24px]] [[Sketcher_NewSketch|Sketcher Sketch]]=== <!--T:75-->

<!--T:76-->
* Only sketches that contain a single unconstrained line can be edited.
* No context menus for this object.

==Preferences== <!--T:77-->

<!--T:79-->
See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]].

<!--T:78-->
* The color of the temporary nodes is the same as the color of the snap symbols. This color can be changed in the preferences: {{MenuCommand|Edit → Preferences... → Draft → Grid and snapping → Snap symbol color}}. Note that this color is not used for the temporary nodes displayed for [[Draft_BezCurve|Draft BezCurves]]. These nodes use the {{PropertyView|Line Color}} of the curve instead.
* The size of the nodes depends on: {{MenuCommand|Edit → Preferences... → Display → 3D View → Marker size}}. {{Version|0.22}}

==Scripting== <!--T:25-->

<!--T:8-->
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


<!--T:9-->
<!--T:9-->
There is no Python method to Draft Edit objects. To emulate the results of the command geometric properties of objects have to be modified.
There is no programming interface available for the Edit tool. Each object is modified by changing its attributes directly.



<!--T:15-->
<!--T:15-->
{{Docnav
{{Docnav
|[[Draft_PointLinkArray|PointLinkArray]]
|[[Draft_Scale|Scale]]
|[[Draft_SubelementHighlight|Subelement highlight]]
|[[Draft_SubelementHighlight|SubelementHighlight]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Scale.svg
|IconL=Draft_PointLinkArray.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_SubelementHighlight.svg
|IconR=Draft_SubelementHighlight.svg
|IconC=Workbench_Draft.svg
}}
}}


Line 86: Line 236:
{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 08:13, 7 March 2024

Draft Edit

Menu location
Modification → Edit
Workbenches
Draft, Arch
Default shortcut
D E
Introduced in version
-
See also
Std Edit

Description

The Draft Edit command puts selected objects in Draft Edit mode. In this mode the properties of objects can be edited graphically. Typically nodes can be moved and in some cases context menu options can be selected. The command can handle most Draft objects, but also some other objects. See Supported objects. Supported Draft objects can also be put in Draft Edit mode with the Std Edit command.

4 objects in Draft Edit mode: a Draft Wire (red), a Draft Arc (black), a Draft BSpline (green) and a Draft BezCurve (magenta)

Usage

See also: Draft Snap and Draft Constrain.

  1. Optionally select one or more objects. Note that although multiple objects can be in Draft Edit mode, objects can only be edited one at a time.
  2. There are several ways to invoke the command:
    • If you have not yet selected an object: double-click an object in the Tree view. This only works for supported Draft objects.
    • Press the Edit button.
    • Select the Modification → Edit option from the menu.
    • Use the keyboard shortcut: D then E.
    • For a single object: select the Edit option from the Tree view context menu. This only works for supported Draft objects. introduced in version 0.21
  3. If you have not yet selected an object: select an object in the 3D view.
  4. The selected objects are marked with temporary nodes, and the Main task panel opens. See Options for more information.
  5. Optionally use a node or edge context menu. These context menus are only available for some Draft objects. See Supported objects for more information.
    • Do one of the following:
      • On all operating systems: hold down E and click the node or edge. To use E you may have to click in the 3D view once to ensure that it has the focus.
      • On Windows: hold down Alt and click the node or edge.
      • On Linux: hold down Shift+Alt, Ctrl+Alt or Alt, and click the node or edge.
      • On macOS: hold down Option and click the node or edge.
    • Select an option from the context menu.
    • If the selected option requires point input:
  6. Optionally move a node:
    • Click the node in the 3D view.
    • The Edit node task panel opens. See Options for more information.
    • Pick a point in the 3D view, or type coordinates and press the Enter point button.
    • The result depends on the object and the selected node.
  7. Press Esc or the Close button (the button at the top of the task panel, without the image) to finish the command.

Options

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts.

Main task panel

  • Press Esc or the Close button to finish the command.

Edit node task panel

  • To manually enter coordinates enter the X, Y and Z component, and press Enter after each. Or you can press the Enter point button when you have the desired values. It is advisable to move the pointer out of the 3D view before entering coordinates.
  • To use polar coordinates enter a value for the Length and a value for the Angle, and press Enter after each.
  • Check the Angle checkbox to constrain the pointer to the specified angle.
  • Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, the coordinates of the picked point are relative to the original point, else they are relative to the coordinate system origin. introduced in version 0.22
  • Press G or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the working plane coordinate system. introduced in version 0.20
  • Press S to switch Draft snapping on or off.

Supported objects

Draft Line and Draft Wire

  • If the start or end node of an open wire is moved so that they coincide, the wire is closed.
  • Node context menu: Delete point. At least two points must remain.
  • Edge context menu: Add point, Open wire/Close wire (introduced in version 0.21) and Reverse wire (introduced in version 0.20).

Draft Arc and Draft Arc 3Points

  • Center node context menu: Move arc.
  • Start node context menu: Set first angle.
  • End node context menu: Set last angle.
  • Mid node context menu: Set radius.
  • Edge context menu: Invert arc.

Draft Circle

  • No context menus for this object.

Draft Ellipse

  • No context menus for this object.

Draft Rectangle

  • No context menus for this object.

Draft Polygon

  • No context menus for this object.

Draft BSpline

  • If the start or end node of an open spline is moved so that they coincide, the spline is closed.
  • Node context menu: Delete point. At least two points must remain for an open spline. For a closed spline the minimum number of points is three.
  • Edge context menu: Add point, Open wire/Close wire (introduced in version 0.21) and Reverse spline (introduced in version 0.21).

Draft CubicBezCurve and Draft BezCurve

  • If the start or end node of an open curve is moved so that they coincide, the curve is closed.
  • Node context menu: Delete point, Make sharp, Make tangent and Make symmetric.
  • Edge context menu: Add point, Open wire/Close wire (introduced in version 0.21) and Reverse curve (introduced in version 0.21).

Draft Dimension

  • Angular dimensions cannot be edited.
  • The start and end nodes of parametric dimensions cannot be moved.
  • No context menus for this object.

Arch Wall

  • A single node to control the height of the wall is displayed above the DataPlacement of the wall.
  • No context menus for this object.

Arch Structure

  • No context menus for this object.

Arch Window

  • No context menus for this object.

Arch Space

  • No context menus for this object.

Arch Panel Cut

  • No context menus for this object.

Arch Panel Sheet

  • No context menus for this object.

Part Box

  • No context menus for this object.

Part Cylinder

  • No context menus for this object.

Part Sphere

  • No context menus for this object.

Part Cone

  • No context menus for this object.

Part Line

  • No context menus for this object.

Sketcher Sketch

  • Only sketches that contain a single unconstrained line can be edited.
  • No context menus for this object.

Preferences

See also: Preferences Editor and Draft Preferences.

  • The color of the temporary nodes is the same as the color of the snap symbols. This color can be changed in the preferences: Edit → Preferences... → Draft → Grid and snapping → Snap symbol color. Note that this color is not used for the temporary nodes displayed for Draft BezCurves. These nodes use the ViewLine Color of the curve instead.
  • The size of the nodes depends on: Edit → Preferences... → Display → 3D View → Marker size. introduced in version 0.22

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

There is no Python method to Draft Edit objects. To emulate the results of the command geometric properties of objects have to be modified.