if (aCopyCompound) {
ResultBodyPtr aResultBody = document()->createBody(data(), anIndexToRemove++);
aResultBody->store(aCopyCompound);
- aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::VERTEX, "Modified_Vertex");
- aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::EDGE, "Modified_Edge");
- aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::FACE, "Modified_Face");
+ aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::VERTEX);
+ aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::EDGE);
+ aResultBody->loadModifiedShapes(aCopyAlgo, aCompound, GeomAPI_Shape::FACE);
setResult(aResultBody);
}
removeResults(anIndexToRemove);
// Store result.
ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
aResultBody->storeModified(aShape, aCopyAlgo->shape());
- aResultBody->loadModifiedShapes(aCopyAlgo, aShape, GeomAPI_Shape::VERTEX, "Modified_Vertex");
+ aResultBody->loadModifiedShapes(aCopyAlgo, aShape, GeomAPI_Shape::VERTEX);
setResult(aResultBody, aResultIndex);
++aResultIndex;
if (aShell->isSubShape(aHistoryShape, false)) {
aResultBody->loadModifiedShapes(aSewingAlgo,
aFace,
- GeomAPI_Shape::EDGE,
- "Modified_Edge");
+ GeomAPI_Shape::EDGE);
aResultBody->loadModifiedShapes(aSewingAlgo,
aFace,
- GeomAPI_Shape::FACE,
- "Modified_Face");
+ GeomAPI_Shape::FACE);
break;
}
}
++anIt)
{
GeomShapePtr aShape = *anIt;
- aResultBody->loadModifiedShapes(theAlgorithm, aShape, GeomAPI_Shape::FACE, "Modified_Face");
+ aResultBody->loadModifiedShapes(theAlgorithm, aShape, GeomAPI_Shape::FACE);
}
setResult(aResultBody);
}
const int aModEdgeTag = 2;
ResultBodyPtr aResultBody = document()->createBody(data());
aResultBody->storeModified(aBaseShape, aResultShape);
- aResultBody->loadModifiedShapes(aBuilder, aBaseShape, GeomAPI_Shape::EDGE, "Modified_Edge");
+ aResultBody->loadModifiedShapes(aBuilder, aBaseShape, GeomAPI_Shape::EDGE);
for (ListOfShape::const_iterator anIt = aShapesToAdd.cbegin();
anIt != aShapesToAdd.cend();
++anIt)
GeomAPI_Shape::ShapeType aShType = (*anIt)->shapeType();
aResultBody->loadModifiedShapes(aBuilder,
*anIt,
- aShType,
- aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex"
- : "Modified_Edge");
+ aShType);
}
setResult(aResultBody);
}
for(ListOfShape::const_iterator anIt = anEdges.cbegin(); anIt != anEdges.cend(); ++anIt) {
std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(*anIt));
if(anEdgeInList->isEqual(anEdgeInResult)) {
- aResultBody->modified(anEdgeInList, anEdgeInResult, "Edge");
+ aResultBody->modified(anEdgeInList, anEdgeInResult);
break;
}
}
}
std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeShapeList;
- GeomAPI_DataMapOfShapeShape aMapOfShapes;
if(!aShapesToAdd.empty()) {
// Cut objects with not used solids.
std::shared_ptr<GeomAlgoAPI_Boolean> anObjectsCutAlgo(new GeomAlgoAPI_Boolean(
aShapesToSmash.clear();
aShapesToSmash.push_back(anObjectsCutAlgo->shape());
aMakeShapeList->appendAlgo(anObjectsCutAlgo);
- aMapOfShapes.merge(anObjectsCutAlgo->mapOfSubShapes());
}
// Cut tools with not used solids.
aTools.clear();
aTools.push_back(aToolsCutAlgo->shape());
aMakeShapeList->appendAlgo(aToolsCutAlgo);
- aMapOfShapes.merge(aToolsCutAlgo->mapOfSubShapes());
}
}
return;
}
aMakeShapeList->appendAlgo(aBoolAlgo);
- aMapOfShapes.merge(aBoolAlgo->mapOfSubShapes());
// Put all (cut result, tools and not used solids) to PaveFiller.
aShapesToAdd.push_back(aBoolAlgo->shape());
std::shared_ptr<GeomAPI_Shape> aShape = aFillerAlgo->shape();
aMakeShapeList->appendAlgo(aFillerAlgo);
- aMapOfShapes.merge(aFillerAlgo->mapOfSubShapes());
std::shared_ptr<GeomAPI_Shape> aFrontShape = anOriginalShapes.front();
anOriginalShapes.pop_front();
theResultBody->storeModified(theBaseShape, theResultShape);
- const std::string aModEName = "Modified_Edge";
- const std::string aModFName = "Modified_Face";
-
- theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::EDGE, aModEName);
- theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE, aModFName);
+ theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::EDGE);
+ theResultBody->loadModifiedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE);
theResultBody->loadDeletedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::FACE);
- std::string aName;
for (ListOfShape::const_iterator anIter = theTools.begin();
anIter != theTools.end();
++anIter)
{
- aName = (*anIter)->shapeType() <= GeomAPI_Shape::FACE ? aModFName
- : aModEName;
- theResultBody->loadModifiedShapes(theMakeShape,
- *anIter,
- aName == aModEName ? GeomAPI_Shape::EDGE
- : GeomAPI_Shape::FACE,
- aName);
+ GeomAPI_Shape::ShapeType aShapeType =
+ (*anIter)->shapeType() <= GeomAPI_Shape::FACE ? GeomAPI_Shape::FACE
+ : GeomAPI_Shape::EDGE;
+ theResultBody->loadModifiedShapes(theMakeShape, *anIter, aShapeType);
theResultBody->loadDeletedShapes(theMakeShape, *anIter, GeomAPI_Shape::FACE);
}
const ListOfShape& theTools,
const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape)
{
- const std::string aModName = "Modfied";
-
ListOfShape aTools = theTools;
aTools.push_back(theObject);
} else {
aResultBody->storeModified(aBaseShape, aResultShape);
- const std::string aModEName = "Modified_Edge";
- const std::string aModFName = "Modified_Face";
- aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::EDGE, aModEName);
- aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::FACE, aModFName);
+ aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::EDGE);
+ aResultBody->loadModifiedShapes(anAlgo, aBaseShape, GeomAPI_Shape::FACE);
}
setResult(aResultBody);
}
continue;
}
if(aShapesMap.isBound(aSubShape)) {
- theResultBody->modified(aShapesMap.find(aSubShape),
- aSubShape,
- std::string("Modified_")
- + (anIndex == 0 ? "Vertex_" : "Edge_")
- + std::to_string((long long)(anIndex == 0 ? aModifiedVertexIndex++
- : aModifiedEdgeIndex++)));
+ theResultBody->modified(aShapesMap.find(aSubShape), aSubShape);
} else {
theResultBody->generated(
aSubShape,
++anIt)
{
GeomShapePtr aShape = *anIt;
- aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::EDGE, "Modified_Edge");
- aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::FACE, "Modified_Face");
+ aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::EDGE);
+ aResultBody->loadModifiedShapes(theMakeShape, aShape, GeomAPI_Shape::FACE);
aResultBody->loadDeletedShapes(theMakeShape, aShape, GeomAPI_Shape::FACE);
}
aResultBody->loadModifiedShapes(aMakeShapeList,
aBaseShape,
- GeomAPI_Shape::FACE,
- "Modified_Face");
+ GeomAPI_Shape::FACE);
aResultBody->loadModifiedShapes(aMakeShapeList,
aBaseShape,
- GeomAPI_Shape::EDGE,
- "Modified_Edge");
+ GeomAPI_Shape::EDGE);
aResultBody->loadModifiedShapes(aMakeShapeList,
aBaseShape,
- GeomAPI_Shape::VERTEX,
- "Modified_Vertex");
+ GeomAPI_Shape::VERTEX);
setResult(aResultBody);
}
// workaround: make copy to name edges correctly
// Store result and naming.
- const std::string aModEName = "Modified_Edge";
- const std::string aModFName = "Modified_Face";
std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
aResultBody->storeModified(anObjects.front(), aShape);
for(ListOfShape::const_iterator anIter = anObjects.begin(); anIter != anObjects.end(); ++anIter) {
- aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::EDGE, aModEName);
- aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::FACE, aModFName);
+ aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::EDGE);
+ aResultBody->loadModifiedShapes(aMakeShapeList, *anIter, GeomAPI_Shape::FACE);
//aResultBody->loadDeletedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
}