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

> 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.py
> MSG:..\src\GEOMImpl\GEOMImpl_IShapesOperations.cpp [154] :
> GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations
>
> [PAF] all operations registered
> [PAF] ParametricModelingContext initialized
> when a module returns an object defined in another module, ... Test:
> automatic import of dependent modules
> ok
> testDict (wrapper_features_unittest.TestWrapperFeatures) ... Test: python
> dicts
> ok
> testDumpToString (wrapper_features_unittest.TestWrapperFeatures) ... Test:
> pickling of TopoDS_Shapes
> ok
> testFT1 (wrapper_features_unittest.TestWrapperFeatures) ... Test:
> Standard_Integer & by reference transformator
> ok
> testHash (wrapper_features_unittest.TestWrapperFeatures) ... Test:
> __hash__ overloading
> ok
> test that the == wrapper is ok ... ok
> testList (wrapper_features_unittest.TestWrapperFeatures) ... Test: python
> lists
> ok
> test that the != wrapper is ok ... ok
> test if the classes with protected constructors can be created ... Test:
> protected constructor
> ok
> test that arguments returned by ref transormation is ok ... First point
> coords :  (40.0, 0.0, 0.0)
> (40.0, 0.0, 0.0)
> ok
> testStandardBooleanByRefPassedReturned
> (wrapper_features_unittest.TestWrapperFeatures) ... Test: Standard_Boolean
> & by reference transformator
> ok
> testStandardIntegerByRefPassedReturned
> (wrapper_features_unittest.TestWrapperFeatures) ... Test: Standard_Integer
> & by reference transformator
> ok
> testStaticMethod (wrapper_features_unittest.TestWrapperFeatures) ... Test
> : wrapper for C++ static methods
> ok
> testSubClass (wrapper_features_unittest.TestWrapperFeatures) ... Test:
> subclass
> ok
> testTopoDS_ShapeOperators (wrapper_features_unittest.TestWrapperFeatures)
> ... ok
> testTopology (wrapper_features_unittest.TestWrapperFeatures) ... Test:
> Topology
> ok
> test_axis (geometry_unittest.TestGeometry) ... Test: axis
> ok
> test_bezier_surfaces (geometry_unittest.TestGeometry) ... Test: Bezier
> surfaces
> ok
> test_bspline (geometry_unittest.TestGeometry) ... Test: bspline
> ok
> test_circles2d_from_curves (geometry_unittest.TestGeometry) ... Test:
> circles2d from curves
> ok
> test_curves2d_from_curves (geometry_unittest.TestGeometry) ... Test:
> curves 2d from curves
> ok
> test_curves2d_from_offset (geometry_unittest.TestGeometry) ... Test:
> curves 2d from offset
> ok
> test_distances (geometry_unittest.TestGeometry) ... Test: distances
> ok
> test_parabola (geometry_unittest.TestGeometry) ... Test: parabola
> ok
> test_pipes (geometry_unittest.TestGeometry) ... Test: pipes
> ok
> test_point_from_curve (geometry_unittest.TestGeometry) ... Test: point
> from curve
> ok
> test_point_from_projections (geometry_unittest.TestGeometry) ... Test:
> point from projections
> ok
> test_points_from_intersection (geometry_unittest.TestGeometry) ... Test:
> points from intersection
> ok
> test_project_point_on_curve (geometry_unittest.TestGeometry) ... Test:
> project point on curve
> Q1: at Distance :4.0791322882449039
> Q2: at Distance :7.8333058011926164
> ok
> test_surface_from_curves (geometry_unittest.TestGeometry) ... Test:
> surfaces from curves
> ok
> test_surfaces_from_offsets (geometry_unittest.TestGeometry) ... Test:
> surfaces from offsets
> ok
> test_surfaces_from_revolution (geometry_unittest.TestGeometry) ... Test:
> surfaces from revolution
> ok
> test_draft_angle (topology_building_unittest.TestTopologyBuilding) ...
> Test: draft angle
>  direction (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)
> ok
> test_edge (topology_building_unittest.TestTopologyBuilding) ... Test: edge
> ok
> test_evolved_shape (topology_building_unittest.TestTopologyBuilding) ...
> Test: evolved shape
> ok
> test_face (topology_building_unittest.TestTopologyBuilding) ... Test: face
> ok
> test_prism (topology_building_unittest.TestTopologyBuilding) ... Test:
> prism
> ok
> test_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 sections
> then 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
>
>
> _
>

Hi Vin,

Thanks to your report, I fixed cmake configuration files as well as the
GEOM wrapper. Current master should compile without any problem. However, I
can't reproduce the through_section crash.

Regards,

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

Reply via email to