From: ageay Date: Wed, 21 Jul 2010 08:34:04 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V5_1_main_FINAL~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=93b159ab93590ce1ae22b9a4f0daa5d63177246c;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i index 4b8e950b2..becacdfe9 100644 --- a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i @@ -115,6 +115,7 @@ static double *convertPyToNewDblArr2(PyObject *pyLi) else { PyErr_SetString(PyExc_TypeError,"list must contain floats only"); + PyErr_Print(); return NULL; } } @@ -123,6 +124,7 @@ static double *convertPyToNewDblArr2(PyObject *pyLi) else { PyErr_SetString(PyExc_TypeError,"convertPyToNewIntArr : not a list"); + PyErr_Print(); return 0; } } diff --git a/src/MEDCoupling_Swig/libMEDCoupling_Swig.i b/src/MEDCoupling_Swig/libMEDCoupling_Swig.i index 93d4cc45c..876dff59a 100644 --- a/src/MEDCoupling_Swig/libMEDCoupling_Swig.i +++ b/src/MEDCoupling_Swig/libMEDCoupling_Swig.i @@ -24,6 +24,7 @@ %{ #include "MEDCouplingMemArray.hxx" #include "MEDCouplingUMesh.hxx" +#include "MEDCouplingExtrudedMesh.hxx" #include "MEDCouplingField.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingTypemaps.i" @@ -55,9 +56,12 @@ using namespace INTERP_KERNEL; %newobject ParaMEDMEM::MEDCouplingUMesh::buildPartOfMySelf; %newobject ParaMEDMEM::MEDCouplingPointSet::zipCoordsTraducer; %newobject ParaMEDMEM::MEDCouplingUMesh::getMeasureField; +%newobject ParaMEDMEM::MEDCouplingUMesh::buildExtrudedMeshFromThis; %newobject ParaMEDMEM::MEDCouplingUMesh::mergeUMeshes; +%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::New; %feature("unref") DataArrayDouble "$this->decrRef();" %feature("unref") MEDCouplingUMesh "$this->decrRef();" +%feature("unref") MEDCouplingExtrudedMesh "$this->decrRef();" %feature("unref") DataArrayInt "$this->decrRef();" %feature("unref") MEDCouplingFieldDouble "$this->decrRef();" @@ -78,6 +82,23 @@ using namespace INTERP_KERNEL; namespace ParaMEDMEM { + + %extend MEDCouplingPointSet + { + void rotate(PyObject *center, PyObject *vector, double alpha) + { + double *c=convertPyToNewDblArr2(center); + if(!c) + return ; + double *v=convertPyToNewDblArr2(vector); + if(!v) + { delete [] c; return ; } + self->rotate(c,v,alpha); + delete [] c; + delete [] v; + } + } + class MEDCouplingUMesh : public ParaMEDMEM::MEDCouplingPointSet { public: @@ -134,8 +155,15 @@ namespace ParaMEDMEM } } MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; + MEDCouplingUMesh *buildExtrudedMeshFromThis(const MEDCouplingUMesh *mesh1D, int policy); static MEDCouplingUMesh *mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2); }; + + class MEDCouplingExtrudedMesh : public ParaMEDMEM::MEDCouplingMesh + { + public: + static MEDCouplingExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception); + }; } %extend ParaMEDMEM::DataArrayDouble