From d42fc6b29e7c9dd4f46b94b62f02fbcded7cc486 Mon Sep 17 00:00:00 2001 From: Bastien Gorissen <bastien.gorissen@cenaero.be> Date: Thu, 18 Nov 2010 13:43:40 +0000 Subject: [PATCH] Implemented the switch_tags option for IDEAS meshes. --- Geo/GModelIO_Mesh.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index 65ebd9d8e9..719319e92b 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -1659,8 +1659,13 @@ int GModel::readUNV(const std::string &name) if(strlen(buffer) < 3) continue; // possible line ending after last fscanf if(!strncmp(buffer, " -1", 6)) break; int num, type, elementary, physical, color, numNodes; - if(sscanf(buffer, "%d %d %d %d %d %d", &num, &type, &elementary, &physical, - &color, &numNodes) != 6) break; + if(!CTX::instance()->mesh.switchElementTags) { + if(sscanf(buffer, "%d %d %d %d %d %d", &num, &type, &elementary, &physical, + &color, &numNodes) != 6) break; + } else { + if(sscanf(buffer, "%d %d %d %d %d %d", &num, &type, &physical, &elementary, + &color, &numNodes) != 6) break; + } if(elementary < 0) elementary = getMaxElementaryNumber(-1) + 1; if(physical < 0) physical = 0; switch(type){ -- GitLab