-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <TopExp.hxx>
#include <BRep_Tool.hxx>
+#include <Standard_Version.hxx>
+
+#if OCC_VERSION_HEX > 0x070400
+#include <PrsDim_TypeOfAngleArrowVisibility.hxx>
+#endif
+
/// Update variable aspect parameters (depending on viewer scale)
/// \param theDimAspect an aspect to be changed
/// \param theDimValue an arrow value
// #define COMPILATION_CORRECTION
//#endif
-IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension);
+IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, PrsDim_AngleDimension);
SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
SketchPlugin_Sketch* theSketcher)
-: AIS_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)),
+: PrsDim_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)),
myConstraint(theConstraint),
mySketcher(theSketcher),
myFirstPoint(gp_Pnt(0,0,0)),
double aDist = -1;
#ifndef COMPILATION_CORRECTION
+#if OCC_VERSION_HEX > 0x070400
+ SetArrowsVisibility(PrsDim_TypeOfAngleArrowVisibility_Both);
+#else
SetArrowsVisibility(AIS_TOAV_Both);
+#endif
#endif
SetMeasuredGeometry(myFirstPoint, myCenterPoint, mySecondPoint);
#ifndef COMPILATION_CORRECTION
bool isReversedPlanes = isAnglePlaneReversedToSketchPlane();
+#if OCC_VERSION_HEX > 0x070400
+ SetType(!isReversedPlanes ? PrsDim_TypeOfAngle_Exterior : PrsDim_TypeOfAngle_Interior);
+#else
SetType(!isReversedPlanes ? AIS_TOA_Exterior : AIS_TOA_Interior);
+#endif
#endif
if (aDist < 0) /// it was not calculated yet
aDist = calculateDistanceToFlyoutPoint();
updateArrows(myAspect, anAngleCircleLength, aTextSize, aLocationType);
- AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode);
+ PrsDim_AngleDimension::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay)
SketcherPrs_Tools::sendEmptyPresentationError(myConstraint,
}
}
SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
- AIS_AngleDimension::ComputeSelection(aSelection, aMode);
+ PrsDim_AngleDimension::ComputeSelection(aSelection, aMode);
}
bool SketcherPrs_Angle::isAnglePlaneReversedToSketchPlane()