aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
theResultBody->loadGeneratedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::EDGE);
}
-
+ std::list<std::shared_ptr<GeomAlgoAPI_MakeSweep> > aSweeps; // all sweeps collected
std::shared_ptr<GeomAlgoAPI_MakeSweep> aMakeSweep =
std::dynamic_pointer_cast<GeomAlgoAPI_MakeSweep>(theMakeShape);
if(aMakeSweep.get()) {
+ aSweeps.push_back(aMakeSweep);
+ } else {
+ std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeList =
+ std::dynamic_pointer_cast<GeomAlgoAPI_MakeShapeList>(theMakeShape);
+ if (aMakeList.get()) {
+ ListOfMakeShape::const_iterator anIter = aMakeList->list().cbegin();
+ for(; anIter != aMakeList->list().cend(); anIter++) {
+ std::shared_ptr<GeomAlgoAPI_MakeSweep> aSweep =
+ std::dynamic_pointer_cast<GeomAlgoAPI_MakeSweep>(*anIter);
+ if (aSweep.get())
+ aSweeps.push_back(aSweep);
+ }
+ }
+ }
+ std::list<std::shared_ptr<GeomAlgoAPI_MakeSweep> >::iterator aSweep = aSweeps.begin();
+ for(; aSweep != aSweeps.end(); aSweep++) {
// Store from shapes.
- storeShapes(theResultBody, aBaseShapeType, aMakeSweep->fromShapes(), "From_");
+ storeShapes(theResultBody, aBaseShapeType, (*aSweep)->fromShapes(), "From_");
// Store to shapes.
- storeShapes(theResultBody, aBaseShapeType, aMakeSweep->toShapes(), "To_");
+ storeShapes(theResultBody, aBaseShapeType, (*aSweep)->toShapes(), "To_");
}
}
}
}
+const ListOfMakeShape& GeomAlgoAPI_MakeShapeList::list() const
+{
+ return myListOfMakeShape;
+}
+
+
//==================================================================================================
void GeomAlgoAPI_MakeShapeList::appendAlgo(
const GeomMakeShapePtr theMakeShape)
/// \param[in] theMakeShapeList list of algorithms.
GEOMALGOAPI_EXPORT void init(const ListOfMakeShape& theMakeShapeList);
+ /// \return the list reference
+ GEOMALGOAPI_EXPORT const ListOfMakeShape& list() const;
+
/// \brief Adds algo to the end of list.
/// \param[in] theMakeShape algo to be added.
GEOMALGOAPI_EXPORT void appendAlgo(const GeomMakeShapePtr theMakeShape);