使用其网站上的基本示例:
from OCC.Display.SimpleGui import init_display
from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox
display, start_display, add_menu, add_function_to_menu = init_display()
my_box = BRepPrimAPI_MakeBox(10., 20., 30.).Shape()
display.DisplayShape(my_box, update=True)
start_display()我不能让它跑?有什么想法吗?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\WinPython-32bit-2.7.6.4\python-2.7.6\lib\site-packages\OCC\Display\SimpleGui.py", line 164, in init_display
win.canva.InitDriver()
File "C:\WinPython-32bit-2.7.6.4\python-2.7.6\lib\site-packages\OCC\Display\pysideDisplay.py", line 79, in InitDriver
self._display = OCCViewer.Viewer3d(self.GetHandle())
File "C:\WinPython-32bit-2.7.6.4\python-2.7.6\lib\site-packages\OCC\Display\pysideDisplay.py", line 55, in GetHandle
return int(self.winId())
TypeError: int() argument must be a string or a number, not 'PyCObject'发布于 2015-01-08 13:30:25
这是一个重复的github问题:
https://github.com/tpaviot/pythonocc-core/issues/68
我们需要知道您所使用的GUI库以及您使用的pythonocc的哪个顶点。这是较旧版本的pythonocc,当前您可以在这里找到。
为什么不试着安装新版本呢?重要的是,您已经安装的OCE库匹配。所以pythonocc核0.16和OCE 0.16
https://stackoverflow.com/questions/27807827
复制相似问题