]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for other than bodies results renaming and issue #908
authormpv <mpv@opencascade.com>
Fri, 4 Sep 2015 05:29:26 +0000 (08:29 +0300)
committermpv <mpv@opencascade.com>
Fri, 4 Sep 2015 05:29:26 +0000 (08:29 +0300)
src/FeaturesPlugin/Test/TestExtrusion.py
src/Model/Model_Objects.cpp

index cd204d7ed396c2a53f3f8a623778effa126176da..b6122f30a498db5b9f2022b2126d54e838c5081a 100644 (file)
@@ -228,9 +228,9 @@ anExtrusionFt.selectionList("base").append(
 anExtrusionFt.string("CreationMethod").setValue("ByPlanesAndOffsets")
 anExtrusionFt.real("to_size").setValue(0) #TODO: remove
 anExtrusionFt.real("from_size").setValue(0) #TODO: remove
-anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3/LateralFace_2")
+anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/LateralFace_2")
 anExtrusionFt.real("to_offset").setValue(0)
-anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3/LateralFace_1")
+anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/LateralFace_1")
 anExtrusionFt.real("from_offset").setValue(0)
 anExtrusionFt.execute()
 aSession.finishOperation()
index 489ed63d19ec2d7264c5caa0572f5597856f4145..adb4363a858bba21064f3b26ca77af6a537fbe51 100644 (file)
@@ -779,7 +779,7 @@ void Model_Objects::storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
     std::stringstream aNewName;
     aNewName<<theFeatureData->name();
     // if there are several results (issue #899: any number of result), add unique prefix starting from second
-    if (theResultIndex >= 0)
+    if (theResultIndex > 0 || theResult->groupName() == ModelAPI_ResultBody::group())
       aNewName<<"_"<<theResultIndex + 1;
     theResult->data()->setName(aNewName.str());
   }