From 1a735aea2c20add9d3b3d7feb14fcb1c729a0c60 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 23 Sep 2010 15:19:44 +0000
Subject: [PATCH] change p3d prec for Marie-Claire.Le_Pape@onera.fr

---
 Geo/GModelIO_Mesh.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp
index ec8584a60f..77b6043e99 100644
--- a/Geo/GModelIO_Mesh.cpp
+++ b/Geo/GModelIO_Mesh.cpp
@@ -2446,7 +2446,7 @@ int GModel::writeP3D(const std::string &name, bool saveAll, double scalingFactor
         for(unsigned int k = 0; k < gf->transfinite_vertices[j].size(); k++){
           MVertex *v = gf->transfinite_vertices[j][k];
           double d = (coord == 0) ? v->x() : (coord == 1) ? v->y() : v->z();
-          fprintf(fp, "%g ", d * scalingFactor);
+          fprintf(fp, "%.16g ", d * scalingFactor);
         }
         fprintf(fp, "\n");
       }
@@ -2461,7 +2461,7 @@ int GModel::writeP3D(const std::string &name, bool saveAll, double scalingFactor
           for(unsigned int l = 0; l < gr->transfinite_vertices[j][k].size(); l++){
             MVertex *v = gr->transfinite_vertices[j][k][l];
             double d = (coord == 0) ? v->x() : (coord == 1) ? v->y() : v->z();
-            fprintf(fp, "%g ", d * scalingFactor);
+            fprintf(fp, "%.16g ", d * scalingFactor);
           }
           fprintf(fp, "\n");
         }
@@ -3222,7 +3222,7 @@ int GModel::writeINP(const std::string &name, bool saveAll,
       for(unsigned int j = 0; j < entities[i]->getNumMeshVertices(); j++){
         MVertex *v = entities[i]->getMeshVertex(j);
         if(v->getIndex() >= 0)
-          fprintf(fp, "%d, %g, %g, %g\n", v->getIndex(), v->x() * scalingFactor,
+          fprintf(fp, "%d, %.16g, %.16g, %.16g\n", v->getIndex(), v->x() * scalingFactor,
                   v->y() * scalingFactor, v->z() * scalingFactor);
       }
   
-- 
GitLab