Draft Offset/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 20: Line 20:
Nástroj Odsadit odsadí vybrané objekty o zadanou vzdálenost v aktuální [[Draft SelectPlane/cs|pracovní rovině]]. Není-li vybrán žádný objekt, budete vyzváni k výběru objektu.
Nástroj Odsadit odsadí vybrané objekty o zadanou vzdálenost v aktuální [[Draft SelectPlane/cs|pracovní rovině]]. Není-li vybrán žádný objekt, budete vyzváni k výběru objektu.
</div>
</div>

Typically this tool is used in copy mode to create offset copies of a base wire while leaving this wire in the same place. The offset copies are scaled versions of the original object. To create other scaled copies use [[Draft Scale|Draft Scale]]. To produce exact copies shifted a distance use [[Draft Move|Draft Move]].


[[Image:Draft_Offset_example.jpg|400px]]
[[Image:Draft_Offset_example.jpg|400px]]
{{Caption|Offsetting a wire a certain distance from one of its edges}}
{{Caption|Offsetting a Draft Wire}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Použití==
==Použití==
</div>
</div>

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


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 35: Line 35:
# Klikněte na bod ve 3D pohledu nebo zadejte vzálenost.
# Klikněte na bod ve 3D pohledu nebo zadejte vzálenost.
</div>
</div>

The distance used to create the offset is perpendicular to one of the edges of the original shape, depending on the position of the pointer. If the pointer is moved closer to another edge, this edge now becomes the reference for the distance. Hold the {{KEY|Shift}} key to keep the current reference edge despite moving the pointer closer to other edges.


==Volby==
==Volby==

The single character keyboard shortcut and the modifier keys mentioned here can be changed. See [[Draft_Preferences|Draft Preferences]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 47: Line 47:
* Stisknutím tlačítka {{KEY|ESC}} nebo {{KEY|'''Cancel'''}} zrušíte právě probíhající příkaz.
* Stisknutím tlačítka {{KEY|ESC}} nebo {{KEY|'''Cancel'''}} zrušíte právě probíhající příkaz.
</div>
</div>

==Notes==

* To create an offset version of a [[Draft_BezCurve|Draft BezCurve]] its points are offset individually, and from the new points a new Bézier curve is calculated. This new curve is not parallel to the original curve.
* The command cannot handle [[Draft_BSpline|Draft BSplines]].

==Preferences==

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

* To change the number of decimals used for the input of the distance: {{MenuCommand|Edit → Preferences... → General → Units → Units settings → Number of decimals}}.
* To store and reuse the same copy mode setting across commands: {{MenuCommand|Edit → Preferences... → Draft → General settings → Draft tools options → Global copy mode}}.


==Scripting==
==Scripting==
Line 59: Line 71:


{{Code|code=
{{Code|code=
Offsetobj = offset(obj, delta, copy=False, bind=False, sym=False, occ=False)
offset_obj = offset(obj, delta, copy=False, bind=False, sym=False, occ=False)
}}
}}


Line 73: Line 85:


{{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(1500, 2000, 0)
p3 = App.Vector(4000, 0, 0)


p1 = FreeCAD.Vector(0, 0, 0)
wire = Draft.make_wire([p1, p2, p3])
doc.recompute()
p2 = FreeCAD.Vector(1500, 2000, 0)
p3 = FreeCAD.Vector(4000, 0, 0)


Wire = Draft.makeWire([p1, p2, p3])
vector = App.Vector(-200, 150, 0)
offset1 = Draft.offset(wire, vector, copy=True, bind=True, sym=True)
offset2 = Draft.offset(wire, 3*vector, copy=True)
offset3 = Draft.offset(wire, 6*vector, copy=True)
offset4 = Draft.offset(wire, 9*vector, copy=True)
offset5 = Draft.offset(wire, 1.5*vector, copy=True, occ=True)


doc.recompute()
vector = FreeCAD.Vector(0, 500, 0)
Offset_1 = Draft.offset(Wire, vector, copy=True)
Offset_2 = Draft.offset(Wire, 3*vector, copy=True)
Offset_3 = Draft.offset(Wire, 6*vector, copy=True)
Offset_4 = Draft.offset(Wire, 9*vector, copy=True)
Offset_5 = Draft.offset(Wire, 1.5*vector, copy=True, occ=True)
}}
}}



Revision as of 08:03, 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.

Kreslení Odsadit

Umístění Menu
Draft → Offset
Pracovní stoly
Kreslení, Architektura
Výchozí zástupce
O S
Představen ve verzi
-
Viz také
Part 2D Offset

Popis

Nástroj Odsadit odsadí vybrané objekty o zadanou vzdálenost v aktuální pracovní rovině. Není-li vybrán žádný objekt, budete vyzváni k výběru objektu.

Offsetting a Draft Wire

Použití

See also: Draft Snap and Draft Constrain.

  1. Vyberte objekty, které chcete odsadit
  2. Stiskněte tlačítko Kreslení Odsadit nebo klávesy O a potom S
  3. Klikněte na bod ve 3D pohledu nebo zadejte vzálenost.

Volby

The single character keyboard shortcut and the modifier keys mentioned here can be changed. See Draft Preferences.

  • Stiskněte klávesu T nebo zaklikněte/odklikněte políčko Pokračovat. Je-li nastaven pokračovací mód, bude nástroj Odsadit hned po ukončení připraven k odsazení nebo kopírování bez nutnosti stisknout znovu tlačítko Odsadit.
  • Stisknutí klávesy ALT nebo C nebo kliknutí na tlačítko Kopie vytvoří kopii objektu místo jeho odsazení. Podržíte-li stisknutou klávesu ALT po kliknutí na druhý bod, budete moci umístit několik kopií, až dokud neuvolníte klávesu ALT.
  • Stisknutím klávesy CTRL během kreslení vynutíte přichycení vašeho bodu k nejbližšímu uchopovacímu místu nezávisle na vzálenosti od něho.
  • Stisknutím klávesy SHIFT během kreslení nastavíte vazbu na aktuální segment místo výběru nejbližšího.
  • Stisknutím tlačítka ESC nebo Cancel zrušíte právě probíhající příkaz.

Notes

  • To create an offset version of a Draft BezCurve its points are offset individually, and from the new points a new Bézier curve is calculated. This new curve is not parallel to the original curve.
  • The command cannot handle Draft BSplines.

Preferences

See also: Preferences Editor and Draft Preferences.

  • To change the number of decimals used for the input of the distance: Edit → Preferences... → General → Units → Units settings → Number of decimals.
  • To store and reuse the same copy mode setting across commands: Edit → Preferences... → Draft → General settings → Draft tools options → Global copy mode.

Scripting

Skriptování

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

offset_obj = offset(obj, delta, copy=False, bind=False, sym=False, occ=False)
  • Odsadí zadaný drát aplikací údajů z Vectoru na první vrchol drátu .
  • Je-li copymode True, je vytvořen další objekt, jinak je odsunut původní objekt.
  • Je-li bind True a zadaný drát je otevřený, původní a odsunutý drát budou spojeny koncovými body a vytvoří plochu.
  • Je-li sym True, je odsunutí provedeno symetricky na obou stranách s celkovou šířkou rovnou délce zadaného vektoru.
  • Vrací odsunutý objekt (nebo jeho kopii, je-li copymode True).

Příklad:

import FreeCAD as App
import Draft

doc = App.newDocument()

p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1500, 2000, 0)
p3 = App.Vector(4000, 0, 0)

wire = Draft.make_wire([p1, p2, p3])
doc.recompute()

vector = App.Vector(-200, 150, 0)
offset1 = Draft.offset(wire, vector, copy=True, bind=True, sym=True)
offset2 = Draft.offset(wire, 3*vector, copy=True)
offset3 = Draft.offset(wire, 6*vector, copy=True)
offset4 = Draft.offset(wire, 9*vector, copy=True)
offset5 = Draft.offset(wire, 1.5*vector, copy=True, occ=True)

doc.recompute()