Draft Line/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "{{GuiCommand|Name=Draft Line|Workbenches=Kreslení, Architektura|MenuLocation=Draft -> Line|Shortcut=L I|SeeAlso=Kreslení drát}}")
(Updating to match new version of source page)
 
(43 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Draft Line|Workbenches=[[Draft Module|Kreslení]], [[Arch Module|Architektura]]|MenuLocation=Draft -> Line|Shortcut=L I|SeeAlso=[[Draft Wire|Kreslení drát]]}}

{{Docnav
|
|[[Draft_Wire|Wire]]
|[[Draft_Workbench|Draft]]
|IconL=
|IconR=Draft_Wire.svg
|IconC=Workbench_Draft.svg
}}

<div class="mw-translate-fuzzy">
{{GuiCommand/cs|Name=Draft Line|Name/cs=Kreslení Přímka|Workbenches=[[Draft_Workbench/cs|Kreslení]], [[Arch_Workbench/cs|Architektura]]|MenuLocation=Kreslení → Přímka|Shortcut=L I|SeeAlso=[[Draft Wire/cs|Kreslení drát]]}}
</div>

==Description==

<div class="mw-translate-fuzzy">
==Popis==
Nástroj Přímka vytváří rovnou dvoubodovou přímku v aktuální [[Draft SelectPlane/cs|pracovní rovině]]. Použije se [[Draft Linestyle/cs|tloušťka čáry a barva]] předem zadaná v záložce Nástrojů. Nástroj Přímka se chová přesně stejně jako nástroj [[Draft Wire/cs|Drát (lomená čára)]] kromě toho že končí po zadání dvou bodů.
</div>


A Draft Line is in fact a [[Draft_Wire|Draft Wire]] with only two points.
==Description==
The Line tool creates a straight, two-points line in the current [[Draft Workingplane|work plane]]. It takes the [[Draft Linestyle|linewidth and color]] previously set on the Tasks tab. The Line tool behaves exactly like the [[Draft Wire]] tool, except that it stops after two points.


[[Image:Draft_Line_example.jpg|400px]]
[[Image:Draft_Line_example.jpg|400px]]
<div class="mw-translate-fuzzy">
[[Image:Draft_Line_example.jpg|400px]]
</div>


==How to use==
==Usage==

# Press the {{KEY|[[Image:Draft Line.png|16px]] [[Draft Line]]}} button, or press {{KEY|L}} then {{KEY|I}} keys
See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
# Click a first point on the 3D view, or type a [[Draft_Coordinates|coordinate]]

# Click a second point on the 3D view, or type a [[Draft_Coordinates|coordinate]]
<div class="mw-translate-fuzzy">
==Použití==
# Stiskněte tlačítko {{KEY|[[Image:Draft Line.png|16px]] [[Draft Line|Přímka]]}} nebo klávesy {{KEY|L}} pak {{KEY|I}}
# Klikněte na první bod ve 3D pohledu nebo zadejte souřadnice
# Klikněte na druhý bod ve 3D pohledu nebo zadejte souřadnice.
</div>


==Options==
==Options==

* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after the first point to constrain the second point on the given axis.
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).
* 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 check/uncheck the {{KEY|'''Relative'''}} button. 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 (0,0,0) origin point.
<div class="mw-translate-fuzzy">
* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. 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 Line button again.
==Volby==
* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Po zadání prvního bodu stiskněte {{KEY|X}}, {{KEY|Y}} nebo {{KEY|Z}} pro určení osy druhého bodu.
* Press {{KEY|SHIFT}} while drawing to [[Draft_Constrain|constrain]] your second point horizontally or vertically in relation to the first one.
* Pro zadání souřadnic ručně, jednoduše zadejte číslo a stiskněte {{KEY|ENTER}} mezi každou z komponent X, Y a Z.
* Press {{KEY|CTRL}}+{{KEY|Z}} or press the {{KEY|[[Image:Draft UndoLine.png|12px]] '''[[Draft_UndoLine|Undo]]'''}} button to undo the last point.
* Stiskněte klávesu {{KEY|R}} nebo klikněte/odklikněte zaklikávací políčko {{KEY|'''Relativní'''}}. Je-li nastaven relativní mód jsou souřadnice následujícího bodu relativní k předchozímu bodu. Je-li mód absolutní souřadnice jsou vztaženy k počátečnímu bodu (0,0,0).
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current Line command.
* Stiskněte klávesu {{KEY|T}} nebo klikněte/odklikněte zaklikávací políčko {{KEY|'''Pokračovat'''}}. Je-li nastaven pokračovací mód, nástroj Přímka bude po ukončení křivky restartován a připraven ke kreslení další přímky bez nutnosti znovu jej spouštět klikáním na tlačítko Přímka.
* Stiskněte při kreslení klávesu {{KEY|CTRL}} pro [[Draft_Snap|přichycení]] Vašeho bodu k nejbližšímu uchopovacímu místu, nezávisle na vzdálenosti od něho.
* Stiskněte při kreslení klávesu {{KEY|SHIFT}} pro nastavení [[Draft_Constrain|vazby]] Vašeho dalšího bodu vodorovně nebo svisle v relaci k předchozímu bodu.
* Stiskněte klávesy {{KEY|CTRL}}+{{KEY|Z}} nebo tlačítko {{KEY|[[Image:Draft UndoLine.png|12px]] '''Undo'''}} ke zrušení posledního bodu.
* Stiskněte klávesu {{KEY|ESC}} nebo tlačítko {{KEY|'''Cancel'''}} pro ukončení aktuálního příkazu Přímka.
</div>

==Notes==

* A Draft Line can be edited with the [[Draft_Edit|Draft Edit]] command.
* 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.

==Preferences==

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.


==Properties==
==Properties==

* {{PropertyData|Start}}: The start point
<div class="mw-translate-fuzzy">
* {{PropertyData|End}}: The end point
==Vlastnosti==
* {{PropertyData/cs|Počátek}}: Počáteční bod
* {{PropertyData/cs|Konec}}: Koncový bod
* {{PropertyData/cs|Subdivisions}}: Divides the line with the given number of subdivisions {{version|0.16}}
</div>


==Scripting==
==Scripting==

The Line tool can by used in [[macros]] and from the python console by using the following function:
<div class="mw-translate-fuzzy">
<syntaxhighlight>
==Skriptování==
Nástroj Přímka může být využit v [[macros|makrech]] a z konzoly Pythonu použitím následující funkce:
</div>

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.

{{Code|code=
{{Code|code=
line = make_line(p1, p2)
makeLine (Vector, Vector)
line = make_line(LineSegment)
line = make_line(Shape)
}}
}}
</syntaxhighlight>
* Creates a line between the two given vectors. The current draft linewidth and color will be used.
* Returns the newly created object.


<div class="mw-translate-fuzzy">
Example:
* Vytvoří přímku mezi dvěma zadanými vektory. Pro kreslení je použita aktuálně nastavená šířka a barva čáry.
<syntaxhighlight>
* Vrací nově vytvořený objekt.
</div>

Příklad:

{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft
Draft.makeLine(FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,0,0))

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()
}}
}}
</syntaxhighlight>



{{clear}}
{{Docnav
<languages/>
|
|[[Draft_Wire|Wire]]
|[[Draft_Workbench|Draft]]
|IconL=
|IconR=Draft_Wire.svg
|IconC=Workbench_Draft.svg
}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 05:00, 9 January 2024

Kreslení Přímka

Umístění Menu
Kreslení → Přímka
Pracovní stoly
Kreslení, Architektura
Výchozí zástupce
L I
Představen ve verzi
-
Viz také
Kreslení drát

Description

Popis

Nástroj Přímka vytváří rovnou dvoubodovou přímku v aktuální pracovní rovině. Použije se tloušťka čáry a barva předem zadaná v záložce Nástrojů. Nástroj Přímka se chová přesně stejně jako nástroj Drát (lomená čára) kromě toho že končí po zadání dvou bodů.

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

Usage

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

Použití

  1. Stiskněte tlačítko Přímka nebo klávesy L pak I
  2. Klikněte na první bod ve 3D pohledu nebo zadejte souřadnice
  3. Klikněte na druhý bod ve 3D pohledu nebo zadejte souřadnice.

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 (for version 0.22).

Volby

  • Po zadání prvního bodu stiskněte X, Y nebo Z pro určení osy druhého bodu.
  • Pro zadání souřadnic ručně, jednoduše zadejte číslo a stiskněte ENTER mezi každou z komponent X, Y a Z.
  • Stiskněte klávesu R nebo klikněte/odklikněte zaklikávací políčko Relativní. Je-li nastaven relativní mód jsou souřadnice následujícího bodu relativní k předchozímu bodu. Je-li mód absolutní souřadnice jsou vztaženy k počátečnímu bodu (0,0,0).
  • Stiskněte klávesu T nebo klikněte/odklikněte zaklikávací políčko Pokračovat. Je-li nastaven pokračovací mód, nástroj Přímka bude po ukončení křivky restartován a připraven ke kreslení další přímky bez nutnosti znovu jej spouštět klikáním na tlačítko Přímka.
  • Stiskněte při kreslení klávesu CTRL pro přichycení Vašeho bodu k nejbližšímu uchopovacímu místu, nezávisle na vzdálenosti od něho.
  • Stiskněte při kreslení klávesu SHIFT pro nastavení vazby Vašeho dalšího bodu vodorovně nebo svisle v relaci k předchozímu bodu.
  • Stiskněte klávesy CTRL+Z nebo tlačítko Undo ke zrušení posledního bodu.
  • Stiskněte klávesu ESC nebo tlačítko Cancel pro ukončení aktuálního příkazu Přímka.

Notes

Preferences

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.

Properties

Vlastnosti

  • DATAPočátek: Počáteční bod
  • DATAKonec: Koncový bod
  • DATASubdivisions: Divides the line with the given number of subdivisions introduced in version 0.16

Scripting

Skriptování

Nástroj Přímka může být využit v makrech a z konzoly Pythonu použitím následující funkce:

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)
  • Vytvoří přímku mezi dvěma zadanými vektory. Pro kreslení je použita aktuálně nastavená šířka a barva čáry.
  • Vrací nově vytvořený objekt.

Příklad:

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()