Draft SelectPlane/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{Docnav
{{Docnav|[[Draft_Stretch|Stretch]]|[[Draft_FinishLine|Finish line]]|[[Draft_Module|Draft]]|IconL=Draft_Stretch.svg|IconC=Workbench_Draft.svg|IconR=Draft_FinishLine.png}}
|[[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">
<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>
</div>

==Description==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 23: Line 32:
</div>
</div>


The {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}} button is present in the [[Draft Tray]] toolbar, which only appears in the [[Draft Module|Draft]] and [[Arch Module|Arch]] workbenches.
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.


=== Without element selected ===
=== Without element selected ===


# Press the {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane|SelectPlane]]}} button.
# 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 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}}.
# 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.png|16px]] Top}}, {{Button|[[Image:Draft SelectPlane.svg|16px]] Front}}, {{Button|[[Image:Draft SelectPlane.svg|16px]] Side}}, {{Button|[[Image:Draft SelectPlane.png|16px]] Auto}}, {{Button|[[Image:Draft SelectPlane.svg|16px]] d(0.0,-1.0,0.0)}}.
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}}.
You can show and hide the grid with the shortcut {{KEY|G}} {{KEY|R}}.
Line 37: Line 46:
=== With element selected ===
=== 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}}
# 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]]}}.
# 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.
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">
<div class="mw-translate-fuzzy">
Line 55: Line 66:
</div>
</div>


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


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

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


Workplane = FreeCAD.DraftWorkingPlane
workplane = App.DraftWorkingPlane


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


Workplane.alignToPointAndAxis(v1, v2, 17)
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.
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">
<div class="mw-translate-fuzzy">
Příklad:
Příklad:
</div>
</div>

{{Code|code=
{{Code|code=
import WorkingPlane
import WorkingPlane


Plane = WorkingPlane.plane()
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.
{{Docnav|[[Draft_Stretch|Stretch]]|[[Draft_FinishLine|Finish line]]|[[Draft_Module|Draft]]|IconL=Draft_Stretch.svg|IconC=Workbench_Draft.svg|IconR=Draft_FinishLine.png}}
{{Code|code=
import FreeCAD as App
import DraftTrackers


App.DraftWorkingPlane.alignToPointAndAxis(App.Vector(0, 0, 0),
{{Draft Tools navi}}
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}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

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.