22 Interface0DIterator_doc,
23 "Class hierarchy: :class:`Iterator` > :class:`Interface0DIterator`\n"
25 "Class defining an iterator over Interface0D elements. An instance of\n"
26 "this iterator is always obtained from a 1D element.\n"
28 ".. method:: __init__(*args)\n"
30 " Accepted call signatures:\n"
32 " - ``__init__(brother)``\n"
33 " - ``__init__(it)``\n"
35 " Construct a nested Interface0DIterator using either the copy constructor\n"
36 " or the constructor that takes an argument of a Function0D.\n"
38 " :param brother: An Interface0DIterator object.\n"
39 " :type brother: :class:`Interface0DIterator`\n"
40 " :param it: An iterator object to be nested.\n"
41 " :type it: :class:`SVertexIterator` | :class:`CurvePointIterator` | "
42 ":class:`StrokeVertexIterator`\n");
59 static const char *kwlist_1[] = {
"it",
nullptr};
60 static const char *kwlist_2[] = {
"inter",
nullptr};
61 static const char *kwlist_3[] = {
"brother",
nullptr};
63 PyObject *brother, *inter;
65 if (PyArg_ParseTupleAndKeywords(args,
77 else if ((
void)PyErr_Clear(),
78 PyArg_ParseTupleAndKeywords(args,
90 else if ((
void)PyErr_Clear(),
91 PyArg_ParseTupleAndKeywords(args,
104 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
115 return (PyObject *)self;
121 if (self->
if0D_it->isBegin()) {
122 PyErr_SetNone(PyExc_StopIteration);
129 PyErr_SetNone(PyExc_StopIteration);
135 else if (self->
if0D_it->atLast()) {
136 PyErr_SetNone(PyExc_StopIteration);
151 Interface0DIterator_object_doc,
152 "The 0D object currently pointed to by this iterator. The object may be an\n"
153 "instance of :class:`Interface0D` or one of its subclasses. For example if\n"
154 "the iterator has been created from the `vertices_begin()` method of the\n"
155 ":class:`Stroke` class, the .object property refers to a :class:`StrokeVertex`\n"
158 ":type: :class:`Interface0D`\n");
162 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
170 Interface0DIterator_t_doc,
171 "The curvilinear abscissa of the current point.\n"
176 return PyFloat_FromDouble(self->
if0D_it->t());
181 Interface0DIterator_u_doc,
182 "The point parameter at the current point in the 1D element (0 <= u <= 1).\n"
187 return PyFloat_FromDouble(self->
if0D_it->u());
192 Interface0DIterator_at_last_doc,
193 "True if the iterator points to the last valid element.\n"
194 "For its counterpart (pointing to the first valid element), use it.is_begin.\n"
206 Interface0DIterator_object_doc,
213 Interface0DIterator_at_last_doc,
215 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
221 PyVarObject_HEAD_INIT(
nullptr, 0)
222 "Interface0DIterator",
240 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
241 Interface0DIterator_doc,
PyObject * PyBool_from_bool(bool b)
PyObject * Any_BPy_Interface0D_from_Interface0D(Interface0D &if0D)
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :param inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :param inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
static PyObject * Interface0DIterator_object_get(BPy_Interface0DIterator *self, void *)
static int Interface0DIterator_init(BPy_Interface0DIterator *self, PyObject *args, PyObject *kwds)
static PyObject * Interface0DIterator_t_get(BPy_Interface0DIterator *self, void *)
static int convert_nested_it(PyObject *obj, void *v)
static PyObject * Interface0DIterator_iternext(BPy_Interface0DIterator *self)
static PyObject * Interface0DIterator_at_last_get(BPy_Interface0DIterator *self, void *)
static PyObject * Interface0DIterator_u_get(BPy_Interface0DIterator *self, void *)
static PyGetSetDef BPy_Interface0DIterator_getseters[]
PyTypeObject Interface0DIterator_Type
static PyObject * Interface0DIterator_iter(BPy_Interface0DIterator *self)
PyTypeObject Interface1D_Type
PyTypeObject Iterator_Type
#define BPy_Iterator_Check(v)
Interface0DIterator(Interface0DIteratorNested *it=nullptr)
Freestyle::Interface0DIterator * if0D_it
PyObject_HEAD Freestyle::Iterator * it