-//=================================================================================================
-void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Prism& theFeature,
- std::shared_ptr<ModelAPI_ResultBody> theResultBody,
- std::shared_ptr<GeomAPI_Shape> theBasis,
- std::shared_ptr<GeomAPI_Shape> theContext)
-{
- //load result
- if(theBasis->isEqual(theContext))
- theResultBody->store(theFeature.shape());
- else
- theResultBody->storeGenerated(theBasis, theFeature.shape());
-
- std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theFeature.mapOfShapes();
-
- //Insert lateral face : Face from Edge
- std::string aLatName = "LateralFace";
- theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape().get(), theBasis, EDGE,_LATERAL_TAG, aLatName, *aSubShapes);
-
- //Insert bottom face
- std::string aBotName = "BottomFace";
- std::shared_ptr<GeomAPI_Shape> aBottomFace = theFeature.firstShape();
- if(!aBottomFace->isNull()) {
- if(aSubShapes->isBound(aBottomFace)) {
- aBottomFace = aSubShapes->find(aBottomFace);
- }
- theResultBody->generated(aBottomFace, aBotName, _FIRST_TAG);
- }
-
- //Insert top face
- std::string aTopName = "TopFace";
- std::shared_ptr<GeomAPI_Shape> aTopFace = theFeature.lastShape();
- if (!aTopFace->isNull()) {
- if (aSubShapes->isBound(aTopFace)) {
- aTopFace = aSubShapes->find(aTopFace);
- }
- theResultBody->generated(aTopFace, aTopName, _LAST_TAG);
- }