From: nds Date: Wed, 29 Jul 2015 08:43:49 +0000 (+0300) Subject: CompSolid filled presentation. All result bodies are placed in one compsolid for... X-Git-Tag: V_1.4.0_beta4~446 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4cf26536ece6d115514aa1d8d7fb10f74ae4537;p=modules%2Fshaper.git CompSolid filled presentation. All result bodies are placed in one compsolid for test purposes. The scenario is: create a sketch with two circles, create an extrusion on both faces. The result is one compsolid with two sub-results inside. --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index 38fe43254..63ba5d3b7 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -27,7 +27,7 @@ #define _LAST_TAG 3 #define EDGE 6 -//#define DEBUG_COMPSOLID +#define DEBUG_COMPSOLID //================================================================================================= FeaturesPlugin_Extrusion::FeaturesPlugin_Extrusion() @@ -98,7 +98,11 @@ void FeaturesPlugin_Extrusion::execute() // for each selected face generate a result int anIndex = 0, aResultIndex = 0; - +#ifdef DEBUG_COMPSOLID + ResultCompSolidPtr aCompSolidResult = document()->createCompSolid(data(), aResultIndex); + setResult(aCompSolidResult, aResultIndex); + aResultIndex++; +#endif for(; anIndex < aFaceRefs->size(); anIndex++) { std::shared_ptr aFaceRef = aFaceRefs->value(anIndex); ResultPtr aContextRes = aFaceRef->context(); @@ -122,12 +126,6 @@ void FeaturesPlugin_Extrusion::execute() break; } } - -#ifdef DEBUG_COMPSOLID - ResultCompSolidPtr aCompSolidResult = document()->createCompSolid(data(), aResultIndex); - setResult(aCompSolidResult, aResultIndex); - aResultIndex++; -#endif for(int aFaceIndex = 0; aFaceIndex < aFacesNum || aFacesNum == -1; aFaceIndex++) { #ifdef DEBUG_COMPSOLID ResultBodyPtr aResultBody = aCompSolidResult->addResult(aResultIndex); @@ -160,10 +158,7 @@ void FeaturesPlugin_Extrusion::execute() break; } //LoadNamingDS -//#ifdef DEBUG_COMPSOLID -//#else LoadNamingDS(aFeature, aResultBody, aBaseShape, aContext); -//#endif setResult(aResultBody, aResultIndex); aResultIndex++;