# Get axes if not axes: axes = vv.gca() # Get figure fig = axes.GetFigure() if not fig: return # Init pointset, helper, and line object line = vv.plot(Pointset(2), axes=axes, ms=ms, **kwargs) pp = line._points ginputHelper.Start(axes, pp, N) # Enter a loop while ginputHelper.axes: fig._ProcessGuiEvents() time.sleep(0.1) # Remove line object and return points pp = Pointset(pp[:, :2]) line.Destroy() return pp if __name__ == '__main__': vv.cla() vv.title('Selec three points.') print(vv.ginput(3))
# Get axes if not axes: axes = vv.gca() # Get figure fig = axes.GetFigure() if not fig: return # Init pointset, helper, and line object line = vv.plot(Pointset(2), axes=axes, ms=ms, **kwargs) pp = line._points ginputHelper.Start(axes, pp, N) # Enter a loop while ginputHelper.axes: fig._ProcessGuiEvents() time.sleep(0.1) # Remove line object and return points pp = Pointset(pp[:,:2]) line.Destroy() return pp if __name__ == '__main__': vv.cla() vv.title('Selec three points.') print(vv.ginput(3))
""" # Get axes if not axes: axes = vv.gca() # Get figure fig = axes.GetFigure() if not fig: return # Init pointset, helper, and line object line = vv.plot(Pointset(2), axes=axes, ms=ms, **kwargs) pp = line._points ginputHelper.Start(axes, pp, N) # Enter a loop while ginputHelper.axes: fig._ProcessGuiEvents() time.sleep(0.1) # Remove line object and return points pp = Pointset(pp[:, :2]) line.Destroy() return pp if __name__ == '__main__': print vv.ginput(3)
""" # Get axes if not axes: axes = vv.gca() # Get figure fig = axes.GetFigure() if not fig: return # Init pointset, helper, and line object line = vv.plot(Pointset(2), axes=axes, ms=ms, **kwargs) pp = line._points ginputHelper.Start(axes, pp, N) # Enter a loop while ginputHelper.axes: fig._ProcessGuiEvents() time.sleep(0.1) # Remove line object and return points pp = Pointset(pp[:,:2]) line.Destroy() return pp if __name__ == '__main__': print vv.ginput(3)