Draft SelectPlane/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "{{GuiCommand/cs|Name=Draft SelectPlane|Name/cs=Kreslení VýběrRoviny|Workbenches=Kreslení, Architektura|MenuLocation=Kreslení -> Uti...")
(Updating to match new version of source page)
(30 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
{{Docnav
|[[Draft_Stretch|Stretch]]
|[[Draft_FinishLine|Finish line]]
|[[Draft_Module|Draft]]
|IconL=Draft_Stretch.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_FinishLine.svg
}}

<div class="mw-translate-fuzzy">
{{GuiCommand/cs|Name=Draft SelectPlane|Name/cs=Kreslení VýběrRoviny|Workbenches=[[Draft Module/cs|Kreslení]], [[Arch Module/cs|Architektura]]|MenuLocation=Kreslení -> Utility -> Výběr roviny}}
{{GuiCommand/cs|Name=Draft SelectPlane|Name/cs=Kreslení VýběrRoviny|Workbenches=[[Draft Module/cs|Kreslení]], [[Arch Module/cs|Architektura]]|MenuLocation=Kreslení -> Utility -> Výběr roviny}}
</div>


==Description==
==Description==
The Draft module features a working plane system, that allows you to specify a custom plane in the 3D space on which next Draft command will occur. There are several methods to define the working plane:
* From a selected face
* From the current view
* From a preset: top, frontal or lateral
* None, in which case the working plane is adapted automatically to the current view when you start a command, or to a face if you start drawing on an existing face.


<div class="mw-translate-fuzzy">
[[Image:Workingplane_example.jpg|400px]]
==Popis==
Modul kreslení má pracovní rovinu, která umožňuje specifikovat uživatelskou rovinu ve 3D, na které se bude realizovat následujíci kreslicí příkaz. Pro definování pracovní roviny existuje několik metod:
* Z vybrané plochy
* Z aktuálního pohledu
* Z předvolby: horní, přední nebo boční
* Žádná, v tomto případě je pracovní rovina automaticky adaptována podle aktuálního pohledu, kde spouštíte příkaz nebo na ploše, pokud začínáte kreslení na existující ploše.
</div>


[[Image:WorkingPlane_example.png|400px]]
==How to use==
{{Caption|Different working planes can be set on which to draw shapes}}
# Press the {{KEY|[[Image:Draft SelectPlane.png|16px]] [[Draft SelectPlane|SelectPlane]]}} button. If your button doesn't look like this, see this [[Basic_modeling_tutorial#DraftPlaneButton|note]].


<div class="mw-translate-fuzzy">
==Options==
==Použití==
* To set the workplane to an existing face: select a face of an existing object in the 3D view, then press the {{KEY|[[Image:Draft SelectPlane.png|16px]] [[Draft SelectPlane|SelectPlane]]}} button
# Stiskněte tlačítko {{KEY|[[Image:Draft SelectPlane.png|16px]] [[Draft SelectPlane/cs|VýběrRoviny]]}}. Pokud tlačítko nevypadá takto, podívejte se na tuto [[Basic_modeling_tutorial#DraftPlaneButton/cs|poznámku]].
* Pressing the {{KEY|'''VIEW'''}} button will set the working plane as the view plane, perpendicular to the camera axis and passing through the (0,0,0) origin point.
</div>
* Pressing the {{KEY|'''NONE'''}} will unset any current working plane. The next 2D operations will be view-dependent.
* You can also specify an offset value, which will set your working plane at a certain distance from the plane you select.


The {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}} button is present in the [[Draft Tray|Draft Tray]] toolbar, which only appears in the [[Draft Module|Draft]] and [[Arch Module|Arch]] workbenches.
==Scripting==
Working plane objects can easily be created and manipulated in scripts and [[macros]]. You can create your own, and use them independently of the current Draft working plane.


=== Without element selected ===
Example:
<syntaxhighlight>
import WorkingPlane
myPlane = WorkingPlane.plane()
</syntaxhighlight>
You can also access the current Draft working plane:
<syntaxhighlight>
import FreeCAD
draftPlane = FreeCAD.DraftWorkingPlane
</syntaxhighlight>
The working plane has a complete [http://www.freecadweb.org/api/DraftWorkingPlane.html scripting API] on its own, with convenience functions to position it and convert to/from placements.


# Press the {{Button|[[Image:Draft_SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}} button, or use {{KEY|Draft}} → {{KEY|Utilities}} → {{KEY|[[Image:Draft_SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}} from the top menu, or the keyboard shortcut {{KEY|W}} then {{KEY|P}}
# Select the offset, the grid spacing, and the main lines
# Select one of the presets: {{Button|[[Image:View-top.svg|16px]] XY (top)}}, {{Button|[[Image:View-front.svg|16px]] XZ (front)}}, {{Button|[[Image:View-right.svg|16px]] YZ (side)}}, {{Button|[[Image:View-isometric.svg|16px]] View}}, or {{Button|[[Image:View-axonometric.svg|16px]] Auto}}.

Once the plane is set, the button will change to indicate the active plane {{Button|[[Image:Draft_SelectPlane.svg|16px]] Top}}, {{Button|[[Image:Draft SelectPlane.svg|16px]] Front}}, {{Button|[[Image:Draft SelectPlane.svg|16px]] Side}}, {{Button|[[Image:Draft_SelectPlane.svg|16px]] Auto}}, {{Button|[[Image:Draft SelectPlane.svg|16px]] d(0.0,-1.0,0.0)}}.

You can show and hide the grid with the shortcut {{KEY|G}} {{KEY|R}}.

=== With element selected ===

# Select a face of an existing object in the [[3D view]], or hold {{KEY|Ctrl}} and select three vertices of any object. {{Version|0.17}}
# Press the {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}} button, or right click and select {{MenuCommand|Utilities → [[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}}.

The plane will be created aligned to the face of the object, or to the plane defined by the three vertices.

==Options==

<div class="mw-translate-fuzzy">
==Volby==
* Pro nastavení pracovní roviny na existující plochu: vyberte existující objekt ve 3D pohledu a potom stiskněte tlačítko {{KEY|[[Image:Draft SelectPlane.png|16px]] [[Draft SelectPlane/cs|VýběrRoviny]]}}
* Stisknutí tlačítka {{KEY|'''POHLED'''}} nastaví pracovní rovinu jako je rovina pohledu, kolmo k osám kamery a procházející počátkem (0,0,0).
* Stisknutí tlačítka {{KEY|'''ŽÁDNÁ'''}} zruší nastavení aktuální pracovní roviny. Následující 2D operace budou závislé na pohledu.
* Múžete také specifikovat hodnotu odsunutí, což odsune pracovní rovinu o zadanou vzdálenost od vybrané roviny.
</div>

<div class="mw-translate-fuzzy">
==Skriptování==
Objekt pracovní roviny může být snadno vyvořen a manipulován ve skriptech a [[macros/cs|makrech]]. Můžete vytvářet vlastní a používat je nezávisle na aktuální pracovní ploše Kreslení.
</div>

Working plane objects can easily be created and manipulated in [[macros|macros]] and from the [[Python|Python]] console.

<div class="mw-translate-fuzzy">
Můžete také přistupovat na aktuální pracovní rovinu Kreslení:
</div>

{{Code|code=
import FreeCAD as App
import FreeCADGui as Gui

workplane = App.DraftWorkingPlane

v1 = App.Vector(0, 0, 0)
v2 = App.Vector(1, 1, 1).normalize()

workplane.alignToPointAndAxis(v1, v2, 17)
Gui.Snapper.toggleGrid()
Gui.Snapper.toggleGrid()
}}

A Draft command must be issued after changing the working plane to update the visible grid, for example, [[Draft_Line|Line]], or just [[Draft_ToggleGrid|ToggleGrid]].

<div class="mw-translate-fuzzy">
Příklad:
</div>

{{Code|code=
import WorkingPlane

my_plane = WorkingPlane.plane()

v1 = App.Vector(0, 0, 0)
v2 = App.Vector(1, 1, 1).normalize()
my_plane.alignToPointAndAxis(v1, v2, 17)

projection = my_plane.projectPoint(App.Vector(10, 15, 2))
print(projection)
}}

To display a new grid use a new tracker object. First set up the normal working plane as you need, then create a new tracker object, then set it to the current plane, and then you can turn it on or off.
{{Code|code=
import FreeCAD as App
import DraftTrackers

App.DraftWorkingPlane.alignToPointAndAxis(App.Vector(0, 0, 0),
App.Vector(1, 0, 0),
0)

my_grid = DraftTrackers.gridTracker()
my_grid.set()
my_grid.on()
my_grid.off()
}}

This grid is merely a visual aid and doesn't allow snapping.

To have the possibility of switching quickly to different grids, in different positions, you should create a {{Button|[[File:Draft_SetWorkingPlaneProxy.svg|16px]] [[Draft_SetWorkingPlaneProxy|Working plane proxy]]}}.

{{Docnav
|[[Draft_Stretch|Stretch]]
|[[Draft_FinishLine|Finish line]]
|[[Draft_Module|Draft]]
|IconL=Draft_Stretch.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_FinishLine.svg
}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}
<languages/>

Revision as of 22:37, 18 March 2020

Kreslení VýběrRoviny

Umístění Menu
Kreslení -> Utility -> Výběr roviny
Pracovní stoly
Kreslení, Architektura
Výchozí zástupce
Nikdo
Představen ve verzi
-
Viz také
Nikdo

Description

Popis

Modul kreslení má pracovní rovinu, která umožňuje specifikovat uživatelskou rovinu ve 3D, na které se bude realizovat následujíci kreslicí příkaz. Pro definování pracovní roviny existuje několik metod:

  • Z vybrané plochy
  • Z aktuálního pohledu
  • Z předvolby: horní, přední nebo boční
  • Žádná, v tomto případě je pracovní rovina automaticky adaptována podle aktuálního pohledu, kde spouštíte příkaz nebo na ploše, pokud začínáte kreslení na existující ploše.

Different working planes can be set on which to draw shapes

Použití

  1. Stiskněte tlačítko VýběrRoviny. Pokud tlačítko nevypadá takto, podívejte se na tuto poznámku.

The SelectPlane button is present in the Draft Tray toolbar, which only appears in the Draft and Arch workbenches.

Without element selected

  1. Press the SelectPlane button, or use DraftUtilities SelectPlane from the top menu, or the keyboard shortcut W then P
  2. Select the offset, the grid spacing, and the main lines
  3. Select one of the presets: XY (top), XZ (front), YZ (side), View, or Auto.

Once the plane is set, the button will change to indicate the active plane Top, Front, Side, Auto, d(0.0,-1.0,0.0).

You can show and hide the grid with the shortcut G R.

With element selected

  1. Select a face of an existing object in the 3D view, or hold Ctrl and select three vertices of any object. introduced in version 0.17
  2. Press the SelectPlane button, or right click and select Utilities → SelectPlane.

The plane will be created aligned to the face of the object, or to the plane defined by the three vertices.

Options

Volby

  • Pro nastavení pracovní roviny na existující plochu: vyberte existující objekt ve 3D pohledu a potom stiskněte tlačítko VýběrRoviny
  • Stisknutí tlačítka POHLED nastaví pracovní rovinu jako je rovina pohledu, kolmo k osám kamery a procházející počátkem (0,0,0).
  • Stisknutí tlačítka ŽÁDNÁ zruší nastavení aktuální pracovní roviny. Následující 2D operace budou závislé na pohledu.
  • Múžete také specifikovat hodnotu odsunutí, což odsune pracovní rovinu o zadanou vzdálenost od vybrané roviny.

Skriptování

Objekt pracovní roviny může být snadno vyvořen a manipulován ve skriptech a makrech. Můžete vytvářet vlastní a používat je nezávisle na aktuální pracovní ploše Kreslení.

Working plane objects can easily be created and manipulated in macros and from the Python console.

Můžete také přistupovat na aktuální pracovní rovinu Kreslení:

import FreeCAD as App
import FreeCADGui as Gui

workplane = App.DraftWorkingPlane

v1 = App.Vector(0, 0, 0)
v2 = App.Vector(1, 1, 1).normalize()

workplane.alignToPointAndAxis(v1, v2, 17)
Gui.Snapper.toggleGrid()
Gui.Snapper.toggleGrid()

A Draft command must be issued after changing the working plane to update the visible grid, for example, Line, or just ToggleGrid.

Příklad:

import WorkingPlane

my_plane = WorkingPlane.plane()

v1 = App.Vector(0, 0, 0)
v2 = App.Vector(1, 1, 1).normalize()
my_plane.alignToPointAndAxis(v1, v2, 17)

projection = my_plane.projectPoint(App.Vector(10, 15, 2))
print(projection)

To display a new grid use a new tracker object. First set up the normal working plane as you need, then create a new tracker object, then set it to the current plane, and then you can turn it on or off.

import FreeCAD as App
import DraftTrackers

App.DraftWorkingPlane.alignToPointAndAxis(App.Vector(0, 0, 0),
                                          App.Vector(1, 0, 0),
                                          0)

my_grid = DraftTrackers.gridTracker()
my_grid.set()
my_grid.on()
my_grid.off()

This grid is merely a visual aid and doesn't allow snapping.

To have the possibility of switching quickly to different grids, in different positions, you should create a Working plane proxy.