]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to OCCT 7.4.1dev
authorjfa <jfa@opencascade.com>
Fri, 31 Jul 2020 15:36:42 +0000 (18:36 +0300)
committerjfa <jfa@opencascade.com>
Fri, 31 Jul 2020 15:36:42 +0000 (18:36 +0300)
17 files changed:
src/CurveCreator/CurveCreator_Utils.cxx
src/CurveCreator/CurveCreator_Widget.cxx
src/GEOMAlgo/GEOMAlgo_Gluer.cxx
src/GEOMGUI/GEOMGUI_DimensionProperty.cxx
src/GEOMGUI/GEOMGUI_DimensionProperty.h
src/GEOMGUI/GEOMGUI_OCCSelector.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMImpl/GEOMImpl_ChamferDriver.cxx
src/MeasureGUI/MeasureGUI_AngleDlg.cxx
src/MeasureGUI/MeasureGUI_AnnotationDlg.cxx
src/MeasureGUI/MeasureGUI_CreateDimensionDlg.cxx
src/MeasureGUI/MeasureGUI_DimensionInteractor.cxx
src/MeasureGUI/MeasureGUI_ManageDimensionsDlg.cxx
src/OBJECT/GEOM_AISShape.cxx
src/OBJECT/GEOM_Annotation.cxx
src/OBJECT/GEOM_Annotation.hxx

index 433f02ee54fa2566678bc7f749f7b6c2cb40e24f..f115904b3a10b2b9fbc55b4628e335528e89199a 100644 (file)
 #include <AIS_Line.hxx>
 #include <AIS_Trihedron.hxx>
 
-#if OCC_VERSION_LARGE <= 0x07030000
-#include <AIS_LocalContext.hxx>
-#endif
-
 #include <Geom_Point.hxx>
 #include <Geom_BSplineCurve.hxx>
 #include <Geom_Line.hxx>
@@ -653,9 +649,6 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo
   //ASL: we switch on again automatic highlight (otherwise selection will not be shown)
   //     and call HilightPicked to draw selected owners
   theContext->SetAutomaticHilight( Standard_True );
-#if OCC_VERSION_LARGE <= 0x07030000
-  theContext->LocalContext()->HilightPicked( Standard_True );
-#endif
 }
 
 //=======================================================================
@@ -670,15 +663,7 @@ void CurveCreator_Utils::setLocalPointContext( const CurveCreator_ICurve* theCur
     return;
 
   if ( theOpen ) {
-#if OCC_VERSION_LARGE <= 0x07030000
-    // Open local context if there is no one
-    if ( !theContext->HasOpenedContext() ) {
-#endif
-      theContext->ClearCurrents( false );
-#if OCC_VERSION_LARGE <= 0x07030000
-      theContext->OpenLocalContext( false/*use displayed objects*/, true/*allow shape decomposition*/ );
-    }
-#endif
+    theContext->ClearCurrents( false );
     // load the curve AIS object to the local context with the point selection
     Handle(AIS_InteractiveObject) anAIS = theCurve->getAISObject();
     if ( !anAIS.IsNull() )
@@ -691,13 +676,8 @@ void CurveCreator_Utils::setLocalPointContext( const CurveCreator_ICurve* theCur
     }
   }
   else {
-#if OCC_VERSION_LARGE <= 0x07030000
-    if ( theContext->HasOpenedContext() )
-      theContext->CloseAllContexts( Standard_True );
-#else
     theContext->Deactivate();
     theContext->Activate(0);
-#endif
   }
 }
 
index 0415f860f717ae3d00c868974a5251b87db14694..e5af5cdbe4c5de822c788e12f1064dc5910e8360 100644 (file)
@@ -1522,11 +1522,7 @@ void CurveCreator_Widget::setSelectedPoints( const CurveCreator_ICurve::SectionT
   if ( myDragStarted )
     return;
   Handle(AIS_InteractiveContext) aContext = getAISContext();
-  if ( aContext.IsNull() 
-#if OCC_VERSION_LARGE <= 0x07030000
-       || !aContext->HasOpenedContext() 
-#endif       
-     )
+  if ( aContext.IsNull() )
     return;
 
   CurveCreator_Utils::setSelectedPoints( aContext, myCurve, thePoints );
index b14578597d24f69341878358cdf72c8bf09278f8..38ec977f27af1631a271fc682fd105de834a7e15 100644 (file)
@@ -510,12 +510,8 @@ void GEOMAlgo_Gluer::MakeSolids()
   myResult=aCmp;
   //
   if (aMS.Extent()) {
-#if OCC_VERSION_LARGE > 0x07020001
     TopTools_IndexedMapOfShape aMapToAvoid;
     BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, aMapToAvoid, 0.0001);
-#else
-    BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
-#endif
   }
 }
 //=======================================================================
index 25249f1856fd5bf00a409e4acc645ff48ff6cf18..c57d1335c9feeb710c40b2763a43f1b223ef080c 100644 (file)
@@ -74,7 +74,7 @@ namespace
 // function : Length::Init
 // purpose  : 
 //=================================================================================
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
 void GEOMGUI_DimensionProperty::Length::Init( const Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS )
 #else
 void GEOMGUI_DimensionProperty::Length::Init( const Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS )
@@ -96,7 +96,7 @@ void GEOMGUI_DimensionProperty::Length::Init( const Handle(AIS_LengthDimension)&
 // function : Length::Update
 // purpose  : 
 //=================================================================================
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
 void GEOMGUI_DimensionProperty::Length::Update( Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS )
 #else
 void GEOMGUI_DimensionProperty::Length::Update( Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS )
@@ -850,7 +850,7 @@ void GEOMGUI_DimensionProperty::AddRecord( const Handle(AIS_Dimension)& theIO, c
   {
     case DimensionType_Length :
     {
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
       Handle(PrsDim_LengthDimension) aLength = 
         Handle(PrsDim_LengthDimension)::DownCast( theIO );
 #else
@@ -937,7 +937,7 @@ void GEOMGUI_DimensionProperty::SetRecord( const int theIndex,
   {
     case DimensionType_Length :
     {
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
       Handle(PrsDim_LengthDimension) aLength = 
         Handle(PrsDim_LengthDimension)::DownCast( theIO );
 #else
@@ -1138,7 +1138,7 @@ void GEOMGUI_DimensionProperty::SaveToAttribute( const std::string &theEntry )
 //=================================================================================
 int GEOMGUI_DimensionProperty::TypeFromIO( const Handle(AIS_Dimension)& theIO ) const
 {
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
   if ( theIO->IsKind( STANDARD_TYPE( PrsDim_LengthDimension ) ) )
 #else
   if ( theIO->IsKind( STANDARD_TYPE( AIS_LengthDimension ) ) )
index 9ae98ce4802d9a1359d7cc050376266cbb408187..c57d988a400670729e1338fa182ebfa2abf48a00 100644 (file)
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <AIS_Dimension.hxx>
 #include <AIS_DiameterDimension.hxx>
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
 #include <PrsDim_LengthDimension.hxx>
 #else
 #include <AIS_LengthDimension.hxx>
@@ -144,7 +144,7 @@ public:
      * \param theIO [in] the interactive presentation.
      * \param theLCS [in] the local coordinate system of parent object.
      */
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
     void Init( const Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS );
 #else
     void Init( const Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
@@ -155,7 +155,7 @@ public:
      * \param theIO [in/out] the interactive presentation.
      * \param theLCS [in] the local coordinate system of parent object.
      */
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
     void Update( Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS );
 #else
     void Update( Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
index e650a7b16e9c73fb98b3f3eb922ce830d0468e91..eea733efa084d43a185d675a210e9b54c3de4bb7 100644 (file)
@@ -80,12 +80,8 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
     return;
 
   Handle(AIS_InteractiveContext) ic = vw->getAISContext();
-#if OCC_VERSION_LARGE <= 0x07030000
-  if (ic->HasOpenedContext())
-  {
-#endif
-    TopoDS_Shape curBigShape;
-    TopTools_IndexedMapOfShape subShapes;
+  TopoDS_Shape curBigShape;
+  TopTools_IndexedMapOfShape subShapes;
 
     for (ic->InitSelected(); ic->MoreSelected(); ic->NextSelected())
     {
@@ -127,27 +123,6 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
         aList.append(SUIT_DataOwnerPtr(owner));
       }
     }
-#if OCC_VERSION_LARGE <= 0x07030000
-  }
-  else
-  {
-    for (ic->InitCurrent(); ic->MoreCurrent(); ic->NextCurrent())
-    {
-      Handle(AIS_InteractiveObject) io = ic->Current();
-
-      QString entryStr = entry( io );
-
-      if ( !entryStr.isEmpty() )
-      {
-        Handle(SALOME_InteractiveObject) anIO = Handle(SALOME_InteractiveObject)::DownCast(io->GetOwner()); 
-        if ( !anIO.IsNull() ) {
-          LightApp_DataOwner* owner = new LightApp_DataOwner( anIO );
-          aList.append( SUIT_DataOwnerPtr( owner ) );
-        }
-      }
-    }
-  }
-#endif
 
   // add externally selected objects
   SUIT_DataOwnerPtrList::const_iterator anExtIter;
index 21f7591882a30d8085b2952b4cd7d61472cc8ea5..abd978501cc63f8ee8adb8f8083e41039e5e1259 100644 (file)
 
 #include <TColStd_HArray1OfByte.hxx>
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
 #include <Image_SupportedFormats.hxx>
 #endif
 
@@ -246,7 +246,7 @@ namespace
       const Handle(Graphic3d_TextureMap)& aTexture = aAISShape->Attributes()->ShadingAspect()->Aspect()->TextureMap();
       if ( aTexture.IsNull() )
         continue;
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
       Handle(Image_SupportedFormats) aFormats = new Image_SupportedFormats();
       const Handle(Image_PixMap)& aPixmap = aTexture->GetImage(aFormats);
 #else
@@ -1356,7 +1356,7 @@ void GEOM_Displayer::updateDimensions( const Handle(SALOME_InteractiveObject)& t
       if ( aUnitsAngle == "deg" )
       {
         aPrs->SetSpecialSymbol(0xB0);
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
         aPrs->SetDisplaySpecialSymbol( isUnitsShown ? PrsDim_DisplaySpecialSymbol_After :
                                                       PrsDim_DisplaySpecialSymbol_No );
 #else
@@ -1366,7 +1366,7 @@ void GEOM_Displayer::updateDimensions( const Handle(SALOME_InteractiveObject)& t
       }
       else
       {
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
         aPrs->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
 #else
         aPrs->SetDisplaySpecialSymbol(AIS_DSS_No);
@@ -2070,13 +2070,8 @@ void GEOM_Displayer::BeforeDisplay( SALOME_View* v, const SALOME_OCCPrs* )
     Handle(AIS_InteractiveContext) ic = vf->getAISContext();
     if ( !ic.IsNull() )
     {
-#if OCC_VERSION_LARGE <= 0x07030000
-      if ( ic->HasOpenedContext() )
-      ic->CloseAllContexts(Standard_True);
-#else
       ic->Deactivate();
       ic->Activate( 0 );
-#endif
     }
   }
 }
index c92b77b6d46662326fd8600ca3fdb2d30c578a61..e10dae3f847e73c57587f6c182d50d59e3e6ba27 100644 (file)
@@ -2441,16 +2441,9 @@ void GeometryGUI::createPreferences()
   aFontFile = aFontFile + QDir::separator() + "Y14.5M-2009.ttf";
   // add enginier font into combobox
   /*int fontID =*/ QFontDatabase::addApplicationFont( aFontFile );
-#if OCC_VERSION_LARGE <= 0x07030000
-  Handle(Font_SystemFont) sf = new Font_SystemFont( 
-    new TCollection_HAsciiString("Y14.5M-2009"), 
-    Font_FA_Regular, 
-    new TCollection_HAsciiString(aFontFile.toLatin1().data()) );
-# else
   Handle(Font_SystemFont) sf = new Font_SystemFont( TCollection_AsciiString("Y14.5M-2009") );
   sf->SetFontPath( Font_FA_Regular, 
     TCollection_AsciiString( aFontFile.toLatin1().data() ) );
-#endif
   // register font in OCC font manager
   fmgr->RegisterFont( sf, Standard_False );
 
index fc6aa3494200c95fc94e044fcca54023858cab59..dff71bfbd9cc2bb58dc8c6fb442a122c62b926a0 100644 (file)
@@ -130,11 +130,7 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(Handle(TFunction_Logbook)& log)
       if (!BRepTools::IsReallyClosed(E, F) &&
           !BRep_Tool::Degenerated(E) &&
           M.FindFromIndex(i).Extent() == 2)
-#if OCC_VERSION_LARGE <= 0x07030000
-        fill.Add(aD, E, F);
-#else
         fill.Add(aD, aD, E, F);
-#endif
     }
   }
   else if (aType == CHAMFER_SHAPE_EDGE || aType == CHAMFER_SHAPE_EDGE_AD) {
index c893d0182d8ca702b74c42b23f4df2350e1fdaeb..81b851e90606e3e672c8238a269c719b5c385dec 100644 (file)
@@ -55,7 +55,7 @@
 #include <gce_MakePln.hxx>
 #include <Precision.hxx>
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
 #include <PrsDim.hxx>
 #else
 #include <AIS.hxx>
@@ -331,7 +331,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
         Handle(Geom_Curve) extCurv;
         Standard_Integer extShape;
         Handle(Geom_Plane) aPlane;
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
         if (PrsDim::ComputeGeometry (anEdge1, anEdge2,
 #else
         if (AIS::ComputeGeometry    (anEdge1, anEdge2,
@@ -362,7 +362,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
         anIO->SetDimensionAspect( aDimensionStyle );
         anIO->SetDisplayUnits( aUnitsAngle.toUtf8().data() );
         if (aUnitsAngle == "rad")
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
           anIO->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
 #else
           anIO->SetDisplaySpecialSymbol(AIS_DSS_No);
index 950ea16ad4d800c669077501d7c33e1f86f0c094..ea3b68fe39ee6bae86b90b5c534e657fc81d12f5 100644 (file)
@@ -907,12 +907,7 @@ bool MeasureGUI_AnnotationDlg::getPickedPoint( gp_Pnt& thePnt, const TopoDS_Shap
 
   Handle(AIS_InteractiveContext) anAISContext = aViewer->getAISContext();
   Handle(SelectMgr_ViewerSelector) aSelector;
-#if OCC_VERSION_LARGE <= 0x07030000
-  if ( anAISContext->HasOpenedContext() )
-    aSelector = anAISContext->LocalSelector();
-  else
-#endif
-    aSelector = anAISContext->MainSelector();
+  aSelector = anAISContext->MainSelector();
 
   if ( aSelector->NbPicked() < 1 )
     return false;
index 6779e5a41203860baf54f1cd004c41825cb1059b..39fefbdc0789219749936fe7679e020bd9b29df3 100644 (file)
@@ -438,11 +438,8 @@ void MeasureGUI_CreateDimensionDlg::StartLocalEditing()
   Handle(V3d_Viewer)             aViewer3d    = myEditingViewer->getViewer3d();
 
   aViewer3d->AddZLayer( myEditingLayer );
-#if OCC_VERSION_LARGE <= 0x07030000
-  anAISContext->OpenLocalContext( Standard_False, Standard_False );
-#endif
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
   anAISContext->Load( myDimension, PrsDim_DimensionSelectionMode_All );
   anAISContext->SetZLayer( myDimension, myEditingLayer );
   anAISContext->Activate( myDimension, PrsDim_DimensionSelectionMode_Line );
@@ -473,12 +470,8 @@ void MeasureGUI_CreateDimensionDlg::StopLocalEditing()
   Handle(V3d_Viewer)             aViewer3d    = myEditingViewer->getViewer3d();
 
   aViewer3d->RemoveZLayer( myEditingLayer );
-#if OCC_VERSION_LARGE <= 0x07030000
-  anAISContext->CloseLocalContext( Standard_True );
-#else
   anAISContext->Deactivate();
   anAISContext->Activate(0);
-#endif
 
   myEditingViewer = NULL;
 }
@@ -644,7 +637,7 @@ Handle(AIS_Dimension) MeasureGUI_CreateDimensionDlg::CreateDimension()
     if ( aUnitsAngle == "deg" )
     {
       aDimensionIO->SetSpecialSymbol(0xB0);
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
       aDimensionIO->SetDisplaySpecialSymbol( isUnitsShown ? PrsDim_DisplaySpecialSymbol_After :
                                                             PrsDim_DisplaySpecialSymbol_No );
 #else
@@ -654,7 +647,7 @@ Handle(AIS_Dimension) MeasureGUI_CreateDimensionDlg::CreateDimension()
     }
     else
     {
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
       aDimensionIO->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
 #else
       aDimensionIO->SetDisplaySpecialSymbol(AIS_DSS_No);
index bb5fecac536dee9750f556c26f5001bac17461bf..1f197d5a34a884767d666b7932f013fb77ca10bb 100644 (file)
@@ -159,7 +159,7 @@ MeasureGUI_DimensionInteractor::Operation
     return Operation_None;
   }
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
   Handle(PrsDim_DimensionOwner) anOwner = Handle(PrsDim_DimensionOwner)::DownCast( theEntity );
 #else
   Handle(AIS_DimensionOwner) anOwner = Handle(AIS_DimensionOwner)::DownCast( theEntity );
@@ -173,7 +173,7 @@ MeasureGUI_DimensionInteractor::Operation
 
   switch ( anOwner->SelectionMode() )
   {
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
     case PrsDim_DimensionSelectionMode_Line :
 #else
     case AIS_DSM_Line :
@@ -194,7 +194,7 @@ MeasureGUI_DimensionInteractor::Operation
       return Operation_MoveFlyoutFree;
     }
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
     case PrsDim_DimensionSelectionMode_Text : return Operation_MoveText;
 #else
     case AIS_DSM_Text : return Operation_MoveText;
index d4624cb93f1b5ff69261c14a99b0f5f166d245f5..21b05da596bbafab7ea12fc0c313e2cc1a0c3a90 100644 (file)
@@ -198,9 +198,6 @@ void MeasureGUI_ManageDimensionsDlg::StartSelection( const Selection theSelectio
 
     anAISContext->ClearCurrents( Standard_False );
     anAISContext->ClearSelected( Standard_False );
-#if OCC_VERSION_LARGE <= 0x07030000
-    anAISContext->OpenLocalContext( Standard_True, Standard_False );
-#endif
     Handle(MeasureGUI_DimensionFilter) aFilter = new MeasureGUI_DimensionFilter( myEditObject->GetStudyEntry() );
 
     anAISContext->AddFilter( aFilter );
@@ -267,12 +264,8 @@ void MeasureGUI_ManageDimensionsDlg::StopSelection()
      * ------------------------------------------------ */
 
     Handle(AIS_InteractiveContext) anAISContext = myOperatedViewer->getAISContext();
-#if OCC_VERSION_LARGE <= 0x07030000
-    anAISContext->CloseLocalContext();
-#else
     anAISContext->Deactivate();
     anAISContext->Activate(0);
-#endif
 
     LightApp_SelectionMgr* aSelectionMgr = myGeomGUI->getApp()->selectionMgr();
 
@@ -365,19 +358,7 @@ void MeasureGUI_ManageDimensionsDlg::SelectionIntoArgument( const Selection theS
     anAISContext->InitSelected();
 
     Handle(AIS_InteractiveObject) anAIS;
-#if OCC_VERSION_LARGE <= 0x07030000
-    if ( anAISContext->HasOpenedContext() )
-    {
-      Handle(SelectMgr_EntityOwner) anAISOwner = anAISContext->SelectedOwner();
-      anAIS = Handle(AIS_InteractiveObject)::DownCast( anAISOwner->Selectable() );
-    }
-    else
-    {
-#endif
-      anAIS = anAISContext->Current();
-#if OCC_VERSION_LARGE <= 0x07030000
-    }
-#endif
+    anAIS = anAISContext->Current();
 
     int aDimensionId = IdFromPrs( anAIS );
 
@@ -1252,19 +1233,7 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
   {
     return;
   }
-#if OCC_VERSION_LARGE <= 0x07030000
-  Standard_Boolean isLocal = anAISContext->HasOpenedContext();
-  if ( isLocal )
-  {
-    anAISContext->ClearSelected( Standard_False );
-  }
-  else
-  {
-#endif
-    anAISContext->ClearCurrents( Standard_False );
-#if OCC_VERSION_LARGE <= 0x07030000
-  }
-#endif
+  anAISContext->ClearCurrents( Standard_False );
   SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( theViewer->CreatePrs( myEditObject->GetStudyEntry() ) );
 
   AIS_ListOfInteractive aListOfIO;
@@ -1276,46 +1245,26 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
     const Handle(AIS_InteractiveObject)& anIO = anIt.Value();
     if ( IdFromPrs( anIO ) != theId )
     {
-#if OCC_VERSION_LARGE <= 0x07030000
-      if ( isLocal )
-      {
-#endif
-
-#if OCC_VERSION_LARGE > 0x07040000
-        anAISContext->Deactivate( anIO, PrsDim_DimensionSelectionMode_Line );
-        anAISContext->Deactivate( anIO, PrsDim_DimensionSelectionMode_Text );
+#if OCC_VERSION_LARGE >= 0x070400ff
+      anAISContext->Deactivate( anIO, PrsDim_DimensionSelectionMode_Line );
+      anAISContext->Deactivate( anIO, PrsDim_DimensionSelectionMode_Text );
 #else
-        anAISContext->Deactivate( anIO, AIS_DSM_Line );
-        anAISContext->Deactivate( anIO, AIS_DSM_Text );
+      anAISContext->Deactivate( anIO, AIS_DSM_Line );
+      anAISContext->Deactivate( anIO, AIS_DSM_Text );
 #endif
-      }
       continue;
-#if OCC_VERSION_LARGE <= 0x07030000
     }
+    anAISContext->AddOrRemoveSelected( anIO, Standard_False );
 
-    if ( isLocal )
-    {
-#endif
-      anAISContext->AddOrRemoveSelected( anIO, Standard_False );
-
-#if OCC_VERSION_LARGE > 0x07040000
-      anAISContext->Activate( anIO, PrsDim_DimensionSelectionMode_Line );
-      anAISContext->Activate( anIO, PrsDim_DimensionSelectionMode_Text );
+#if OCC_VERSION_LARGE >= 0x070400ff
+    anAISContext->Activate( anIO, PrsDim_DimensionSelectionMode_Line );
+    anAISContext->Activate( anIO, PrsDim_DimensionSelectionMode_Text );
 #else
-      anAISContext->Activate( anIO, AIS_DSM_Line );
-      anAISContext->Activate( anIO, AIS_DSM_Text );
-#endif
-
-#if OCC_VERSION_LARGE <= 0x07030000
-    }
-    else
-    {
-#endif
-      anAISContext->AddOrRemoveCurrentObject( anIO, Standard_False );
-#if OCC_VERSION_LARGE <= 0x07030000
-    }
+    anAISContext->Activate( anIO, AIS_DSM_Line );
+    anAISContext->Activate( anIO, AIS_DSM_Text );
 #endif
 
+    anAISContext->AddOrRemoveCurrentObject( anIO, Standard_False );
     anAISContext->UpdateCurrentViewer();
   }
 }
index 88aa3ecf130d3202d9a68757400ba3f3c586dcdb..491e4825e0f630e50b0e353fadda88710cd2f8a9 100644 (file)
@@ -70,7 +70,7 @@
 #include <V3d_View.hxx>
 
 #include <Basics_OCCTVersion.hxx>
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
 #include <Graphic3d_Text.hxx>
 #else
 #include <StdSelect_DisplayMode.hxx>
@@ -372,11 +372,7 @@ void GEOM_AISShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndex
 {
   Handle(AIS_InteractiveObject) anObj = this;
   Handle(AIS_InteractiveContext) anIC = GetContext();
-  if ( anIC.IsNull() 
-#if OCC_VERSION_LARGE <= 0x07030000
-       || !anIC->HasOpenedContext() 
-#endif
-     ) 
+  if ( anIC.IsNull() ) 
     return;
 
   Standard_Boolean isAutoHilight = anIC->AutomaticHilight();
@@ -603,7 +599,7 @@ void GEOM_AISShape::drawField( const Handle(Prs3d_Presentation)& thePrs,
           anAspectText3d->SetColor( myLabelColor );
           aGroup->SetPrimitivesAspect( anAspectText3d );
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
           Handle(Graphic3d_Text) aText = new Graphic3d_Text (14.);
           aText->SetText (aString.toUtf8().constData());
           aText->SetPosition (aCenter);
@@ -678,7 +674,7 @@ void GEOM_AISShape::drawName( const Handle(Prs3d_Presentation)& thePrs )
   aGroup->SetPrimitivesAspect( anAspectText3d );
 
   const char* aName = getIO()->getName();
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
   Handle(Graphic3d_Text) aText = new Graphic3d_Text (16.);
   aText->SetText (aName);
   aText->SetPosition (aCenter);
index 53db84454d52630b2a687646f0597ebeeec25196..368e7e8d1edcca758df7dfc166a6d9314dcab135 100644 (file)
@@ -538,7 +538,7 @@ Bnd_Box GEOM_Annotation::TextBoundingBox() const
 {
   Handle(Prs3d_TextAspect) anAsp = myDrawer->TextAspect();
   Font_FTFont aFont;
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400FF
   Font_FTFontParams aFontParams;
   aFontParams.PointSize  = (unsigned int)anAsp->Height();
   aFontParams.Resolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
@@ -708,11 +708,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
   const unsigned int aDPI = theWorkspace->View()->RenderingParams().Resolution;
   if (myTextDPI != aDPI)
   {
-#if OCC_VERSION_LARGE <= 0x07030000
-    const OpenGl_AspectText* anAspect = theWorkspace->AspectText();
-#else
     const OpenGl_Aspects* anAspect = theWorkspace->Aspects();
-#endif
 
     // getting string size will also initialize font library
 #if OCC_VERSION_LARGE >= 0x07040000
@@ -790,11 +786,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
   {
     Handle(Graphic3d_PresentationAttributes) empty;
     theWorkspace->SetHighlightStyle(empty);
-#if OCC_VERSION_LARGE <= 0x07030000
-    theWorkspace->ApplyAspectLine();
-#else
     theWorkspace->ApplyAspects();
-#endif
   }
   
   GLint myOldDepthMode = 0;
index 902fca98f2b5c7bb914e0be7372919a1fa696b48..36c1d7e6b56fe7b24aea1e1b953e4ce8227bbe53 100644 (file)
@@ -274,7 +274,7 @@ private:
   virtual void ComputeSelection( const Handle(SelectMgr_Selection)& theSelection,
                                  const Standard_Integer theMode ) Standard_OVERRIDE;
 
-#if OCC_VERSION_LARGE > 0x07040000
+#if OCC_VERSION_LARGE >= 0x070400ff
   virtual void setLocalTransformation( const Handle(TopLoc_Datum3D)& /*theTransformation*/ ) Standard_OVERRIDE {}
 #else
   virtual void setLocalTransformation( const Handle(Geom_Transformation)& /*theTransformation*/ ) Standard_OVERRIDE {}
@@ -415,11 +415,7 @@ public:
       const Standard_Boolean isMatches = Select3D_SensitiveBox::Matches( theMgr, thePickResult );
       if ( !myIsDepthCulling )
       {
-#if OCC_VERSION_LARGE <= 0x07030000
-        thePickResult = SelectBasics_PickResult( -DBL_MAX, thePickResult.DistToGeomCenter() );
-#else
         thePickResult = SelectBasics_PickResult( -DBL_MAX, thePickResult.DistToGeomCenter(), thePickResult.PickedPoint() );
-#endif
       }
       return isMatches;
     }