Draft Stretch: Difference between revisions

From FreeCAD Documentation
No edit summary
mNo edit summary
 
(62 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>

<!--T:12-->
{{Docnav
|[[Draft_Trimex|Trimex]]
|[[Draft_Clone|Clone]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Trimex.svg
|IconR=Draft_Clone.svg
|IconC=Workbench_Draft.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=Modification → Stretch
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
|Shortcut={{KEY|S}} {{KEY|H}}
|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 [[Image:Draft_Stretch.svg|24px]] '''Draft Stretch''' command stretches objects by moving selected points.

</translate>
[[Image:Draft_Stretch_Example.jpg|400px]]
<translate>
<!--T:3-->
<!--T:3-->
{{Caption|Stretching three Draft Wires}}
[[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:20-->
See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
* 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.
* 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.


==Scripting== <!--T:6-->
<!--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.
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.
# There are several ways to invoke the command:
#* 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.
#* Use the keyboard shortcut: {{KEY|S}} then {{KEY|H}}.
# If you have not yet selected an object: select an object in the [[3D_view|3D view]].
# 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.


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


<!--T:21-->
<languages/>
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.

<!--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|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.
* 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|Esc}} or the {{Button|Close}} button to abort the command.

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

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

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


<!--T:11-->
{{Docnav
|[[Draft_Trimex|Trimex]]
|[[Draft_Clone|Clone]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Trimex.svg
|IconR=Draft_Clone.svg
|IconC=Workbench_Draft.svg
}}

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

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.