Draft Stretch/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 17: Line 17:
|MenuLocation=Modification → Stretch
|MenuLocation=Modification → Stretch
|Workbenches=[[Draft_Module|Draft]], [[Arch_Module|Arch]]
|Workbenches=[[Draft_Module|Draft]], [[Arch_Module|Arch]]
|Shortcut={{KEY|S}} {{KEY|H}}
|Version=0.17
|Version=0.17
|SeeAlso=[[Draft_Offset|Draft Offset]], [[Draft_Scale|Draft Scale]]
}}
}}


==Описание==
==Описание==


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.

The Stretch tool works for objects like [[Draft Wire|Draft Wire]]s and [[Draft BSpline|Draft BSpline]]s which are defined by many points.


[[Image:Draft_Stretch_Example.jpg|400px]]
[[Image:Draft_Stretch_Example.jpg|400px]]
{{Caption|Stretching of three wires by enclosing some vertices and moving them to another position}}
{{Caption|Stretching three Draft Wires}}


==Usage==
==Usage==


See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
# Select an object that you wish to stretch.
# 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.
# 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.


# 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.
==Notes==
# There are several ways to invoke the command:

#* Press the {{Button|[[Image:Draft_Stretch.svg|16px]] [[Draft_Stretch|Draft Stretch]]}} button.
* 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.
#* Select the {{MenuCommand|Modification → [[Image:Draft_Stretch.svg|16px]] Stretch}} option from the menu.
* 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.
#* Use the keyboard shortcut: {{KEY|S}} then {{KEY|H}}.
* [[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]]}}.
# 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 [[Draft_Coordinates|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 [[Draft_Coordinates|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 [[Draft_Coordinates|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 [[Draft_Coordinates|coordinates]] and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.


==Options==
==Options==


The single character keyboard shortcuts mentioned here can be changed. See [[Draft_Preferences|Draft Preferences]].
* 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.


* 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.
==Scripting==
* 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}}
* The {{MenuCommand|Filled}} checkbox has no purpose for this command.
* The {{MenuCommand|Continue}} checkbox has no purpose for this command.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command.


==Preferences==
See also: [https://www.freecadweb.org/api Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].

See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]].

* To change the number of decimals used for the input of coordinates: {{MenuCommand|Edit → Preferences... → General → Units → Units settings → Number of decimals}}.

==Scripting==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|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 {{incode|Placement}}, {{incode|Points}}, {{incode|Length}}, or {{incode|Height}}, which results in a stretched shape.


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.
When using the Stretch tool the [[Python|Python]] console shows the individual commands that were used to produce the stretching of the shape.





Revision as of 08:14, 16 June 2021

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Draft Stretch

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

Описание

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 Draft 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 mentioned here can be changed. See Draft Preferences.

  • 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
  • The Filled checkbox has no purpose for this command.
  • The Continue checkbox has no purpose for this command.
  • Press Esc or the Close button to abort the command.

Preferences

See also: Preferences Editor and Draft Preferences.

  • To change the number of decimals used for the input of coordinates: Edit → Preferences... → General → Units → Units settings → Number of decimals.

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.