- case BOOL_CUT: aBoolAlgo = GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_CUT); break;
- case BOOL_COMMON: aBoolAlgo = GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_COMMON); break;
- case BOOL_FILL: aBoolAlgo = GeomAlgoAPI_Partition(aListWithObject, aTools); break;
+ case BOOL_CUT: {
+ aBoolAlgo =
+ GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_CUT);
+ aResShape = aBoolAlgo.shape();
+ break;
+ }
+ case BOOL_COMMON: {
+ aBoolAlgo =
+ GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_COMMON);
+ aResShape = aBoolAlgo.shape();
+ break;
+ }
+ case BOOL_FILL: {
+ aBoolAlgo = GeomAlgoAPI_Partition(aListWithObject, aTools);
+ aResShape = aBoolAlgo.shape();
+ if(aResShape->shapeType() == GeomAPI_Shape::COMPOUND) {
+ int aSubResultsNb = 0;
+ GeomAPI_ShapeIterator anIt(aResShape);
+ for(; anIt.more(); anIt.next()) {
+ ++aSubResultsNb;
+ }
+ if(aSubResultsNb == 1) {
+ anIt.init(aResShape);
+ if(anIt.more()) {
+ aResShape = anIt.current();
+ }
+ }
+ }
+ break;
+ }