ListOfShape aV1History, aV2History;
theMakeShape->generated(aV1, aV1History);
theMakeShape->generated(aV2, aV2History);
- theResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", theTag++);
- theResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", theTag++);
+ if(!aV1History.empty()) {
+ theResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", theTag++);
+ }
+ if(!aV2History.empty()) {
+ theResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", theTag++);
+ }
}
case GeomAPI_Shape::FACE:
case GeomAPI_Shape::SHELL: {
ListOfShape aV1History, aV2History;
thePipeAlgo.generated(aV1, aV1History);
thePipeAlgo.generated(aV2, aV2History);
- aResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", aGenTag++);
- aResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", aGenTag++);
+ if(!aV1History.empty()) {
+ aResultBody->generated(aV1, aV1History.front(), aGenName + "Edge_1", aGenTag++);
+ }
+ if(!aV2History.empty()) {
+ aResultBody->generated(aV2, aV2History.front(), aGenName + "Edge_2", aGenTag++);
+ }
}
case GeomAPI_Shape::FACE:
case GeomAPI_Shape::SHELL: {