Skip to content
Snippets Groups Projects
Commit 0652a31f authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

support single-line Dimension field (used by CGAL ?)

parent 94270029
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,10 @@ int GModel::readMESH(const std::string &name)
if(buffer[0] != '#'){ // skip comments and empty lines
str[0]='\0';
sscanf(buffer, "%s", str);
if(!strcmp(str, "Dimension")){
if(!strncmp(buffer, "Dimension 3", 11)){
// alternative single-line 'Dimension' field used by CGAL
}
else if(!strcmp(str, "Dimension")){
if(!fgets(buffer, sizeof(buffer), fp)) break;
}
else if(!strcmp(str, "Vertices")){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment