Draft SelectPlane: Difference between revisions

From FreeCAD Documentation
(→‎Without element selected: More information on setting the plane with an object selected)
(More information for the options)
Line 37: Line 37:


==Options== <!--T:5-->
==Options== <!--T:5-->
* 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.
* Press the {{Button|XY (top)}} button to set the working plane on the XY plane. You should set the view from the top or bottom (positive or negative Z direction). Press {{KEY|2}} or {{KEY|5}} to quickly change the view.
* Press the {{Button|XZ (front)}} button to set the working plane on the XZ plane. You should set the view from the front or rear (negative or positive Y direction). Press {{KEY|1}} or {{KEY|4}} to quickly change the view.
* Pressing the {{KEY|'''AUTO'''}} will unset any current working plane. The next 2D operations will be view-dependent.
* Press the {{Button|YZ (side)}} button to set the working plane on the YZ plane. You should set the view from the left or right side (positive or negative X direction). Press {{KEY|3}} or {{KEY|6}} to quickly change the view.
* You can also specify an offset value, which will set your working plane at a certain distance from the plane you select.
* Press the {{Button|View}} button will set the working plane as the view plane, perpendicular to the camera axis and passing through the origin (0,0,0).
* Press the {{Button|Auto}} button will unset any current working plane. The next 2D operations will be view-dependent.
* Set the "Offset" value to set the working place at a certain perpendicular distance from the plane you selected.
* You can hide and show the grid with the shortcut {{KEY|'''G'''}}{{KEY|'''R'''}}
* You can hide and show the grid with the shortcut {{KEY|'''G'''}}{{KEY|'''R'''}}



Revision as of 18:59, 18 November 2018

Draft SelectPlane

Menu location
Draft → Utilities → Select Plane
Workbenches
Draft, Arch
Default shortcut
W P
Introduced in version
-
See also
Draft SetWorkingPlaneProxy

Description

The Draft Workbench features a working plane system. A plane in the 3D view indicates where a Draft shape will be built. There are several methods to define the working plane:

  • From a selected face.
  • From three selected vertices.
  • From the current view.
  • From a preset: top, front, bottom, 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.

How to use

Without element selected

  1. Press the SelectPlane button.
  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).

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.

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

Options

  • Press the XY (top) button to set the working plane on the XY plane. You should set the view from the top or bottom (positive or negative Z direction). Press 2 or 5 to quickly change the view.
  • Press the XZ (front) button to set the working plane on the XZ plane. You should set the view from the front or rear (negative or positive Y direction). Press 1 or 4 to quickly change the view.
  • Press the YZ (side) button to set the working plane on the YZ plane. You should set the view from the left or right side (positive or negative X direction). Press 3 or 6 to quickly change the view.
  • Press the View button will set the working plane as the view plane, perpendicular to the camera axis and passing through the origin (0,0,0).
  • Press the Auto button will unset any current working plane. The next 2D operations will be view-dependent.
  • Set the "Offset" value to set the working place at a certain perpendicular distance from the plane you selected.
  • You can hide and show the grid with the shortcut GR

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.

Example:

import WorkingPlane
myPlane = WorkingPlane.plane()

You can also access the current Draft working plane:

import FreeCAD
draftPlane = FreeCAD.DraftWorkingPlane

To move or rotate the Draft working plane (see the WorkingPlane API page for available methods):

import FreeCAD
from FreeCAD import Vector
FreeCAD.DraftWorkingPlane.alignToPointAndAxis(Vector(0,0,0), Vector(1,1,1).normalize(), 17)

(note: a Draft command must have been issued to make grid adopt changes)

The working plane has a complete scripting API on its own, with convenience functions to position it and convert to/from placements.