From 475b04ed2e28f1e6983cf54eaefece14e68f4aac Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 15 Jun 2015 19:29:08 +0300 Subject: [PATCH] Using shape selected for sketcher --- src/FeaturesPlugin/extrusioncut_widget.xml | 2 +- src/PartSet/PartSet_WidgetSketchCreator.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/FeaturesPlugin/extrusioncut_widget.xml b/src/FeaturesPlugin/extrusioncut_widget.xml index a480b3cba..bb0d6b5f8 100755 --- a/src/FeaturesPlugin/extrusioncut_widget.xml +++ b/src/FeaturesPlugin/extrusioncut_widget.xml @@ -17,7 +17,7 @@ diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index fb687a891..1c4fbeddf 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -17,6 +17,11 @@ #include #include +#include +#include + +#include +#include #include #include @@ -158,5 +163,20 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp) if (aIsOp) aMgr->abortOperation(); theOp->abort(); + } else { + DataPtr aData = aSketchFeature->data(); + AttributeSelectionPtr aSelAttr = + std::dynamic_pointer_cast + (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID())); + if (aSelAttr.get()) { + 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); + } + } } } -- 2.39.2