From ad8f629a9dbf7e7b2a496b5eddd8d2403e691a04 Mon Sep 17 00:00:00 2001 From: Nicolas RECHATIN Date: Thu, 17 Jun 2021 16:19:28 +0200 Subject: [PATCH] + XML formatting and tooltips + CPP Includes sort and lint --- src/FiltersAPI/FiltersAPI_Feature.cpp | 4 +- src/FiltersAPI/FiltersAPI_Filter.cpp | 1 - .../FiltersPlugin_ContinuousFaces.cpp | 13 ++- src/FiltersPlugin/FiltersPlugin_EdgeSize.cpp | 5 +- src/FiltersPlugin/FiltersPlugin_FaceSize.cpp | 4 +- .../FiltersPlugin_FeatureEdges.cpp | 6 +- src/FiltersPlugin/FiltersPlugin_Plugin.cpp | 24 ++--- .../FiltersPlugin_VolumeSize.cpp | 4 +- src/FiltersPlugin/filter-ContinuousFaces.xml | 11 ++- src/FiltersPlugin/filter-EdgeSize.xml | 92 ++++++++++--------- src/FiltersPlugin/filter-FaceSize.xml | 83 ++++++++--------- src/FiltersPlugin/filter-FeatureEdges.xml | 9 +- src/FiltersPlugin/filter-VolumeSize.xml | 83 ++++++++--------- .../GeomAlgoAPI_BasicProperties.cpp | 14 ++- .../GeomAlgoAPI_ContinuousFaces.cpp | 23 +++-- .../GeomValidators_Positive.cpp | 1 - 16 files changed, 191 insertions(+), 186 deletions(-) diff --git a/src/FiltersAPI/FiltersAPI_Feature.cpp b/src/FiltersAPI/FiltersAPI_Feature.cpp index 095f45775..0b5def82e 100644 --- a/src/FiltersAPI/FiltersAPI_Feature.cpp +++ b/src/FiltersAPI/FiltersAPI_Feature.cpp @@ -20,11 +20,11 @@ #include "FiltersAPI_Feature.h" #include +#include +#include #include #include -#include -#include FiltersAPI_Feature::FiltersAPI_Feature( const std::shared_ptr & theFeature) diff --git a/src/FiltersAPI/FiltersAPI_Filter.cpp b/src/FiltersAPI/FiltersAPI_Filter.cpp index 37d7881e6..f1f37393a 100644 --- a/src/FiltersAPI/FiltersAPI_Filter.cpp +++ b/src/FiltersAPI/FiltersAPI_Filter.cpp @@ -84,7 +84,6 @@ FiltersAPI_Filter::FiltersAPI_Filter(const std::string& theName, myFilterArguments.push_back(FiltersAPI_Argument(aBoolean->value())); continue; } - } } diff --git a/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp b/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp index 0ab82ea2c..67726eaa1 100644 --- a/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp +++ b/src/FiltersPlugin/FiltersPlugin_ContinuousFaces.cpp @@ -22,16 +22,15 @@ #include #include #include - #include #include #include -#include +#include #include -#include #include +#include #include #include @@ -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); } diff --git a/src/FiltersPlugin/FiltersPlugin_EdgeSize.cpp b/src/FiltersPlugin/FiltersPlugin_EdgeSize.cpp index a5b6ff8fb..854636ab0 100644 --- a/src/FiltersPlugin/FiltersPlugin_EdgeSize.cpp +++ b/src/FiltersPlugin/FiltersPlugin_EdgeSize.cpp @@ -21,21 +21,20 @@ #include #include - #include #include #include #include -#include #include +#include + #include #include #include - bool FiltersPlugin_EdgeSize::isSupported(GeomAPI_Shape::ShapeType theType) const { return theType == GeomAPI_Shape::EDGE; diff --git a/src/FiltersPlugin/FiltersPlugin_FaceSize.cpp b/src/FiltersPlugin/FiltersPlugin_FaceSize.cpp index 17923ffba..8479c4a36 100644 --- a/src/FiltersPlugin/FiltersPlugin_FaceSize.cpp +++ b/src/FiltersPlugin/FiltersPlugin_FaceSize.cpp @@ -21,14 +21,14 @@ #include #include - #include #include #include -#include #include + #include +#include #include diff --git a/src/FiltersPlugin/FiltersPlugin_FeatureEdges.cpp b/src/FiltersPlugin/FiltersPlugin_FeatureEdges.cpp index 4b6ad58cc..1617be13b 100644 --- a/src/FiltersPlugin/FiltersPlugin_FeatureEdges.cpp +++ b/src/FiltersPlugin/FiltersPlugin_FeatureEdges.cpp @@ -21,16 +21,16 @@ #include #include - #include #include -#include -#include #include #include +#include #include +#include + #include #include #include diff --git a/src/FiltersPlugin/FiltersPlugin_Plugin.cpp b/src/FiltersPlugin/FiltersPlugin_Plugin.cpp index 343cdd267..59d25b9dd 100644 --- a/src/FiltersPlugin/FiltersPlugin_Plugin.cpp +++ b/src/FiltersPlugin/FiltersPlugin_Plugin.cpp @@ -17,24 +17,24 @@ // 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 diff --git a/src/FiltersPlugin/FiltersPlugin_VolumeSize.cpp b/src/FiltersPlugin/FiltersPlugin_VolumeSize.cpp index 32f04d30f..2a4a961c2 100644 --- a/src/FiltersPlugin/FiltersPlugin_VolumeSize.cpp +++ b/src/FiltersPlugin/FiltersPlugin_VolumeSize.cpp @@ -21,14 +21,14 @@ #include #include - #include #include #include -#include #include + #include +#include #include diff --git a/src/FiltersPlugin/filter-ContinuousFaces.xml b/src/FiltersPlugin/filter-ContinuousFaces.xml index 5864b282e..45036ef51 100644 --- a/src/FiltersPlugin/filter-ContinuousFaces.xml +++ b/src/FiltersPlugin/filter-ContinuousFaces.xml @@ -1,13 +1,14 @@ + label="Angle" + min="0" + step="0.1" + default="5" + tooltip="Continuity angle"> diff --git a/src/FiltersPlugin/filter-EdgeSize.xml b/src/FiltersPlugin/filter-EdgeSize.xml index bb459a633..b6eaed803 100644 --- a/src/FiltersPlugin/filter-EdgeSize.xml +++ b/src/FiltersPlugin/filter-EdgeSize.xml @@ -1,70 +1,78 @@ - + + label="Size" + min="0" + step="0.1" + default="1" + tooltip="< to"> - + - + - + - + - + - + - + - + + label="Max size" + min="0" + step="0.1" + default="10" + tooltip="Max value"> - + + label="Max size" + min="0" + step="0.1" + default="10" + tooltip="Max value"> diff --git a/src/FiltersPlugin/filter-FaceSize.xml b/src/FiltersPlugin/filter-FaceSize.xml index 2eff84f7b..41d75e61f 100644 --- a/src/FiltersPlugin/filter-FaceSize.xml +++ b/src/FiltersPlugin/filter-FaceSize.xml @@ -1,69 +1,70 @@ - + + label="Size" + min="0" + default="1" + tooltip="< to"> - + - + - + - + - + - + - + - + + label="Max size" + min="0" step="0.1" + default="10" + tooltip="Max value"> - + + label="Max size" + min="0" step="0.1" + default="10" + tooltip="Max value"> diff --git a/src/FiltersPlugin/filter-FeatureEdges.xml b/src/FiltersPlugin/filter-FeatureEdges.xml index c4e9071e4..a96933f01 100644 --- a/src/FiltersPlugin/filter-FeatureEdges.xml +++ b/src/FiltersPlugin/filter-FeatureEdges.xml @@ -1,8 +1,9 @@ + label="Angle" + min="0" + step="0.1" + default="5" + tooltip="Edge angle"> diff --git a/src/FiltersPlugin/filter-VolumeSize.xml b/src/FiltersPlugin/filter-VolumeSize.xml index fcb332097..cb89879c4 100644 --- a/src/FiltersPlugin/filter-VolumeSize.xml +++ b/src/FiltersPlugin/filter-VolumeSize.xml @@ -1,69 +1,70 @@ - + + label="Size" + min="0" + default="1" + tooltip="< to"> - + - + - + - + - + - + to"> - + - + + label="Max size" + min="0" step="0.1" + default="10" + tooltip="Max value"> - + + label="Max size" + min="0" step="0.1" + default="10" + tooltip="Max value"> diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.cpp index 174929da1..123370f24 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.cpp @@ -26,12 +26,12 @@ #include //================================================================================================= -bool GetBasicProperties( const std::shared_ptr& theShape, - const double theTolerance, - Standard_Real& theLength, - Standard_Real& theSurfArea, - Standard_Real& theVolume, - std::string& theError) +bool GetBasicProperties(const std::shared_ptr& 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& theShape, theError = aFail.GetMessageString(); return false; } - return true; - } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ContinuousFaces.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_ContinuousFaces.cpp index a7507e432..436c64d85 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ContinuousFaces.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ContinuousFaces.cpp @@ -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) { diff --git a/src/GeomValidators/GeomValidators_Positive.cpp b/src/GeomValidators/GeomValidators_Positive.cpp index cfb033f31..4d5527eba 100644 --- a/src/GeomValidators/GeomValidators_Positive.cpp +++ b/src/GeomValidators/GeomValidators_Positive.cpp @@ -79,6 +79,5 @@ bool GeomValidators_Positive::isValid(const AttributePtr& theAttribute, return false; } } - return true; } -- 2.39.2