23 #include "../../BPy_Convert.h"
24 #include "../../BPy_Id.h"
25 #include "../BPy_ViewEdge.h"
38 "Class hierarchy: :class:`Interface1D` > :class:`Curve` > :class:`Chain`\n"
40 "Class to represent a 1D elements issued from the chaining process. A\n"
41 "Chain is the last step before the :class:`Stroke` and is used in the\n"
42 "Splitting and Creation processes.\n"
44 ".. method:: __init__()\n"
45 " __init__(brother)\n"
48 " Builds a :class:`Chain` using the default constructor,\n"
49 " copy constructor or from an :class:`Id`.\n"
51 " :arg brother: A Chain object.\n"
52 " :type brother: :class:`Chain`\n"
53 " :arg id: An Id object.\n"
54 " :type id: :class:`Id`");
58 static const char *kwlist_1[] = {
"brother",
nullptr};
59 static const char *kwlist_2[] = {
"id",
nullptr};
60 PyObject *obj =
nullptr;
62 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
Chain_Type, &obj)) {
64 self->c =
new Chain();
70 else if ((
void)PyErr_Clear(),
71 PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist_2, &
Id_Type, &obj)) {
75 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
78 self->py_c.c =
self->c;
79 self->py_c.py_if1D.if1D =
self->c;
80 self->py_c.py_if1D.borrowed =
false;
85 ".. method:: push_viewedge_back(viewedge, orientation)\n"
87 " Adds a ViewEdge at the end of the Chain.\n"
89 " :arg viewedge: The ViewEdge that must be added.\n"
90 " :type viewedge: :class:`ViewEdge`\n"
91 " :arg orientation: The orientation with which the ViewEdge must be\n"
93 " :type orientation: bool");
97 static const char *kwlist[] = {
"viewedge",
"orientation",
nullptr};
98 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
100 if (!PyArg_ParseTupleAndKeywords(
101 args, kwds,
"O!O!", (
char **)kwlist, &
ViewEdge_Type, &obj1, &PyBool_Type, &obj2)) {
106 self->c->push_viewedge_back(ve, orientation);
111 ".. method:: push_viewedge_front(viewedge, orientation)\n"
113 " Adds a ViewEdge at the beginning of the Chain.\n"
115 " :arg viewedge: The ViewEdge that must be added.\n"
116 " :type viewedge: :class:`ViewEdge`\n"
117 " :arg orientation: The orientation with which the ViewEdge must be\n"
119 " :type orientation: bool");
123 static const char *kwlist[] = {
"viewedge",
"orientation",
nullptr};
124 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
126 if (!PyArg_ParseTupleAndKeywords(
127 args, kwds,
"O!O!", (
char **)kwlist, &
ViewEdge_Type, &obj1, &PyBool_Type, &obj2)) {
132 self->c->push_viewedge_front(ve, orientation);
137 {
"push_viewedge_back",
139 METH_VARARGS | METH_KEYWORDS,
140 Chain_push_viewedge_back_doc},
141 {
"push_viewedge_front",
143 METH_VARARGS | METH_KEYWORDS,
144 Chain_push_viewedge_front_doc},
145 {
nullptr,
nullptr, 0,
nullptr},
151 PyVarObject_HEAD_INIT(
nullptr, 0)
"Chain",
169 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
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 PyObject * Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObject *kwds)
static PyMethodDef BPy_Chain_methods[]
static PyObject * Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyObject *kwds)
static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds)
bool bool_from_PyBool(PyObject *b)
PyTypeObject FrsCurve_Type
PyTypeObject ViewEdge_Type