23 #include "../BPy_Convert.h"
37 "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n"
39 "Class representing an iterator on a curve. Allows an iterating\n"
40 "outside initial vertices. A CurvePoint is instantiated and returned\n"
41 "through the .object attribute.\n"
43 ".. method:: __init__()\n"
44 " __init__(brother)\n"
45 " __init__(step=0.0)\n"
47 " Builds a CurvePointIterator object using either the default constructor,\n"
48 " copy constructor, or the overloaded constructor.\n"
50 " :arg brother: A CurvePointIterator object.\n"
51 " :type brother: :class:`CurvePointIterator`\n"
52 " :arg step: A resampling resolution with which the curve is resampled.\n"
53 " If zero, no resampling is done (i.e., the iterator iterates over\n"
54 " initial vertices).\n"
55 " :type step: float");
59 static const char *kwlist_1[] = {
"brother",
nullptr};
60 static const char *kwlist_2[] = {
"step",
nullptr};
61 PyObject *brother =
nullptr;
64 if (PyArg_ParseTupleAndKeywords(
74 else if ((
void)PyErr_Clear(),
75 PyArg_ParseTupleAndKeywords(args, kwds,
"f", (
char **)kwlist_2, &step)) {
79 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
82 self->py_it.it =
self->cp_it;
89 "The CurvePoint object currently pointed by this iterator.\n"
91 ":type: :class:`CurvePoint`");
95 if (
self->cp_it->isEnd()) {
96 PyErr_SetString(PyExc_RuntimeError,
"iteration has stopped");
103 "The curvilinear abscissa of the current point.\n"
109 return PyFloat_FromDouble(
self->cp_it->t());
113 "The point parameter at the current point in the stroke (0 <= u <= 1).\n"
119 return PyFloat_FromDouble(
self->cp_it->u());
126 CurvePointIterator_object_doc,
130 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
136 PyVarObject_HEAD_INIT(
nullptr, 0)
"CurvePointIterator",
154 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
155 CurvePointIterator_doc,
PyObject * BPy_CurvePoint_from_CurvePoint(CurvePoint &cp)
static PyObject * CurvePointIterator_u_get(BPy_CurvePointIterator *self, void *UNUSED(closure))
static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, PyObject *kwds)
static PyGetSetDef BPy_CurvePointIterator_getseters[]
PyDoc_STRVAR(CurvePointIterator_doc, "Class hierarchy: :class:`Iterator` > :class:`CurvePointIterator`\n" "\n" "Class representing an iterator on a curve. Allows an iterating\n" "outside initial vertices. A CurvePoint is instantiated and returned\n" "through the .object attribute.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(step=0.0)\n" "\n" " Builds a CurvePointIterator object using either the default constructor,\n" " copy constructor, or the overloaded constructor.\n" "\n" " :arg brother: A CurvePointIterator object.\n" " :type brother: :class:`CurvePointIterator`\n" " :arg step: A resampling resolution with which the curve is resampled.\n" " If zero, no resampling is done (i.e., the iterator iterates over\n" " initial vertices).\n" " :type step: float")
static PyObject * CurvePointIterator_object_get(BPy_CurvePointIterator *self, void *UNUSED(closure))
PyTypeObject CurvePointIterator_Type
static PyObject * CurvePointIterator_t_get(BPy_CurvePointIterator *self, void *UNUSED(closure))
PyTypeObject Iterator_Type