From: nds Date: Fri, 28 Aug 2015 18:08:07 +0000 (+0300) Subject: Issue #764 extrusionfuse - plane for sketch X-Git-Tag: V_1.4.0_beta4~200 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c878326ca3cbca11878476015e2ef3607461a0a5;p=modules%2Fshaper.git Issue #764 extrusionfuse - plane for sketch --- diff --git a/src/FeaturesPlugin/extrusioncut_widget.xml b/src/FeaturesPlugin/extrusioncut_widget.xml index 8160f4936..3ed6db6e5 100755 --- a/src/FeaturesPlugin/extrusioncut_widget.xml +++ b/src/FeaturesPlugin/extrusioncut_widget.xml @@ -72,6 +72,7 @@ tooltip="Objects to Cut" type_choice="Solids" concealment="true"> + diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 9781f9cf8..c93c58516 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -192,10 +193,16 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp) ResultPtr aRes = aSelAttr->context(); GeomShapePtr aShape = aSelAttr->value(); if (aRes.get()) { - AttributeSelectionListPtr aSelList = - aCompFeature->data()->selectionList(FeaturesPlugin_CompositeBoolean::BOOLEAN_OBJECTS_ID()); - aSelList->append(aRes, GeomShapePtr()); - updateObject(aCompFeature); + std::string anObjectsAttribute = FeaturesPlugin_CompositeBoolean::BOOLEAN_OBJECTS_ID(); + SessionPtr aMgr = ModelAPI_Session::get(); + ModelAPI_ValidatorsFactory* aFactory = aMgr->validators(); + AttributePtr anAttribute = myFeature->attribute(anObjectsAttribute); + std::string aValidatorID, anError; + if (aFactory->validate(anAttribute, aValidatorID, anError)) { + AttributeSelectionListPtr aSelList = aCompFeature->data()->selectionList(anObjectsAttribute); + aSelList->append(aRes, GeomShapePtr()); + updateObject(aCompFeature); + } } } }