mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-25 03:50:34 +05:00
RNV: Porting SALOME GEOM module to the new version of the OCCT.
This commit is contained in:
parent
4d84d697e5
commit
fa17d8fb3a
@ -375,7 +375,11 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha
|
|||||||
try {
|
try {
|
||||||
if ( !S1.IsNull() ) {
|
if ( !S1.IsNull() ) {
|
||||||
/* erase any previous */
|
/* erase any previous */
|
||||||
|
#if OCC_VERSION_LARGE <= 0x06060000
|
||||||
ic->Erase( mySimulationShape1, Standard_True, Standard_False );
|
ic->Erase( mySimulationShape1, Standard_True, Standard_False );
|
||||||
|
#else
|
||||||
|
ic->Erase( mySimulationShape1, Standard_True );
|
||||||
|
#endif
|
||||||
ic->ClearPrs( mySimulationShape1 );
|
ic->ClearPrs( mySimulationShape1 );
|
||||||
|
|
||||||
mySimulationShape1 = new AIS_Shape( TopoDS_Shape() );
|
mySimulationShape1 = new AIS_Shape( TopoDS_Shape() );
|
||||||
@ -387,7 +391,11 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha
|
|||||||
mySimulationShape1->UnsetColor();
|
mySimulationShape1->UnsetColor();
|
||||||
}
|
}
|
||||||
if ( !S2.IsNull() ) {
|
if ( !S2.IsNull() ) {
|
||||||
|
#if OCC_VERSION_LARGE <= 0x06060000
|
||||||
ic->Erase( mySimulationShape2, Standard_True, Standard_False );
|
ic->Erase( mySimulationShape2, Standard_True, Standard_False );
|
||||||
|
#else
|
||||||
|
ic->Erase( mySimulationShape2, Standard_True );
|
||||||
|
#endif
|
||||||
ic->ClearPrs( mySimulationShape2 );
|
ic->ClearPrs( mySimulationShape2 );
|
||||||
|
|
||||||
mySimulationShape2 = new AIS_Shape( TopoDS_Shape() );
|
mySimulationShape2 = new AIS_Shape( TopoDS_Shape() );
|
||||||
@ -431,9 +439,14 @@ void EntityGUI::EraseSimulationShape()
|
|||||||
if ( vw->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
if ( vw->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||||
OCCViewer_Viewer* v3d = ( (OCCViewer_ViewManager*)( vw->getViewManager() ) )->getOCCViewer();
|
OCCViewer_Viewer* v3d = ( (OCCViewer_ViewManager*)( vw->getViewManager() ) )->getOCCViewer();
|
||||||
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
||||||
|
#if OCC_VERSION_LARGE <= 0x06060000
|
||||||
ic->Erase( mySimulationShape1, Standard_True, Standard_False );
|
ic->Erase( mySimulationShape1, Standard_True, Standard_False );
|
||||||
ic->ClearPrs( mySimulationShape1 );
|
|
||||||
ic->Erase( mySimulationShape2, Standard_True, Standard_False );
|
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->ClearPrs( mySimulationShape2 );
|
||||||
ic->UpdateCurrentViewer();
|
ic->UpdateCurrentViewer();
|
||||||
}
|
}
|
||||||
|
@ -303,8 +303,9 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const QString& IOR, boo
|
|||||||
|
|
||||||
AIS_ListOfInteractive displayed;
|
AIS_ListOfInteractive displayed;
|
||||||
ic->DisplayedObjects( displayed );
|
ic->DisplayedObjects( displayed );
|
||||||
|
#if OCC_VERSION_LARGE <= 0x06060000
|
||||||
ic->ObjectsInCollector( displayed );
|
ic->ObjectsInCollector( displayed );
|
||||||
|
#endif
|
||||||
AIS_ListIteratorOfListOfInteractive it( displayed );
|
AIS_ListIteratorOfListOfInteractive it( displayed );
|
||||||
while ( it.More() && shape.IsNull() ) {
|
while ( it.More() && shape.IsNull() ) {
|
||||||
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user