From: azv Date: Wed, 6 Dec 2017 11:45:05 +0000 (+0300) Subject: Extend the validator of 3D Fillet selection to get only sub-shapes of solids X-Git-Tag: V_2.10.0RC~99 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=49485013bea9d0d656fd11f5d0675e217ab74198;p=modules%2Fshaper.git Extend the validator of 3D Fillet selection to get only sub-shapes of solids --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp index 4c53bcbb2..0df681c49 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp @@ -693,6 +693,13 @@ bool FeaturesPlugin_ValidatorFilletSelection::isValid(const AttributePtr& theAtt ResultCompSolidPtr aContextOwner = ModelAPI_Tools::compSolidOwner(aContext); GeomShapePtr anOwner = aContextOwner.get() ? aContextOwner->shape() : aContext->shape(); + + if (anOwner->shapeType() != GeomAPI_Shape::SOLID && + anOwner->shapeType() != GeomAPI_Shape::COMPSOLID) { + theError = "Error: Not all selected shapes are sub-shapes of solids"; + return false; + } + if (!aBaseSolid) aBaseSolid = anOwner; else if (!aBaseSolid->isEqual(anOwner)) {