From b4cf26536ece6d115514aa1d8d7fb10f74ae4537 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 29 Jul 2015 11:43:49 +0300 Subject: [PATCH] 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. --- src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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++; -- 2.39.2