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

polish
parent 6ec04bdb
No related branches found
No related tags found
No related merge requests found
// $Id: GModelIO_Geo.cpp,v 1.9 2007-03-11 20:18:58 geuzaine Exp $ // $Id: GModelIO_Geo.cpp,v 1.10 2007-03-13 09:25:50 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -279,8 +279,7 @@ class writeGFaceGEO { ...@@ -279,8 +279,7 @@ class writeGFaceGEO {
num.push_back((*it)->tag()); num.push_back((*it)->tag());
for(std::list<int>::iterator it = orientations.begin(); it != orientations.end(); it++) for(std::list<int>::iterator it = orientations.begin(); it != orientations.end(); it++)
ori.push_back((*it) > 0 ? 1 : -1); ori.push_back((*it) > 0 ? 1 : -1);
int NUMLOOP = gf->tag() + 1000000; fprintf(geo, "Line Loop (%d) = ", gf->tag());
fprintf(geo, "Line Loop (%d) = ", NUMLOOP);
for(unsigned int i = 0; i < num.size(); i++){ for(unsigned int i = 0; i < num.size(); i++){
if(i) if(i)
fprintf(geo, ", %d", num[i] * ori[i]); fprintf(geo, ", %d", num[i] * ori[i]);
...@@ -289,10 +288,10 @@ class writeGFaceGEO { ...@@ -289,10 +288,10 @@ class writeGFaceGEO {
} }
fprintf(geo, "};\n"); fprintf(geo, "};\n");
if(gf->geomType() == GEntity::Plane){ if(gf->geomType() == GEntity::Plane){
fprintf(geo, "Plane Surface (%d) = {%d};\n", gf->tag(), NUMLOOP); fprintf(geo, "Plane Surface (%d) = {%d};\n", gf->tag(), gf->tag());
} }
else if(edges.size() == 3 || edges.size() == 4){ else if(edges.size() == 3 || edges.size() == 4){
fprintf(geo, "Ruled Surface (%d) = {%d};\n", gf->tag(), NUMLOOP); fprintf(geo, "Ruled Surface (%d) = {%d};\n", gf->tag(), gf->tag());
} }
else{ else{
Msg(GERROR, "Skipping surface %d in export", gf->tag()); Msg(GERROR, "Skipping surface %d in export", gf->tag());
...@@ -312,8 +311,7 @@ class writeGRegionGEO { ...@@ -312,8 +311,7 @@ class writeGRegionGEO {
std::list<GFace*> faces = gr->faces(); std::list<GFace*> faces = gr->faces();
if(faces.size()){ if(faces.size()){
int NUMLOOP = gr->tag() + 1000000; fprintf(geo, "Surface Loop (%d) = ", gr->tag());
fprintf(geo, "Surface Loop (%d) = ", NUMLOOP);
for(std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++) { for(std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++) {
if(it != faces.begin()) if(it != faces.begin())
fprintf(geo, ", %d", (*it)->tag()); fprintf(geo, ", %d", (*it)->tag());
...@@ -321,7 +319,7 @@ class writeGRegionGEO { ...@@ -321,7 +319,7 @@ class writeGRegionGEO {
fprintf(geo, "{%d", (*it)->tag()); fprintf(geo, "{%d", (*it)->tag());
} }
fprintf(geo, "};\n"); fprintf(geo, "};\n");
fprintf(geo, "Volume (%d) = {%d};\n", gr->tag(), NUMLOOP); fprintf(geo, "Volume (%d) = {%d};\n", gr->tag(), gr->tag());
} }
} }
}; };
......
// $Id: GModelIO_Mesh.cpp,v 1.10 2007-03-11 20:18:58 geuzaine Exp $ // $Id: GModelIO_Mesh.cpp,v 1.11 2007-03-13 09:25:50 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -1959,7 +1959,7 @@ int GModel::readP3D(const std::string &name) ...@@ -1959,7 +1959,7 @@ int GModel::readP3D(const std::string &name)
for(int j = 0; j < Nj[n]; j++){ for(int j = 0; j < Nj[n]; j++){
for(int k = 0; k < Nk[n]; k++){ for(int k = 0; k < Nk[n]; k++){
double d; double d;
if(fscanf(fp, "%lf", &d) != 1){printf("aaa\n"); return 0;} if(fscanf(fp, "%lf", &d) != 1) return 0;
if(coord == 0){ if(coord == 0){
MVertex *v = new MVertex(d, 0., 0., gr); MVertex *v = new MVertex(d, 0., 0., gr);
gr->transfinite_vertices[i][j][k] = v; gr->transfinite_vertices[i][j][k] = v;
......
$Id: TODO,v 1.53 2007-03-11 20:19:06 geuzaine Exp $ $Id: TODO,v 1.54 2007-03-13 09:25:50 geuzaine Exp $
******************************************************************** ********************************************************************
...@@ -11,6 +11,10 @@ interface duplicate entity removal from opencascade ...@@ -11,6 +11,10 @@ interface duplicate entity removal from opencascade
******************************************************************** ********************************************************************
add support for Patran mesh files
********************************************************************
reinterface Triangle for plane surfaces reinterface Triangle for plane surfaces
******************************************************************** ********************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment