summaryrefslogtreecommitdiff
path: root/gui/occ_shell.py
blob: 41473d99226a2b66dc0ec9bfed150b78fb608eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python
#occ_shell.py: display a simple GUI that doesn't take over your python session
#
#how to get an interactive interpreter with pythonOCC running:
#ipython -wthread -c "import occ_shell as shell" -i
#
#>>>shell.start()
#how to get something you have clicked on:
#>>>my_shape = shell.selected()

import OCC.Display.wxSamplesGui

if __name__ == '__main__':
    OCC.Display.wxSamplesGui.start_display()

def start():
    OCC.Display.wxSamplesGui.display.Create()
def selected():
    return OCC.Display.wxSamplesGui.display.Context.SelectedShape()