Thomas Paviot a écrit :
> [EMAIL PROTECTED] a écrit :
>   
>> Hi Jelle,
>>
>> to be honest, I'm not so deep in wx or OCC. I just got it to compile, 
>> swigged by the efforts of Thomas and start.
>>
>>     
>>> Björn, from what I've understood ( Torsten told me ) is that OCC  
>>> either returns a Window NT gui handler, or a X11 handler.
>>> Therefore, wx x11 should be used on *Nix platforms. Is this perhaps the
>>> problem wrapping the viewer?
>>>       
>> Is it this way? OCC gives the handle or do I have to pass a handle to 
>> OCC? Honestly I'm not sure...
>> Regarding the example in Display3d.cpp it seems that on windows just 
>> an window handle is needed and has to be given to the WNT_Window of 
>> OCC. The rest is done by OCC (with rest I mean preparing and setting 
>> up the OpenGL-Context).
>> So It would be "logical" that on linux it is handled the same way. One 
>> has to pass a linux-window handle to the corresponding Xw_Window and 
>> the rest is done by OCC. But exactly this seems not to work.
>> I once integrated OCC in an QT-Widget ... or better copied brute force 
>> an example (The one that comes along with OCC) and integrated it in an 
>> application running on windows and on linux. My knowledge about the 
>> mechanisms is very limited. But If you have a look in 
>> OCC/samples/standard/qt/src/View.cxx you will see that for linux a lot 
>> of stuff as to be initialized before setting up OCC (more than on 
>> windows). But again... the mechanism behind that are out of my 
>> knowledge :-(
>>
>> So my next step will be to try out to add the code in View.cxx 
>> directly to Display3d.cpp and try to get the visualization to run this 
>> way.....
>>
>> Any other ideas are appreciated.... :-)
>>
>> Best regards
>>
>> Björn
>>
>>     
> Hello Björn,
>
> The View.cxx sample seems a good start for a Linux build of pythonOCC 
> (especially the graphical part). Do this sample work on your Fedora config?
>
> Another thing: I think that the line 60 of the file Display3d.cpp is not 
> good:
>
> myWindow =new 
> Xw_Window(Handle(Graphic3d_GraphicDevice)::DownCast(gd),static_cast<Standard_Integer>(hi),static_cast<Standard_Integer>(lo),Xw_WQ_SAMEQUALITY);
>
> May be should be replaced with:
>
> myWindow =new Xw_Window( gd 
> ,static_cast<Standard_Integer>(hi),static_cast<Standard_Integer>(lo),Xw_WQ_SAMEQUALITY);
>
> If it doesn't work, I will split the Init() method of Display3d class 
> into different functions so that it's more convenient for you to debug
>
> Thomas
>
>
>   
I just commited to the svn repository a few modifications in Display3d.cpp:
- the previous fix is included (I think it was a bug)
- the quality settings were moved to another method: SetQuality
- I added information messages for each step of the Display3d 
initialzation process.

Hope this helps for pythonOCC compilation for Linux.

Thomas



_______________________________________________
Minerva-pythonocc mailing list
Minerva-pythonocc@gna.org
https://mail.gna.org/listinfo/minerva-pythonocc

Reply via email to