From: dbv Date: Thu, 7 Apr 2016 09:35:18 +0000 (+0300) Subject: Compilation fix. Validator fix. X-Git-Tag: V_2.3.0~271 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b8c11eeb8598fb6c6b185770d44cb48379f25fde;p=modules%2Fshaper.git Compilation fix. Validator fix. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp index b9d9a670e..69ab07cef 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,7 @@ #include #include -#include +#include //================================================================================================= GeomAlgoAPI_Prism::GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape, diff --git a/src/GeomValidators/GeomValidators_ZeroOffset.cpp b/src/GeomValidators/GeomValidators_ZeroOffset.cpp index 3d08e9fd9..1ba9664d9 100644 --- a/src/GeomValidators/GeomValidators_ZeroOffset.cpp +++ b/src/GeomValidators/GeomValidators_ZeroOffset.cpp @@ -46,7 +46,9 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& int aSketchFacesNum = aConstruction->facesNum(); for(int aFaceIndex = 0; aFaceIndex < aSketchFacesNum; aFaceIndex++) { std::shared_ptr aFace = std::dynamic_pointer_cast(aConstruction->face(aFaceIndex)); - aFacesList.push_back(aFace); + if(aFace->isFace() && aFace->isPlanar()) { + aFacesList.push_back(aFace); + } } } } else if(theFeature->selectionList(*anIt)) { @@ -55,7 +57,9 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& AttributeSelectionPtr aFaceSel = aFacesSelectionList->value(anIndex); std::shared_ptr aFaceShape = aFaceSel->value(); if(aFaceShape.get() && !aFaceShape->isNull()) { // Getting face. - aFacesList.push_back(aFaceShape); + if(aFaceShape->isFace() && aFaceShape->isPlanar()) { + aFacesList.push_back(aFaceShape); + } } else { // This may be the whole sketch result selected, check and get faces. ResultPtr aContext = aFaceSel->context(); std::shared_ptr aContextShape = aContext->shape(); @@ -69,7 +73,9 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr& int aFacesNum = aConstruction->facesNum(); for(int aFaceIndex = 0; aFaceIndex < aFacesNum || aFacesNum == -1; aFaceIndex++) { aFaceShape = std::dynamic_pointer_cast(aConstruction->face(aFaceIndex)); - aFacesList.push_back(aFaceShape); + if(aFaceShape->isFace() && aFaceShape->isPlanar()) { + aFacesList.push_back(aFaceShape); + } } } }