From: dbv Date: Thu, 18 Jun 2015 09:35:53 +0000 (+0300) Subject: For for bounding planes selection in composite features X-Git-Tag: V_1.3.0~221 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=171be43909f55eb16ae1de8b67ab68660ce28f1f;p=modules%2Fshaper.git For for bounding planes selection in composite features --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.cpp index fcc224488..af44526a7 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.cpp @@ -33,12 +33,18 @@ ListOfShape FeaturesPlugin_ExtrusionBoolean::MakeSolids(const ListOfShape& theFa std::shared_ptr aFromShape; std::shared_ptr aToShape; std::shared_ptr anObjRef = selection(FROM_OBJECT_ID()); - if (anObjRef) { + if(anObjRef.get() != NULL) { aFromShape = std::dynamic_pointer_cast(anObjRef->value()); + if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) { + aFromShape = anObjRef->context()->shape(); + } } anObjRef = selection(TO_OBJECT_ID()); - if (anObjRef) { + if(anObjRef.get() != NULL) { aToShape = std::dynamic_pointer_cast(anObjRef->value()); + if(aToShape.get() == NULL && anObjRef->context().get() != NULL) { + aToShape = anObjRef->context()->shape(); + } } // Getting extrusion sizes. diff --git a/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.cpp index 646792492..09a0fd72b 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.cpp @@ -48,12 +48,18 @@ ListOfShape FeaturesPlugin_RevolutionBoolean::MakeSolids(const ListOfShape& theF std::shared_ptr aFromShape; std::shared_ptr aToShape; anObjRef = selection(FROM_OBJECT_ID()); - if (anObjRef) { + if(anObjRef.get() != NULL) { aFromShape = std::dynamic_pointer_cast(anObjRef->value()); + if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) { + aFromShape = anObjRef->context()->shape(); + } } anObjRef = selection(TO_OBJECT_ID()); - if (anObjRef) { + if(anObjRef.get() != NULL) { aToShape = std::dynamic_pointer_cast(anObjRef->value()); + if(aToShape.get() == NULL && anObjRef->context().get() != NULL) { + aToShape = anObjRef->context()->shape(); + } } // Getting revolution angles.