From ecc6bc7d7e6024e72614c5ff855f3c1982240ec3 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 11 Sep 2006 23:11:08 +0000 Subject: [PATCH] - added CROD in BDF - also accept small "e" and "d" in BDF floating point numbers --- Geo/GModelIO.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Geo/GModelIO.cpp b/Geo/GModelIO.cpp index 217f96934e..05a287f202 100644 --- a/Geo/GModelIO.cpp +++ b/Geo/GModelIO.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO.cpp,v 1.52 2006-09-11 20:18:23 remacle Exp $ +// $Id: GModelIO.cpp,v 1.53 2006-09-11 23:11:08 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -1448,10 +1448,10 @@ static double atofBDF(char *str) int len = strlen(str); // classic numbers with E or D exponent notation for(int i = 0; i < len; i++){ - if(str[i] == 'E') { + if(str[i] == 'E' || str[i] == 'e') { return atof(str); } - else if(str[i] == 'D'){ + else if(str[i] == 'D' || str[i] == 'd'){ str[i] = 'E'; return atof(str); } @@ -1622,6 +1622,10 @@ int GModel::readBDF(const std::string &name) if(readElementBDF(fp, buffer, 4, 2, num, region, vertices, vertexMap)) elements[0][region].push_back(new MLine(vertices, num)); } + else if(!strncmp(buffer, "CROD", 4)){ + if(readElementBDF(fp, buffer, 4, 2, num, region, vertices, vertexMap)) + elements[0][region].push_back(new MLine(vertices, num)); + } else if(!strncmp(buffer, "CBEAM", 5)){ if(readElementBDF(fp, buffer, 5, 2, num, region, vertices, vertexMap)) elements[0][region].push_back(new MLine(vertices, num)); -- GitLab