RNV: Porting SALOME GEOM module to the new version of the OCCT.

This commit is contained in:
inv 2013-10-07 13:36:49 +00:00
parent 4d84d697e5
commit fa17d8fb3a
2 changed files with 16 additions and 2 deletions

View File

@ -375,7 +375,11 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha
try {
if ( !S1.IsNull() ) {
/* erase any previous */
#if OCC_VERSION_LARGE <= 0x06060000
ic->Erase( mySimulationShape1, Standard_True, Standard_False );
#else
ic->Erase( mySimulationShape1, Standard_True );
#endif
ic->ClearPrs( mySimulationShape1 );
mySimulationShape1 = new AIS_Shape( TopoDS_Shape() );
@ -387,7 +391,11 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha
mySimulationShape1->UnsetColor();
}
if ( !S2.IsNull() ) {
#if OCC_VERSION_LARGE <= 0x06060000
ic->Erase( mySimulationShape2, Standard_True, Standard_False );
#else
ic->Erase( mySimulationShape2, Standard_True );
#endif
ic->ClearPrs( mySimulationShape2 );
mySimulationShape2 = new AIS_Shape( TopoDS_Shape() );
@ -431,9 +439,14 @@ void EntityGUI::EraseSimulationShape()
if ( vw->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
OCCViewer_Viewer* v3d = ( (OCCViewer_ViewManager*)( vw->getViewManager() ) )->getOCCViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
#if OCC_VERSION_LARGE <= 0x06060000
ic->Erase( mySimulationShape1, Standard_True, Standard_False );
ic->ClearPrs( mySimulationShape1 );
ic->Erase( mySimulationShape2, Standard_True, Standard_False );
#else
ic->Erase( mySimulationShape1, Standard_True );
ic->Erase( mySimulationShape2, Standard_True );
#endif
ic->ClearPrs( mySimulationShape1 );
ic->ClearPrs( mySimulationShape2 );
ic->UpdateCurrentViewer();
}

View File

@ -303,8 +303,9 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const QString& IOR, boo
AIS_ListOfInteractive displayed;
ic->DisplayedObjects( displayed );
#if OCC_VERSION_LARGE <= 0x06060000
ic->ObjectsInCollector( displayed );
#endif
AIS_ListIteratorOfListOfInteractive it( displayed );
while ( it.More() && shape.IsNull() ) {
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {