Draft Line/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{docnav||[[Draft_Wire|Wire]]|[[Draft_Module|Draft_Module]]}}
{{Docnav/ru
|
|[[Draft_Wire/ru|Ломаная линия]]
|[[Draft_Workbench/ru|Верстак "Draft"]]
|IconL=
|IconR=Draft_Wire.svg
|IconC=Workbench_Draft.svg
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 6: Line 14:
|Name=Draft Line
|Name=Draft Line
|Name/ru=Draft Line
|Name/ru=Draft Line
|Workbenches=[[Draft Module/ru|Draft]], [[Arch Module/ru|Arch]]
|MenuLocation=Черчение → Линия
|MenuLocation=Черчение → Линия
|Workbenches=[[Draft_Workbench/ru|Draft]], [[Arch_Workbench/ru|Arch]]
|Shortcut=L I
|Shortcut={{KEY|L}} {{KEY|I}}
|SeeAlso=[[Draft Wire/ru|Draft Wire]]
|SeeAlso=[[Draft Wire/ru|Draft Wire]]
}}
}}
</div>
</div>

<span id="Description"></span>
==Описание==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
== Описание ==
Инструмент «Линия» создает прямую линию, определяемую двумя точками. Он использует набор [[Draft Linestyle]] на панели инструментов «Тревожный лоток». Инструмент «Линия» ведет себя точно так же, как инструмент [[Draft Wire]], за исключением того, что он останавливается после двух точек.
Инструмент «Линия» создает прямую линию, определяемую двумя точками. Он использует набор [[Draft Linestyle]] на панели инструментов «Тревожный лоток». Инструмент «Линия» ведет себя точно так же, как инструмент [[Draft Wire]], за исключением того, что он останавливается после двух точек.
</div>
</div>

A Draft Line is in fact a [[Draft_Wire|Draft Wire]] with only two points.


[[Image:Draft_Line_example.jpg|400px]]
[[Image:Draft_Line_example.jpg|400px]]
Line 23: Line 35:
</div>
</div>


<span id="Usage"></span>
==How to use==
==Применение==
# Press the {{Button|[[Image:Draft Line.svg|16px]] [[Draft Line]]}} button, or press {{KEY|L}} then {{KEY|I}} keys.
# Click a first 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.


See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
The line can be edited by double clicking on the element in the tree view, or by pressing the {{Button|[[Image:Draft Edit.svg|16px]] [[Draft Edit]]}} button. Then you can move the points to a new position.


# There are several ways to invoke the command:
===Fusing single lines===
#* Press the {{Button|[[Image:Draft_Line.svg|16px]] [[Draft_Line|Line]]}} button.
If several connected [[Draft Line|Draft Lines]] are selected they can be fused into a wire by pressing the {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade]]}} tool; however, this wire will not be editable. To create an editable wire, use {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade]]}} three more times on the new shapes (wire, closed wire, face). You can also fuse the original lines with the {{Button|[[Image:Draft Wire.svg|16px]] [[Draft Wire]]}} tool.
#* Select the {{MenuCommand|Drafting → [[Image:Draft_Line.svg|16px]] Line}} option from the menu.
#* Use the keyboard shortcut: {{KEY|L}} then {{KEY|I}}.
# The {{MenuCommand|Line}} task panel opens. See [[#Options|Options]] for more information.
# Pick the first point 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 in the [[3D_view|3D view]], or type coordinates and press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button.


<span id="Options"></span>
A wire can also be created from a single line by adding another point anywhere along its length. To do this, press the {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} button, and click anywhere on the line.
==Опции==


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 (for version 0.22).
==Options==
* 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.
** You can also define the polar coordinates of the point by giving a value to "Length" and "Angle". Click on the checkbox next to "Angle" to constrain the pointer to the specified angle. 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.
* 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 Line tool will restart after you give the second point, allowing you to draw another line segment 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|Ctrl}}+{{KEY|Z}} or press the {{button|[[Image:Draft UndoLine.png|12px]] [[Draft_UndoLine|Undo]]}} button to undo the last point.
* 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.
<div class="mw-translate-fuzzy">
* To use polar coordinates enter a value for the {{MenuCommand|Length}} and a value for the {{MenuCommand|Angle}}, and press {{KEY|Enter}} after each.
==свойства==
* Check the {{MenuCommand|Angle}} checkbox to constrain the pointer to the specified angle.
* {{PropertyData/ru|Start}}: Начальная точка
* Press {{KEY|L}} to change the focus from the {{MenuCommand|X}} input box to the {{MenuCommand|Length}} input box and back. Depending on the input box that receives the focus the {{MenuCommand|Angle}} checkbox is checked or unchecked.
* {{PropertyData/ru|End}}: Конечная точка
* Press {{KEY|R}} or click the {{MenuCommand|Relative}} checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point are relative to the first point, else they are relative to the coordinate system origin.
* {{PropertyData/ru|Subdivisions}}: Разделяет линию с заданным количеством подразделений {{version|0.16}}
* 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}}
</div>
* Press {{KEY|N}} or click the {{MenuCommand|Continue}} checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing, allowing you to continue creating lines.
* Press {{KEY|S}} to switch [[Draft_Snap|Draft snapping]] on or off.
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command.


<span id="Notes"></span>
===Data===
==Примечания==
* {{PropertyData|Start}}: specifies the start point.
* {{PropertyData|End}}: specifies the end point.
* {{PropertyData|Subdivisions}}: specifies the number of interior nodes in the line. {{version|0.16}}
* {{PropertyData|Length}}: (read-only) specifies the length of the segment.


* A Draft Line can be edited with the [[Draft_Edit|Draft Edit]] command.
===View===
* Draft Lines and [[Draft_Wire|Draft Wires]] can be joined with the [[Draft_Wire|Draft Wire]] command, the [[Draft_Join|Draft Join]] command or the [[Draft_Upgrade|Draft Upgrade]] command.
* {{PropertyView|End Arrow}}: if it is {{TRUE}} it will display a symbol at the last point of the line, so it can be used as an annotation line.
* {{PropertyView|Arrow Size}}: specifies the size of the symbol displayed at the end of the line.
* {{PropertyView|Arrow Type}}: specifies the type of symbol displayed at the end of the line, which can be "Dot", "Circle", "Arrow", or "Tick".


<span id="Preferences"></span>
==Scripting==
==Настройки==
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]].

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

* To change the initial focus of the task panel to the {{MenuCommand|Length}} input box: {{MenuCommand|Edit → Preferences... → Draft → General → Set focus on Length instead of X coordinate}}. Note that you must move the pointer in the [[3D_view|3D view]] for the change to take effect.
* If the {{MenuCommand|Edit → Preferences... → Draft → General → Create Part primitives if possible}} option is checked, the command will create a [[Part_Line|Part Line]] instead of a Draft Line.

<span id="Properties"></span>
==Свойства==

См. [[Draft_Wire/ru#Properties|Draft Wire]].

<span id="Scripting"></span>
==Программирование==

See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].

To create a Draft Line use the {{incode|make_line}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makeLine}} method.


The Line tool can be used in [[macros]] and from the [[Python]] console by using the following function:
{{Code|code=
{{Code|code=
Line = makeLine(p1, p2)
line = make_line(p1, p2)
Line = makeLine(LineSegment)
line = make_line(LineSegment)
Line = makeLine(Shape)
line = make_line(Shape)
}}
}}


Line 79: Line 100:


Пример:
Пример:

{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft

doc = App.newDocument()

p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 500, 0)
p3 = App.Vector(-250, -500, 0)
p4 = App.Vector(500, 1000, 0)

line1 = Draft.make_line(p1, p2)
line2 = Draft.make_line(p3, p4)

doc.recompute()
}}


p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(1000, 500, 0)
p3 = FreeCAD.Vector(-250, -500, 0)
p4 = FreeCAD.Vector(500, 1000, 0)


{{Docnav/ru
Line1 = Draft.makeLine(p1, p2)
|
Line2 = Draft.makeLine(p3, p4)
|[[Draft_Wire/ru|Ломаная линия]]
|[[Draft_Workbench/ru|Верстак "Draft"]]
|IconL=
|IconR=Draft_Wire.svg
|IconC=Workbench_Draft.svg
}}
}}


{{Draft Tools navi{{#translation:}}}}
{{docnav||[[Draft_Wire|Wire]]|[[Draft_Module|Draft_Module]]}}
{{Userdocnavi{{#translation:}}}}
{{Draft Tools navi}}
{{Userdocnavi}}
{{clear}}

Latest revision as of 04:57, 9 January 2024

Draft Line

Системное название
Draft Line
Расположение в меню
Черчение → Линия
Верстаки
Draft, Arch
Быстрые клавиши
L I
Представлено в версии
-
См. также
Draft Wire

Описание

Инструмент «Линия» создает прямую линию, определяемую двумя точками. Он использует набор Draft Linestyle на панели инструментов «Тревожный лоток». Инструмент «Линия» ведет себя точно так же, как инструмент Draft Wire, за исключением того, что он останавливается после двух точек.

A Draft Line is in fact a Draft Wire with only two points.

Применение

See also: Draft Tray, Draft Snap and Draft Constrain.

  1. There are several ways to invoke the command:
    • Press the Line button.
    • Select the Drafting → Line option from the menu.
    • Use the keyboard shortcut: L then I.
  2. The Line task panel opens. See Options for more information.
  3. Pick the first point in the 3D view, or type coordinates and press the Enter point button.
  4. Pick the second point in the 3D view, or type coordinates and press the Enter point button.

Опции

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

  • 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 L to change the focus from the X input box to the Length input box and back. Depending on the input box that receives the focus the Angle checkbox is checked or unchecked.
  • Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point 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 N or click the Continue checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing, allowing you to continue creating lines.
  • Press S to switch Draft snapping on or off.
  • Press Esc or the Close button to abort the command.

Примечания

Настройки

See also: Preferences Editor and Draft Preferences.

  • To change the initial focus of the task panel to the Length input box: Edit → Preferences... → Draft → General → Set focus on Length instead of X coordinate. Note that you must move the pointer in the 3D view for the change to take effect.
  • If the Edit → Preferences... → Draft → General → Create Part primitives if possible option is checked, the command will create a Part Line instead of a Draft Line.

Свойства

См. Draft Wire.

Программирование

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Line use the make_line method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeLine method.

line = make_line(p1, p2)
line = make_line(LineSegment)
line = make_line(Shape)
  • Creates a Line object between points p1 and p2, each defined by its FreeCAD.Vector, with units in millimeters.
  • Creates a Line object from a Part.LineSegment.
  • Creates a Line object from the first vertex to the last vertex of the given Shape.

Пример:

import FreeCAD as App
import Draft

doc = App.newDocument()

p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 500, 0)
p3 = App.Vector(-250, -500, 0)
p4 = App.Vector(500, 1000, 0)

line1 = Draft.make_line(p1, p2)
line2 = Draft.make_line(p3, p4)

doc.recompute()