From 59708865f1d545779d2883983d5bbcc091637ee3 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 6 Dec 2017 14:45:05 +0300 Subject: [PATCH] Extend the validator of 3D Fillet selection to get only sub-shapes of solids --- src/FeaturesPlugin/FeaturesPlugin_Validators.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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)) { -- 2.39.2