From 084eb7ded785430805bdc8dd83491829c6e89aa1 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 1 Nov 2018 10:10:33 +0300 Subject: [PATCH] Fix for stator_ermes problem of plane created on 3 points --- src/Model/Model_ResultConstruction.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 2.39.2