virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const = 0;
virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const char *func) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingFieldDouble *buildOrthogonalField() const = 0;
- virtual void rotate(const double *center, const double *vector, double angle) = 0;
virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception) = 0;
virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
static MEDCouplingMesh *mergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
self->translate(v);
delete [] v;
}
+
+ void rotate(PyObject *center, PyObject *vector, double alpha)
+ {
+ int sz;
+ double *c=convertPyToNewDblArr2(center,&sz);
+ if(!c)
+ return ;
+ double *v=convertPyToNewDblArr2(vector,&sz);
+ if(!v)
+ { delete [] c; return ; }
+ self->rotate(c,v,alpha);
+ delete [] c;
+ delete [] v;
+ }
}
};
}
static DataArrayDouble *mergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2);
static MEDCouplingPointSet *buildInstanceFromMeshType(MEDCouplingMeshType type);
virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const = 0;
- virtual void renumberNodes(const int *newNodeNumbers, int newNbOfNodes);
virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const = 0;
//! size of returned tinyInfo must be always the same.
void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
void unserialization(const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
- virtual void giveElemsInBoundingBox(const double *bbox, double eps, std::vector<int>& elems) = 0;
virtual void giveElemsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps, std::vector<int>& elems) = 0;
virtual DataArrayInt *zipCoordsTraducer() = 0;
%extend
self->findBoundaryNodes(nodes);
return convertIntArrToPyList2(nodes);
}
- void rotate(PyObject *center, PyObject *vector, double alpha)
- {
- int sz;
- double *c=convertPyToNewDblArr2(center,&sz);
- if(!c)
- return ;
- double *v=convertPyToNewDblArr2(vector,&sz);
- if(!v)
- { delete [] c; return ; }
- self->rotate(c,v,alpha);
- delete [] c;
- delete [] v;
- }
void renumberNodes(PyObject *li, int newNbOfNodes)
{
int size;
return ret;
}
+ PyObject *giveElemsInBoundingBox(PyObject *bbox, double eps)
+ {
+ std::vector<int> elems;
+ int size;
+ double *tmp=convertPyToNewDblArr2(bbox,&size);
+ self->giveElemsInBoundingBox(tmp,eps,elems);
+ delete [] tmp;
+ return convertIntArrToPyList2(elems);
+ }
+
static void rotate2DAlg(PyObject *center, double angle, int nbNodes, PyObject *coords)
{
int sz;