From: ageay Date: Fri, 8 Oct 2010 14:00:22 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V5_1_5~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0aba66165991858df07d622de729092cc858d188;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i index e27bc7dd7..9063c82bc 100644 --- a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i @@ -164,6 +164,15 @@ static PyObject *convertDblArrToPyList(const double *ptr, int size) return ret; } +static PyObject *convertDblArrToPyList2(const std::vector& v) +{ + int size=v.size(); + PyObject *ret=PyList_New(size); + for(int i=0;i& conn) const = 0; - virtual void getCoordinatesOfNode(int nodeId, std::vector& coo) const = 0; // tools virtual void getBoundingBox(double *bbox) const = 0; virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const = 0; @@ -259,6 +257,19 @@ namespace ParaMEDMEM delete [] tmp; return ret; } + PyObject *getNodeIdsOfCell(int cellId) const + { + std::vector conn; + self->getNodeIdsOfCell(cellId,conn); + return convertIntArrToPyList2(conn); + } + + PyObject *getCoordinatesOfNode(int nodeId) const + { + std::vector coo; + self->getCoordinatesOfNode(nodeId,coo); + return convertDblArrToPyList2(coo); + } } }; }