From 374a366d81778aa27ed32cc080c0f95bdb03f1c5 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 9 Nov 2021 11:41:00 +0300 Subject: [PATCH] Fix compilation warnings --- .../FeaturesPlugin_GeometryCalculation.cpp | 1 - .../FeaturesPlugin_Measurement.cpp | 46 +++++++++--------- .../FiltersPlugin_ContinuousFaces.cpp | 4 +- src/GeomAPI/GeomAPI_AISObject.cpp | 47 ++++++++++--------- src/GeomAPI/GeomAPI_AISObject.h | 10 ++-- src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h | 4 +- src/ModelAPI/ModelAPI_Tools.cpp | 2 +- src/PartSet/PartSet_Module.cpp | 4 +- src/PartSet/PartSet_SketcherMgr.cpp | 5 +- src/SketcherPrs/SketcherPrs_Angle.cpp | 8 ++-- src/SketcherPrs/SketcherPrs_Angle.h | 8 ++-- .../SketcherPrs_DimensionStyle.cpp | 12 ++--- src/SketcherPrs/SketcherPrs_DimensionStyle.h | 6 +-- .../SketcherPrs_LengthDimension.cpp | 8 ++-- src/SketcherPrs/SketcherPrs_LengthDimension.h | 8 ++-- src/SketcherPrs/SketcherPrs_Radius.cpp | 8 ++-- src/SketcherPrs/SketcherPrs_Radius.h | 8 ++-- src/SketcherPrs/SketcherPrs_Tools.cpp | 2 +- src/XGUI/XGUI_Displayer.cpp | 2 +- 19 files changed, 96 insertions(+), 97 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_GeometryCalculation.cpp b/src/FeaturesPlugin/FeaturesPlugin_GeometryCalculation.cpp index 724ce7e2e..c59dc9d4b 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_GeometryCalculation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_GeometryCalculation.cpp @@ -81,7 +81,6 @@ void FeaturesPlugin_GeometryCalculation::attributeChanged(const std::string& the } if (aShape) { - double aTolerance = 0.0001; double aLength; double aSurfArea; double aVolume; diff --git a/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp b/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp index da2c2c981..e8cb398bb 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp @@ -41,10 +41,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -394,13 +394,13 @@ AISObjectPtr FeaturesPlugin_Measurement::lengthDimension(AISObjectPtr thePreviou aPlane = gp_Pln(aPnt1, aPlane.XAxis().Direction()); } - Handle(AIS_LengthDimension) aDim; + Handle(PrsDim_LengthDimension) aDim; if (thePrevious.get()) { aAISObj = thePrevious; Handle(AIS_InteractiveObject) aAIS = aAISObj->impl(); - aDim = Handle(AIS_LengthDimension)::DownCast(aAIS); + aDim = Handle(PrsDim_LengthDimension)::DownCast(aAIS); if (aDim.IsNull()) { - aDim = new AIS_LengthDimension(aTEdge, aPlane); + aDim = new PrsDim_LengthDimension(aTEdge, aPlane); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } @@ -409,7 +409,7 @@ AISObjectPtr FeaturesPlugin_Measurement::lengthDimension(AISObjectPtr thePreviou } } else { - aDim = new AIS_LengthDimension(aTEdge, aPlane); + aDim = new PrsDim_LengthDimension(aTEdge, aPlane); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } @@ -457,13 +457,13 @@ AISObjectPtr FeaturesPlugin_Measurement::distanceDimension(AISObjectPtr thePrevi aPlane = gp_Pln(aPnt1, aPlane.XAxis().Direction()); } - Handle(AIS_LengthDimension) aDim; + Handle(PrsDim_LengthDimension) aDim; if (thePrevious.get()) { aAISObj = thePrevious; Handle(AIS_InteractiveObject) aAIS = aAISObj->impl(); - aDim = Handle(AIS_LengthDimension)::DownCast(aAIS); + aDim = Handle(PrsDim_LengthDimension)::DownCast(aAIS); if (aDim.IsNull()) { - aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane); + aDim = new PrsDim_LengthDimension(aPnt1, aPnt2, aPlane); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } @@ -474,7 +474,7 @@ AISObjectPtr FeaturesPlugin_Measurement::distanceDimension(AISObjectPtr thePrevi } else { aAISObj = AISObjectPtr(new GeomAPI_AISObject()); - aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane); + aDim = new PrsDim_LengthDimension(aPnt1, aPnt2, aPlane); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } aDim->SetFlyout(aDistance / 3.); @@ -501,16 +501,16 @@ AISObjectPtr FeaturesPlugin_Measurement::radiusDimension(AISObjectPtr thePreviou if (thePrevious.get()) { aAISObj = thePrevious; Handle(AIS_InteractiveObject) aAIS = aAISObj->impl(); - Handle(AIS_RadiusDimension) aDim = Handle(AIS_RadiusDimension)::DownCast(aAIS); + Handle(PrsDim_RadiusDimension) aDim = Handle(PrsDim_RadiusDimension)::DownCast(aAIS); if (aDim.IsNull()) { - aDim = new AIS_RadiusDimension(aShp); + aDim = new PrsDim_RadiusDimension(aShp); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } else aDim->SetMeasuredGeometry(aShp); } else { aAISObj = AISObjectPtr(new GeomAPI_AISObject()); - Handle(AIS_RadiusDimension) aDim = new AIS_RadiusDimension(aShp); + Handle(PrsDim_RadiusDimension) aDim = new PrsDim_RadiusDimension(aShp); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } } @@ -546,20 +546,20 @@ AISObjectPtr FeaturesPlugin_Measurement::angleDimension(AISObjectPtr thePrevious TopoDS_Edge aTEdge1 = TopoDS::Edge(anEdge1->impl()); TopoDS_Edge aTEdge2 = TopoDS::Edge(anEdge2->impl()); - Handle(AIS_AngleDimension) aDim; + Handle(PrsDim_AngleDimension) aDim; if (thePrevious.get()) { aAISObj = thePrevious; Handle(AIS_InteractiveObject) aAIS = aAISObj->impl(); - aDim = Handle(AIS_AngleDimension)::DownCast(aAIS); + aDim = Handle(PrsDim_AngleDimension)::DownCast(aAIS); if (aDim.IsNull()) { - aDim = new AIS_AngleDimension(aTEdge1, aTEdge2); + aDim = new PrsDim_AngleDimension(aTEdge1, aTEdge2); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } else aDim->SetMeasuredGeometry(aTEdge1, aTEdge2); } else { aAISObj = AISObjectPtr(new GeomAPI_AISObject()); - aDim = new AIS_AngleDimension(aTEdge1, aTEdge2); + aDim = new PrsDim_AngleDimension(aTEdge1, aTEdge2); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } } @@ -589,15 +589,15 @@ AISObjectPtr FeaturesPlugin_Measurement::angleByPointsDimension(AISObjectPtr the if (thePrevious.get()) { aAISObj = thePrevious; Handle(AIS_InteractiveObject) aAIS = aAISObj->impl(); - Handle(AIS_AngleDimension) aDim = Handle(AIS_AngleDimension)::DownCast(aAIS); + Handle(PrsDim_AngleDimension) aDim = Handle(PrsDim_AngleDimension)::DownCast(aAIS); if (aDim.IsNull()) { - aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3); + aDim = new PrsDim_AngleDimension(aPnt1, aPnt2, aPnt3); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } else aDim->SetMeasuredGeometry(aPnt1, aPnt2, aPnt3); } else { - Handle(AIS_AngleDimension) aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3); + Handle(PrsDim_AngleDimension) aDim = new PrsDim_AngleDimension(aPnt1, aPnt2, aPnt3); aAISObj = AISObjectPtr(new GeomAPI_AISObject()); aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim)); } @@ -610,7 +610,7 @@ void FeaturesPlugin_Measurement::setupDimension(AISObjectPtr theDim) { if (theDim.get()) { Handle(AIS_InteractiveObject) aAIS = theDim->impl(); - Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAIS); + Handle(PrsDim_Dimension) aDim = Handle(PrsDim_Dimension)::DownCast(aAIS); int aSize = Config_PropManager::integer("Visualization", "dimension_arrow_size"); int aTextSize = Config_PropManager::integer("Visualization", "dimension_value_size"); std::string aFont = Config_PropManager::string("Visualization", "dimension_font"); diff --git a/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp b/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp index f0e0feea9..245db94cd 100644 --- a/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp +++ b/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp @@ -111,7 +111,7 @@ static bool updateFaces(const AttributeSelectionListPtr& theList, SetOfShapes& theFaces) { bool aNewCache = false; - if (theFaces.size() != theList->size()) { + if ((int)theFaces.size() != theList->size()) { aNewCache = true; } else { for (int i = 0; i < theList->size(); i++) { @@ -165,7 +165,7 @@ bool FiltersPlugin_ContinuousFaces::isOk(const GeomShapePtr& theShape, const Res } if (myCachedShapes.empty()) { - for (size_t i = 0; i < aList->size(); i++) + for (int i = 0; i < aList->size(); i++) { ResultBodyPtr aBaseResult = ModelAPI_Tools::bodyOwner(aList->value(i)->context(), true); if (!aBaseResult.get()) { diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index 8ce35f039..93c32e41d 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -32,16 +32,16 @@ #include #include -#include #include #include -#include -#include -#include -#include #include -#include #include +#include +#include +#include +#include +#include +#include #include @@ -140,9 +140,10 @@ void GeomAPI_AISObject::createDistance(std::shared_ptr theStartPoin Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_LengthDimension) aDimAIS = new AIS_LengthDimension(theStartPoint->impl(), - theEndPoint->impl(), - thePlane->impl()); + Handle(PrsDim_LengthDimension) aDimAIS = + new PrsDim_LengthDimension(theStartPoint->impl(), + theEndPoint->impl(), + thePlane->impl()); aDimAIS->SetCustomValue(theDistance); Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect(); @@ -159,7 +160,7 @@ void GeomAPI_AISObject::createDistance(std::shared_ptr theStartPoin setImpl(new Handle(AIS_InteractiveObject)(aDimAIS)); } else { // update presentation - Handle(AIS_LengthDimension) aDimAIS = Handle(AIS_LengthDimension)::DownCast(anAIS); + Handle(PrsDim_LengthDimension) aDimAIS = Handle(PrsDim_LengthDimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->SetMeasuredGeometry(theStartPoint->impl(), theEndPoint->impl(), thePlane->impl()); @@ -177,7 +178,7 @@ bool GeomAPI_AISObject::isEmptyDistanceGeometry() Handle(AIS_InteractiveObject) anAIS = impl(); if (!anAIS.IsNull()) { - Handle(AIS_LengthDimension) aDimAIS = Handle(AIS_LengthDimension)::DownCast(anAIS); + Handle(PrsDim_LengthDimension) aDimAIS = Handle(PrsDim_LengthDimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { anEmpty = !aDimAIS->IsValid(); } @@ -209,8 +210,8 @@ void GeomAPI_AISObject::createRadius(std::shared_ptr theCircle, Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_RadiusDimension) aDimAIS = new AIS_RadiusDimension(theCircle->impl(), - anAnchor->impl()); + Handle(PrsDim_RadiusDimension) aDimAIS = new PrsDim_RadiusDimension(theCircle->impl(), + anAnchor->impl()); aDimAIS->SetCustomValue(theRadius); Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect(); @@ -226,7 +227,7 @@ void GeomAPI_AISObject::createRadius(std::shared_ptr theCircle, setImpl(new Handle(AIS_InteractiveObject)(aDimAIS)); } else { // update presentation - Handle(AIS_RadiusDimension) aDimAIS = Handle(AIS_RadiusDimension)::DownCast(anAIS); + Handle(PrsDim_RadiusDimension) aDimAIS = Handle(PrsDim_RadiusDimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->SetMeasuredGeometry(theCircle->impl(), anAnchor->impl()); aDimAIS->SetCustomValue(theRadius); @@ -243,14 +244,14 @@ void GeomAPI_AISObject::createParallel(std::shared_ptr theLine1, Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl()); Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_ParallelRelation) aParallel = new AIS_ParallelRelation( + Handle(PrsDim_ParallelRelation) aParallel = new PrsDim_ParallelRelation( theLine1->impl(), theLine2->impl(), aPlane); if (theFlyoutPoint) aParallel->SetPosition(theFlyoutPoint->impl()); setImpl(new Handle(AIS_InteractiveObject)(aParallel)); } else { - Handle(AIS_ParallelRelation) aParallel = Handle(AIS_ParallelRelation)::DownCast(anAIS); + Handle(PrsDim_ParallelRelation) aParallel = Handle(PrsDim_ParallelRelation)::DownCast(anAIS); if (!aParallel.IsNull()) { aParallel->SetFirstShape(theLine1->impl()); aParallel->SetSecondShape(theLine2->impl()); @@ -269,12 +270,12 @@ void GeomAPI_AISObject::createPerpendicular(std::shared_ptr theLi Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl()); Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_PerpendicularRelation) aPerpendicular = new AIS_PerpendicularRelation( + Handle(PrsDim_PerpendicularRelation) aPerpendicular = new PrsDim_PerpendicularRelation( theLine1->impl(), theLine2->impl(), aPlane); setImpl(new Handle(AIS_InteractiveObject)(aPerpendicular)); } else { - Handle(AIS_PerpendicularRelation) aPerpendicular = Handle(AIS_PerpendicularRelation)::DownCast( + Handle(PrsDim_PerpendicularRelation) aPerpendicular = Handle(PrsDim_PerpendicularRelation)::DownCast( anAIS); if (!aPerpendicular.IsNull()) { aPerpendicular->SetFirstShape(theLine1->impl()); @@ -292,13 +293,13 @@ void GeomAPI_AISObject::createFixed(std::shared_ptr theShape, Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl()); Handle(AIS_InteractiveObject) anAIS = impl(); TopoDS_Shape aShape = theShape->impl(); - Handle(AIS_FixRelation) aFixPrs; + Handle(PrsDim_FixRelation) aFixPrs; if (anAIS.IsNull()) { - aFixPrs = new AIS_FixRelation(aShape, aPlane); + aFixPrs = new PrsDim_FixRelation(aShape, aPlane); setImpl(new Handle(AIS_InteractiveObject)(aFixPrs)); } else { - aFixPrs = Handle(AIS_FixRelation)::DownCast(anAIS); + aFixPrs = Handle(PrsDim_FixRelation)::DownCast(anAIS); if (!aFixPrs.IsNull()) { aFixPrs->SetFirstShape(aShape); aFixPrs->SetPlane(aPlane); @@ -325,7 +326,7 @@ void GeomAPI_AISObject::setColor(const int& theColor) if (anAIS.IsNull()) return; Quantity_Color aColor((Quantity_NameOfColor) theColor); - Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS); + Handle(PrsDim_Dimension) aDimAIS = Handle(PrsDim_Dimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->DimensionAspect()->SetCommonColor(aColor); } @@ -371,7 +372,7 @@ bool GeomAPI_AISObject::setColor(int theR, int theG, int theB) return false; Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); - Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS); + Handle(PrsDim_Dimension) aDimAIS = Handle(PrsDim_Dimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->DimensionAspect()->SetCommonColor(aColor); if (!aContext.IsNull()) diff --git a/src/GeomAPI/GeomAPI_AISObject.h b/src/GeomAPI/GeomAPI_AISObject.h index f1d99cc3c..023a7a94c 100644 --- a/src/GeomAPI/GeomAPI_AISObject.h +++ b/src/GeomAPI/GeomAPI_AISObject.h @@ -52,7 +52,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface /// Returns shape used for the presentation creation (can be NULL) GEOMAPI_EXPORT std::shared_ptr getShape() const; - /** \brief Creates AIS_LengthDimension object + /** \brief Creates PrsDim_LengthDimension object * \param[in] theStartPoint first point for dimension * \param[in] theEndPoint second point for dimension * \param[in] theFlyoutPoint the flyout of dimension relative to the measured line @@ -73,7 +73,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface GEOMAPI_EXPORT bool isEmptyDistanceGeometry(); - /** \brief Creates AIS_RadiusDimension object + /** \brief Creates PrsDim_RadiusDimension object * \param[in] theCircle the radius is created for this circle * \param[in] theFlyoutPoint the flyout of dimension * \param[in] theRadius value of the radius to be shown @@ -82,7 +82,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface void createRadius(std::shared_ptr theCircle, std::shared_ptr theFlyoutPoint, double theRadius); - /** \brief Creates AIS_ParallelRelation object for two lines + /** \brief Creates PrsDim_ParallelRelation object for two lines * \param[in] theLine1 first parallel line * \param[in] theLine2 second parallel line * \param[in] theFlyoutPoint the flyout point for relation @@ -94,7 +94,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface std::shared_ptr theFlyoutPoint, std::shared_ptr thePlane); - /** \brief Creates AIS_PerpendicularRelation object for two lines + /** \brief Creates PrsDim_PerpendicularRelation object for two lines * \param[in] theLine1 first parallel line * \param[in] theLine2 second parallel line * \param[in] thePlane the plane which contains the lines @@ -104,7 +104,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface std::shared_ptr theLine2, std::shared_ptr thePlane); - /** \brief Creates AIS_FixedRelation object for an object + /** \brief Creates PrsDim_FixedRelation object for an object * \param[in] theShape the object * \param[in] thePlane the plane which contains the lines */ diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h index 5f511d73c..5d26f7af7 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h @@ -28,8 +28,8 @@ #include #include #ifdef WIN32 - #include -#endif WIN32 +#include +#endif class GeomAPI_Ax1; class GeomAPI_Edge; diff --git a/src/ModelAPI/ModelAPI_Tools.cpp b/src/ModelAPI/ModelAPI_Tools.cpp index a3a0df3b5..f78af49b8 100644 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@ -1174,7 +1174,7 @@ std::array, 10> myColorTab = { void findRandomColor(std::vector& theValues, bool theReset) { - static int i = 0; + static size_t i = 0; static std::vector> usedGeneratedColor; // True when disabling auto-color diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index c648cc072..7c66e1748 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -124,8 +124,8 @@ #include #include -#include #include +#include #include #include #include @@ -1174,7 +1174,7 @@ void PartSet_Module::onViewTransformed(int theTrsfType) foreach(AISObjectPtr aAIS, aPrsList) { Handle(AIS_InteractiveObject) aAisObj = aAIS->impl(); #endif - Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAisObj); + Handle(PrsDim_Dimension) aDim = Handle(PrsDim_Dimension)::DownCast(aAisObj); if (!aDim.IsNull()) { aDim->DimensionAspect()->ArrowAspect()->SetLength(aLen); aContext->Redisplay(aDim, false); diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 113f254a3..85b62a991 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -102,9 +102,8 @@ #include #include -//#include #include -#include +#include #include #include @@ -1707,7 +1706,7 @@ bool PartSet_SketcherMgr::setDistanceValueByPreselection(ModuleBase_Operation* t anAISIO = anAIS->impl(); if (!anAISIO.IsNull()) { - Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(anAISIO); + Handle(PrsDim_Dimension) aDim = Handle(PrsDim_Dimension)::DownCast(anAISIO); if (!aDim.IsNull()) { gp_Pnt aPosition = aDim->GetTextPosition(); diff --git a/src/SketcherPrs/SketcherPrs_Angle.cpp b/src/SketcherPrs/SketcherPrs_Angle.cpp index 298cb927a..93653b8b5 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.cpp +++ b/src/SketcherPrs/SketcherPrs_Angle.cpp @@ -57,11 +57,11 @@ extern void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, // #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)), @@ -263,7 +263,7 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP updateArrows(myAspect, anAngleCircleLength, aTextSize, aLocationType); - AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode); + PrsDim_AngleDimension::Compute(thePresentationManager, thePresentation, theMode); if (!aReadyToDisplay) SketcherPrs_Tools::sendEmptyPresentationError(myConstraint, @@ -294,7 +294,7 @@ void SketcherPrs_Angle::ComputeSelection(const Handle(SelectMgr_Selection)& aSel } } SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.); - AIS_AngleDimension::ComputeSelection(aSelection, aMode); + PrsDim_AngleDimension::ComputeSelection(aSelection, aMode); } bool SketcherPrs_Angle::isAnglePlaneReversedToSketchPlane() diff --git a/src/SketcherPrs/SketcherPrs_Angle.h b/src/SketcherPrs/SketcherPrs_Angle.h index bb61ebc39..26d4b54c6 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.h +++ b/src/SketcherPrs/SketcherPrs_Angle.h @@ -24,18 +24,18 @@ #include #include -#include +#include #include #include -DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension) +DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, PrsDim_AngleDimension) /** * \ingroup GUI * A class for representation of angle constraint */ -class SketcherPrs_Angle : public AIS_AngleDimension +class SketcherPrs_Angle : public PrsDim_AngleDimension { public: /// Constructor @@ -47,7 +47,7 @@ public: /// Destructor Standard_EXPORT ~SketcherPrs_Angle(); - DEFINE_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension) + DEFINE_STANDARD_RTTIEXT(SketcherPrs_Angle, PrsDim_AngleDimension) /// Returns true if the constraint feature arguments are correcly filled /// to build AIS presentation diff --git a/src/SketcherPrs/SketcherPrs_DimensionStyle.cpp b/src/SketcherPrs/SketcherPrs_DimensionStyle.cpp index 9ecc4a9ad..4309c23db 100644 --- a/src/SketcherPrs/SketcherPrs_DimensionStyle.cpp +++ b/src/SketcherPrs/SketcherPrs_DimensionStyle.cpp @@ -25,7 +25,7 @@ #include -#include +#include #include #include @@ -63,7 +63,7 @@ SketcherPrs_DimensionStyle::~SketcherPrs_DimensionStyle() { } -void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension, +void SketcherPrs_DimensionStyle::updateDimensions(PrsDim_Dimension* theDimension, const SketcherPrs_DimensionStyle::DimensionValue& theDimensionValue) { if (!theDimension) @@ -72,10 +72,10 @@ void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension, theDimensionValue.myTextValue, theDimensionValue.myDoubleValue); } -void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension, - const bool theHasParameters, - const std::string& theTextValue, - const double theDoubleValue) +void SketcherPrs_DimensionStyle::updateDimensions(PrsDim_Dimension* theDimension, + const bool theHasParameters, + const std::string& theTextValue, + const double theDoubleValue) { if (!theDimension) return; diff --git a/src/SketcherPrs/SketcherPrs_DimensionStyle.h b/src/SketcherPrs/SketcherPrs_DimensionStyle.h index b4b5f3915..00080ef40 100644 --- a/src/SketcherPrs/SketcherPrs_DimensionStyle.h +++ b/src/SketcherPrs/SketcherPrs_DimensionStyle.h @@ -23,7 +23,7 @@ //#include #include -#include +#include #include "SketcherPrs_Tools.h" @@ -63,7 +63,7 @@ public: /// Visualizes the dimension text or dimension value depending on the has parameters state /// \param theDimension a modified dimension /// \param theDimensionValue container filled by the model double attribute - Standard_EXPORT void updateDimensions(AIS_Dimension* theDimension, + Standard_EXPORT void updateDimensions(PrsDim_Dimension* theDimension, const DimensionValue& theDimensionValue); private: @@ -72,7 +72,7 @@ private: /// \param theHasParameters if true, the text is shown, else digit /// \param theTextValue a dimension text value /// \param theDoubleValue a dimension digit value - void updateDimensions(AIS_Dimension* theDimension, + void updateDimensions(PrsDim_Dimension* theDimension, const bool theHasParameters, const std::string& theTextValue, const double theDoubleValue); diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp index 808de510c..41def9c85 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp @@ -105,11 +105,11 @@ static const gp_Pnt MyDefStart(0,0,0); static const gp_Pnt MyDefEnd(1,0,0); static const gp_Pln MyDefPln(gp_Pnt(0,0,0), gp_Dir(0,0,1)); -IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension); +IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, PrsDim_LengthDimension); SketcherPrs_LengthDimension::SketcherPrs_LengthDimension(ModelAPI_Feature* theConstraint, SketchPlugin_Sketch* theSketcher) -: AIS_LengthDimension(MyDefStart, MyDefEnd, MyDefPln), +: PrsDim_LengthDimension(MyDefStart, MyDefEnd, MyDefPln), myConstraint(theConstraint), mySketcher(theSketcher), myFirstPoint(MyDefStart), @@ -227,7 +227,7 @@ void SketcherPrs_LengthDimension::Compute( // Update text visualization: parameter value or parameter text myStyleListener->updateDimensions(this, myValue); - AIS_LengthDimension::Compute(thePresentationManager, thePresentation, theMode); + PrsDim_LengthDimension::Compute(thePresentationManager, thePresentation, theMode); if (!aReadyToDisplay) SketcherPrs_Tools::sendEmptyPresentationError(myConstraint, @@ -336,7 +336,7 @@ void SketcherPrs_LengthDimension::ComputeSelection(const Handle(SelectMgr_Select } } SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.); - AIS_LengthDimension::ComputeSelection(aSelection, aMode); + PrsDim_LengthDimension::ComputeSelection(aSelection, aMode); } void SketcherPrs_LengthDimension::setDirection(ModelAPI_Feature* theConstraint, diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.h b/src/SketcherPrs/SketcherPrs_LengthDimension.h index 23835fd74..df1d1966d 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.h +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -32,14 +32,14 @@ #include -DEFINE_STANDARD_HANDLE(SketcherPrs_LengthDimension, AIS_LengthDimension) +DEFINE_STANDARD_HANDLE(SketcherPrs_LengthDimension, PrsDim_LengthDimension) /** * \ingroup GUI * A class for representation of linear dimension constraint. * It supports SketchPlugin_ConstraintLength and SketchPlugin_ConstraintDistance features. */ -class SketcherPrs_LengthDimension : public AIS_LengthDimension +class SketcherPrs_LengthDimension : public PrsDim_LengthDimension { public: /// Constructor @@ -51,7 +51,7 @@ public: /// Destructor Standard_EXPORT ~SketcherPrs_LengthDimension(); - DEFINE_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension) + DEFINE_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, PrsDim_LengthDimension) /// Returns true if the constraint feature arguments are correcly filled /// to build AIS presentation diff --git a/src/SketcherPrs/SketcherPrs_Radius.cpp b/src/SketcherPrs/SketcherPrs_Radius.cpp index f0e07c93a..e4755e7e8 100644 --- a/src/SketcherPrs/SketcherPrs_Radius.cpp +++ b/src/SketcherPrs/SketcherPrs_Radius.cpp @@ -49,11 +49,11 @@ extern void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, static const gp_Circ MyDefCirc(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 1); -IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension); +IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius, PrsDim_RadiusDimension); SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint, SketchPlugin_Sketch* theSketcher) -: AIS_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcher(theSketcher), +: PrsDim_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcher(theSketcher), myCircle(MyDefCirc), myAnchorPoint(gp_Pnt(0, 0, 2)), myValue(1, false, "") @@ -172,7 +172,7 @@ void SketcherPrs_Radius::Compute( (SketcherPrs_Tools::LocationType)(aLocAttr->value()) : SketcherPrs_Tools::LOCATION_AUTOMATIC; updateArrows(DimensionAspect(), GetValue(), aTextSize, aLocationType); - AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode); + PrsDim_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode); if (!aReadyToDisplay) SketcherPrs_Tools::sendEmptyPresentationError(myConstraint, @@ -204,5 +204,5 @@ void SketcherPrs_Radius::ComputeSelection(const Handle(SelectMgr_Selection)& aSe } } SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.); - AIS_RadiusDimension::ComputeSelection(aSelection, aMode); + PrsDim_RadiusDimension::ComputeSelection(aSelection, aMode); } diff --git a/src/SketcherPrs/SketcherPrs_Radius.h b/src/SketcherPrs/SketcherPrs_Radius.h index ad2fb6824..b79dee7c0 100644 --- a/src/SketcherPrs/SketcherPrs_Radius.h +++ b/src/SketcherPrs/SketcherPrs_Radius.h @@ -24,18 +24,18 @@ #include #include -#include +#include #include #include -DEFINE_STANDARD_HANDLE(SketcherPrs_Radius, AIS_RadiusDimension) +DEFINE_STANDARD_HANDLE(SketcherPrs_Radius, PrsDim_RadiusDimension) /** * \ingroup GUI * A class for representation of radius constraint */ -class SketcherPrs_Radius : public AIS_RadiusDimension +class SketcherPrs_Radius : public PrsDim_RadiusDimension { public: /// Constructor @@ -47,7 +47,7 @@ public: /// Destructor Standard_EXPORT ~SketcherPrs_Radius(); - DEFINE_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension) + DEFINE_STANDARD_RTTIEXT(SketcherPrs_Radius, PrsDim_RadiusDimension) /// Returns true if the constraint feature arguments are correcly filled /// to build AIS presentation diff --git a/src/SketcherPrs/SketcherPrs_Tools.cpp b/src/SketcherPrs/SketcherPrs_Tools.cpp index 02c4cf476..69e4768b9 100644 --- a/src/SketcherPrs/SketcherPrs_Tools.cpp +++ b/src/SketcherPrs/SketcherPrs_Tools.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include namespace SketcherPrs_Tools { diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index c943d5d51..c0824cf1d 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -57,7 +57,6 @@ #include #include #include -#include #include #ifdef BEFORE_TRIHEDRON_PATCH #include @@ -67,6 +66,7 @@ #include #include #include +#include #include #include #include -- 2.39.2