Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Draft
- from FreeCAD import Vector
- '''
- moves object upper left hand corner to origin
- with top surface of part at z=0
- '''
- sel=Gui.Selection.getSelection()
- Xmin = sel[0].Shape.BoundBox.XMin
- Ymax = sel[0].Shape.BoundBox.YMax
- Zmax = sel[0].Shape.BoundBox.ZMax
- xmove = 0 - Xmin
- ymove = 0 - Ymax
- zmove = 0 - Zmax
- Draft.move(sel,Vector(xmove,ymove,zmove))
- App.activeDocument().recompute()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement