Draft Stretch: Difference between revisions

From FreeCAD Documentation
m (I have updated an external link.)
mNo edit summary
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Page_in_progress}}
<languages/>
<languages/>
<translate>
<translate>
Line 7: Line 6:
|[[Draft_Trimex|Trimex]]
|[[Draft_Trimex|Trimex]]
|[[Draft_Clone|Clone]]
|[[Draft_Clone|Clone]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Trimex.svg
|IconL=Draft_Trimex.svg
|IconR=Draft_Clone.svg
|IconR=Draft_Clone.svg
Line 17: Line 16:
|Name=Draft Stretch
|Name=Draft Stretch
|MenuLocation=Modification → Stretch
|MenuLocation=Modification → Stretch
|Workbenches=[[Draft_Module|Draft]], [[Arch_Module|Arch]]
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
|Shortcut={{KEY|S}} {{KEY|H}}
|Version=0.17
|Version=0.17
|SeeAlso=[[Draft_Offset|Draft Offset]], [[Draft_Scale|Draft Scale]]
}}
}}


Line 25: Line 24:


<!--T:2-->
<!--T:2-->
The {{Button|[[Image:Draft Stretch.svg|16px]] [[Draft_Stretch|Draft Stretch]]}} tool stretches an object by moving some of its selected vertices. The equivalent action is editing the object and moving the points manually to a new position.
The [[Image:Draft_Stretch.svg|24px]] '''Draft Stretch''' command stretches objects by moving selected points.

<!--T:7-->
The Stretch tool works for objects like [[Draft Wire|Draft Wire]]s and [[Draft BSpline|Draft BSpline]]s which are defined by many points.


</translate>
</translate>
Line 34: Line 30:
<translate>
<translate>
<!--T:3-->
<!--T:3-->
{{Caption|Stretching of three wires by enclosing some vertices and moving them to another position}}
{{Caption|Stretching three Draft Wires}}


==Usage== <!--T:16-->
==Usage== <!--T:16-->

<!--T:20-->
See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].


<!--T:4-->
<!--T:4-->
# Optionally select one or more objects. The objects must be [[Draft_Line|Draft Lines]], [[Draft_Wire|Draft Wires]], [[Draft_Rectangle|Draft Rectangles]], [[Draft_BSpline|Draft BSplines]] or [[Draft_BezCurve|Draft BezCurves]]. Other objects are ignored.
# Select an object that you wish to stretch.
# There are several ways to invoke the command:
# Press the {{Button|[[Image:Draft Stretch.svg|16px]] [[Draft Stretch|Draft Stretch]]}} button. If no object is selected, you will be invited to select one.
# Click a 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 the {{Button|[[Image:Draft_Stretch.svg|16px]] [[Draft_Stretch|Stretch]]}} button.
#* Select the {{MenuCommand|Modification → [[Image:Draft_Stretch.svg|16px]] Stretch}} option from the menu.
# Click a second 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. The first two points define a selection rectangle. The vertices of the original object enclosed by this rectangle become highlighted.
#* Use the keyboard shortcut: {{KEY|S}} then {{KEY|H}}.
# Click a third 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.
# If you have not yet selected an object: select an object in the [[3D_view|3D view]].
# Click a fourth 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. The second pair of points define a line, whose distance and direction will be used to stretch the figure attached to the highlighted points.
# The {{MenuCommand|Stretch}} task panel opens. See [[#Options|Options]] for more information.
# Pick the first point, one corner of a rectangular selection area, in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
# Pick the second point, the opposite corner of the selection area, in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
# The points of the selected objects that are inside the selection area are marked.
# Pick the third point, the base point, in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.
# Pick the fourth point, the target point, in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.


==Notes== <!--T:18-->
==Options== <!--T:17-->


<!--T:8-->
<!--T:21-->
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.
* The Stretch tool is designed to work with objects that are comprised of points. By moving only the selected points, the original figure is stretched in the desired direction.
* So far, only [[Draft Line|Draft Line]], [[Draft Wire|Draft Wire]], [[Draft BSpline|Draft BSpline]], [[Draft BezCurve|Draft BezCurve]] and [[Draft Rectangle|Draft Rectangle]] work with this tool.
* [[Draft Circle|Draft Circle]]s and [[Draft Polygon|Draft Polygon]]s are only defined by their centers; the individual edges of those shapes don't have selectable points, and therefore can't be stretched. Performing a stretch operation on them will simply move the object like using {{Button|[[Image:Draft Move.svg|16px]] [[Draft Move|Draft Move]]}}.

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


<!--T:5-->
<!--T:5-->
* 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 the first point to constrain the second point on the given axis.
* Press {{KEY|R}} or click the {{MenuCommand|Relative}} checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point of the displacement are relative to the first point, else they are relative to the coordinate system origin.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|Enter}} between each X, Y and Z component.
* Press {{KEY|R}} or click the checkbox to toggle ''relative'' mode. If relative mode is on, the coordinates of the second point are relative to the first one; if not, they are absolute, taken from the origin (0,0,0).
* 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|S}} to switch [[Draft_Snap|Draft snapping]] on or off.
* Press {{KEY|T}} or click the checkbox to toggle ''continue'' mode. If continue mode is on, the Stretch tool will restart after you give the final point, allowing you to repeat the operation without pressing the tool button again.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command.
* Hold {{KEY|Ctrl}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Hold {{KEY|Shift}} while drawing to [[Draft_Constrain|constrain]] your second point horizontally or vertically in relation to the first one.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the current command.


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


<!--T:6-->
<!--T:6-->
See also: [https://freecad.github.io/SourceDoc/ API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
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 stretch objects. To emulate the results of the Draft Stretch command geometric properties of objects have to be modified.
There is no programming interface available for the Stretch tool. All it does is change some attributes of the selected Draft objects, like {{incode|Placement}}, {{incode|Points}}, {{incode|Length}}, or {{incode|Height}}, which results in a stretched shape.

<!--T:10-->
When using the Stretch tool the [[Python|Python]] console shows the individual commands that were used to produce the stretching of the shape.




Line 80: Line 76:
|[[Draft_Trimex|Trimex]]
|[[Draft_Trimex|Trimex]]
|[[Draft_Clone|Clone]]
|[[Draft_Clone|Clone]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Trimex.svg
|IconL=Draft_Trimex.svg
|IconR=Draft_Clone.svg
|IconR=Draft_Clone.svg

Latest revision as of 18:42, 6 January 2024

Draft Stretch

Menu location
Modification → Stretch
Workbenches
Draft, Arch
Default shortcut
S H
Introduced in version
0.17
See also
None

Description

The Draft Stretch command stretches objects by moving selected points.

Stretching three Draft Wires

Usage

See also: Draft Snap and Draft Constrain.

  1. Optionally select one or more objects. The objects must be Draft Lines, Draft Wires, Draft Rectangles, Draft BSplines or Draft BezCurves. Other objects are ignored.
  2. There are several ways to invoke the command:
    • Press the Stretch button.
    • Select the Modification → Stretch option from the menu.
    • Use the keyboard shortcut: S then H.
  3. If you have not yet selected an object: select an object in the 3D view.
  4. The Stretch task panel opens. See Options for more information.
  5. Pick the first point, one corner of a rectangular selection area, in the 3D view, or type coordinates and press the Enter point button.
  6. Pick the second point, the opposite corner of the selection area, in the 3D view, or type coordinates and press the Enter point button.
  7. The points of the selected objects that are inside the selection area are marked.
  8. Pick the third point, the base point, in the 3D view, or type coordinates and press the Enter point button.
  9. Pick the fourth point, the target point, in the 3D view, or type coordinates and press the Enter point button.

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.

  • 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.
  • Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point of the displacement are relative to the first point, else they are relative to the coordinate system origin.
  • 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.
  • Press Esc or the Close button to abort the command.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

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