From: rnv Date: Wed, 8 Apr 2015 13:07:00 +0000 (+0300) Subject: Porting on the OCCT-6.9.0 X-Git-Tag: V7_6_0b1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=3275e006305221824dd8082c492a617e4d4e1dbd;p=modules%2Fgeom.git Porting on the OCCT-6.9.0 --- diff --git a/src/CurveCreator/CurveCreator_Utils.cxx b/src/CurveCreator/CurveCreator_Utils.cxx index 035f0b35c..b8471abe8 100644 --- a/src/CurveCreator/CurveCreator_Utils.cxx +++ b/src/CurveCreator/CurveCreator_Utils.cxx @@ -22,6 +22,8 @@ #include "CurveCreator_Curve.hxx" #include "CurveCreator_UtilsICurve.hxx" +#include + #include #include @@ -578,8 +580,16 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo Handle_SelectMgr_Selection aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) ); for( aSelection->Init(); aSelection->More(); aSelection->Next() ) - { + { +#if OCC_VERSION_LARGE > 0x06080100 + const SelectMgr_HSensitiveEntity aHSenEntity = aSelection->Sensitive(); + if( aHSenEntity.IsNull() ) + continue; + Handle_SelectBasics_SensitiveEntity aSenEntity = aHSenEntity->BaseSensitive(); +#else Handle_SelectBasics_SensitiveEntity aSenEntity = aSelection->Sensitive(); +#endif + Handle_Select3D_SensitivePoint aSenPnt = Handle_Select3D_SensitivePoint::DownCast( aSenEntity ); gp_Pnt anOwnerPnt = aSenPnt->Point(); diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index 3bd18e550..efb4dcd6b 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -25,6 +25,8 @@ // #include "GEOMGUI_OCCSelector.h" +#include + #include #include @@ -176,7 +178,15 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, Handle(SelectMgr_Selection) sel = theObj->Selection( m ); for ( sel->Init(); sel->More(); sel->Next() ) { +#if OCC_VERSION_LARGE > 0x06080100 + const SelectMgr_HSensitiveEntity aHSenEntity = sel->Sensitive(); + if( aHSenEntity.IsNull() ) + continue; + + Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive(); +#else Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive(); +#endif if ( entity.IsNull() ) continue; diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index 52285710d..5415d5373 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -108,10 +108,17 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, Handle(SelectMgr_Selection) sel = theObj->Selection( m ); for ( sel->Init(); sel->More(); sel->Next() ) { +#if OCC_VERSION_LARGE > 0x06080100 + const SelectMgr_HSensitiveEntity aHSenEntity = sel->Sensitive(); + if( aHSenEntity.IsNull() ) + continue; + + Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive(); +#else Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive(); +#endif if ( entity.IsNull() ) continue; - Handle(SelectMgr_EntityOwner) owner = Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId()); if ( !owner.IsNull() )