Draft Line/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "Kreslení Přímka")
 
(Updating to match new version of source page)
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Draft Line|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Line|Shortcut=L I|SeeAlso=[[Draft Wire]]}}
{{Docnav||[[Draft_Wire|Wire]]|[[Draft_Module|Draft]]|IconC=Workbench_Draft.svg|IconR=Draft_Wire.svg}}


<div class="mw-translate-fuzzy">
==Description==
{{GuiCommand/cs|Name=Draft Line|Name/cs=Kreslení Přímka|Workbenches=[[Draft Module/cs|Kreslení]], [[Arch Module/cs|Architektura]]|MenuLocation=Kreslení → Přímka|Shortcut=L I|SeeAlso=[[Draft Wire/cs|Kreslení drát]]}}
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.
</div>


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

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


<div class="mw-translate-fuzzy">
==How to use==
==Použití==
# Press the {{KEY|[[Image:Draft Line.png|16px]] [[Draft Line]]}} button, or press {{KEY|L}} then {{KEY|I}} keys
# Stiskněte tlačítko {{KEY|[[Image:Draft Line.png|16px]] [[Draft Line|Přímka]]}} nebo klávesy {{KEY|L}} pak {{KEY|I}}
# 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]]
# Klikněte na první bod ve 3D pohledu nebo zadejte [[Draft_Coordinates|souřadnice]]
# Klikněte na druhý bod ve 3D pohledu nebo zadejte [[Draft_Coordinates|souřadnice]].
</div>


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|Draft Edit]]}} button. Then you can move the points to a new position.
==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.
* 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.
* 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.
* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Press {{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 {{KEY|[[Image:Draft UndoLine.png|12px]] '''[[Draft_UndoLine|Undo]]'''}} button to undo the last point.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current Line command.


===Fusing single lines===
==Properties==
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|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|Draft Wire]]}} tool.
* {{PropertyData|Start}}: The start point
* {{PropertyData|End}}: The end point


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.
==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>
==Volby==
* Po zadání prvního bodu stiskněte {{KEY|X}}, {{KEY|Y}} nebo {{KEY|Z}} pro určení osy druhého bodu.
* 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.
* 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).
* 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]] '''[[Draft_UndoLine|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>

<div class="mw-translate-fuzzy">
==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>

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

===View===
* {{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".

<div class="mw-translate-fuzzy">
==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>

The Line tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
{{Code|code=
{{Code|code=
Line = makeLine(p1, p2)
makeLine (Vector, Vector)
Line = makeLine(LineSegment)
Line = makeLine(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, Draft

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

Line1 = Draft.makeLine(p1, p2)
Line2 = Draft.makeLine(p3, p4)
}}
}}
</syntaxhighlight>


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

{{Draft Tools navi}}

{{Userdocnavi}}
{{clear}}
{{clear}}
<languages/>

Revision as of 09:59, 14 September 2019

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

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

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.

The line can be edited by double clicking on the element in the tree view, or by pressing the Draft Edit button. Then you can move the points to a new position.

Fusing single lines

If several connected Draft Lines are selected they can be fused into a wire by pressing the Draft Upgrade tool; however, this wire will not be editable. To create an editable wire, use Draft Upgrade three more times on the new shapes (wire, closed wire, face). You can also fuse the original lines with the Draft Wire tool.

A wire can also be created from a single line by adding another point anywhere along its length. To do this, press the add point button, and click anywhere on the line.

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.

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

Data

  • ÚdajeStart: specifies the start point.
  • ÚdajeEnd: specifies the end point.
  • ÚdajeSubdivisions: specifies the number of interior nodes in the line. introduced in version 0.16
  • ÚdajeLength: (read-only) specifies the length of the segment.

View

  • PohledEnd 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.
  • PohledArrow Size: specifies the size of the symbol displayed at the end of the line.
  • PohledArrow Type: specifies the type of symbol displayed at the end of the line, which can be "Dot", "Circle", "Arrow", or "Tick".

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:

The Line tool can be used in macros and from the Python console by using the following function:

Line = makeLine(p1, p2)
Line = makeLine(LineSegment)
Line = makeLine(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, Draft

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

Line1 = Draft.makeLine(p1, p2)
Line2 = Draft.makeLine(p3, p4)