1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_DFLoader.cpp
4 // Created: 23 October 2014
5 // Author: Sergey Zaritchny
7 #include <GeomAlgoAPI_DFLoader.h>
8 #include <TopoDS_Iterator.hxx>
9 #include <TopTools_MapOfShape.hxx>
10 #include <TopExp_Explorer.hxx>
11 #include <TopTools_ListIteratorOfListOfShape.hxx>
12 //=======================================================================
13 //function : refineResult
15 //=======================================================================
16 const TopoDS_Shape GeomAlgoAPI_DFLoader::refineResult(const TopoDS_Shape& theResult)
18 TopoDS_Shape aResult = theResult;
19 const TopAbs_ShapeEnum aShType = theResult.ShapeType();
20 if(aShType == TopAbs_COMPOUND || aShType == TopAbs_SHELL || aShType == TopAbs_WIRE) {
21 Standard_Integer aSubResultsNb = 0;
22 TopoDS_Iterator anIt(theResult);
23 for(; anIt.More(); anIt.Next()) {
26 if(aSubResultsNb == 1) {
27 anIt.Initialize(theResult);
29 aResult = anIt.Value();