From 0aba66165991858df07d622de729092cc858d188 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 8 Oct 2010 14:00:22 +0000 Subject: [PATCH] *** empty log message *** --- src/MEDCoupling_Swig/MEDCouplingTypemaps.i | 9 +++++++++ src/MEDCoupling_Swig/libMEDCoupling_Swig.i | 15 +++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) 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); + } } }; } -- 2.39.2