Draft Line/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav
|
|
Line 19: Line 20:
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ů.
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>
</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 26: Line 29:


==Usage==
==Usage==

See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 34: Line 39:
</div>
</div>


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


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.
=== Fusing single lines ===
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 [[Image:Workbench_Part.svg|24px]] Wire will not be editable. To '''create an editable wire''', use {{Button|[[Image:Draft_Upgrade.svg|16px]] [[Draft_Upgrade|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.

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


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 53: Line 54:
* Stiskněte klávesu {{KEY|ESC}} nebo tlačítko {{KEY|'''Cancel'''}} pro ukončení aktuálního příkazu Přímka.
* Stiskněte klávesu {{KEY|ESC}} nebo tlačítko {{KEY|'''Cancel'''}} pro ukončení aktuálního příkazu Přímka.
</div>
</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.
* If the {{MenuCommand|Edit → Preferences... → Draft → General settings → Draft tools options → Use Part Primitives when available}} option is checked, the command will create a [[Part_Line|Part Line]] instead of a Draft Line. See [[Draft_Preferences#General_settings|Draft Preferences]].

==Properties==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 61: Line 70:
</div>
</div>


===Data===
==Scripting==
* {{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">
<div class="mw-translate-fuzzy">
Line 77: Line 77:
</div>
</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.
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)
line = make_line(p1, p2)
Line = makeLine(LineSegment)
line = make_line(LineSegment)
Line = makeLine(Shape)
line = make_line(Shape)
}}
}}


Line 90: Line 91:


Příklad:
Příklad:

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


_doc = App.newDocument()
doc = App.newDocument()


p1 = App.Vector(0, 0, 0)
p1 = App.Vector(0, 0, 0)
Line 101: Line 103:
p4 = App.Vector(500, 1000, 0)
p4 = App.Vector(500, 1000, 0)


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

_doc.recompute()
doc.recompute()
}}
}}



{{Docnav
{{Docnav
Line 117: Line 121:
{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Revision as of 11:14, 4 May 2021

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.

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

  • A Draft Line can be edited with the Draft Edit command.
  • Draft Lines and Draft Wires can be joined with the Draft Wire command, the Draft Join command or the Draft Upgrade command.
  • If the Edit → Preferences... → Draft → General settings → Draft tools options → Use Part Primitives when available option is checked, the command will create a Part Line instead of a Draft Line. See Draft Preferences.

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