// python wrapper for vtkCell3D // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkCell3D.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkCell3D(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkCell3D_ClassNew(); } #ifndef DECLARED_PyvtkCell_ClassNew extern "C" { PyObject *PyvtkCell_ClassNew(); } #define DECLARED_PyvtkCell_ClassNew #endif static const char *PyvtkCell3D_Doc = "vtkCell3D - abstract class to specify 3D cell interface\n\n" "Superclass: vtkCell\n\n" "vtkCell3D is an abstract class that extends the interfaces for 3D\n" "data cells, and implements methods needed to satisfy the vtkCell API.\n" "The 3D cells include hexehedra, tetrahedra, wedge, pyramid, and\n" "voxel.\n\n" "@sa\n" "vtkTetra vtkHexahedron vtkVoxel vtkWedge vtkPyramid\n\n"; static PyObject * PyvtkCell3D_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkCell3D::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell3D_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkCell3D::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell3D_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkCell3D *tempr = vtkCell3D::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCell3D_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkCell3D *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkCell3D::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkCell3D_GetEdgePoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetEdgePoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); int temp0; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); int *temp1 = store1.Data(); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetArray(temp1, size1)) { op->GetEdgePoints(temp0, temp1); if (!ap.ErrorOccurred()) { ap.SetArgValue(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell3D_GetFacePoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetFacePoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); int temp0; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); int *temp1 = store1.Data(); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetArray(temp1, size1)) { op->GetFacePoints(temp0, temp1); if (!ap.ErrorOccurred()) { ap.SetArgValue(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell3D_Contour(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Contour"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); double temp0; vtkDataArray *temp1 = nullptr; vtkIncrementalPointLocator *temp2 = nullptr; vtkCellArray *temp3 = nullptr; vtkCellArray *temp4 = nullptr; vtkCellArray *temp5 = nullptr; vtkPointData *temp6 = nullptr; vtkPointData *temp7 = nullptr; vtkCellData *temp8 = nullptr; vtkIdType temp9; vtkCellData *temp10 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(11) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkDataArray") && ap.GetVTKObject(temp2, "vtkIncrementalPointLocator") && ap.GetVTKObject(temp3, "vtkCellArray") && ap.GetVTKObject(temp4, "vtkCellArray") && ap.GetVTKObject(temp5, "vtkCellArray") && ap.GetVTKObject(temp6, "vtkPointData") && ap.GetVTKObject(temp7, "vtkPointData") && ap.GetVTKObject(temp8, "vtkCellData") && ap.GetValue(temp9) && ap.GetVTKObject(temp10, "vtkCellData")) { if (ap.IsBound()) { op->Contour(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10); } else { op->vtkCell3D::Contour(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell3D_Clip(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Clip"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); double temp0; vtkDataArray *temp1 = nullptr; vtkIncrementalPointLocator *temp2 = nullptr; vtkCellArray *temp3 = nullptr; vtkPointData *temp4 = nullptr; vtkPointData *temp5 = nullptr; vtkCellData *temp6 = nullptr; vtkIdType temp7; vtkCellData *temp8 = nullptr; int temp9; PyObject *result = nullptr; if (op && ap.CheckArgCount(10) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkDataArray") && ap.GetVTKObject(temp2, "vtkIncrementalPointLocator") && ap.GetVTKObject(temp3, "vtkCellArray") && ap.GetVTKObject(temp4, "vtkPointData") && ap.GetVTKObject(temp5, "vtkPointData") && ap.GetVTKObject(temp6, "vtkCellData") && ap.GetValue(temp7) && ap.GetVTKObject(temp8, "vtkCellData") && ap.GetValue(temp9)) { if (ap.IsBound()) { op->Clip(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9); } else { op->vtkCell3D::Clip(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell3D_GetCellDimension(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellDimension"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetCellDimension() : op->vtkCell3D::GetCellDimension()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell3D_SetMergeTolerance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetMergeTolerance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetMergeTolerance(temp0); } else { op->vtkCell3D::SetMergeTolerance(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell3D_GetMergeToleranceMinValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMergeToleranceMinValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetMergeToleranceMinValue() : op->vtkCell3D::GetMergeToleranceMinValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell3D_GetMergeToleranceMaxValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMergeToleranceMaxValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetMergeToleranceMaxValue() : op->vtkCell3D::GetMergeToleranceMaxValue()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell3D_GetMergeTolerance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetMergeTolerance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell3D *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetMergeTolerance() : op->vtkCell3D::GetMergeTolerance()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyMethodDef PyvtkCell3D_Methods[] = { {"IsTypeOf", PyvtkCell3D_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkCell3D_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkCell3D_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkCell3D\nC++: static vtkCell3D *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkCell3D_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkCell3D\nC++: vtkCell3D *NewInstance()\n\n"}, {"GetEdgePoints", PyvtkCell3D_GetEdgePoints, METH_VARARGS, "V.GetEdgePoints(int, [int, ...])\nC++: virtual void GetEdgePoints(int edgeId, int *&pts)\n\nGet the pair of vertices that define an edge. The method returns\nthe number of vertices, along with an array of vertices. Note\nthat the vertices are 0-offset; that is, they refer to the ids of\nthe cell, not the point ids of the mesh that the cell belongs to.\nThe edgeId must range between 0<=edgeIdGetNumberOfEdges().\n"}, {"GetFacePoints", PyvtkCell3D_GetFacePoints, METH_VARARGS, "V.GetFacePoints(int, [int, ...])\nC++: virtual void GetFacePoints(int faceId, int *&pts)\n\nGet the list of vertices that define a face. The list is\nterminated with a negative number. Note that the vertices are\n0-offset; that is, they refer to the ids of the cell, not the\npoint ids of the mesh that the cell belongs to. The faceId must\nrange between 0<=faceIdGetNumberOfFaces().\n"}, {"Contour", PyvtkCell3D_Contour, METH_VARARGS, "V.Contour(float, vtkDataArray, vtkIncrementalPointLocator,\n vtkCellArray, vtkCellArray, vtkCellArray, vtkPointData,\n vtkPointData, vtkCellData, int, vtkCellData)\nC++: void Contour(double value, vtkDataArray *cellScalars,\n vtkIncrementalPointLocator *locator, vtkCellArray *verts,\n vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd,\n vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId,\n vtkCellData *outCd) override;\n\nGenerate contouring primitives. The scalar list cellScalars are\nscalar values at each cell point. The point locator is\nessentially a points list that merges points as they are inserted\n(i.e., prevents duplicates). Contouring primitives can be\nvertices, lines, or polygons. It is possible to interpolate point\ndata along the edge by providing input and output point data - if\noutPd is nullptr, then no interpolation is performed. Also, if\nthe output cell data is non-nullptr, the cell data from the\ncontoured cell is passed to the generated contouring primitives.\n(Note: the CopyAllocate() method must be invoked on both the\noutput cell and point data. The cellId refers to the cell from\nwhich the cell data is copied.)\n"}, {"Clip", PyvtkCell3D_Clip, METH_VARARGS, "V.Clip(float, vtkDataArray, vtkIncrementalPointLocator,\n vtkCellArray, vtkPointData, vtkPointData, vtkCellData, int,\n vtkCellData, int)\nC++: void Clip(double value, vtkDataArray *cellScalars,\n vtkIncrementalPointLocator *locator,\n vtkCellArray *connectivity, vtkPointData *inPd,\n vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId,\n vtkCellData *outCd, int insideOut) override;\n\nCut (or clip) the cell based on the input cellScalars and the\nspecified value. The output of the clip operation will be one or\nmore cells of the same topological dimension as the original\ncell. The flag insideOut controls what part of the cell is\nconsidered inside - normally cell points whose scalar value is\ngreater than \"value\" are considered inside. If insideOut is on,\nthis is reversed. Also, if the output cell data is non-nullptr,\nthe cell data from the clipped cell is passed to the generated\ncontouring primitives. (Note: the CopyAllocate() method must be\ninvoked on both the output cell and point data. The cellId refers\nto the cell from which the cell data is copied.) (Satisfies\nvtkCell API.)\n"}, {"GetCellDimension", PyvtkCell3D_GetCellDimension, METH_VARARGS, "V.GetCellDimension() -> int\nC++: int GetCellDimension() override;\n\nThe topological dimension of the cell. (Satisfies vtkCell API.)\n"}, {"SetMergeTolerance", PyvtkCell3D_SetMergeTolerance, METH_VARARGS, "V.SetMergeTolerance(float)\nC++: virtual void SetMergeTolerance(double _arg)\n\nSet the tolerance for merging clip intersection points that are\nnear the vertices of cells. This tolerance is used to prevent the\ngeneration of degenerate tetrahedra during clipping.\n"}, {"GetMergeToleranceMinValue", PyvtkCell3D_GetMergeToleranceMinValue, METH_VARARGS, "V.GetMergeToleranceMinValue() -> float\nC++: virtual double GetMergeToleranceMinValue()\n\nSet the tolerance for merging clip intersection points that are\nnear the vertices of cells. This tolerance is used to prevent the\ngeneration of degenerate tetrahedra during clipping.\n"}, {"GetMergeToleranceMaxValue", PyvtkCell3D_GetMergeToleranceMaxValue, METH_VARARGS, "V.GetMergeToleranceMaxValue() -> float\nC++: virtual double GetMergeToleranceMaxValue()\n\nSet the tolerance for merging clip intersection points that are\nnear the vertices of cells. This tolerance is used to prevent the\ngeneration of degenerate tetrahedra during clipping.\n"}, {"GetMergeTolerance", PyvtkCell3D_GetMergeTolerance, METH_VARARGS, "V.GetMergeTolerance() -> float\nC++: virtual double GetMergeTolerance()\n\nSet the tolerance for merging clip intersection points that are\nnear the vertices of cells. This tolerance is used to prevent the\ngeneration of degenerate tetrahedra during clipping.\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkCell3D_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkCommonDataModelPython.vtkCell3D", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkCell3D_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; PyObject *PyvtkCell3D_ClassNew() { PyVTKClass_Add( &PyvtkCell3D_Type, PyvtkCell3D_Methods, "vtkCell3D", nullptr); PyTypeObject *pytype = &PyvtkCell3D_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkCell_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkCell3D( PyObject *dict) { PyObject *o; o = PyvtkCell3D_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkCell3D", o) != 0) { Py_DECREF(o); } }