Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.34 KB

Macro_Align_Working_Plane_to_Camera.md

File metadata and controls

39 lines (29 loc) · 1.34 KB

Macro Align Working Plane to Camera

{{Macro |Name=Macro Align Working Plane to Camera |Icon=Macro_Align_Working_Plane_to_Camera.png |Description=This macro moves the current Draft Working Plane to the center of the current view |Author=yorik |Version=1.0 |Date=2017-05-10 |Download=[https://www.freecadweb.org/wiki/images/0/01/Macro_Align_Working_Plane_to_Camera.png ToolBar Icon] |FCVersion=All |SeeAlso=Macro Align Camera to Working Plane 24px|Macro Align Camera to Working Plane }}

Description

This macro moves the current Draft Working Plane to the center of the current view. It is useful when you are working quite far from the grid center.

Usage

  • Move the view to the zone where you want to look at.
  • Run the macro.

Script

ToolBar Icon

Macro_Align_Working_Plane_to_Camera.FCMacro

{{MacroCode|code= import FreeCAD,FreeCADGui cam = FreeCAD.Vector(FreeCADGui.ActiveDocument.ActiveView.getCameraNode().position.getValue().getValue()) pos = FreeCAD.DraftWorkingPlane.projectPoint(cam) FreeCAD.DraftWorkingPlane.position = pos FreeCADGui.Snapper.setGrid() }}


documentation index > Macro Align Working Plane to Camera