// python wrapper for vtkCell // #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 "vtkCell.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkCell(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkCell_ClassNew(); } #ifndef DECLARED_PyvtkObject_ClassNew extern "C" { PyObject *PyvtkObject_ClassNew(); } #define DECLARED_PyvtkObject_ClassNew #endif static const char *PyvtkCell_Doc = "vtkCell - abstract class to specify cell behavior\n\n" "Superclass: vtkObject\n\n" "vtkCell is an abstract class that specifies the interfaces for data\n" "cells. Data cells are simple topological elements like points, lines,\n" "polygons, and tetrahedra of which visualization datasets are\n" "composed. In some cases visualization datasets may explicitly\n" "represent cells (e.g., vtkPolyData, vtkUnstructuredGrid), and in some\n" "cases, the datasets are implicitly composed of cells (e.g.,\n" "vtkStructuredPoints).\n\n" "@warning\n" "The #define VTK_CELL_SIZE is a parameter used to construct cells and\n" "provide a general guideline for controlling object execution. This\n" "parameter is not a hard boundary: you can create cells with more\n" "points.\n\n" "@sa\n" "vtkHexahedron vtkLine vtkPixel vtkPolyLine vtkPolyVertex vtkPolygon\n" "vtkQuad vtkTetra vtkTriangle vtkTriangleStrip vtkVertex vtkVoxel\n" "vtkWedge vtkPyramid\n\n"; static PyObject * PyvtkCell_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkCell::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *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->vtkCell::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkCell *tempr = vtkCell::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCell_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkCell *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkCell::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 * PyvtkCell_Initialize_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Initialize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); vtkIdType *temp1 = store1.Data(); vtkIdType *save1 = (size1 == 0 ? nullptr : temp1 + size1); vtkPoints *temp2 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetVTKObject(temp2, "vtkPoints")) { ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->Initialize(temp0, temp1, temp2); } else { op->vtkCell::Initialize(temp0, temp1, temp2); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_Initialize_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Initialize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; vtkPoints *temp1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkPoints")) { if (ap.IsBound()) { op->Initialize(temp0, temp1); } else { op->vtkCell::Initialize(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_Initialize_s3(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Initialize"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->Initialize(); } else { op->vtkCell::Initialize(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_Initialize(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 3: return PyvtkCell_Initialize_s1(self, args); case 2: return PyvtkCell_Initialize_s2(self, args); case 0: return PyvtkCell_Initialize_s3(self, args); } vtkPythonArgs::ArgCountError(nargs, "Initialize"); return nullptr; } static PyObject * PyvtkCell_ShallowCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ShallowCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); vtkCell *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkCell")) { if (ap.IsBound()) { op->ShallowCopy(temp0); } else { op->vtkCell::ShallowCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_DeepCopy(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "DeepCopy"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); vtkCell *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkCell")) { if (ap.IsBound()) { op->DeepCopy(temp0); } else { op->vtkCell::DeepCopy(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_GetCellType(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellType"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetCellType(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetCellDimension(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCellDimension"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetCellDimension(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_IsLinear(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsLinear"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->IsLinear() : op->vtkCell::IsLinear()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_RequiresInitialization(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RequiresInitialization"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->RequiresInitialization() : op->vtkCell::RequiresInitialization()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_IsExplicitCell(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsExplicitCell"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->IsExplicitCell() : op->vtkCell::IsExplicitCell()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_RequiresExplicitFaceRepresentation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RequiresExplicitFaceRepresentation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->RequiresExplicitFaceRepresentation() : op->vtkCell::RequiresExplicitFaceRepresentation()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_SetFaces(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetFaces"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int size0 = ap.GetArgSize(0); vtkPythonArgs::Array store0(2*size0); vtkIdType *temp0 = store0.Data(); vtkIdType *save0 = (size0 == 0 ? nullptr : temp0 + size0); PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->SetFaces(temp0); } else { op->vtkCell::SetFaces(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_GetFaces(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetFaces"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkIdType *tempr = (ap.IsBound() ? op->GetFaces() : op->vtkCell::GetFaces()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkPoints *tempr = (ap.IsBound() ? op->GetPoints() : op->vtkCell::GetPoints()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCell_GetNumberOfPoints(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfPoints"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkIdType tempr = (ap.IsBound() ? op->GetNumberOfPoints() : op->vtkCell::GetNumberOfPoints()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetNumberOfEdges(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfEdges"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetNumberOfEdges(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetNumberOfFaces(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfFaces"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(0)) { int tempr = op->GetNumberOfFaces(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetPointIds(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPointIds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkIdList *tempr = (ap.IsBound() ? op->GetPointIds() : op->vtkCell::GetPointIds()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCell_GetPointId(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetPointId"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0) && ap.CheckPrecond((0 <= temp0 && temp0 < op->GetPointIds()->GetNumberOfIds()), "0 <= ptId && ptId < GetPointIds()->GetNumberOfIds()")) { vtkIdType tempr = (ap.IsBound() ? op->GetPointId(temp0) : op->vtkCell::GetPointId(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetEdge(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetEdge"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkCell *tempr = op->GetEdge(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCell_GetFace(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetFace"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(1) && ap.GetValue(temp0)) { vtkCell *tempr = op->GetFace(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkCell_CellBoundary(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "CellBoundary"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; const int size1 = 3; double temp1[3]; double save1[3]; vtkIdList *temp2 = nullptr; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetVTKObject(temp2, "vtkIdList")) { ap.SaveArray(temp1, save1, size1); int tempr = op->CellBoundary(temp0, temp1, temp2); if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_EvaluatePosition(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "EvaluatePosition"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); double *temp1 = store1.Data(); double *save1 = (size1 == 0 ? nullptr : temp1 + size1); int temp2; const int size3 = 3; double temp3[3]; double save3[3]; double temp4; int size5 = ap.GetArgSize(5); vtkPythonArgs::Array store5(2*size5); double *temp5 = store5.Data(); double *save5 = (size5 == 0 ? nullptr : temp5 + size5); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(6) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetValue(temp2) && ap.GetArray(temp3, size3) && ap.GetValue(temp4) && ap.GetArray(temp5, size5)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp3, save3, size3); ap.SaveArray(temp5, save5, size5); int tempr = op->EvaluatePosition(temp0, temp1, temp2, temp3, temp4, temp5); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { ap.SetArgValue(2, temp2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { ap.SetArgValue(4, temp4); } if (ap.ArrayHasChanged(temp5, save5, size5) && !ap.ErrorOccurred()) { ap.SetArray(5, temp5, size5); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_EvaluateLocation(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "EvaluateLocation"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; const int size1 = 3; double temp1[3]; double save1[3]; const int size2 = 3; double temp2[3]; double save2[3]; int size3 = ap.GetArgSize(3); vtkPythonArgs::Array store3(2*size3); double *temp3 = store3.Data(); double *save3 = (size3 == 0 ? nullptr : temp3 + size3); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(4) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetArray(temp3, size3)) { ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp3, save3, size3); op->EvaluateLocation(temp0, temp1, temp2, temp3); if (!ap.ErrorOccurred()) { ap.SetArgValue(0, temp0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp3, save3, size3) && !ap.ErrorOccurred()) { ap.SetArray(3, temp3, size3); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_Contour(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Contour"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *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.IsPureVirtual() && 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")) { op->Contour(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10); if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_Clip(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Clip"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *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.IsPureVirtual() && 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)) { op->Clip(temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9); if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_IntersectWithLine(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IntersectWithLine"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; const int size1 = 3; double temp1[3]; double save1[3]; double temp2; double temp3; const int size4 = 3; double temp4[3]; double save4[3]; const int size5 = 3; double temp5[3]; double save5[3]; int temp6; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(7) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1) && ap.GetValue(temp2) && ap.GetValue(temp3) && ap.GetArray(temp4, size4) && ap.GetArray(temp5, size5) && ap.GetValue(temp6)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp4, save4, size4); ap.SaveArray(temp5, save5, size5); int tempr = op->IntersectWithLine(temp0, temp1, temp2, temp3, temp4, temp5, temp6); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { ap.SetArgValue(3, temp3); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (ap.ArrayHasChanged(temp5, save5, size5) && !ap.ErrorOccurred()) { ap.SetArray(5, temp5, size5); } if (!ap.ErrorOccurred()) { ap.SetArgValue(6, temp6); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_Triangulate(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Triangulate"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; vtkIdList *temp1 = nullptr; vtkPoints *temp2 = nullptr; PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(3) && ap.GetValue(temp0) && ap.GetVTKObject(temp1, "vtkIdList") && ap.GetVTKObject(temp2, "vtkPoints")) { int tempr = op->Triangulate(temp0, temp1, temp2); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_Derivatives(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "Derivatives"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int temp0; const int size1 = 3; double temp1[3]; double save1[3]; int size2 = ap.GetArgSize(2); vtkPythonArgs::Array store2(2*size2); double *temp2 = store2.Data(); double *save2 = (size2 == 0 ? nullptr : temp2 + size2); int temp3; int size4 = ap.GetArgSize(4); vtkPythonArgs::Array store4(2*size4); double *temp4 = store4.Data(); double *save4 = (size4 == 0 ? nullptr : temp4 + size4); PyObject *result = nullptr; if (op && !ap.IsPureVirtual() && ap.CheckArgCount(5) && ap.GetValue(temp0) && ap.GetArray(temp1, size1) && ap.GetArray(temp2, size2) && ap.GetValue(temp3) && ap.GetArray(temp4, size4)) { ap.SaveArray(temp1, save1, size1); ap.SaveArray(temp2, save2, size2); ap.SaveArray(temp4, save4, size4); op->Derivatives(temp0, temp1, temp2, temp3, temp4); if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (ap.ArrayHasChanged(temp2, save2, size2) && !ap.ErrorOccurred()) { ap.SetArray(2, temp2, size2); } if (ap.ArrayHasChanged(temp4, save4, size4) && !ap.ErrorOccurred()) { ap.SetArray(4, temp4, size4); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_GetBounds_s1(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 6; double temp0[6]; double save0[6]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); if (ap.IsBound()) { op->GetBounds(temp0); } else { op->vtkCell::GetBounds(temp0); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_GetBounds_s2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetBounds"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); int sizer = 6; PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetBounds() : op->vtkCell::GetBounds()); if (!ap.ErrorOccurred()) { result = ap.BuildTuple(tempr, sizer); } } return result; } static PyObject * PyvtkCell_GetBounds(PyObject *self, PyObject *args) { int nargs = vtkPythonArgs::GetArgCount(self, args); switch(nargs) { case 1: return PyvtkCell_GetBounds_s1(self, args); case 0: return PyvtkCell_GetBounds_s2(self, args); } vtkPythonArgs::ArgCountError(nargs, "GetBounds"); return nullptr; } static PyObject * PyvtkCell_GetLength2(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetLength2"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetLength2() : op->vtkCell::GetLength2()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetParametricCenter(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParametricCenter"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); int tempr = (ap.IsBound() ? op->GetParametricCenter(temp0) : op->vtkCell::GetParametricCenter(temp0)); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetParametricDistance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParametricDistance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetArray(temp0, size0)) { ap.SaveArray(temp0, save0, size0); double tempr = (ap.IsBound() ? op->GetParametricDistance(temp0) : op->vtkCell::GetParametricDistance(temp0)); if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_IsPrimaryCell(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsPrimaryCell"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->IsPrimaryCell() : op->vtkCell::IsPrimaryCell()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_GetParametricCoords(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetParametricCoords"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double *tempr = (ap.IsBound() ? op->GetParametricCoords() : op->vtkCell::GetParametricCoords()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkCell_InterpolateFunctions(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InterpolateFunctions"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); double *temp1 = store1.Data(); double *save1 = (size1 == 0 ? nullptr : temp1 + size1); PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->InterpolateFunctions(temp0, temp1); } else { op->vtkCell::InterpolateFunctions(temp0, temp1); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkCell_InterpolateDerivs(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "InterpolateDerivs"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkCell *op = static_cast(vp); const int size0 = 3; double temp0[3]; double save0[3]; int size1 = ap.GetArgSize(1); vtkPythonArgs::Array store1(2*size1); double *temp1 = store1.Data(); double *save1 = (size1 == 0 ? nullptr : temp1 + size1); PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetArray(temp0, size0) && ap.GetArray(temp1, size1)) { ap.SaveArray(temp0, save0, size0); ap.SaveArray(temp1, save1, size1); if (ap.IsBound()) { op->InterpolateDerivs(temp0, temp1); } else { op->vtkCell::InterpolateDerivs(temp0, temp1); } if (ap.ArrayHasChanged(temp0, save0, size0) && !ap.ErrorOccurred()) { ap.SetArray(0, temp0, size0); } if (ap.ArrayHasChanged(temp1, save1, size1) && !ap.ErrorOccurred()) { ap.SetArray(1, temp1, size1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkCell_Methods[] = { {"IsTypeOf", PyvtkCell_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", PyvtkCell_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", PyvtkCell_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkCell\nC++: static vtkCell *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkCell_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkCell\nC++: vtkCell *NewInstance()\n\n"}, {"Initialize", PyvtkCell_Initialize, METH_VARARGS, "V.Initialize(int, [int, ...], vtkPoints)\nC++: void Initialize(int npts, vtkIdType *pts, vtkPoints *p)\nV.Initialize(int, vtkPoints)\nC++: void Initialize(int npts, vtkPoints *p)\nV.Initialize()\nC++: virtual void Initialize()\n\nInitialize cell from outside with point ids and point coordinates\nspecified.\n"}, {"ShallowCopy", PyvtkCell_ShallowCopy, METH_VARARGS, "V.ShallowCopy(vtkCell)\nC++: virtual void ShallowCopy(vtkCell *c)\n\nCopy this cell by reference counting the internal data\nstructures. This is safe if you want a \"read-only\" copy. If you\nmodify the cell you might wish to use DeepCopy().\n"}, {"DeepCopy", PyvtkCell_DeepCopy, METH_VARARGS, "V.DeepCopy(vtkCell)\nC++: virtual void DeepCopy(vtkCell *c)\n\nCopy this cell by completely copying internal data structures.\nThis is slower but safer than ShallowCopy().\n"}, {"GetCellType", PyvtkCell_GetCellType, METH_VARARGS, "V.GetCellType() -> int\nC++: virtual int GetCellType()\n\nReturn the type of cell.\n"}, {"GetCellDimension", PyvtkCell_GetCellDimension, METH_VARARGS, "V.GetCellDimension() -> int\nC++: virtual int GetCellDimension()\n\nReturn the topological dimensional of the cell (0,1,2, or 3).\n"}, {"IsLinear", PyvtkCell_IsLinear, METH_VARARGS, "V.IsLinear() -> int\nC++: virtual int IsLinear()\n\nNon-linear cells require special treatment beyond the usual cell\ntype and connectivity list information. Most cells in VTK are\nimplicit cells.\n"}, {"RequiresInitialization", PyvtkCell_RequiresInitialization, METH_VARARGS, "V.RequiresInitialization() -> int\nC++: virtual int RequiresInitialization()\n\nSome cells require initialization prior to access. For example,\nthey may have to triangulate themselves or set up internal data\nstructures.\n"}, {"IsExplicitCell", PyvtkCell_IsExplicitCell, METH_VARARGS, "V.IsExplicitCell() -> int\nC++: virtual int IsExplicitCell()\n\nExplicit cells require additional representational information\nbeyond the usual cell type and connectivity list information.\nMost cells in VTK are implicit cells.\n"}, {"RequiresExplicitFaceRepresentation", PyvtkCell_RequiresExplicitFaceRepresentation, METH_VARARGS, "V.RequiresExplicitFaceRepresentation() -> int\nC++: virtual int RequiresExplicitFaceRepresentation()\n\nDetermine whether the cell requires explicit face representation,\nand methods for setting and getting the faces (see vtkPolyhedron\nfor example usage of these methods).\n"}, {"SetFaces", PyvtkCell_SetFaces, METH_VARARGS, "V.SetFaces([int, ...])\nC++: virtual void SetFaces(vtkIdType *faces)\n\n"}, {"GetFaces", PyvtkCell_GetFaces, METH_VARARGS, "V.GetFaces() -> (int, ...)\nC++: virtual vtkIdType *GetFaces()\n\n"}, {"GetPoints", PyvtkCell_GetPoints, METH_VARARGS, "V.GetPoints() -> vtkPoints\nC++: vtkPoints *GetPoints()\n\nGet the point coordinates for the cell.\n"}, {"GetNumberOfPoints", PyvtkCell_GetNumberOfPoints, METH_VARARGS, "V.GetNumberOfPoints() -> int\nC++: vtkIdType GetNumberOfPoints()\n\nReturn the number of points in the cell.\n"}, {"GetNumberOfEdges", PyvtkCell_GetNumberOfEdges, METH_VARARGS, "V.GetNumberOfEdges() -> int\nC++: virtual int GetNumberOfEdges()\n\nReturn the number of edges in the cell.\n"}, {"GetNumberOfFaces", PyvtkCell_GetNumberOfFaces, METH_VARARGS, "V.GetNumberOfFaces() -> int\nC++: virtual int GetNumberOfFaces()\n\nReturn the number of faces in the cell.\n"}, {"GetPointIds", PyvtkCell_GetPointIds, METH_VARARGS, "V.GetPointIds() -> vtkIdList\nC++: vtkIdList *GetPointIds()\n\nReturn the list of point ids defining the cell.\n"}, {"GetPointId", PyvtkCell_GetPointId, METH_VARARGS, "V.GetPointId(int) -> int\nC++: vtkIdType GetPointId(int ptId)\n\nFor cell point i, return the actual point id.\n"}, {"GetEdge", PyvtkCell_GetEdge, METH_VARARGS, "V.GetEdge(int) -> vtkCell\nC++: virtual vtkCell *GetEdge(int edgeId)\n\nReturn the edge cell from the edgeId of the cell.\n"}, {"GetFace", PyvtkCell_GetFace, METH_VARARGS, "V.GetFace(int) -> vtkCell\nC++: virtual vtkCell *GetFace(int faceId)\n\nReturn the face cell from the faceId of the cell.\n"}, {"CellBoundary", PyvtkCell_CellBoundary, METH_VARARGS, "V.CellBoundary(int, [float, float, float], vtkIdList) -> int\nC++: virtual int CellBoundary(int subId, double pcoords[3],\n vtkIdList *pts)\n\nGiven parametric coordinates of a point, return the closest cell\nboundary, and whether the point is inside or outside of the cell.\nThe cell boundary is defined by a list of points (pts) that\nspecify a face (3D cell), edge (2D cell), or vertex (1D cell). If\nthe return value of the method is != 0, then the point is inside\nthe cell.\n"}, {"EvaluatePosition", PyvtkCell_EvaluatePosition, METH_VARARGS, "V.EvaluatePosition([float, float, float], [float, ...], int,\n [float, float, float], float, [float, ...]) -> int\nC++: virtual int EvaluatePosition(double x[3],\n double *closestPoint, int &subId, double pcoords[3],\n double &dist2, double *weights)\n\nGiven a point x[3] return inside(=1), outside(=0) cell, or (-1)\ncomputational problem encountered; evaluate parametric\ncoordinates, sub-cell id (!=0 only if cell is composite),\ndistance squared of point x[3] to cell (in particular, the\nsub-cell indicated), closest point on cell to x[3] (unless\nclosestPoint is null, in which case, the closest point and dist2\nare not found), and interpolation weights in cell. (The number of\nweights is equal to the number of points defining the cell).\nNote: on rare occasions a -1 is returned from the method. This\nmeans that numerical error has occurred and all data returned\nfrom this method should be ignored. Also, inside/outside is\ndetermine parametrically. That is, a point is inside if it\nsatisfies parametric limits. This can cause problems for cells of\ntopological dimension 2 or less, since a point in 3D can project\nonto the cell within parametric limits but be \"far\" from the\ncell. Thus the value dist2 may be checked to determine true\nin/out.\n"}, {"EvaluateLocation", PyvtkCell_EvaluateLocation, METH_VARARGS, "V.EvaluateLocation(int, [float, float, float], [float, float,\n float], [float, ...])\nC++: virtual void EvaluateLocation(int &subId, double pcoords[3],\n double x[3], double *weights)\n\nDetermine global coordinate (x[3]) from subId and parametric\ncoordinates. Also returns interpolation weights. (The number of\nweights is equal to the number of points in the cell.)\n"}, {"Contour", PyvtkCell_Contour, METH_VARARGS, "V.Contour(float, vtkDataArray, vtkIncrementalPointLocator,\n vtkCellArray, vtkCellArray, vtkCellArray, vtkPointData,\n vtkPointData, vtkCellData, int, vtkCellData)\nC++: virtual 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)\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", PyvtkCell_Clip, METH_VARARGS, "V.Clip(float, vtkDataArray, vtkIncrementalPointLocator,\n vtkCellArray, vtkPointData, vtkPointData, vtkCellData, int,\n vtkCellData, int)\nC++: virtual 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)\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.)\n"}, {"IntersectWithLine", PyvtkCell_IntersectWithLine, METH_VARARGS, "V.IntersectWithLine([float, float, float], [float, float, float],\n float, float, [float, float, float], [float, float, float],\n int) -> int\nC++: virtual int IntersectWithLine(double p1[3], double p2[3],\n double tol, double &t, double x[3], double pcoords[3],\n int &subId)\n\nIntersect with a ray. Return parametric coordinates (both line\nand cell) and global intersection coordinates, given ray\ndefinition p1[3], p2[3] and tolerance tol. The method returns\nnon-zero value if intersection occurs. A parametric distance t\nbetween 0 and 1 along the ray representing the intersection\npoint, the point coordinates x[3] in data coordinates and also\npcoords[3] in parametric coordinates. subId is the index within\nthe cell if a composed cell like a triangle strip.\n"}, {"Triangulate", PyvtkCell_Triangulate, METH_VARARGS, "V.Triangulate(int, vtkIdList, vtkPoints) -> int\nC++: virtual int Triangulate(int index, vtkIdList *ptIds,\n vtkPoints *pts)\n\nGenerate simplices of proper dimension. If cell is 3D,\ntetrahedron are generated; if 2D triangles; if 1D lines; if 0D\npoints. The form of the output is a sequence of points, each n+1\npoints (where n is topological cell dimension) defining a\nsimplex. The index is a parameter that controls which\ntriangulation to use (if more than one is possible). If numerical\ndegeneracy encountered, 0 is returned, otherwise 1 is returned.\nThis method does not insert new points: all the points that\ndefine the simplices are the points that define the cell.\n"}, {"Derivatives", PyvtkCell_Derivatives, METH_VARARGS, "V.Derivatives(int, [float, float, float], [float, ...], int,\n [float, ...])\nC++: virtual void Derivatives(int subId, double pcoords[3],\n double *values, int dim, double *derivs)\n\nCompute derivatives given cell subId and parametric coordinates.\nThe values array is a series of data value(s) at the cell points.\nThere is a one-to-one correspondence between cell point and data\nvalue(s). Dim is the number of data values per cell point. Derivs\nare derivatives in the x-y-z coordinate directions for each data\nvalue. Thus, if computing derivatives for a scalar function in a\nhexahedron, dim=1, 8 values are supplied, and 3 deriv values are\nreturned (i.e., derivatives in x-y-z directions). On the other\nhand, if computing derivatives of velocity (vx,vy,vz) dim=3, 24\nvalues are supplied ((vx,vy,vz)1, (vx,vy,vz)2, ....()8), and 9\nderiv values are returned ((d(vx)/dx),(d(vx)/dy),(d(vx)/dz),\n(d(vy)/dx),(d(vy)/dy), (d(vy)/dz),\n(d(vz)/dx),(d(vz)/dy),(d(vz)/dz)).\n"}, {"GetBounds", PyvtkCell_GetBounds, METH_VARARGS, "V.GetBounds([float, float, float, float, float, float])\nC++: void GetBounds(double bounds[6])\nV.GetBounds() -> (float, float, float, float, float, float)\nC++: double *GetBounds()\n\nCompute cell bounding box (xmin,xmax,ymin,ymax,zmin,zmax). Copy\nresult into user provided array.\n"}, {"GetLength2", PyvtkCell_GetLength2, METH_VARARGS, "V.GetLength2() -> float\nC++: double GetLength2()\n\nCompute Length squared of cell (i.e., bounding box diagonal\nsquared).\n"}, {"GetParametricCenter", PyvtkCell_GetParametricCenter, METH_VARARGS, "V.GetParametricCenter([float, float, float]) -> int\nC++: virtual int GetParametricCenter(double pcoords[3])\n\nReturn center of the cell in parametric coordinates. Note that\nthe parametric center is not always located at (0.5,0.5,0.5). The\nreturn value is the subId that the center is in (if a composite\ncell). If you want the center in x-y-z space, invoke the\nEvaluateLocation() method.\n"}, {"GetParametricDistance", PyvtkCell_GetParametricDistance, METH_VARARGS, "V.GetParametricDistance([float, float, float]) -> float\nC++: virtual double GetParametricDistance(double pcoords[3])\n\nReturn the distance of the parametric coordinate provided to the\ncell. If inside the cell, a distance of zero is returned. This is\nused during picking to get the correct cell picked. (The\ntolerance will occasionally allow cells to be picked who are not\nreally intersected \"inside\" the cell.)\n"}, {"IsPrimaryCell", PyvtkCell_IsPrimaryCell, METH_VARARGS, "V.IsPrimaryCell() -> int\nC++: virtual int IsPrimaryCell()\n\nReturn whether this cell type has a fixed topology or whether the\ntopology varies depending on the data (e.g., vtkConvexPointSet).\nThis compares to composite cells that are typically composed of\nprimary cells (e.g., a triangle strip composite cell is made up\nof triangle primary cells).\n"}, {"GetParametricCoords", PyvtkCell_GetParametricCoords, METH_VARARGS, "V.GetParametricCoords() -> (float, ...)\nC++: virtual double *GetParametricCoords()\n\nReturn a contiguous array of parametric coordinates of the points\ndefining this cell. In other words, (px,py,pz, px,py,pz, etc..) \nThe coordinates are ordered consistent with the definition of the\npoint ordering for the cell. This method returns a non-nullptr\npointer when the cell is a primary type (i.e., IsPrimaryCell() is\ntrue). Note that 3D parametric coordinates are returned no matter\nwhat the topological dimension of the cell.\n"}, {"InterpolateFunctions", PyvtkCell_InterpolateFunctions, METH_VARARGS, "V.InterpolateFunctions([float, float, float], [float, ...])\nC++: virtual void InterpolateFunctions(double pcoords[3],\n double *weight)\n\nCompute the interpolation functions/derivatives (aka shape\nfunctions/derivatives) No-ops at this level. Typically overridden\nin subclasses.\n"}, {"InterpolateDerivs", PyvtkCell_InterpolateDerivs, METH_VARARGS, "V.InterpolateDerivs([float, float, float], [float, ...])\nC++: virtual void InterpolateDerivs(double pcoords[3],\n double *derivs)\n\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkCell_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkCommonDataModelPython.vtkCell", // 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 PyvtkCell_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 *PyvtkCell_ClassNew() { PyVTKClass_Add( &PyvtkCell_Type, PyvtkCell_Methods, "vtkCell", nullptr); PyTypeObject *pytype = &PyvtkCell_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 *)PyvtkObject_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkCell( PyObject *dict) { PyObject *o; o = PyvtkCell_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkCell", o) != 0) { Py_DECREF(o); } o = PyInt_FromLong(512); if (o) { PyDict_SetItemString(dict, "VTK_CELL_SIZE", o); Py_DECREF(o); } o = PyFloat_FromDouble(1.e-05); if (o) { PyDict_SetItemString(dict, "VTK_TOL", o); Py_DECREF(o); } }