Draft Stretch: Difference between revisions

From FreeCAD Documentation
No edit summary
(Marked this version for translation)
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:12-->
{{Docnav
|[[Draft_Mirror|Mirror]]
|[[Draft_SelectPlane|Set working plane]]
|[[Draft_Module|Draft]]
|IconL=Draft_Mirror.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_SelectPlane.svg
}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand|Name=Draft Stretch|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft → Stretch|SeeAlso=[[Draft Offset]]}}
|Name=Draft Stretch
|MenuLocation=Draft → Stretch
|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]
|SeeAlso=[[Draft Offset]], [[Draft Scale]]
|Version=0.17
}}


==Description== <!--T:2-->
==Description== <!--T:15-->
This tool allows to stretch an object by moving some of its vertices.


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

<!--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>
[[Image:Draft_Stretch_Example.jpg|400px]]
<translate>
<!--T:3-->
<!--T:3-->
{{Caption|Stretching of three wires by enclosing some vertices and moving them to another position}}
[[Image:Draft_Stretch_Example.jpg]]


==How to use== <!--T:4-->
==Usage== <!--T:16-->
# Select objects you wish to stretch
# Press the {{KEY|[[Image:Draft Stretch.png|16px]] [[Draft Stretch]]}} button
# Pick the first corner of a selection rectangle
# Pick the opposite corner of the selection rectangle. The selected vertices get highlighted
# Pick the first point of the displacement you wish to give to these vertices
# Pick the end point of the displacement


==Options== <!--T:5-->
<!--T:4-->
# Select an object that you wish to stretch.
* If no object is selected when starting the command, you will be invited to pick one. But to work on more than one object, you need to have them selected before starting 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.
* So far, only [[Draft Wire]], [[Draft Line]], [[Draft BSpline]], [[Draft BezCurve]] and [[Draft Rectangle]] objects will have their individual vertices stretched. All other objects will have their origin point moved if it is inside the selection rectangle.
# 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.
# 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.
# 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.
# 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.

==Notes== <!--T:8-->
* 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-->
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after the first point to constrain the second point on the given axis.
* 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|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.
* 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:6-->
==Scripting== <!--T:6-->
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
The Stretch tool has no direct python function because all it does is modify properties of the selected objects, such as the Placement or Points properties of Draft objects. By looking at the python output when using the stretch tool, it is easy to reproduce its working manually.

<!--T:9-->
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.

<!--T:11-->
{{Docnav
|[[Draft_Mirror|Mirror]]
|[[Draft_SelectPlane|Set working plane]]
|[[Draft_Module|Draft]]
|IconL=Draft_Mirror.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_SelectPlane.svg
}}


</translate>
</translate>
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Revision as of 21:34, 21 February 2020

Draft Stretch

Menu location
Draft → Stretch
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
0.17
See also
Draft Offset, Draft Scale

Description

The 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 Stretch tool works for objects like Draft Wires and Draft BSplines which are defined by many points.

Stretching of three wires by enclosing some vertices and moving them to another position

Usage

  1. Select an object that you wish to stretch.
  2. Press the Draft Stretch button. If no object is selected, you will be invited to select one.
  3. Click a point on the 3D view, or type a coordinate and press the add point button.
  4. Click a second point on the 3D view, or type a coordinate and press the add point button. The first two points define a selection rectangle. The vertices of the original object enclosed by this rectangle become highlighted.
  5. Click a third point on the 3D view, or type a coordinate and press the add point button.
  6. Click a fourth point on the 3D view, or type a coordinate and press the 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.

Notes

  • 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 Wire, Draft BSpline, Draft BezCurve and Draft Rectangle work with this tool.
  • Draft Circles and Draft Polygons 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 Draft Move.

Options

  • Press X, Y or Z after the first point to constrain the second point on the given axis.
  • To enter coordinates manually, simply enter the numbers, then press Enter between each X, Y and Z component.
  • Press 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 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.
  • Hold Ctrl while drawing to force snapping your point to the nearest snap location, independently of the distance.
  • Hold Shift while drawing to constrain your second point horizontally or vertically in relation to the first one.
  • Press Esc or the Close button to abort the current command.

Scripting

See also: Draft API and FreeCAD Scripting Basics.

There is no programming interface available for the Stretch tool. All it does is change some attributes of the selected Draft objects, like Placement, Points, Length, or Height, which results in a stretched shape.

When using the Stretch tool the Python console shows the individual commands that were used to produce the stretching of the shape.