2014/1/10 Marko <marko...@gmail.com> > 2014/1/10, Thomas Paviot <tpav...@gmail.com>: > > 2014/1/10 Marko <marko...@gmail.com> > > > >> 2014/1/10, Thomas Paviot <tpav...@gmail.com>: > >> > 2013/12/30 Marko <marko...@gmail.com> > >> > > >> >> As you probably know, I'm developing a simple CAD application (Kubos) > >> >> based on pythonOCC. > >> >> > >> >> My application was originally based on the "SimpleGui" module which > >> >> comes with pythonOCC. In the past I have essentially developed a more > >> >> sophisticated version of SimpleGui which acts as a backend for > "Kubos" > >> >> and "Kubos Script". Recently I have put some effort into separating > >> >> the backend and the frontends more cleanly and I think that the > >> >> backend could be useful for other projects as well now. > >> >> > >> >> Using the backend of Kubos you can easily: > >> >> > >> >> * start a simple CAD application with a single line of code > >> >> * add new actions to the toolbar and menu > >> >> * add predefined actions (import / export STEP files, view control, > >> >> ...) > >> >> * add new or predefined interactive modeling tools > >> >> * add undo/redo > >> >> > >> >> You can watch a short demo here: > >> >> https://www.youtube.com/watch?v=O8a1mm79flA > >> >> > >> >> The code is here: https://sourceforge.net/p/kubos > >> >> > >> >> I hope this will be helpful for others! Currently there's little > >> >> documentation about it. If you'd like to use it, feel free to ask me > >> >> anything. > >> >> > >> >> Question to the developers of pythonOCC: As this is derived from > >> >> pythonOCC's SimpleGui, I thought it would make sense to integrate it > >> >> back into pythonOCC - not as a replacement of SimpleGui, but as an > >> >> additional option. Any interest? (I can provide more details if > you're > >> >> interested) > >> >> > >> >> Marko > >> >> > >> >> > >> > Hi Marko, > >> > > >> > This is very interesting, thank you for sharing. I'm trying to get > >> > kubos > >> > work on my Windows machine (PyQt was dropped from my Mac when I > >> > upgraded > >> to > >> > OSX Maverick), but it fails with the following trace: > >> > Traceback (most recent call last): > >> > File "__main__.pyw", line 34, in <module> > >> > from app import app > >> > File "Z:\kubos\kubos\app.py", line 20, in <module> > >> > app = _KubosApp(appdir=_file) > >> > File "Z:\kubos\kubos\appclass.py", line 44, in __init__ > >> > from doc import doc_ctrl > >> > File "Z:\kubos\kubos\doc.py", line 9, in <module> > >> > import active_tool > >> > File "Z:\kubos\kubos\active_tool.py", line 48, in <module> > >> > activate_select_tool() > >> > File "Z:\kubos\kubos\active_tool.py", line 19, in > >> > activate_select_tool > >> > select.action.trigger() > >> > File "Z:\kubos\kubos\tools\tool.py", line 47, in _get_action > >> > checkable=True, parent=None) > >> > File "Z:\kubos\kubos\lib\action.py", line 27, in __init__ > >> > self.setToolTip(tooltip) > >> > TypeError: QAction.setToolTip(QString): argument 1 has unexpected type > >> > 'NoneType > >> > >> This is very interesting, thanks for pointing this out. My guess is > >> that we have different versions of PyQt. I didn't know that there were > >> incompatibilities like this between PyQt versions - this is good to > >> know. > >> I'm using PyQt 4.9, the latest version would be 4.10. In PyQt 4.9, > >> setToolTip() accepts "None" as an argument without any issues. > >> > >> Could you post your PyQt version, then I could have a closer look at > >> this? > >> > >> You can find the version through these commands: > >> >>>from PyQt4 import Qt > >> >>>Qt.PYQT_VERSION_STR > >> > >> Anyways this issue seems to be easy to fix and I'll probably release a > >> fixed version in the next days. > >> > > > > '4.9.6' > > > > This is the PyQt shipped with the latest python(x,y) ( > > https://code.google.com/p/pythonxy/). > > Hm, this is strange. Anywas, I have prepared a new release "0.2a2" > which should fix this issue. > It's available at https://sourceforge.net/projects/kubos/files/ > > I still have the same issue with PyQt: Traceback (most recent call last): File "__main__.pyw", line 34, in <module> from app import app File "Z:\kubos\kubos\app.py", line 22, in <module> app.run() File "Z:\kubos\kubos\appclass.py", line 93, in run self.load_actions('actions.help') File "Z:\kubos\kubos\lib\cadappqt.py", line 63, in load_actions module = _importlib.import_module(name) File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module __import__(name) File "Z:\kubos\kubos\actions\help.py", line 77, in <module> open_known_issues = Action(known_issues.show, ['&Help', '&Known Issues']) File "Z:\kubos\kubos\lib\action.py", line 25, in __init__ if QIcon.hasThemeIcon(icon): TypeError: QIcon.hasThemeIcon(QString): argument 1 has unexpected type 'NoneType'
Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users