]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Wed, 1 Dec 2010 13:27:45 +0000 (13:27 +0000)
committerageay <ageay>
Wed, 1 Dec 2010 13:27:45 +0000 (13:27 +0000)
src/MEDCoupling_Swig/libMEDCoupling_Swig.i

index 5d7dc18661e59e5ec3738588a55929124bb53fec..3d9a91e1944d88fd0cf45853d061a6aeedec3035 100644 (file)
@@ -242,7 +242,6 @@ namespace ParaMEDMEM
     virtual std::string simpleRepr() const = 0;
     virtual std::string advancedRepr() const = 0;
     // tools
-    virtual void getBoundingBox(double *bbox) const = 0;
     virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const = 0;
     virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const = 0;
     virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const char *func) const throw(INTERP_KERNEL::Exception);
@@ -315,6 +314,16 @@ namespace ParaMEDMEM
            self->scale(p,factor);
            delete [] p;
          }
+
+         PyObject *getBoundingBox() const throw(INTERP_KERNEL::Exception)
+         {
+           int spaceDim=self->getSpaceDimension();
+           double *tmp=new double[2*spaceDim];
+           self->getBoundingBox(tmp);
+           PyObject *ret=convertDblArrToPyListOfTuple(tmp,2,spaceDim);
+           delete [] tmp;
+           return ret;
+         }
        }
   };
 }
@@ -334,7 +343,6 @@ namespace ParaMEDMEM
       void setCoords(DataArrayDouble *coords);
       DataArrayDouble *getCoordinatesAndOwner() const;
       bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const;
-      void getBoundingBox(double *bbox) const;
       void zipCoords();
       double getCaracteristicDimension() const;
       void translate(const double *vector);