From: Nicolas Rechatin Date: Wed, 23 Mar 2022 15:05:36 +0000 (+0100) Subject: FIX : Variable rename + test KO X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fnrn%2FLot2%2FDuplicatedFaces;p=modules%2Fshaper.git FIX : Variable rename + test KO --- diff --git a/src/FeaturesAPI/FeaturesAPI_DuplicatedFaces.cpp b/src/FeaturesAPI/FeaturesAPI_DuplicatedFaces.cpp index 0aa69855a..5171854ce 100644 --- a/src/FeaturesAPI/FeaturesAPI_DuplicatedFaces.cpp +++ b/src/FeaturesAPI/FeaturesAPI_DuplicatedFaces.cpp @@ -21,10 +21,8 @@ #include -#include -#include - #include +#include #include #include diff --git a/src/FeaturesPlugin/FeaturesPlugin_CommonDuplicatedFaces.cpp b/src/FeaturesPlugin/FeaturesPlugin_CommonDuplicatedFaces.cpp index bc66326c7..7e0914d4f 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CommonDuplicatedFaces.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CommonDuplicatedFaces.cpp @@ -54,14 +54,14 @@ void explode(const GeomShapePtr& theCompound, ListOfShape& theSubs) //================================================================================================= void FeaturesPlugin_CommonDuplicatedFaces::updateFaces() { - AttributeSelectionPtr ancompSolidAttr = + AttributeSelectionPtr aCompSolidAttr = std::dynamic_pointer_cast(attributObject()); AttributeSelectionListPtr aFacesListAttr = std::dynamic_pointer_cast (attributListFaces()); - GeomShapePtr aShape = ancompSolidAttr->value(); + GeomShapePtr aShape = aCompSolidAttr->value(); AttributeDoublePtr aToleranceAttr = std::dynamic_pointer_cast @@ -73,13 +73,13 @@ void FeaturesPlugin_CommonDuplicatedFaces::updateFaces() myShape = aShape; anIsCompute->setValue(true); } - if (aShape.get() && ancompSolidAttr->context().get() + if (aShape.get() && aCompSolidAttr->context().get() && aToleranceAttr.get() && !aShape->isEqual(myShape)) { if (aFacesListAttr->isInitialized()) aFacesListAttr->clear(); - aShape = ancompSolidAttr->context()->shape(); + aShape = aCompSolidAttr->context()->shape(); if (aShape) { std::string anError; ListOfShape aFaces; @@ -103,7 +103,7 @@ void FeaturesPlugin_CommonDuplicatedFaces::updateFaces() if (!aFacePtr.get()) { setError("GetDuplicatedFaces : An invalid face found " + anError); } - aFacesListAttr->append(ancompSolidAttr->context(), aFacePtr); + aFacesListAttr->append(aCompSolidAttr->context(), aFacePtr); } std::stringstream alabel; alabel << aFacesListAttr->size(); diff --git a/src/FeaturesPlugin/FeaturesPlugin_DuplicatedFaces.cpp b/src/FeaturesPlugin/FeaturesPlugin_DuplicatedFaces.cpp index badca1158..ff959c814 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_DuplicatedFaces.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_DuplicatedFaces.cpp @@ -131,8 +131,8 @@ void FeaturesPlugin_DuplicatedFaces::execute() } if (selection(OBJECT_ID())->isInitialized()) { - AttributeSelectionPtr ancompSolidAttr = selection(OBJECT_ID()); - ResultPtr aResult = ancompSolidAttr->context(); + AttributeSelectionPtr aCompSolidAttr = selection(OBJECT_ID()); + ResultPtr aResult = aCompSolidAttr->context(); double aTranparency = integer(TRANSPARENCY_ID())->value()/100.0; ModelAPI_Tools::setTransparency(aResult, aTranparency); diff --git a/src/FeaturesPlugin/FeaturesPlugin_GroupDuplicatedFaces.cpp b/src/FeaturesPlugin/FeaturesPlugin_GroupDuplicatedFaces.cpp index 4b0e1e351..ef9d82c5f 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_GroupDuplicatedFaces.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_GroupDuplicatedFaces.cpp @@ -117,8 +117,8 @@ void FeaturesPlugin_GroupDuplicatedFaces::execute() } if (selection(OBJECT_ID())->isInitialized()) { - AttributeSelectionPtr ancompSolidAttr = selection(OBJECT_ID()); - ResultPtr aResult = ancompSolidAttr->context(); + AttributeSelectionPtr aCompSolidAttr = selection(OBJECT_ID()); + ResultPtr aResult = aCompSolidAttr->context(); if(integer(TRANSPARENCY_ID())->isInitialized()){ double aTranparency = integer(TRANSPARENCY_ID())->value()/100.0;