- //Insert lateral face : Face from Edge
- std::string aLatName = "LateralFace";
- theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape(), theBasis, EDGE,_LATERAL_TAG, aLatName, *aSubShapes);
-
- ////Insert first face
- //std::string aBotName = "FirstFace";
- //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 last face
- //std::string aTopName = "LastFace";
- //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);
- //}
+ std::string aGeneratedName = "Generated";
+ theResultBody->loadAndOrientGeneratedShapes(theFeature.makeShape(), theBasis, EDGE,_GENERATE_TAG, aGeneratedName, *aSubShapes);
+
+ //Insert bottom face
+ std::string aBotName = "FromFace";
+ 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 = "ToFace";
+ 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);
+ }
+