Hi Andy,
There's a little bug in the __init__.py file in the OCC directory, I
noticed the same issue.
Just comment out the __all__ list and you'll be good.
( Basically the import call is not finding the Display module. )
Cheers,
-jelle
import os
#
#Define OpenCascade behaviour settings
#
os.environ['MMGT_CLEAR']='1'
os.environ['MMGT_OPT']='1'
os.environ['MMGT_REENTRANT']='0'
os.environ['CSF_EXCEPTION_PROMPT']='1'
VERSION='md0.1'
#
# __all__=['Standard',
# 'MMgt',
# 'Precision',
# 'Quantity',
# 'TCollection',
# 'TColgp',
# 'TColStd',
# 'TColGeom',
# 'TColGeom2d',
# 'TColQuantity',
# 'TShort',
# 'gce',
# 'CPnts',
# 'GCE2d',
# 'Poly',
# 'GC',
# 'GProp',
# 'gp',
# 'GCPnts',
# 'TopoDS',
# 'TopoDSToStep',
# 'TopLoc',
# 'TopExp',
# 'TopTools',
# 'MoniTool',
# 'Interface',
# 'IFSelect',
# 'Transfer',
# 'XSAlgo',
# 'XSControl',
# 'RWStl',
# 'StlAPI',
# 'StlMesh',
# 'Vrml',
# 'VrmlAPI',
# 'VrmlConverter',
# 'TopAbs',
# 'Adaptor2d',
# 'Adaptor3d',
# 'ChFi2d',
# 'ChFi3d',
# 'ChFiDS',
# 'Contap',
# 'HLRAlgo',
# 'TNaming',
# 'TFunction',
# 'TDF',
# 'GccAna',
# 'GccEnt',
# 'GccInt',
# 'GccIter',
# 'Convert',
# 'Blend',
# 'BlendFunc',
# 'BooleanOperations',
# 'BOP',
# 'BOPTools',
# 'BOPTColStd',
# 'Extrema',
# 'AppParCurves',
# 'Approx',
# 'ApproxInt',
# 'AppBlend',
# 'MeshAlgo',
# 'MeshDS',
# 'MeshShape',
# 'Intf',
# 'IntRes2d',
# 'IntCurveSurface',
# 'IntSurf',
# 'IntImp',
# 'LProp',
# 'LProp3d',
# 'Hatch',
# 'HatchGen',
# 'Geom2dAdaptor',
# 'Geom2dAPI',
# 'Geom2dConvert',
# 'Geom2dGcc',
# 'Geom2dHatch',
# 'Geom2dInt',
# 'Geom2dLProp',
# 'Geom2dToIGES',
# 'Geom2d',
# 'GeomAbs',
# 'GeomAdaptor',
# 'GeomAPI',
# 'GeomConvert',
# 'GeomFill',
# 'GeomInt',
# 'GeomLib',
# 'GeomLProp',
# 'AdvApp2Var',
# 'Geom',
# 'GeomPlate',
# 'GeomProjLib',
# 'GeomToIGES',
# 'GeomTools',
# 'GeomToStep',
# 'GProp',
# 'IGESToBRep',
# 'IGESControl',
# 'STEPControl',
# 'BRep',
# 'BRepPrimAPI',
# 'BRepMesh',
# 'BRepBlend',
# 'BRepBuilderAPI',
# 'BRepCheck',
# 'BRepClass',
# 'BRepClass3d',
# 'BRepExtrema',
# 'BRepFill',
# 'BRepGProp',
# 'BRepAlgo',
# 'BRepAlgoAPI',
# 'BRepLib',
# 'MAT',
# 'BRepMAT2d',
# 'Draft',
# 'BRepOffsetAPI',
# 'BRepOffset',
# 'Primitives',
# 'BRepPrim',
# 'BRepProj',
# 'BRepSweep',
# 'BRepToIGES',
# 'BRepTools',
# 'BRepTopAdaptor',
# 'BRepFilletAPI',
# 'BRepBndLib',
# 'BRepApprox',
# 'HLRBRep',
# 'TopOpeBRepDS',
# 'TopOpeBRep',
# 'TopOpeBRepTool',
# 'math',
# 'Law',
# 'FilletSurf',
# 'Bnd',
# 'BndLib',
# 'MFT',
# 'OSD',
# 'Message',
# 'ShapeAlgo',
# 'ShapeBuild',
# 'ShapeConstruct',
# 'ShapeCustom',
# 'ShapeExtend',
# 'ShapeFix',
# 'ShapeProcess',
# 'ShapeUpgrade',
# 'ShapeAnalysis',
# 'Units',
# 'Aspect',
# 'SelectBasics',
# 'V2d',
# 'Viewer',
# 'V3d',
# 'Dynamic',
# 'Materials',
# 'PS',
# 'PlotMgt',
# 'PS_Driver',
# 'Xw',
# 'Graphic2d',
# 'Graphic3d',
# 'Prs3d',
# 'PrsMgr',
# 'SelectMgr',
# 'DsgPrs',
# 'AIS',
# 'Voxel',
# 'Visualization',
# 'Misc'
# ]
when I try to run the CADViewer.py demo I get following errors:
In [27]: run CADViewer.py
---------------------------------------------------------------------------
ImportError Traceback (most recent
call last)
E:\home\ennemosa\TOOLS\Python\OpenCascade\PythonOCC_Demos\CADViewer
\CADViewer.py in <module>()
39
40 import OCC
---> 41 from OCC.Display.wxDisplay import wxViewer3d
42
43 class AppFrame(wx.Frame):
ImportError: No module named Display.wxDisplay
WARNING: Failure executing file: <CADViewer.py>
I run Python (python-2.5.4.msi) and corresponding wxPython
(wxPython2.8-win32-unicode-2.8.9.1-py25.exe) and Open CASCADE 6.3.0
on Windows.
I have the same problem (obviously) with InteractiveViewer.py
Can you help. Please advise.
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users