|
| 1 | +##Copyright 2010-2014 Thomas Paviot (tpaviot@gmail.com) |
| 2 | +## |
| 3 | +##This file is part of pythonOCC. |
| 4 | +## |
| 5 | +##pythonOCC is free software: you can redistribute it and/or modify |
| 6 | +##it under the terms of the GNU Lesser General Public License as published by |
| 7 | +##the Free Software Foundation, either version 3 of the License, or |
| 8 | +##(at your option) any later version. |
| 9 | +## |
| 10 | +##pythonOCC is distributed in the hope that it will be useful, |
| 11 | +##but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +##GNU Lesser General Public License for more details. |
| 14 | +## |
| 15 | +##You should have received a copy of the GNU Lesser General Public License |
| 16 | +##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>. |
| 17 | + |
| 18 | +from OCC.Display.SimpleGui import init_display |
| 19 | +from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox |
| 20 | + |
| 21 | +# wx test |
| 22 | +wx_display, start_display, add_menu, add_function_to_menu = init_display('wx') |
| 23 | +my_box = BRepPrimAPI_MakeBox(10., 20., 30.).Shape() |
| 24 | +wx_display.DisplayShape(my_box, update=True) |
| 25 | + |
| 26 | +# qt test |
| 27 | +qt_display, start_display, add_menu, add_function_to_menu = init_display('qt') |
| 28 | +my_box = BRepPrimAPI_MakeBox(10., 20., 30.).Shape() |
| 29 | +qt_display.DisplayShape(my_box, update=True) |
0 commit comments