24 "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n"
26 "Class to represent a 1D elements issued from the chaining process. A\n"
27 "Chain is the last step before the :class:`Stroke` and is used in the\n"
28 "Splitting and Creation processes.\n"
30 ".. method:: __init__()\n"
31 " __init__(brother)\n"
34 " Builds a :class:`Chain` using the default constructor,\n"
35 " copy constructor or from an :class:`Id`.\n"
37 " :arg brother: A Chain object.\n"
38 " :type brother: :class:`Chain`\n"
39 " :arg id: An Id object.\n"
40 " :type id: :class:`Id`");
44 static const char *kwlist_1[] = {
"brother",
nullptr};
45 static const char *kwlist_2[] = {
"id",
nullptr};
46 PyObject *obj =
nullptr;
48 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
Chain_Type, &obj)) {
56 else if ((
void)PyErr_Clear(),
57 PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist_2, &
Id_Type, &obj))
62 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
67 self->py_c.py_if1D.borrowed =
false;
73 Chain_push_viewedge_back_doc,
74 ".. method:: push_viewedge_back(viewedge, orientation)\n"
76 " Adds a ViewEdge at the end of the Chain.\n"
78 " :arg viewedge: The ViewEdge that must be added.\n"
79 " :type viewedge: :class:`ViewEdge`\n"
80 " :arg orientation: The orientation with which the ViewEdge must be\n"
82 " :type orientation: bool");
86 static const char *kwlist[] = {
"viewedge",
"orientation",
nullptr};
87 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
89 if (!PyArg_ParseTupleAndKeywords(
90 args, kwds,
"O!O!", (
char **)kwlist, &
ViewEdge_Type, &obj1, &PyBool_Type, &obj2))
96 self->c->push_viewedge_back(ve, orientation);
102 Chain_push_viewedge_front_doc,
103 ".. method:: push_viewedge_front(viewedge, orientation)\n"
105 " Adds a ViewEdge at the beginning of the Chain.\n"
107 " :arg viewedge: The ViewEdge that must be added.\n"
108 " :type viewedge: :class:`ViewEdge`\n"
109 " :arg orientation: The orientation with which the ViewEdge must be\n"
111 " :type orientation: bool");
115 static const char *kwlist[] = {
"viewedge",
"orientation",
nullptr};
116 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
118 if (!PyArg_ParseTupleAndKeywords(
119 args, kwds,
"O!O!", (
char **)kwlist, &
ViewEdge_Type, &obj1, &PyBool_Type, &obj2))
125 self->c->push_viewedge_front(ve, orientation);
131# pragma clang diagnostic push
132# pragma clang diagnostic ignored "-Wcast-function-type"
134# pragma GCC diagnostic push
135# pragma GCC diagnostic ignored "-Wcast-function-type"
140 {
"push_viewedge_back",
142 METH_VARARGS | METH_KEYWORDS,
143 Chain_push_viewedge_back_doc},
144 {
"push_viewedge_front",
146 METH_VARARGS | METH_KEYWORDS,
147 Chain_push_viewedge_front_doc},
148 {
nullptr,
nullptr, 0,
nullptr},
153# pragma clang diagnostic pop
155# pragma GCC diagnostic pop
162 PyVarObject_HEAD_INIT(
nullptr, 0)
181 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
static PyObject * Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(Chain_doc, "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n" "\n" "Class to represent a 1D elements issued from the chaining process. A\n" "Chain is the last step before the :class:`Stroke` and is used in the\n" "Splitting and Creation processes.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(id)\n" "\n" " Builds a :class:`Chain` using the default constructor,\n" " copy constructor or from an :class:`Id`.\n" "\n" " :arg brother: A Chain object.\n" " :type brother: :class:`Chain`\n" " :arg id: An Id object.\n" " :type id: :class:`Id`")
static PyMethodDef BPy_Chain_methods[]
static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds)
static PyObject * Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObject *kwds)
bool bool_from_PyBool(PyObject *b)
PyTypeObject FrsCurve_Type
PyTypeObject ViewEdge_Type