- //============================================================================
-void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature,
- boost::shared_ptr<ModelAPI_ResultBody> theResultBody,
- boost::shared_ptr<GeomAPI_Shape> theBasis,
- boost::shared_ptr<GeomAPI_Shape> theContext)
-{
-
-
- //load result
- if(theBasis->impl<TopoDS_Shape>().IsEqual(theContext->impl<TopoDS_Shape>()))
- theResultBody->store(theFeature.shape());
- else
- theResultBody->storeGenerated(theContext, theFeature.shape());
-
- TopTools_DataMapOfShapeShape aSubShapes;
- for (TopExp_Explorer Exp(theFeature.shape()->impl<TopoDS_Shape>(),TopAbs_FACE); Exp.More(); Exp.Next()) {
- aSubShapes.Bind(Exp.Current(),Exp.Current());
- }
-
- //Insert lateral face : Face from Edge
- //GeomAlgoAPI_DFLoader::loadAndOrientGeneratedShapes(*myBuilder, myBasis, TopAbs_EDGE, aLateralFaceBuilder, aSubShapes);
-
-
- TopTools_MapOfShape aView;
- TopExp_Explorer aShapeExplorer (theFeature.shape()->impl<TopoDS_Shape>(), TopAbs_EDGE);
- for (; aShapeExplorer.More(); aShapeExplorer.Next ()) {
- const TopoDS_Shape& aRoot = aShapeExplorer.Current ();
- if (!aView.Add(aRoot)) continue;
- boost::shared_ptr<GeomAPI_Shape> aRootG(new GeomAPI_Shape());
- aRootG->setImpl((void *)&aRoot);
- const ListOfShape& aShapes = theFeature.generated(aRootG);
- std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = aShapes.begin(), aLast = aShapes.end();
- for (; anIt != aLast; anIt++) {
- TopoDS_Shape aNewShape = (*anIt)->impl<TopoDS_Shape>();
- if (aSubShapes.IsBound(aNewShape)) {
- aNewShape.Orientation((aSubShapes(aNewShape)).Orientation());
- }