]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
+ XML formatting and tooltips
authorNicolas RECHATIN <nicolas.rechatin@cea.fr>
Thu, 17 Jun 2021 14:19:28 +0000 (16:19 +0200)
committerNicolas RECHATIN <nicolas.rechatin@cea.fr>
Fri, 18 Jun 2021 11:22:07 +0000 (13:22 +0200)
+ CPP Includes sort and lint

16 files changed:
src/FiltersAPI/FiltersAPI_Feature.cpp
src/FiltersAPI/FiltersAPI_Filter.cpp
src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp
src/FiltersPlugin/FiltersPlugin_EdgeSize.cpp
src/FiltersPlugin/FiltersPlugin_FaceSize.cpp
src/FiltersPlugin/FiltersPlugin_FeatureEdges.cpp
src/FiltersPlugin/FiltersPlugin_Plugin.cpp
src/FiltersPlugin/FiltersPlugin_VolumeSize.cpp
src/FiltersPlugin/filter-ContinuousFaces.xml
src/FiltersPlugin/filter-EdgeSize.xml
src/FiltersPlugin/filter-FaceSize.xml
src/FiltersPlugin/filter-FeatureEdges.xml
src/FiltersPlugin/filter-VolumeSize.xml
src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ContinuousFaces.cpp
src/GeomValidators/GeomValidators_Positive.cpp

index 095f4577512b9da32f75b3e5a0f35ac54194a2a9..0b5def82e69fff7eba6b4e211377dd30ddb2dfd6 100644 (file)
 #include "FiltersAPI_Feature.h"
 
 #include <ModelAPI_Feature.h>
+#include <ModelAPI_FiltersFactory.h>
+#include <ModelAPI_Session.h>
 
 #include <ModelHighAPI_Dumper.h>
 #include <ModelHighAPI_Tools.h>
-#include <ModelAPI_Session.h>
-#include <ModelAPI_FiltersFactory.h>
 
 FiltersAPI_Feature::FiltersAPI_Feature(
     const std::shared_ptr<ModelAPI_Feature> & theFeature)
index 37d7881e68d142634c985f887f348389cffabc07..f1f37393a92cae45e76aace7c94bb46181569187 100644 (file)
@@ -84,7 +84,6 @@ FiltersAPI_Filter::FiltersAPI_Filter(const std::string& theName,
       myFilterArguments.push_back(FiltersAPI_Argument(aBoolean->value()));
       continue;
     }
-
   }
 }
 
index 0ab82ea2cc6d4cbdfe06122c1b74523793240cad..67726eaa1245778fd5301fcd36430c9b8b619c6b 100644 (file)
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_AttributeSelection.h>
 #include <ModelAPI_AttributeDouble.h>
-
 #include <ModelAPI_Tools.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAPI_ShapeExplorer.h>
 #include <GeomAPI_Wire.h>
 
-#include <GeomAPI_ShapeExplorer.h>
 #include <GeomAlgoAPI_ContinuousFaces.h>
+#include <GeomAlgoAPI_ShapeTools.h>
 
 #include <map>
 #include <math.h>
@@ -75,10 +74,10 @@ static void cacheContinuousFace(const GeomShapePtr theFace,
       if (theCache.find(*aFIt) == theCache.end()) {
        GeomPointPtr aPoint = anEdge->middlePoint();
        if (isContinuousFaces(theFace,
-                              *aFIt,
-                              aPoint,
-                              theAngle,
-                              anError)) {
+                             *aFIt,
+                             aPoint,
+                             theAngle,
+                             anError)) {
           theCache.insert(*aFIt);
           cacheContinuousFace(*aFIt, theEdgeToFaces, theCache, theAngle);
         }
index a5b6ff8fbb3adeb501fb86e04c6ebbca1f30cec0..854636ab07729a7a9e01d12465c2a347a66007b4 100644 (file)
 
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeDouble.h>
-
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_Tools.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
 #include <GeomAPI_Wire.h>
 
+#include <GeomAlgoAPI_ShapeTools.h>
+
 #include <Precision.hxx>
 
 #include <map>
 #include <iostream>
 
-
 bool FiltersPlugin_EdgeSize::isSupported(GeomAPI_Shape::ShapeType theType) const
 {
   return theType == GeomAPI_Shape::EDGE;
index 17923ffbaf7f0fe7d601078c3a06bb0c245125ab..8479c4a36bece07ac120dd3cc18d640cdbaf65d7 100644 (file)
 
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeDouble.h>
-
 #include <ModelAPI_Tools.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
 #include <GeomAPI_Wire.h>
+
 #include <GeomAlgoAPI_BasicProperties.h>
+#include <GeomAlgoAPI_ShapeTools.h>
 
 #include <Precision.hxx>
 
index 4b6ad58ccbe2f966f52e9c379c88a2b68b1bef4f..1617be13b2dd4e2020bdce5857520b3f7773d2b3 100644 (file)
 
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeDouble.h>
-
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_Tools.h>
-#include <GeomAPI_ShapeExplorer.h>
-#include <GeomAlgoAPI_ContinuousFaces.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Shape.h>
+#include <GeomAPI_ShapeExplorer.h>
 #include <GeomAPI_Wire.h>
 
+#include <GeomAlgoAPI_ContinuousFaces.h>
+
 #include <map>
 #include <math.h>
 #include <iostream>
index 343cdd2674882e3f08f707a77b22197cc5fb1c11..59d25b9ddbe469f4c030a0e380f305a71608cf77 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include "FiltersPlugin_Plugin.h"
-#include "FiltersPlugin_Selection.h"
-#include "FiltersPlugin_HorizontalFace.h"
-#include "FiltersPlugin_VerticalFace.h"
 #include "FiltersPlugin_BelongsTo.h"
-#include "FiltersPlugin_OnPlane.h"
-#include "FiltersPlugin_OnLine.h"
-#include "FiltersPlugin_OnGeometry.h"
-#include "FiltersPlugin_OnPlaneSide.h"
-#include "FiltersPlugin_OppositeToEdge.h"
+#include "FiltersPlugin_ContinuousFaces.h"
 #include "FiltersPlugin_EdgeSize.h"
+#include "FiltersPlugin_ExternalFaces.h"
 #include "FiltersPlugin_FaceSize.h"
 #include "FiltersPlugin_FeatureEdges.h"
-#include "FiltersPlugin_ContinuousFaces.h"
-#include "FiltersPlugin_VolumeSize.h"
+#include "FiltersPlugin_HorizontalFace.h"
+#include "FiltersPlugin_OnGeometry.h"
+#include "FiltersPlugin_OnLine.h"
+#include "FiltersPlugin_OnPlane.h"
+#include "FiltersPlugin_OnPlaneSide.h"
+#include "FiltersPlugin_OppositeToEdge.h"
+#include "FiltersPlugin_Plugin.h"
 #include "FiltersPlugin_RelativeToSolid.h"
-#include "FiltersPlugin_ExternalFaces.h"
+#include "FiltersPlugin_Selection.h"
 #include "FiltersPlugin_Validators.h"
+#include "FiltersPlugin_VerticalFace.h"
+#include "FiltersPlugin_VolumeSize.h"
 
 #include <Config_ModuleReader.h>
 
index 32f04d30ff4dffec10b590bfdbbe55b72f2ae2d6..2a4a961c26019cca10a9f751d50f0b9d45b5456a 100644 (file)
 
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeDouble.h>
-
 #include <ModelAPI_Tools.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_ShapeTools.h>
 #include <GeomAPI_Wire.h>
+
 #include <GeomAlgoAPI_BasicProperties.h>
+#include <GeomAlgoAPI_ShapeTools.h>
 
 #include <Precision.hxx>
 
index 5864b282ea96be5d57f064a2cac432597131d27a..45036ef51a23e4c02960a3b85c5d8dd2722b1335 100644 (file)
@@ -1,13 +1,14 @@
 <filter id="ContinuousFaces">
   <doublevalue id="ContinuousFaces__value"
-      label="Angle"
-      min="0"
-      step="0.1"
-      default="5">
+               label="Angle"
+               min="0"
+               step="0.1"
+               default="5"
+               tooltip="Continuity angle">
   </doublevalue>
   <multi_selector id="ContinuousFaces__faces"
                   label="Faces:"
-                  tooltip="Select face."
+                  tooltip="Select faces"
                   shape_types="faces">
     <validator id="GeomValidators_ShapeType" parameters="face"/>
   </multi_selector>
index bb459a633b7cadfe4d45dfcbcc1e6d63c052a51b..b6eaed803e748747e7c1705b794a4adc34a529cb 100644 (file)
@@ -1,70 +1,78 @@
 <filter id="EdgeSize">
-    <switch id="EdgeSize__comparatorType">
+  <switch id="EdgeSize__comparatorType">
     <case id="inf" title="&lt;">
       <doublevalue id="EdgeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+                   label="Size"
+                   min="0"
+                   step="0.1"
+                   default="1"
+                   tooltip="&lt; to">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
-    </case> 
+    </case>
     <case id="infEq" title="&lt;=">
-    <doublevalue id="EdgeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="EdgeSize__value"
+                   label="Size"
+                   min="0"
+                   step="0.1"
+                   default="1"
+                   tooltip="&lt;= to">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="sup" title="&gt;">
-    <doublevalue id="EdgeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="EdgeSize__value"
+                   label="Size"
+                   min="0"
+                   step="0.1"
+                   default="1"
+                   tooltip="&gt; to">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="supEq" title="&gt;=">
-    <doublevalue id="EdgeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="EdgeSize__value"
+                   label="Size"
+                   min="0"
+                   step="0.1"
+                   default="1"
+                   tooltip="&gt;= to">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="isBetween" title="is between">
-     <doublevalue id="EdgeSize__value"
-                  label="Min size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="EdgeSize__value"
+                   label="Min size"
+                   min="0"
+                   step="0.1"
+                   default="1"
+                   tooltip="Min value">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
       <doublevalue id="EdgeSize__valueMax"
-                  label="Max size"
-                  min="0"
-                  step="0.1"
-                  default="10">
+                   label="Max size"
+                   min="0"
+                   step="0.1"
+                   default="10"
+                   tooltip="Max value">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
     </case>
     <case id="isStrictlyBetween" title="is strictly between">
-     <doublevalue id="EdgeSize__value"
-                  label="Min size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="EdgeSize__value"
+                   label="Min size"
+                   min="0"
+                   step="0.1"
+                   default="1"
+                   tooltip="Min value">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
       <doublevalue id="EdgeSize__valueMax"
-                  label="Max size"
-                  min="0"
-                  step="0.1"
-                  default="10">
+                   label="Max size"
+                   min="0"
+                   step="0.1"
+                   default="10"
+                   tooltip="Max value">
         <validator id="GeomValidators_Positive" />
       </doublevalue>
     </case>
index 2eff84f7bbdec7bb241bf7ac4c4a5ed20ea7f48b..41d75e61ff1bc3ea07482bbbd20473c47901d288 100644 (file)
@@ -1,69 +1,70 @@
 <filter id="FaceSize">
-    <switch id="FaceSize__comparatorType">
+  <switch id="FaceSize__comparatorType">
     <case id="inf" title="&lt;">
       <doublevalue id="FaceSize__value"
-                  label="Size"
-                  min="0"
-                  default="1">
+                   label="Size"
+                   min="0"
+                   default="1"
+                   tooltip="&lt; to">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
-    </case> 
+    </case>
     <case id="infEq" title="&lt;=">
-    <doublevalue id="FaceSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="FaceSize__value"
+                   label="Size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="&lt;= to">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="sup" title="&gt;">
-    <doublevalue id="FaceSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="FaceSize__value"
+                   label="Size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="&gt; to">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="supEq" title="&gt;=">
-    <doublevalue id="FaceSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="FaceSize__value"
+                   label="Size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="&gt;= to">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="isBetween" title="is between">
-     <doublevalue id="FaceSize__value"
-                  label="Min size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="FaceSize__value"
+                   label="Min size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="Min value">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
       <doublevalue id="FaceSize__valueMax"
-                  label="Max size"
-                  min="0"
-                  step="0.1"
-                  default="10">
+                   label="Max size"
+                   min="0" step="0.1"
+                   default="10"
+                   tooltip="Max value">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
     </case>
     <case id="isStrictlyBetween" title="is strictly between">
-     <doublevalue id="FaceSize__value"
-                  label="Min size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="FaceSize__value"
+                   label="Min size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="Min value">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
       <doublevalue id="FaceSize__valueMax"
-                  label="Max size"
-                  min="0"
-                  step="0.1"
-                  default="10">
+                   label="Max size"
+                   min="0" step="0.1"
+                   default="10"
+                   tooltip="Max value">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
     </case>
index c4e9071e4a48fe323a237e4707fc98c15792cc41..a96933f01af8d5e9d704e17fb1981a36e8c9e3ac 100644 (file)
@@ -1,8 +1,9 @@
 <filter id="FeatureEdges">
   <doublevalue id="FeatureEdges__value"
-              label="Angle"
-              min="0"
-              step="0.1"
-              default="5">
+               label="Angle"
+               min="0"
+               step="0.1"
+               default="5"
+               tooltip="Edge angle">
   </doublevalue>
 </filter>
index fcb332097faf5d7dc63adc209f00dfe0bca17db5..cb89879c4e9334d864ed01f54fab33802806332b 100644 (file)
@@ -1,69 +1,70 @@
 <filter id="VolumeSize">
-    <switch id="VolumeSize__comparatorType">
+  <switch id="VolumeSize__comparatorType">
     <case id="inf" title="&lt;">
       <doublevalue id="VolumeSize__value"
-                  label="Size"
-                  min="0"
-                  default="1">
+                   label="Size"
+                   min="0"
+                   default="1"
+                   tooltip="< to">
         <validator id="GeomValidators_Positive" />
       </doublevalue>
-    </case> 
+    </case>
     <case id="infEq" title="&lt;=">
-    <doublevalue id="VolumeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="VolumeSize__value"
+                   label="Size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="<= to">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="sup" title="&gt;">
-    <doublevalue id="VolumeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="VolumeSize__value"
+                   label="Size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="> to">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="supEq" title="&gt;=">
-    <doublevalue id="VolumeSize__value"
-                  label="Size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="VolumeSize__value"
+                   label="Size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="&gt;="> to">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
-     </case>
+    </case>
     <case id="isBetween" title="is between">
-     <doublevalue id="VolumeSize__value"
-                  label="Min size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="VolumeSize__value"
+                   label="Min size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="Min value">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
       <doublevalue id="VolumeSize__valueMax"
-                  label="Max size"
-                  min="0"
-                  step="0.1"
-                  default="10">
+                   label="Max size"
+                   min="0" step="0.1"
+                   default="10"
+                   tooltip="Max value">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
     </case>
     <case id="isStrictlyBetween" title="is strictly between">
-     <doublevalue id="VolumeSize__value"
-                  label="Min size"
-                  min="0"
-                  step="0.1"
-                  default="1">
+      <doublevalue id="VolumeSize__value"
+                   label="Min size"
+                   min="0" step="0.1"
+                   default="1"
+                   tooltip="Min value">
         <validator id="GeomValidators_Positive" parameters="-1.e-10"/>
       </doublevalue>
       <doublevalue id="VolumeSize__valueMax"
-                  label="Max size"
-                  min="0"
-                  step="0.1"
-                  default="10">
+                   label="Max size"
+                   min="0" step="0.1"
+                   default="10"
+                   tooltip="Max value">
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
     </case>
index 174929da1b9d037b44db7320c1fc61b078ff4b10..123370f24dbb975e34c8a858768d8e086bcf2192 100644 (file)
 #include <Standard_ErrorHandler.hxx>
 
 //=================================================================================================
-bool GetBasicProperties(  const std::shared_ptr<GeomAPI_Shape>& theShape,
-                          const double theTolerance,
-                          Standard_Real& theLength,
-                          Standard_Real& theSurfArea,
-                          Standard_Real& theVolume,
-                          std::string& theError)
+bool GetBasicProperties(const std::shared_ptr<GeomAPI_Shape>& theShape,
+                        const double theTolerance,
+                        Standard_Real& theLength,
+                        Standard_Real& theSurfArea,
+                        Standard_Real& theVolume,
+                        std::string& theError)
 {
 
   #ifdef _DEBUG
@@ -69,7 +69,5 @@ bool GetBasicProperties(  const std::shared_ptr<GeomAPI_Shape>& theShape,
     theError = aFail.GetMessageString();
     return false;
   }
-
   return true;
-
 }
index a7507e43277b306687bd823ac8175b23e681af7e..436c64d85aacc1ba71bb6420d00703ef6f1599cc 100644 (file)
@@ -109,18 +109,17 @@ bool isContinuousFaces(const GeomShapePtr& theFace1,
   try {
     OCC_CATCH_SIGNALS;
     LocalAnalysis_SurfaceContinuity aLocAnal(aSurf1,
-                                            aPointOnFace1.X(),
-                                            aPointOnFace1.Y(),
-                                            aSurf2,
-                                            aPointOnFace2.X(),
-                                            aPointOnFace2.Y(),
-                                            GeomAbs_Shape::GeomAbs_G1, // Order
-                                            0.001, // EpsNul
-                                            0.001, // EpsC0
-                                            0.001, // EpsC1
-                                            0.001, // EpsC2
-                                            theAngle * PI/ 180.0); //EpsG1
-
+                                             aPointOnFace1.X(),
+                                             aPointOnFace1.Y(),
+                                             aSurf2,
+                                             aPointOnFace2.X(),
+                                             aPointOnFace2.Y(),
+                                             GeomAbs_Shape::GeomAbs_G1, // Order
+                                             0.001, // EpsNul
+                                             0.001, // EpsC0
+                                             0.001, // EpsC1
+                                             0.001, // EpsC2
+                                             theAngle * PI/ 180.0); //EpsG1
     aRes = aLocAnal.IsG1();
   }
   catch (Standard_Failure const& anException) {
index cfb033f313ae12ac4be49b3fe5709b6ab27859d9..4d5527eba3c3174150703a904109ca8f89693752 100644 (file)
@@ -79,6 +79,5 @@ bool GeomValidators_Positive::isValid(const AttributePtr& theAttribute,
       return false;
     }
   }
-
   return true;
 }