From: azv Date: Wed, 27 Feb 2019 13:33:08 +0000 (+0300) Subject: Update names of modified faces of the transformation features (Translation, Rotation... X-Git-Tag: HighLevelObjectsHierarchy~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1f700ea1fc88890a208982dac77588f9c2dd166;p=modules%2Fshaper.git Update names of modified faces of the transformation features (Translation, Rotation, Symmetry and so on). --- diff --git a/src/CollectionPlugin/Test/TestGroupMove06.py b/src/CollectionPlugin/Test/TestGroupMove06.py index 5229e0c27..93b000b37 100644 --- a/src/CollectionPlugin/Test/TestGroupMove06.py +++ b/src/CollectionPlugin/Test/TestGroupMove06.py @@ -33,16 +33,16 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Left][Box_1_1/Bottom]"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Right][Box_1_1/Top]")) LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Box_1_1")], model.selection("EDGE", "Axis_1"), 10, 2) Group_1 = model.addGroup(Part_1_doc, [model.selection("SOLID", "LinearCopy_1_1_1")]) -Group_2_objects = [model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Back"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Top"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Right"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Left"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Bottom"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Front")] +Group_2_objects = [model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Back"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Top"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Right"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Left"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Bottom"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Front")] Group_2 = model.addGroup(Part_1_doc, Group_2_objects) -Group_3_objects = [model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Right][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Left][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Left][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Right][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Top]")] +Group_3_objects = [model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Back][LinearCopy_1_1_1/MF:Translated&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Right][LinearCopy_1_1_1/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Left][LinearCopy_1_1_1/MF:Translated&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Left][LinearCopy_1_1_1/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Right][LinearCopy_1_1_1/MF:Translated&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_1/MF:Translated&Box_1_1/Front][LinearCopy_1_1_1/MF:Translated&Box_1_1/Top]")] Group_3 = model.addGroup(Part_1_doc, Group_3_objects) Group_4 = model.addGroup(Part_1_doc, [model.selection("SOLID", "LinearCopy_1_1_2")]) -Group_5_objects = [model.selection("FACE", "LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Back"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Top"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Right"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Left"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Bottom"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Front")] +Group_5_objects = [model.selection("FACE", "LinearCopy_1_1_2/MF:Translated&Box_1_1/Back"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated&Box_1_1/Top"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated&Box_1_1/Right"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated&Box_1_1/Left"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated&Box_1_1/Bottom"), model.selection("FACE", "LinearCopy_1_1_2/MF:Translated&Box_1_1/Front")] Group_5 = model.addGroup(Part_1_doc, Group_5_objects) -Group_6_objects = [model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Right][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Left][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Left][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Right][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated_Face&Box_1_1/Top]")] +Group_6_objects = [model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Back][LinearCopy_1_1_2/MF:Translated&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Right][LinearCopy_1_1_2/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Left][LinearCopy_1_1_2/MF:Translated&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Left][LinearCopy_1_1_2/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Right][LinearCopy_1_1_2/MF:Translated&Box_1_1/Top]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated&Box_1_1/Bottom]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated&Box_1_1/Left]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated&Box_1_1/Right]"), model.selection("EDGE", "[LinearCopy_1_1_2/MF:Translated&Box_1_1/Front][LinearCopy_1_1_2/MF:Translated&Box_1_1/Top]")] Group_6 = model.addGroup(Part_1_doc, Group_6_objects) -Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Left"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated_Face&Box_1_1/Right")) +Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Left"), model.selection("FACE", "LinearCopy_1_1_1/MF:Translated&Box_1_1/Right")) Fill_1 = model.addFill(Part_1_doc, [model.selection("SOLID", "LinearCopy_1_1_1")], [model.selection("SOLID", "LinearCopy_1_1_2"), model.selection("FACE", "Plane_1")]) model.do() # move groups to the end diff --git a/src/CollectionPlugin/Test/TestGroupMove07.py b/src/CollectionPlugin/Test/TestGroupMove07.py index 04c84e272..78c711fcc 100644 --- a/src/CollectionPlugin/Test/TestGroupMove07.py +++ b/src/CollectionPlugin/Test/TestGroupMove07.py @@ -59,7 +59,7 @@ assert(selectionList.size() == 12) assert(aFactory.validate(Group_3.feature())) model.begin() -Symmetry_2 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Symmetry_1_1")], model.selection("VERTEX", "[Symmetry_1_1/MF:Symmetried_Face&Box_1_1/Front][Symmetry_1_1/MF:Symmetried_Face&Box_1_1/Left][Symmetry_1_1/MF:Symmetried_Face&Box_1_1/Bottom]"), True) +Symmetry_2 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Symmetry_1_1")], model.selection("VERTEX", "[Symmetry_1_1/MF:Symmetried&Box_1_1/Front][Symmetry_1_1/MF:Symmetried&Box_1_1/Left][Symmetry_1_1/MF:Symmetried&Box_1_1/Bottom]"), True) model.do() # move groups to the end Part_1_doc.moveFeature(Group_1.feature(), Symmetry_2.feature()) diff --git a/src/CollectionPlugin/Test/TestGroupMove08.py b/src/CollectionPlugin/Test/TestGroupMove08.py index 91fbcc384..cb325166b 100644 --- a/src/CollectionPlugin/Test/TestGroupMove08.py +++ b/src/CollectionPlugin/Test/TestGroupMove08.py @@ -88,7 +88,7 @@ assert(selectionList.size() == 2) # edge selected for the fillet become removed assert(aFactory.validate(Group_6.feature())) model.begin() -Fillet_3 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Fillet_1_1/MF:Fillet_Face&Box_1_1/Front][Fillet_1_1/MF:Fillet_Face&Box_1_1/Left]")], 1, 2) +Fillet_3 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Fillet_1_1/MF:Fillet&Box_1_1/Front][Fillet_1_1/MF:Fillet&Box_1_1/Left]")], 1, 2) model.do() # move groups to the end Part_1_doc.moveFeature(Group_1.feature(), Fillet_3.feature()) diff --git a/src/CollectionPlugin/Test/TestGroupMove12.py b/src/CollectionPlugin/Test/TestGroupMove12.py index e7c2f54d6..28485b632 100644 --- a/src/CollectionPlugin/Test/TestGroupMove12.py +++ b/src/CollectionPlugin/Test/TestGroupMove12.py @@ -74,7 +74,7 @@ model.end() moveGroupsAndVerify(Part_1_doc, Translation_2.feature(), num_in_groups) model.begin() -Translation_3 = model.addTranslation(Part_1_doc, [model.selection("COMPSOLID", "Translation_2_1")], model.selection("VERTEX", "[Translation_2_1_1/MF:Translated_Face&Box_1_1/Back][Translation_2_1_1/MF:Translated_Face&Box_1_1/Bottom][Translation_2_1_1/MF:Translated_Face&Box_1_1/Left]"), model.selection("VERTEX", "PartSet/Origin")) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("COMPSOLID", "Translation_2_1")], model.selection("VERTEX", "[Translation_2_1_1/MF:Translated&Box_1_1/Back][Translation_2_1_1/MF:Translated&Box_1_1/Bottom][Translation_2_1_1/MF:Translated&Box_1_1/Left]"), model.selection("VERTEX", "PartSet/Origin")) model.end() moveGroupsAndVerify(Part_1_doc, Translation_3.feature(), num_in_groups) diff --git a/src/CollectionPlugin/Test/TestGroupMove13.py b/src/CollectionPlugin/Test/TestGroupMove13.py index 9bcb491f4..4df0bcfdb 100644 --- a/src/CollectionPlugin/Test/TestGroupMove13.py +++ b/src/CollectionPlugin/Test/TestGroupMove13.py @@ -68,7 +68,7 @@ num_in_groups = [2, 4, 12, 9] moveGroupsAndVerify(Part_1_doc, Rotation_1.feature(), num_in_groups) model.begin() -Rotation_2 = model.addRotation(Part_1_doc, [model.selection("COMPSOLID", "Rotation_1_1")], model.selection("VERTEX", "[Rotation_1_1_3/MF:Rotated_Face&Box_1_1/Top][Rotation_1_1_3/MF:Rotated_Face&Box_1_1/Front][Rotation_1_1_3/MF:Rotated_Face&Box_1_1/Left]"), model.selection("VERTEX", "[Rotation_1_1_4/MF:Rotated_Face&Box_1_1/Front][Rotation_1_1_4/MF:Rotated_Face&Box_1_1/Bottom][Rotation_1_1_4/MF:Rotated_Face&Box_1_1/Right]"), model.selection("VERTEX", "[Rotation_1_1_2/MF:Rotated_Face&Box_1_1/Back][Rotation_1_1_2/MF:Rotated_Face&Box_1_1/Right][Rotation_1_1_2/MF:Rotated_Face&Box_1_1/Bottom]")) +Rotation_2 = model.addRotation(Part_1_doc, [model.selection("COMPSOLID", "Rotation_1_1")], model.selection("VERTEX", "[Rotation_1_1_3/MF:Rotated&Box_1_1/Top][Rotation_1_1_3/MF:Rotated&Box_1_1/Front][Rotation_1_1_3/MF:Rotated&Box_1_1/Left]"), model.selection("VERTEX", "[Rotation_1_1_4/MF:Rotated&Box_1_1/Front][Rotation_1_1_4/MF:Rotated&Box_1_1/Bottom][Rotation_1_1_4/MF:Rotated&Box_1_1/Right]"), model.selection("VERTEX", "[Rotation_1_1_2/MF:Rotated&Box_1_1/Back][Rotation_1_1_2/MF:Rotated&Box_1_1/Right][Rotation_1_1_2/MF:Rotated&Box_1_1/Bottom]")) model.end() moveGroupsAndVerify(Part_1_doc, Rotation_2.feature(), num_in_groups) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Tools.cpp b/src/FeaturesPlugin/FeaturesPlugin_Tools.cpp index ed96231b4..dc1b1a7e1 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Tools.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Tools.cpp @@ -38,18 +38,11 @@ void FeaturesPlugin_Tools::loadModifiedShapes(ResultBodyPtr theResultBody, for(; aToolIter != theTools.cend(); aToolIter++) aShapes.push_back(*aToolIter); - std::string aVertexName, anEdgeName, aFaceName; - if (!theNamePrefix.empty()) { - aVertexName = theNamePrefix + "_Vertex"; - anEdgeName = theNamePrefix + "_Edge"; - aFaceName = theNamePrefix + "_Face"; - } - for (ListOfShape::const_iterator anIter = aShapes.begin(); anIter != aShapes.end(); ++anIter) { - theResultBody->loadModifiedShapes(theMakeShape, *anIter, GeomAPI_Shape::VERTEX, aVertexName); - theResultBody->loadModifiedShapes(theMakeShape, *anIter, GeomAPI_Shape::EDGE, anEdgeName); - theResultBody->loadModifiedShapes(theMakeShape, *anIter, GeomAPI_Shape::FACE, aFaceName); + theResultBody->loadModifiedShapes(theMakeShape, *anIter, GeomAPI_Shape::VERTEX, theNamePrefix); + theResultBody->loadModifiedShapes(theMakeShape, *anIter, GeomAPI_Shape::EDGE, theNamePrefix); + theResultBody->loadModifiedShapes(theMakeShape, *anIter, GeomAPI_Shape::FACE, theNamePrefix); } }