Hi Thomas,
I meant one issue with linking Sketcher.i (I did geom project).  There were 
some warnings with swig not being able to treat overloading.
My cmake fix is not really a proper fix but rather a simple way to make it 
work.  The problem was with
INSTALL(FILES ${CMAKE_BINARY_DIR}/${LIBRARY_OUTPUT_PATH}/${OCE_MODULE}.py 
DESTINATION ${${PROJECT_NAME}_INSTALL_DIRECTORY} )INSTALL(FILES 
${CMAKE_BINARY_DIR}/${LIBRARY_OUTPUT_PATH}/_${OCE_MODULE}.${EXTENSION} 
DESTINATION ${${PROJECT_NAME}_INSTALL_DIRECTORY} )
which I changed into
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}${OCE_MODULE}.py DESTINATION 
${${PROJECT_NAME}_INSTALL_DIRECTORY} )INSTALL(FILES 
${LIBRARY_OUTPUT_PATH}Release/_${OCE_MODULE}.${EXTENSION} DESTINATION 
${${PROJECT_NAME}_INSTALL_DIRECTORY} )
and did the same change at other places where it was doing the same thing.  
Now, I don't know if something was wrong with my paths, but I had to change 
these lines since it was obvious that cmake was looking at a wrong place.
With regards to display error which is the most serious since I cannot run my 
programs from 32 bit windows,  I realized that graphic module was using wx (my 
version wxPython2.8-win64-unicode-py26 on python 2.6.5), but qt is possible.  
So, I installed pyQt4 and forced backhand in SimplyGUI.py to USED_BACKEND ='qt' 
and the display showed up.  But only a couple of surface selections worked, 
others selections were crashing the application.   So, at least graphics works, 
but something may be wrong with my installation since my unitest doesn't 
succeed.
d:\pythonOCC\src\unittest>python 
test_all.pyMSG:..\src\GEOMImpl\GEOMImpl_IShapesOperations.cpp [154] : 
GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations
[PAF] all operations registered[PAF] ParametricModelingContext initializedwhen 
a module returns an object defined in another module, ... Test: automatic 
import of dependent modulesoktestDict 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: python 
dictsoktestDumpToString (wrapper_features_unittest.TestWrapperFeatures) ... 
Test: pickling of TopoDS_ShapesoktestFT1 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: Standard_Integer & by 
reference transformatoroktestHash 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: __hash__ 
overloadingoktest that the == wrapper is ok ... oktestList 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: python listsoktest 
that the != wrapper is ok ... oktest if the classes with protected constructors 
can be created ... Test: protected constructoroktest that arguments returned by 
ref transormation is ok ... First point coords :  (40.0, 0.0, 0.0)(40.0, 0.0, 
0.0)oktestStandardBooleanByRefPassedReturned 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: Standard_Boolean & by 
reference transformatoroktestStandardIntegerByRefPassedReturned 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: Standard_Integer & by 
reference transformatoroktestStaticMethod 
(wrapper_features_unittest.TestWrapperFeatures) ... Test : wrapper for C++ 
static methodsoktestSubClass (wrapper_features_unittest.TestWrapperFeatures) 
... Test: subclassoktestTopoDS_ShapeOperators 
(wrapper_features_unittest.TestWrapperFeatures) ... oktestTopology 
(wrapper_features_unittest.TestWrapperFeatures) ... Test: Topologyoktest_axis 
(geometry_unittest.TestGeometry) ... Test: axisoktest_bezier_surfaces 
(geometry_unittest.TestGeometry) ... Test: Bezier surfacesoktest_bspline 
(geometry_unittest.TestGeometry) ... Test: bsplineoktest_circles2d_from_curves 
(geometry_unittest.TestGeometry) ... Test: circles2d from 
curvesoktest_curves2d_from_curves (geometry_unittest.TestGeometry) ... Test: 
curves 2d from curvesoktest_curves2d_from_offset 
(geometry_unittest.TestGeometry) ... Test: curves 2d from 
offsetoktest_distances (geometry_unittest.TestGeometry) ... Test: 
distancesoktest_parabola (geometry_unittest.TestGeometry) ... Test: 
parabolaoktest_pipes (geometry_unittest.TestGeometry) ... Test: 
pipesoktest_point_from_curve (geometry_unittest.TestGeometry) ... Test: point 
from curveoktest_point_from_projections (geometry_unittest.TestGeometry) ... 
Test: point from projectionsoktest_points_from_intersection 
(geometry_unittest.TestGeometry) ... Test: points from 
intersectionoktest_project_point_on_curve (geometry_unittest.TestGeometry) ... 
Test: project point on curveQ1: at Distance :4.0791322882449039Q2: at Distance 
:7.8333058011926164oktest_surface_from_curves (geometry_unittest.TestGeometry) 
... Test: surfaces from curvesoktest_surfaces_from_offsets 
(geometry_unittest.TestGeometry) ... Test: surfaces from 
offsetsoktest_surfaces_from_revolution (geometry_unittest.TestGeometry) ... 
Test: surfaces from revolutionoktest_draft_angle 
(topology_building_unittest.TestTopologyBuilding) ... Test: draft 
angledirection (1.0, 0.0, -0.0)direction (1.0, 0.0, -0.0)direction (-0.0, 1.0, 
0.0)direction (-0.0, 1.0, 0.0)direction (0.0, 0.0, 1.0)direction (0.0, 0.0, 
1.0)oktest_edge (topology_building_unittest.TestTopologyBuilding) ... Test: 
edgeoktest_evolved_shape (topology_building_unittest.TestTopologyBuilding) ... 
Test: evolved shapeoktest_face 
(topology_building_unittest.TestTopologyBuilding) ... Test: faceoktest_prism 
(topology_building_unittest.TestTopologyBuilding) ... Test: 
prismoktest_through_sections (topology_building_unittest.TestTopologyBuilding) 
... Test: through sections

... after which I get a pop up "python.exe has stopped working"
Regards,Vin


From: tpav...@gmail.com
Date: Tue, 2 Apr 2013 08:55:26 +0200
To: pythonocc-users@gna.org
Subject: Re: [Pythonocc-users] pythonOCC on Windows 7 issues

2013/4/2 Vin Yovanovich <fracta...@hotmail.com>





I installed pythonOCC from master (3/28/2013) using a OCE 0.12 which I compiled 
from sources.
Hi Vin,
Thank you for this report.

 There were some issues with linking at one project so I had to comment in 
Sketcher.i code


With "some issues", do you mean many or only one? 


/*%nodefaultctor Sketcher_GUI;...
%extend Sketcher_GUI {  void _kill_pointed() {

                delete $self;   }};*/
Interesting, I recently compiled latest pythonocc master on Win7 but did not 
compiled geom. I have to check this out.

 
And also I had to fix main cmake file as it was not pointing at the right 
source location from which it is supposed to install into OCC folder.


Can you post your fix here? 


Issuing python test_all.py goes up to test_through_sections 
(topology_building_unittest.TestTopologyBuilding) ... Test: through 
sectionsthen Python crashes.


Strange, on my windows machine, all unittest runs fine. 

 However, what is more disturbing is that running python geometry_demos.py  
gives
 ###### 3D rendering pipe initialisation #####Display3d class initialization 
starting ...

WNT Graphic device created.WNT window created.Viewer created.Traceback (most 
recent call last):  File "geometry_demos.py", line 70, in <module>    display, 
start_display, add_menu, add_function_to_menu = init_display()

  File "d:\Python26\lib\site-packages\OCC\Display\SimpleGui.py", line 121, in 
init_display    win.canva.InitDriver()  File 
"d:\Python26\lib\site-packages\OCC\Display\wxDisplay.py", line 151, in 
InitDriver

    self._display.Create()  File 
"d:\Python26\lib\site-packages\OCC\Display\OCCViewer.py", line 84, in Create    
self.Init(self._window_handle)RuntimeError: Aspect_GraphicDeviceDefinitionError

OpenGl_Window::CreateWindow: SetPixelFormat failed. Error code: 2000
Is this some kind of incompatibility with Windows 7? 
This one is a real issue. I have 2 Win7 machines: one installed on a Acer 
netbook, and a VirtualBox VM running on OSX. The same pythonocc binary fails on 
the Acer machine (with the SetPixelFormat error you report), and works on the 
VM. I have the feeling that this has something to do with OpenGl, but I can't 
figure out what's wrong. Maybe the way pythonocc initializes the graphic 
driver/window has to be fixed.


Thomas


_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users                                   
  
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to