]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to OCCT 7.4.1 dev
authorjfa <jfa@opencascade.com>
Thu, 30 Apr 2020 12:53:38 +0000 (15:53 +0300)
committerjfa <jfa@opencascade.com>
Thu, 30 Apr 2020 12:53:38 +0000 (15:53 +0300)
src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx
src/GEOMGUI/GEOMGUI_DimensionProperty.cxx
src/GEOMGUI/GEOMGUI_DimensionProperty.h
src/GEOMGUI/GEOM_Displayer.cxx
src/MeasureGUI/MeasureGUI_AngleDlg.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 bbc32bb896d5bc0e50d42ffae7a6fbca09786154..89d86c11ba6a5460c152892bb8720abee03ef83b 100644 (file)
@@ -51,6 +51,8 @@
 
 #include <SalomeApp_Study.h>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <utilities.h>
 #include <Precision.hxx>
 
@@ -67,7 +69,7 @@
 #include <AIS_Shape.hxx>
 
 #include <TCollection_AsciiString.hxx>
-#include <StdSelect_DisplayMode.hxx>
+//#include <StdSelect_DisplayMode.hxx>
 
 #include <Graphic3d_MaterialAspect.hxx>
 
@@ -84,7 +86,7 @@
 #endif
 
 // Constructors
-enum{
+enum {
   CONTOURS,
   CORNERS,
   LINES
index 19b57870b5230b6ea182fa65f38e77ceb9bbce69..25249f1856fd5bf00a409e4acc645ff48ff6cf18 100644 (file)
@@ -26,6 +26,8 @@
 
 #include "GEOMGUI_DimensionProperty.h"
 
+#include <Basics_OCCTVersion.hxx>
+
 // OCCT includes
 #include <Standard_ProgramError.hxx>
 #include <gp_Trsf.hxx>
@@ -72,7 +74,11 @@ namespace
 // function : Length::Init
 // purpose  : 
 //=================================================================================
+#if OCC_VERSION_LARGE > 0x07040000
+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 )
+#endif
 {
   gp_Trsf aFromLCS;
   aFromLCS.SetTransformation( gp_Ax3(), theLCS );
@@ -90,7 +96,11 @@ void GEOMGUI_DimensionProperty::Length::Init( const Handle(AIS_LengthDimension)&
 // function : Length::Update
 // purpose  : 
 //=================================================================================
+#if OCC_VERSION_LARGE > 0x07040000
+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 )
+#endif
 {
   gp_Trsf aToLCS;
   aToLCS.SetTransformation( theLCS, gp_Ax3() );
@@ -840,8 +850,13 @@ void GEOMGUI_DimensionProperty::AddRecord( const Handle(AIS_Dimension)& theIO, c
   {
     case DimensionType_Length :
     {
+#if OCC_VERSION_LARGE > 0x07040000
+      Handle(PrsDim_LengthDimension) aLength = 
+        Handle(PrsDim_LengthDimension)::DownCast( theIO );
+#else
       Handle(AIS_LengthDimension) aLength = 
         Handle(AIS_LengthDimension)::DownCast( theIO );
+#endif
 
       aNewRecord = RecordPtr( new Length() );
       aNewRecord->AsLength()->Init( aLength, theLCS );
@@ -922,8 +937,13 @@ void GEOMGUI_DimensionProperty::SetRecord( const int theIndex,
   {
     case DimensionType_Length :
     {
+#if OCC_VERSION_LARGE > 0x07040000
+      Handle(PrsDim_LengthDimension) aLength = 
+        Handle(PrsDim_LengthDimension)::DownCast( theIO );
+#else
       Handle(AIS_LengthDimension) aLength = 
         Handle(AIS_LengthDimension)::DownCast( theIO );
+#endif
 
       aChangeRecord = RecordPtr( new Length() );
       aChangeRecord->AsLength()->Init( aLength, theLCS );
@@ -1118,7 +1138,11 @@ void GEOMGUI_DimensionProperty::SaveToAttribute( const std::string &theEntry )
 //=================================================================================
 int GEOMGUI_DimensionProperty::TypeFromIO( const Handle(AIS_Dimension)& theIO ) const
 {
+#if OCC_VERSION_LARGE > 0x07040000
+  if ( theIO->IsKind( STANDARD_TYPE( PrsDim_LengthDimension ) ) )
+#else
   if ( theIO->IsKind( STANDARD_TYPE( AIS_LengthDimension ) ) )
+#endif
   {
     return DimensionType_Length;
   }
index 72b16870dcb98bc64a593d0bee806755e2565c15..9ae98ce4802d9a1359d7cc050376266cbb408187 100644 (file)
 #ifndef GEOMGUI_DIMENSIONPROPERTY_H
 #define GEOMGUI_DIMENSIONPROPERTY_H
 
+#include <Basics_OCCTVersion.hxx>
+
 // OCCT includes
+#include <AIS_Dimension.hxx>
 #include <AIS_DiameterDimension.hxx>
+#if OCC_VERSION_LARGE > 0x07040000
+#include <PrsDim_LengthDimension.hxx>
+#else
 #include <AIS_LengthDimension.hxx>
+#endif
 #include <AIS_AngleDimension.hxx>
 #include <gp_Ax3.hxx>
 #include <QVariant>
@@ -137,14 +144,22 @@ public:
      * \param theIO [in] the interactive presentation.
      * \param theLCS [in] the local coordinate system of parent object.
      */
+#if OCC_VERSION_LARGE > 0x07040000
+    void Init( const Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS );
+#else
     void Init( const Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
+#endif
 
     /*!
      * \brief Updates length object properties from the fields.
      * \param theIO [in/out] the interactive presentation.
      * \param theLCS [in] the local coordinate system of parent object.
      */
+#if OCC_VERSION_LARGE > 0x07040000
+    void Update( Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS );
+#else
     void Update( Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
+#endif
 
     /*!
      * \brief Packs properties to array of doubles.
index cdfc09293ddae8d633bf6a02bb786c9bf7d9680d..5c9236b76eebf13d4cb08e7974d3db8ab3159908 100644 (file)
@@ -92,7 +92,7 @@
 #include <Prs3d_PointAspect.hxx>
 #include <StdSelect_TypeOfEdge.hxx>
 #include <StdSelect_TypeOfFace.hxx>
-#include <StdSelect_DisplayMode.hxx>
+//#include <StdSelect_DisplayMode.hxx>
 #include <TopoDS_Face.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom_Plane.hxx>
@@ -1348,12 +1348,21 @@ void GEOM_Displayer::updateDimensions( const Handle(SALOME_InteractiveObject)& t
       if ( aUnitsAngle == "deg" )
       {
         aPrs->SetSpecialSymbol(0xB0);
+#if OCC_VERSION_LARGE > 0x07040000
+        aPrs->SetDisplaySpecialSymbol( isUnitsShown ? PrsDim_DisplaySpecialSymbol_After :
+                                                      PrsDim_DisplaySpecialSymbol_No );
+#else
         aPrs->SetDisplaySpecialSymbol( isUnitsShown ? AIS_DSS_After : AIS_DSS_No );
+#endif
         aStyle->MakeUnitsDisplayed(Standard_False);
       }
       else
       {
+#if OCC_VERSION_LARGE > 0x07040000
+        aPrs->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
+#else
         aPrs->SetDisplaySpecialSymbol(AIS_DSS_No);
+#endif
         aStyle->MakeUnitsDisplayed( (Standard_Boolean) isUnitsShown );
       }
     }
index d93b51c71f62f46d91a0932abfbd0e9890fab99a..c893d0182d8ca702b74c42b23f4df2350e1fdaeb 100644 (file)
 #include <SalomeApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <Basics_OCCTVersion.hxx>
+
 // OCCT Includes
 #include <AIS_AngleDimension.hxx>
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
+//#include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <Geom_Plane.hxx>
 #include <gce_MakePln.hxx>
 #include <Precision.hxx>
+
+#if OCC_VERSION_LARGE > 0x07040000
+#include <PrsDim.hxx>
+#else
 #include <AIS.hxx>
+#endif
+
 #include <Prs3d_LineAspect.hxx> 
 #include <IntTools_EdgeEdge.hxx>
 #include <IntTools_SequenceOfCommonPrts.hxx>
@@ -309,7 +317,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
       OCC_CATCH_SIGNALS;
       TopoDS_Shape S1, S2;
       if (GEOMBase::GetShape(myObj.get() , S1, TopAbs_EDGE) &&
-        GEOMBase::GetShape(myObj2.get(), S2, TopAbs_EDGE)) {
+          GEOMBase::GetShape(myObj2.get(), S2, TopAbs_EDGE)) {
         TopoDS_Edge anEdge1 = TopoDS::Edge(S1);
         TopoDS_Edge anEdge2 = TopoDS::Edge(S2);
 
@@ -323,19 +331,17 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
         Handle(Geom_Curve) extCurv;
         Standard_Integer extShape;
         Handle(Geom_Plane) aPlane;
-        if (AIS::ComputeGeometry(anEdge1,
-                                  anEdge2,
-                                  extShape,
-                                  geom_lin1,
-                                  geom_lin2,
-                                  ptat11,
-                                  ptat12,
-                                  ptat21,
-                                  ptat22,
-                                  extCurv,
-                                  isInfinite1,
-                                  isInfinite2,
-                                  aPlane)) {
+#if OCC_VERSION_LARGE > 0x07040000
+        if (PrsDim::ComputeGeometry (anEdge1, anEdge2,
+#else
+        if (AIS::ComputeGeometry    (anEdge1, anEdge2,
+#endif
+                                     extShape,
+                                     geom_lin1, geom_lin2,
+                                     ptat11, ptat12, ptat21, ptat22,
+                                     extCurv,
+                                     isInfinite1, isInfinite2,
+                                     aPlane)) {
           Standard_Real arrSize1 = aDimensionStyle->ArrowAspect()->Length();
           Standard_Real arrSize2 = aDimensionStyle->ArrowAspect()->Length();
           if (!isInfinite1) arrSize1 = ptat11.Distance(ptat12)/10.;
@@ -356,7 +362,11 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
         anIO->SetDimensionAspect( aDimensionStyle );
         anIO->SetDisplayUnits( aUnitsAngle.toUtf8().data() );
         if (aUnitsAngle == "rad")
+#if OCC_VERSION_LARGE > 0x07040000
+          anIO->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
+#else
           anIO->SetDisplaySpecialSymbol(AIS_DSS_No);
+#endif
 
         SOCC_Prs* aPrs =
           dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
index 560fb595734bfdf78734b71fed1953a7e3009737..bcccbf157a1745d4b78354698ba553381f8fbb5e 100644 (file)
@@ -439,10 +439,18 @@ void MeasureGUI_CreateDimensionDlg::StartLocalEditing()
 #if OCC_VERSION_LARGE <= 0x07030000
   anAISContext->OpenLocalContext( Standard_False, Standard_False );
 #endif
+
+#if OCC_VERSION_LARGE > 0x07040000
+  anAISContext->Load( myDimension, PrsDim_DimensionSelectionMode_All );
+  anAISContext->SetZLayer( myDimension, myEditingLayer );
+  anAISContext->Activate( myDimension, PrsDim_DimensionSelectionMode_Line );
+  anAISContext->Activate( myDimension, PrsDim_DimensionSelectionMode_Text );
+#else
   anAISContext->Load( myDimension, AIS_DSM_All );
   anAISContext->SetZLayer( myDimension, myEditingLayer );
   anAISContext->Activate( myDimension, AIS_DSM_Line );
   anAISContext->Activate( myDimension, AIS_DSM_Text );
+#endif
   anAISContext->Redisplay( myDimension , Standard_True );
 }
 
@@ -634,12 +642,21 @@ Handle(AIS_Dimension) MeasureGUI_CreateDimensionDlg::CreateDimension()
     if ( aUnitsAngle == "deg" )
     {
       aDimensionIO->SetSpecialSymbol(0xB0);
+#if OCC_VERSION_LARGE > 0x07040000
+      aDimensionIO->SetDisplaySpecialSymbol( isUnitsShown ? PrsDim_DisplaySpecialSymbol_After :
+                                                            PrsDim_DisplaySpecialSymbol_No );
+#else
       aDimensionIO->SetDisplaySpecialSymbol( isUnitsShown ? AIS_DSS_After : AIS_DSS_No );
+#endif
       aStyle->MakeUnitsDisplayed(Standard_False);
     }
     else
     {
+#if OCC_VERSION_LARGE > 0x07040000
+      aDimensionIO->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
+#else
       aDimensionIO->SetDisplaySpecialSymbol(AIS_DSS_No);
+#endif
       aStyle->MakeUnitsDisplayed( (Standard_Boolean) isUnitsShown );
     }
   }
index 5a8405d5ce3cee2c9d5093c28d53f63528e41508..bb5fecac536dee9750f556c26f5001bac17461bf 100644 (file)
@@ -35,6 +35,8 @@
 #include <SUIT_ViewWindow.h>
 #include <SUIT_Desktop.h>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <QMouseEvent>
 
 #include <AIS_InteractiveContext.hxx>
@@ -157,7 +159,11 @@ MeasureGUI_DimensionInteractor::Operation
     return Operation_None;
   }
 
+#if OCC_VERSION_LARGE > 0x07040000
+  Handle(PrsDim_DimensionOwner) anOwner = Handle(PrsDim_DimensionOwner)::DownCast( theEntity );
+#else
   Handle(AIS_DimensionOwner) anOwner = Handle(AIS_DimensionOwner)::DownCast( theEntity );
+#endif
   if ( anOwner.IsNull() )
   {
     return Operation_None;
@@ -167,7 +173,11 @@ MeasureGUI_DimensionInteractor::Operation
 
   switch ( anOwner->SelectionMode() )
   {
+#if OCC_VERSION_LARGE > 0x07040000
+    case PrsDim_DimensionSelectionMode_Line :
+#else
     case AIS_DSM_Line :
+#endif
     {
       if ( ( theKeys & Qt::ControlModifier ) == 0 )
       {
@@ -184,7 +194,11 @@ MeasureGUI_DimensionInteractor::Operation
       return Operation_MoveFlyoutFree;
     }
 
+#if OCC_VERSION_LARGE > 0x07040000
+    case PrsDim_DimensionSelectionMode_Text : return Operation_MoveText;
+#else
     case AIS_DSM_Text : return Operation_MoveText;
+#endif
     default :           return Operation_None;
   }
 }
index e6c705d0de3d8c409f18a6479141408a9aee8cd7..d4624cb93f1b5ff69261c14a99b0f5f166d245f5 100644 (file)
@@ -1280,8 +1280,14 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
       if ( isLocal )
       {
 #endif
+
+#if OCC_VERSION_LARGE > 0x07040000
+        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 );
+#endif
       }
       continue;
 #if OCC_VERSION_LARGE <= 0x07030000
@@ -1291,8 +1297,15 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
     {
 #endif
       anAISContext->AddOrRemoveSelected( anIO, Standard_False );
+
+#if OCC_VERSION_LARGE > 0x07040000
+      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
index bbfeaac2f60b1b1263eb253f56dae17b332ea6d0..88aa3ecf130d3202d9a68757400ba3f3c586dcdb 100644 (file)
@@ -36,6 +36,9 @@
 #include <BRep_Tool.hxx>
 #include <GCPnts_AbscissaPoint.hxx>
 #include <GeomAdaptor_Curve.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
 #include <Graphic3d_ArrayOfPoints.hxx>
 #include <Graphic3d_AspectFillArea3d.hxx>
 #include <Graphic3d_AspectLine3d.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
+#include <Prs3d_VertexDrawMode.hxx>
 #include <SelectBasics_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_IndexedMapOfOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <StdPrs_ShadedShape.hxx>
 #include <StdPrs_ToolTriangulatedShape.hxx>
+#include <StdPrs_WFShape.hxx>
 #include <StdSelect_BRepOwner.hxx>
-#include <StdSelect_DisplayMode.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_ListOfInteger.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <V3d_View.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <Prs3d_VertexDrawMode.hxx>
-#include <StdPrs_WFShape.hxx>
 
 #include <Basics_OCCTVersion.hxx>
+#if OCC_VERSION_LARGE > 0x07040000
+#include <Graphic3d_Text.hxx>
+#else
+#include <StdSelect_DisplayMode.hxx>
+#endif
 
 #include <SalomeApp_Tools.h>
 #include <SUIT_Session.h>
@@ -109,8 +113,7 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)&  theObj,
       Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
       if ( entity.IsNull() )
         continue;
-      Handle(SelectMgr_EntityOwner) owner =
-        Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId());
+      const Handle(SelectMgr_EntityOwner)& owner = entity->OwnerId();
       if ( !owner.IsNull() )
         theMap.Add( owner );
     }
@@ -247,9 +250,11 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
     {
       StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange (myshape, myDrawer, Standard_True);
 
+#if OCC_VERSION_LARGE <= 0x07040000
       // After this call if type of deflection is relative
       // computed deflection coefficient is stored as absolute.
       Prs3d::GetDeflection (myshape, myDrawer);
+#endif
     }
     // End 0023271
     case CustomHighlight:
@@ -593,14 +598,20 @@ void GEOM_AISShape::drawField( const Handle(Prs3d_Presentation)& thePrs,
         gp_Pnt aCenter;
         if( computeMassCenter( aSubShape, aCenter ) )
         {
-          Graphic3d_Vertex aVertex( aCenter.X(), aCenter.Y(), aCenter.Z() );
-
           Handle(Graphic3d_AspectText3d) anAspectText3d = new Graphic3d_AspectText3d();
           anAspectText3d->SetStyle( Aspect_TOST_ANNOTATION );
           anAspectText3d->SetColor( myLabelColor );
           aGroup->SetPrimitivesAspect( anAspectText3d );
 
+#if OCC_VERSION_LARGE > 0x07040000
+          Handle(Graphic3d_Text) aText = new Graphic3d_Text (14.);
+          aText->SetText (aString.toUtf8().constData());
+          aText->SetPosition (aCenter);
+          aGroup->AddText (aText);
+#else
+          Graphic3d_Vertex aVertex( aCenter.X(), aCenter.Y(), aCenter.Z() );
           aGroup->Text( aString.toUtf8().constData(), aVertex, 14 );
+#endif
         }
       }
       else
@@ -661,15 +672,21 @@ void GEOM_AISShape::drawName( const Handle(Prs3d_Presentation)& thePrs )
   gp_Ax3 anAx3 = GEOMUtils::GetPosition(myshape);
   gp_Pnt aCenter = anAx3.Location();
 
-  Graphic3d_Vertex aVertex( aCenter.X(), aCenter.Y(), aCenter.Z() );
-
   Handle(Graphic3d_AspectText3d) anAspectText3d = new Graphic3d_AspectText3d();
   anAspectText3d->SetStyle( Aspect_TOST_ANNOTATION );
   anAspectText3d->SetColor( myLabelColor );
   aGroup->SetPrimitivesAspect( anAspectText3d );
 
   const char* aName = getIO()->getName();
+#if OCC_VERSION_LARGE > 0x07040000
+  Handle(Graphic3d_Text) aText = new Graphic3d_Text (16.);
+  aText->SetText (aName);
+  aText->SetPosition (aCenter);
+  aGroup->AddText(aText);
+#else
+  Graphic3d_Vertex aVertex( aCenter.X(), aCenter.Y(), aCenter.Z() );
   aGroup->Text( TCollection_ExtendedString( aName ), aVertex, 16 );
+#endif
 }
 
 Standard_Boolean GEOM_AISShape::computeMassCenter( const TopoDS_Shape& theShape,
index c5f5ab9e81d0dbf2785b817fe4e111188ef09fd0..53db84454d52630b2a687646f0597ebeeec25196 100644 (file)
@@ -538,11 +538,20 @@ Bnd_Box GEOM_Annotation::TextBoundingBox() const
 {
   Handle(Prs3d_TextAspect) anAsp = myDrawer->TextAspect();
   Font_FTFont aFont;
+#if OCC_VERSION_LARGE > 0x07040000
+  Font_FTFontParams aFontParams;
+  aFontParams.PointSize  = (unsigned int)anAsp->Height();
+  aFontParams.Resolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
+  if ( aFont.FindAndInit(anAsp->Aspect()->Font().ToCString(),
+                         anAsp->Aspect()->GetTextFontAspect(),
+                         aFontParams) )
+#else
   unsigned int aResolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
   if ( aFont.Init( anAsp->Aspect()->Font().ToCString(),
                    anAsp->Aspect()->GetTextFontAspect(),
                   (unsigned int)anAsp->Height(),
                   aResolution ) )
+#endif
   {
     const NCollection_String aText( (Standard_Utf16Char* )myText.ToExtString() );
     const Font_Rect aFontRect = aFont.BoundingBox( aText, Graphic3d_HTA_CENTER, Graphic3d_VTA_CENTER );
index 750a81fcc12d5a91f27ed5a6b8b30ec91057c98f..902fca98f2b5c7bb914e0be7372919a1fa696b48 100644 (file)
@@ -274,7 +274,11 @@ private:
   virtual void ComputeSelection( const Handle(SelectMgr_Selection)& theSelection,
                                  const Standard_Integer theMode ) Standard_OVERRIDE;
 
+#if OCC_VERSION_LARGE > 0x07040000
+  virtual void setLocalTransformation( const Handle(TopLoc_Datum3D)& /*theTransformation*/ ) Standard_OVERRIDE {}
+#else
   virtual void setLocalTransformation( const Handle(Geom_Transformation)& /*theTransformation*/ ) Standard_OVERRIDE {}
+#endif
 
   virtual void SetTransformPersistence( const Handle(Graphic3d_TransformPers)& /*theTrsfPers*/ ) Standard_OVERRIDE {}