From: mpv Date: Thu, 1 Nov 2018 07:10:33 +0000 (+0300) Subject: Fix for stator_ermes problem of plane created on 3 points X-Git-Tag: End2018~220 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=084eb7ded785430805bdc8dd83491829c6e89aa1;p=modules%2Fshaper.git Fix for stator_ermes problem of plane created on 3 points --- 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); }