]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix compilation warnings azv/ts_tests
authorazv <azv@opencascade.com>
Tue, 9 Nov 2021 08:41:00 +0000 (11:41 +0300)
committerazv <azv@opencascade.com>
Tue, 9 Nov 2021 10:46:08 +0000 (13:46 +0300)
19 files changed:
src/FeaturesPlugin/FeaturesPlugin_GeometryCalculation.cpp
src/FeaturesPlugin/FeaturesPlugin_Measurement.cpp
src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp
src/GeomAPI/GeomAPI_AISObject.cpp
src/GeomAPI/GeomAPI_AISObject.h
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h
src/ModelAPI/ModelAPI_Tools.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_Angle.h
src/SketcherPrs/SketcherPrs_DimensionStyle.cpp
src/SketcherPrs/SketcherPrs_DimensionStyle.h
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.h
src/SketcherPrs/SketcherPrs_Radius.cpp
src/SketcherPrs/SketcherPrs_Radius.h
src/SketcherPrs/SketcherPrs_Tools.cpp
src/XGUI/XGUI_Displayer.cpp

index 724ce7e2e062f746163f3dea5747d897ab851b95..c59dc9d4b242fffe03b86d633e13fecc3f1370a5 100644 (file)
@@ -81,7 +81,6 @@ void FeaturesPlugin_GeometryCalculation::attributeChanged(const std::string& the
     }
 
     if (aShape) {
-      double aTolerance = 0.0001;
       double aLength;
       double aSurfArea;
       double aVolume;
index da2c2c9811b03fb1c6afbaaa9aebc7579fe0dc37..e8cb398bbaef07d497911473ee0dee53fcf3eb18 100644 (file)
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Shape.hxx>
-#include <AIS_Dimension.hxx>
-#include <AIS_LengthDimension.hxx>
-#include <AIS_RadiusDimension.hxx>
-#include <AIS_AngleDimension.hxx>
+#include <PrsDim_Dimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
+#include <PrsDim_RadiusDimension.hxx>
+#include <PrsDim_AngleDimension.hxx>
 #include <BRepExtrema_DistShapeShape.hxx>
 
 #include <iomanip>
@@ -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<Handle(AIS_InteractiveObject)>();
-        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<Handle(AIS_InteractiveObject)>();
-            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_InteractiveObject)>();
-      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_Shape>());
     TopoDS_Edge aTEdge2 = TopoDS::Edge(anEdge2->impl<TopoDS_Shape>());
 
-    Handle(AIS_AngleDimension) aDim;
+    Handle(PrsDim_AngleDimension) aDim;
     if (thePrevious.get()) {
       aAISObj = thePrevious;
       Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
-      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_InteractiveObject)>();
-      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_InteractiveObject)>();
-    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");
index f0e0feea96fc7e2e7aaef50e67abd6ad6514238b..245db94cdaa5ce49ce0fa8fe613136649c023da6 100644 (file)
@@ -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()) {
index 8ce35f03909e861714125ea008b062f76321ab35..93c32e41dbcc1d86532f5aefc789966d9b839ec6 100644 (file)
 #include <Quantity_NameOfColor.hxx>
 #include <BRepBndLib.hxx>
 
-#include <AIS_Dimension.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <AIS_InteractiveContext.hxx>
-#include <AIS_LengthDimension.hxx>
-#include <AIS_ParallelRelation.hxx>
-#include <AIS_PerpendicularRelation.hxx>
-#include <AIS_RadiusDimension.hxx>
 #include <AIS_Shape.hxx>
-#include <AIS_FixRelation.hxx>
 #include <Prs3d_PointAspect.hxx>
+#include <PrsDim_Dimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
+#include <PrsDim_ParallelRelation.hxx>
+#include <PrsDim_PerpendicularRelation.hxx>
+#include <PrsDim_RadiusDimension.hxx>
+#include <PrsDim_FixRelation.hxx>
 
 #include <Graphic3d_AspectLine3d.hxx>
 
@@ -140,9 +140,10 @@ void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoin
 
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
   if (anAIS.IsNull()) {
-    Handle(AIS_LengthDimension) aDimAIS = new AIS_LengthDimension(theStartPoint->impl<gp_Pnt>(),
-                                                                  theEndPoint->impl<gp_Pnt>(),
-                                                                  thePlane->impl<gp_Pln>());
+    Handle(PrsDim_LengthDimension) aDimAIS =
+        new PrsDim_LengthDimension(theStartPoint->impl<gp_Pnt>(),
+                                   theEndPoint->impl<gp_Pnt>(),
+                                   thePlane->impl<gp_Pln>());
     aDimAIS->SetCustomValue(theDistance);
 
     Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
@@ -159,7 +160,7 @@ void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> 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<gp_Pnt>(), theEndPoint->impl<gp_Pnt>(),
                                    thePlane->impl<gp_Pln>());
@@ -177,7 +178,7 @@ bool GeomAPI_AISObject::isEmptyDistanceGeometry()
 
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
   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<GeomAPI_Circ> theCircle,
 
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
   if (anAIS.IsNull()) {
-    Handle(AIS_RadiusDimension) aDimAIS = new AIS_RadiusDimension(theCircle->impl<gp_Circ>(),
-                                                                  anAnchor->impl<gp_Pnt>());
+    Handle(PrsDim_RadiusDimension) aDimAIS = new PrsDim_RadiusDimension(theCircle->impl<gp_Circ>(),
+                                                                        anAnchor->impl<gp_Pnt>());
     aDimAIS->SetCustomValue(theRadius);
 
     Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
@@ -226,7 +227,7 @@ void GeomAPI_AISObject::createRadius(std::shared_ptr<GeomAPI_Circ> 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<gp_Circ>(), anAnchor->impl<gp_Pnt>());
       aDimAIS->SetCustomValue(theRadius);
@@ -243,14 +244,14 @@ void GeomAPI_AISObject::createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
   Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
   if (anAIS.IsNull()) {
-    Handle(AIS_ParallelRelation) aParallel = new AIS_ParallelRelation(
+    Handle(PrsDim_ParallelRelation) aParallel = new PrsDim_ParallelRelation(
         theLine1->impl<TopoDS_Shape>(), theLine2->impl<TopoDS_Shape>(), aPlane);
     if (theFlyoutPoint)
       aParallel->SetPosition(theFlyoutPoint->impl<gp_Pnt>());
 
     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<TopoDS_Shape>());
       aParallel->SetSecondShape(theLine2->impl<TopoDS_Shape>());
@@ -269,12 +270,12 @@ void GeomAPI_AISObject::createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLi
   Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
   if (anAIS.IsNull()) {
-    Handle(AIS_PerpendicularRelation) aPerpendicular = new AIS_PerpendicularRelation(
+    Handle(PrsDim_PerpendicularRelation) aPerpendicular = new PrsDim_PerpendicularRelation(
         theLine1->impl<TopoDS_Shape>(), theLine2->impl<TopoDS_Shape>(), 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<TopoDS_Shape>());
@@ -292,13 +293,13 @@ void GeomAPI_AISObject::createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
   Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
   Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
   TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
-  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())
index f1d99cc3c895e0f13f7df72e6dc77e7b83381742..023a7a94ce1e548d4a368174db58e4590ced7be4 100644 (file)
@@ -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<GeomAPI_Shape> 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<GeomAPI_Circ> theCircle,
                     std::shared_ptr<GeomAPI_Pnt> 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<GeomAPI_Pnt> theFlyoutPoint,
                       std::shared_ptr<GeomAPI_Pln> 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<GeomAPI_Shape> theLine2,
                            std::shared_ptr<GeomAPI_Pln> 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
    */
index 5f511d73c2bd2ba211de2941d9e01f16f8c45e7a..5d26f7af76862fe70b14ab782e6f2fa1cf87aca3 100644 (file)
@@ -28,8 +28,8 @@
 #include <map>
 #include <set>
 #ifdef WIN32
- #include<array>
-#endif WIN32
+#include<array>
+#endif
 
 class GeomAPI_Ax1;
 class GeomAPI_Edge;
index a3a0df3b5523f7afa273000147484b10e27944a0..f78af49b85c0662f91547e2c0f48426ea0ec6c29 100644 (file)
@@ -1174,7 +1174,7 @@ std::array<std::vector<int>, 10> myColorTab = {
 
 void findRandomColor(std::vector<int>& theValues, bool theReset)
 {
-  static int i = 0;
+  static size_t i = 0;
   static std::vector<std::vector<int>> usedGeneratedColor;
 
   // True when disabling auto-color
index c648cc072f2dc444cb8f3bc612a6d35ef0bc995f..7c66e17481654bd3fa1e60d3660ed607095f36ff 100644 (file)
 #include <Config_PropManager.h>
 #include <Config_Keywords.h>
 
-#include <AIS_Dimension.hxx>
 #include <AIS_InteractiveObject.hxx>
+#include <PrsDim_Dimension.hxx>
 #include <StdSelect_TypeOfFace.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS.hxx>
@@ -1174,7 +1174,7 @@ void PartSet_Module::onViewTransformed(int theTrsfType)
     foreach(AISObjectPtr aAIS, aPrsList) {
       Handle(AIS_InteractiveObject) aAisObj = aAIS->impl<Handle(AIS_InteractiveObject)>();
 #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);
index 113f254a352bd2f823e7ed8cdf8a0abdae65af71..85b62a991f31f1a15e795394dd88679072ba737e 100644 (file)
 #include <SelectMgr_IndexedMapOfOwner.hxx>
 #include <StdSelect_BRepOwner.hxx>
 
-//#include <AIS_DimensionSelectionMode.hxx>
 #include <AIS_Shape.hxx>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
 
 #include <ModelAPI_Events.h>
 #include <ModelAPI_Session.h>
@@ -1707,7 +1706,7 @@ bool PartSet_SketcherMgr::setDistanceValueByPreselection(ModuleBase_Operation* t
             anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
 
             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();
 
index 298cb927a485b8b0f41d4d1e9c4f8e0ff13ab990..93653b8b5e8c0aba77a9099345e0a74a3fc0789c 100644 (file)
@@ -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()
index bb61ebc39d3c01422ec88319c31bbb4d655367d4..26d4b54c6a0c19689e4ec4bbbe271a6b4a48650d 100644 (file)
 #include <ModelAPI_Feature.h>
 #include <SketchPlugin_Sketch.h>
 
-#include <AIS_AngleDimension.hxx>
+#include <PrsDim_AngleDimension.hxx>
 #include <Standard_DefineHandle.hxx>
 
 #include <SketcherPrs_DimensionStyle.h>
 
-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
index 9ecc4a9ad5ed1eef6478996e5cea75459ead4dd0..4309c23db91ecda5b89aff3b88926f797c729c52 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <Locale_Convert.h>
 
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <Standard_Version.hxx>
 
@@ -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;
index b4b5f39158fb3fd483cb1e01f92f24d28b4960f5..00080ef40e4a0fe30f58ef87e515820ebca571ff 100644 (file)
@@ -23,7 +23,7 @@
 //#include <Events_Listener.h>
 
 #include <ModelAPI_AttributeDouble.h>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
 
 #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);
index 808de510c31da019b3c162a033a0c53d9245f190..41def9c853972967786ade29f7741485aafc32e1 100644 (file)
@@ -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,
index 23835fd7415c4ad40e8cf8ac46fd25b8d4aa2ae7..df1d1966dac914d30e1d4d77a51933713b29898b 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <GeomAPI_Ax3.h>
 #include <ModelAPI_Feature.h>
-#include <AIS_LengthDimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
 #include <Standard_DefineHandle.hxx>
 #include <SketchPlugin_Sketch.h>
 
 
 #include <SketcherPrs_DimensionStyle.h>
 
-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
index f0e07c93ac48eb8549be053d3698edf48140ffff..e4755e7e8c540b5a2508dcd871decf8748ac7b2f 100644 (file)
@@ -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);
 }
index ad2fb6824ea7e6c14c5681e59edbac4db1043249..b79dee7c0cec7a07f99e938cb4a154104396ea2e 100644 (file)
 #include <ModelAPI_Feature.h>
 #include <SketchPlugin_Sketch.h>
 
-#include <AIS_RadiusDimension.hxx>
+#include <PrsDim_RadiusDimension.hxx>
 #include <Standard_DefineHandle.hxx>
 
 #include <SketcherPrs_DimensionStyle.h>
 
-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
index 02c4cf47662025f6dbf585a2351c0c3174b6b0cb..69e4768b981b3e6c2fe05ac545e64edb682a2ecf 100644 (file)
@@ -47,7 +47,7 @@
 #include <BRep_Tool.hxx>
 #include <Precision.hxx>
 
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
 
 namespace SketcherPrs_Tools {
 
index c943d5d51e6e164857d89cc6a30343d59d9a42f8..c0824cf1d6b1ae0c3b15b6dabd00332f123b1c4d 100644 (file)
@@ -57,7 +57,6 @@
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <AIS_Shape.hxx>
-#include <AIS_Dimension.hxx>
 #include <AIS_Trihedron.hxx>
 #ifdef BEFORE_TRIHEDRON_PATCH
 #include <AIS_Axis.hxx>
@@ -67,6 +66,7 @@
 #include <AIS_Selection.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_IsoAspect.hxx>
+#include <PrsDim_Dimension.hxx>
 #include <SelectMgr_ListOfFilter.hxx>
 #include <SelectMgr_ListIteratorOfListOfFilter.hxx>
 #include <SelectMgr_SelectionManager.hxx>