From 1fc47ecc1a0b0d7e7cffda14f97a6b123dee1596 Mon Sep 17 00:00:00 2001 From: yorikvanhavre Date: Sat, 24 Dec 2011 13:35:01 -0200 Subject: [PATCH] + extended DraftSnap --- src/Mod/Draft/DraftSnap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/DraftSnap.py b/src/Mod/Draft/DraftSnap.py index 73065e694..78f955ce3 100644 --- a/src/Mod/Draft/DraftSnap.py +++ b/src/Mod/Draft/DraftSnap.py @@ -547,7 +547,12 @@ class Snapper: def getPoint(self,last=None,callback=None): """getPoint([last],[callback]) : gets a 3D point from the screen. You can provide an existing point, in that case additional snap options and a tracker are available. You can also passa function as - callback, which will get called with the resulting point as argument, when a point is clicked.""" + callback, which will get called with the resulting point as argument, when a point is clicked: + + def cb(point): + print "got a 3D point: ",point + FreeCADGui.Snapper.getPoint(callback=cb) + """ self.pt = None self.ui = FreeCADGui.draftToolBar self.view = FreeCADGui.ActiveDocument.ActiveView