1 // File: GeomAlgoAPI_DFLoader.cpp
2 // Created: 23 October 2014
3 // Author: Sergey Zaritchny
5 #include <GeomAlgoAPI_DFLoader.h>
6 #include <TopoDS_Iterator.hxx>
7 #include <TopTools_MapOfShape.hxx>
8 #include <TopExp_Explorer.hxx>
9 #include <TopTools_ListIteratorOfListOfShape.hxx>
10 //=======================================================================
11 //function : refineResult
13 //=======================================================================
14 const TopoDS_Shape GeomAlgoAPI_DFLoader::refineResult(const TopoDS_Shape& theResult)
17 if (theResult.ShapeType() == TopAbs_COMPOUND) {
18 Standard_Integer nbSubResults = 0;
19 TopoDS_Iterator itr(theResult);
20 for (; itr.More(); itr.Next()) nbSubResults++;
21 if (nbSubResults == 1) {
22 itr.Initialize(theResult);
23 if (itr.More()) aResult = itr.Value();