40 PyModule_AddObjectRef(
65 UnaryFunction1DVectorViewShape___doc__,
66 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVectorViewShape`\n"
68 "Base class for unary functions (functors) that work on\n"
69 ":class:`Interface1D` and return a list of :class:`ViewShape`\n"
72 ".. method:: __init__()\n"
73 " __init__(integration_type)\n"
75 " Builds a unary 1D function using the default constructor\n"
76 " or the integration method given as an argument.\n"
78 " :arg integration_type: An integration method.\n"
79 " :type integration_type: :class:`IntegrationType`\n");
85 static const char *kwlist[] = {
"integration",
nullptr};
86 PyObject *obj =
nullptr;
88 if (!PyArg_ParseTupleAndKeywords(
109 delete self->uf1D_vectorviewshape;
115 return PyUnicode_FromFormat(
116 "type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_vectorviewshape);
123 static const char *kwlist[] = {
"inter",
nullptr};
124 PyObject *obj =
nullptr;
126 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
130 if (
typeid(*(
self->uf1D_vectorviewshape)) ==
typeid(
UnaryFunction1D<std::vector<ViewShape *>>)) {
131 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
135 if (!PyErr_Occurred()) {
136 string class_name(Py_TYPE(
self)->tp_name);
137 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
142 const uint list_len =
self->uf1D_vectorviewshape->result.size();
143 PyObject *list = PyList_New(list_len);
144 for (
uint i = 0; i < list_len; i++) {
156 integration_type_doc,
157 "The integration method.\n"
159 ":type: :class:`IntegrationType`");
164 self->uf1D_vectorviewshape->getIntegrationType());
172 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
183 integration_type_doc,
185 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
191 PyVarObject_HEAD_INIT(
nullptr, 0)
192 "UnaryFunction1DVectorViewShape",
210 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
211 UnaryFunction1DVectorViewShape___doc__,
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
PyObject * BPy_ViewShape_from_ViewShape(ViewShape &vs)
PyTypeObject GetOccludeeF1D_Type
PyTypeObject GetOccludersF1D_Type
PyTypeObject GetShapeF1D_Type
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyDoc_STRVAR(UnaryFunction1DVectorViewShape___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVectorViewShape`\n" "\n" "Base class for unary functions (functors) that work on\n" ":class:`Interface1D` and return a list of :class:`ViewShape`\n" "objects.\n" "\n" ".. method:: __init__()\n" " __init__(integration_type)\n" "\n" " Builds a unary 1D function using the default constructor\n" " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n")
static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, PyObject *kwds)
static int integration_type_set(BPy_UnaryFunction1DVectorViewShape *self, PyObject *value, void *)
static PyObject * UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape *self)
static PyGetSetDef BPy_UnaryFunction1DVectorViewShape_getseters[]
static PyObject * UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, PyObject *kwds)
PyTypeObject UnaryFunction1DVectorViewShape_Type
int UnaryFunction1DVectorViewShape_Init(PyObject *module)
static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape *self)
static PyObject * integration_type_get(BPy_UnaryFunction1DVectorViewShape *self, void *)
PyTypeObject UnaryFunction1D_Type
ATTR_WARN_UNUSED_RESULT const BMVert * v
static struct PyModuleDef module