X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultConstruction.cpp;h=8de3c4165aff45c0b604ab2a3db9d8e0346ae996;hb=084eb7ded785430805bdc8dd83491829c6e89aa1;hp=8fc24dd9592e97cf3d5b7b4419ba891cd71c04f1;hpb=8588356f81c947d341405d47403f232f0b98a46f;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultConstruction.cpp b/src/Model/Model_ResultConstruction.cpp index 8fc24dd95..8de3c4165 100644 --- a/src/Model/Model_ResultConstruction.cpp +++ b/src/Model/Model_ResultConstruction.cpp @@ -254,6 +254,15 @@ void Model_ResultConstruction::storeShape(std::shared_ptr theShap TNaming_Builder aBuilder(aSubLab); aBuilder.Generated(anExp.Current()); std::string aVertexName = aMyName + "_" + (anIndex == 1 ? "StartVertex" : "EndVertex"); + // check this name is already used + ResultPtr aThisRes; + do { + static std::string anEmpty; + static bool aUnique; + aThisRes = aMyDoc->findByName(aVertexName, anEmpty, aUnique); + if (aThisRes.get() && aThisRes.get() != this) + aVertexName += "x"; + } while(aThisRes.get() && aThisRes.get() != this); TDataStd_Name::Set(aSubLab, aVertexName.c_str()); aMyDoc->addNamingName(aSubLab, aVertexName); }