From 2607cc869c42b18381e8178979bcbdc3ab3328f4 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 21 Oct 2010 15:18:52 +0000 Subject: [PATCH] Fix for the bug "IPAL21999 Pattern Mapping - New - collapse of pattern mesh" --- src/SMESH/SMESH_Pattern.cxx | 7 ++++++- src/SMESH/SMESH_Pattern.hxx | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index 43ee8669d..0857f545d 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -766,7 +766,12 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh, } paramNodeMap.insert( make_pair( u, node )); } - } + + //rnv : To fix the bug IPAL21999 Pattern Mapping - New - collapse of pattern mesh + if ( paramNodeMap.size() != eSubMesh->NbNodes() ) + return setErrorCode(ERR_UNEXPECTED); + } + // put U in [0,1] so that the first key-point has U==0 bool isSeam = helper.IsRealSeam( edge ); double du = l - f; diff --git a/src/SMESH/SMESH_Pattern.hxx b/src/SMESH/SMESH_Pattern.hxx index 4bac41585..e809ca195 100644 --- a/src/SMESH/SMESH_Pattern.hxx +++ b/src/SMESH/SMESH_Pattern.hxx @@ -191,7 +191,9 @@ class SMESH_EXPORT SMESH_Pattern { // Apply(mesh_face) ERR_APPLF_BAD_FACE_GEOM, // bad face geometry // MakeMesh - ERR_MAKEM_NOT_COMPUTED // mapping failed + ERR_MAKEM_NOT_COMPUTED, // mapping failed + //Unexpected error + ERR_UNEXPECTED // Unexpected of the pattern mapping alorithm }; ErrorCode GetErrorCode() const { return myErrorCode; } -- 2.39.2