Personal tools
You are here: Home Forum Extension of the platform How to use OCC view of salome in my custom module

How to use OCC view of salome in my custom module

Up to Extension of the platform

How to use OCC view of salome in my custom module

Posted by Aminul Islam at April 19. 2010

I am creating a module of salome. I want interact with the occ view that is created by other module(like Geom, Smesh..etc). Actually I want to add some geometry object from my module to the occ view created by other module.

I can change the background of the occ view created by other module from my module like below....

OCCViewer_ViewWindow* pOCCViewWindow = dynamic_cast<OCCViewer_ViewWindow*>(getApp()->activeViewManager()->getActiveView());
OCCViewer_Viewer* pOCCViewer = dynamic_cast<OCCViewer_Viewer*>(pOCCViewWindow->getViewManager()->getViewModel());
OCCViewer_ViewPort3d* pOCCViewPort3d = pOCCViewWindow->getViewPort();
pOCCViewPort3d->setBackgroundColor(QColor(25, 25, 25));

similarly how can I draw or add objects in that occ view from my module.

regards,

Aminul

 

Powered by Ploneboard
Document Actions