From 9103d97b5b5194c429649a49b0f1a6066e6d87e2 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 26 Aug 2009 13:24:21 +0000
Subject: [PATCH] no need for getCoordinates: just getVertex is OK :-)

---
 Geo/MElement.h      | 4 ----
 Geo/MElementCut.cpp | 6 ++++--
 Geo/MLine.h         | 5 -----
 Geo/MTriangle.h     | 5 -----
 Geo/OCCFace.cpp     | 2 +-
 5 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/Geo/MElement.h b/Geo/MElement.h
index 2c70f4cb53..4f90fc0f76 100644
--- a/Geo/MElement.h
+++ b/Geo/MElement.h
@@ -82,10 +82,6 @@ class MElement
   // get the vertices
   virtual int getNumVertices() const = 0;
   virtual MVertex *getVertex(int num) = 0;
-  virtual void getCoordinates(int num, double c[3]) const
-  {
-    c[0] = 0.; c[1] = 0.; c[2] = 0.;
-  }
 
   // get the vertex using the I-deas UNV ordering
   virtual MVertex *getVertexUNV(int num){ return getVertex(num); }
diff --git a/Geo/MElementCut.cpp b/Geo/MElementCut.cpp
index 38cda7e2b0..8c8aa31223 100644
--- a/Geo/MElementCut.cpp
+++ b/Geo/MElementCut.cpp
@@ -357,7 +357,8 @@ void MTriangleBorder::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) c
 {
   double uvw[3][3];
   for(int j = 0; j < 3; j++) {
-    double xyz[3]; getCoordinates(j, xyz);
+    MVertex *v = getVertex(j);
+    double xyz[3] = {v->x(), v->y(), v->z()};
     getParent()->xyz2uvw(xyz, uvw[j]);
   }
   MVertex v0(uvw[0][0], uvw[0][1], uvw[0][2]);
@@ -386,7 +387,8 @@ void MLineBorder::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
 {
   double uvw[2][3];
   for(int j = 0; j < 2; j++) {
-    double xyz[3]; getCoordinates(j, xyz);
+    MVertex *v = getVertex(j);
+    double xyz[3] = {v->x(), v->y(), v->z()};
     getParent()->xyz2uvw(xyz, uvw[j]);
   }
   MVertex v0(uvw[0][0], uvw[0][1], uvw[0][2]);
diff --git a/Geo/MLine.h b/Geo/MLine.h
index 9b7c4b0dc5..8f4689f561 100644
--- a/Geo/MLine.h
+++ b/Geo/MLine.h
@@ -37,11 +37,6 @@ class MLine : public MElement {
   virtual int getDim(){ return 1; }
   virtual int getNumVertices() const { return 2; }
   virtual MVertex *getVertex(int num){ return _v[num]; }
-  virtual void getCoordinates (int num, double c[3]) const {
-    c[0] = _v[num]->x();
-    c[1] = _v[num]->y();
-    c[2] = _v[num]->z();
-  }
   virtual int getNumEdges(){ return 1; }
   virtual MEdge getEdge(int num){ return MEdge(_v[0], _v[1]); }
   virtual int getNumEdgesRep(){ return 1; }
diff --git a/Geo/MTriangle.h b/Geo/MTriangle.h
index d5fbe71c55..13516f421c 100644
--- a/Geo/MTriangle.h
+++ b/Geo/MTriangle.h
@@ -54,11 +54,6 @@ class MTriangle : public MElement {
   virtual double distoShapeMeasure();
   virtual int getNumVertices() const { return 3; }
   virtual MVertex *getVertex(int num){ return _v[num]; }
-  virtual void getCoordinates (int num, double c[3]) const {
-    c[0] = _v[num]->x();
-    c[1] = _v[num]->y();
-    c[2] = _v[num]->z();
-  }
   virtual MVertex *getVertexMED(int num)
   {
     static const int map[3] = {0, 2, 1};
diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp
index 6beecdeb3e..1e697f5160 100644
--- a/Geo/OCCFace.cpp
+++ b/Geo/OCCFace.cpp
@@ -50,7 +50,7 @@ OCCFace::OCCFace(GModel *m, TopoDS_Face _s, int num, TopTools_IndexedMapOfShape
           occe->setTrimmed(this);
         }
       }
-    }      
+    }
     
     GEdgeLoop el(l_wire);
     for(GEdgeLoop::citer it = el.begin(); it != el.end(); ++it){
-- 
GitLab