Macro Align Working Plane to Camera

Text-x-python.png Macro Align Working Plane to Camera

Description
This macro moves the current Draft Working Plane to the center of the current view
Author
yorik
Links
Macros recipes
How to install macros
How to customize toolbars
Version
1.0
Date last modification
2017-05-10


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.

How to use

Script

Macro Align Working Plane to Camera.FCMacro

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() 
Online version: "http://www.freecadweb.org/wiki/index.php?title=Macro_Align_Working_Plane_to_Camera&oldid=239871"

Navigation menu