X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FMEDCouplingCommon.i;h=cb4b2205c4a36d843e63c2cb6bf7c8b6a4a6b675;hb=a019ec6e72f540d3378f3e869c2b19bf4886459c;hp=bdfc4121e22bd54f8a0c1016bbf895089065fbe4;hpb=0938088b3bbe54f4e420a5e1ea4b1c0344c8a9a5;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index bdfc4121e..cb4b2205c 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2017 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -18,8 +18,6 @@ // // Author : Anthony Geay (EDF R&D) -%module MEDCoupling - #ifdef WITH_DOCSTRINGS %include MEDCoupling_doc.i #endif @@ -966,12 +964,12 @@ namespace MEDCoupling return self->checkTypeConsistencyAndContig(code,idsPerType); } - PyObject *splitProfilePerType(const DataArrayInt *profile) const throw(INTERP_KERNEL::Exception) + PyObject *splitProfilePerType(const DataArrayInt *profile, bool smartPflKiller=true) const throw(INTERP_KERNEL::Exception) { std::vector code; std::vector idsInPflPerType; std::vector idsPerType; - self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType); + self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType,smartPflKiller); PyObject *ret=PyTuple_New(3); // if(code.size()%3!=0) @@ -1514,8 +1512,8 @@ namespace MEDCoupling DataArrayDoubleTuple *aa,*aa2; std::vector bb,bb2; int sw; - const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st paramater for point."; - const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st parameter for point."; + const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd parameter for vector."; const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true); const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true); std::vector nodes; @@ -1533,8 +1531,8 @@ namespace MEDCoupling DataArrayDoubleTuple *aa,*aa2; std::vector bb,bb2; int sw; - const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st paramater for point."; - const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st parameter for point."; + const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd parameter for vector."; const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true); const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true); std::vector nodes; @@ -2391,6 +2389,14 @@ namespace MEDCoupling } } + void attractSeg3MidPtsAroundNodes(double ratio, PyObject *nodeIds) throw(INTERP_KERNEL::Exception) + { + int szArr,sw,iTypppArr; + std::vector stdvecTyyppArr; + const int *nodeIdsPtr(convertIntStarLikePyObjToCppIntStar(nodeIds,sw,szArr,iTypppArr,stdvecTyyppArr)); + self->attractSeg3MidPtsAroundNodes(ratio,nodeIdsPtr,nodeIdsPtr+szArr); + } + PyObject *getLevArrPerCellTypes(PyObject *li) const throw(INTERP_KERNEL::Exception) { int sz; @@ -2935,8 +2941,8 @@ namespace MEDCoupling DataArrayDoubleTuple *aa,*aa2; std::vector bb,bb2; int sw; - const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st paramater for origin."; - const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st parameter for origin."; + const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd parameter for vector."; const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true); const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true); // @@ -2958,8 +2964,8 @@ namespace MEDCoupling DataArrayDoubleTuple *aa,*aa2; std::vector bb,bb2; int sw; - const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st paramater for origin."; - const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st parameter for origin."; + const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd parameter for vector."; const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true); const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true); // @@ -2978,8 +2984,8 @@ namespace MEDCoupling DataArrayDoubleTuple *aa,*aa2; std::vector bb,bb2; int sw; - const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st paramater for origin."; - const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st parameter for origin."; + const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd parameter for vector."; const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,3,true); const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,3,true); MCAuto ret(self->clipSingle3DCellByPlane(orig,vect,eps)); @@ -2996,8 +3002,8 @@ namespace MEDCoupling DataArrayDoubleTuple *aa,*aa2; std::vector bb,bb2; int sw; - const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st paramater for origin."; - const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st parameter for origin."; + const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd parameter for vector."; const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true); const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true); return self->getCellIdsCrossingPlane(orig,vect,eps); @@ -3999,7 +4005,7 @@ namespace MEDCoupling ~MEDCouplingFieldT(); }; - %template(DTC3) MEDCoupling::MEDCouplingFieldT; + %template(MEDCouplingFieldTdouble) MEDCoupling::MEDCouplingFieldT; %template(MEDCouplingFieldTfloat) MEDCoupling::MEDCouplingFieldT; %template(MEDCouplingFieldTint) MEDCoupling::MEDCouplingFieldT; @@ -4437,8 +4443,8 @@ namespace MEDCoupling std::vector bb,bb2; int sw; int spaceDim=3; - const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st paramater for origin."; - const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd paramater for vector."; + const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st parameter for origin."; + const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd parameter for vector."; const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true); const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true); //