9 #include "../../BPy_Convert.h"
10 #include "../../BPy_Id.h"
11 #include "../../Interface1D/BPy_FEdge.h"
12 #include "../../Interface1D/BPy_ViewEdge.h"
13 #include "../BPy_SVertex.h"
26 "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`TVertex`\n"
28 "Class to define a T vertex, i.e. an intersection between two edges.\n"
29 "It points towards two SVertex and four ViewEdges. Among the\n"
30 "ViewEdges, two are front and the other two are back. Basically a\n"
31 "front edge hides part of a back edge. So, among the back edges, one\n"
32 "is of invisibility N and the other of invisibility N+1.\n"
34 ".. method:: __init__()\n"
36 " Default constructor.");
42 static const char *kwlist[] = {
nullptr};
44 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
48 self->py_vv.vv =
self->tv;
49 self->py_vv.py_if0D.if0D =
self->tv;
50 self->py_vv.py_if0D.borrowed =
false;
55 ".. method:: get_svertex(fedge)\n"
57 " Returns the SVertex (among the 2) belonging to the given FEdge.\n"
59 " :arg fedge: An FEdge object.\n"
60 " :type fedge: :class:`FEdge`\n"
61 " :return: The SVertex belonging to the given FEdge.\n"
62 " :rtype: :class:`SVertex`");
66 static const char *kwlist[] = {
"fedge",
nullptr};
69 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
FEdge_Type, &py_fe)) {
80 ".. method:: get_mate(viewedge)\n"
82 " Returns the mate edge of the ViewEdge given as argument. If the\n"
83 " ViewEdge is frontEdgeA, frontEdgeB is returned. If the ViewEdge is\n"
84 " frontEdgeB, frontEdgeA is returned. Same for back edges.\n"
86 " :arg viewedge: A ViewEdge object.\n"
87 " :type viewedge: :class:`ViewEdge`\n"
88 " :return: The mate edge of the given ViewEdge.\n"
89 " :rtype: :class:`ViewEdge`");
93 static const char *kwlist[] = {
"viewedge",
nullptr};
96 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
ViewEdge_Type, &py_ve)) {
109 METH_VARARGS | METH_KEYWORDS,
110 TVertex_get_svertex_doc},
113 METH_VARARGS | METH_KEYWORDS,
114 TVertex_get_mate_doc},
115 {
nullptr,
nullptr, 0,
nullptr},
121 "The SVertex that is closer to the viewpoint.\n"
123 ":type: :class:`SVertex`");
127 SVertex *
v =
self->tv->frontSVertex();
137 PyErr_SetString(PyExc_TypeError,
"value must be an SVertex");
140 self->tv->setFrontSVertex(((
BPy_SVertex *)value)->sv);
145 "The SVertex that is further away from the viewpoint.\n"
147 ":type: :class:`SVertex`");
151 SVertex *
v =
self->tv->backSVertex();
161 PyErr_SetString(PyExc_TypeError,
"value must be an SVertex");
164 self->tv->setBackSVertex(((
BPy_SVertex *)value)->sv);
169 "The Id of this TVertex.\n"
171 ":type: :class:`Id`");
182 PyErr_SetString(PyExc_TypeError,
"value must be an Id");
185 self->tv->setId(*(((
BPy_Id *)value)->
id));
193 TVertex_front_svertex_doc,
198 TVertex_back_svertex_doc,
201 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
206 PyVarObject_HEAD_INIT(
nullptr, 0)
"TVertex",
224 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * BPy_SVertex_from_SVertex(SVertex &sv)
PyObject * BPy_ViewEdge_from_ViewEdge(ViewEdge &ve)
PyObject * BPy_Id_from_Id(Id &id)
#define BPy_SVertex_Check(v)
static PyMethodDef BPy_TVertex_methods[]
static int TVertex_id_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closure))
PyTypeObject TVertex_Type
static PyObject * TVertex_front_svertex_get(BPy_TVertex *self, void *UNUSED(closure))
static int TVertex_front_svertex_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closure))
static PyObject * TVertex_get_mate(BPy_TVertex *self, PyObject *args, PyObject *kwds)
static PyObject * TVertex_id_get(BPy_TVertex *self, void *UNUSED(closure))
PyDoc_STRVAR(TVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`TVertex`\n" "\n" "Class to define a T vertex, i.e. an intersection between two edges.\n" "It points towards two SVertex and four ViewEdges. Among the\n" "ViewEdges, two are front and the other two are back. Basically a\n" "front edge hides part of a back edge. So, among the back edges, one\n" "is of invisibility N and the other of invisibility N+1.\n" "\n" ".. method:: __init__()\n" "\n" " Default constructor.")
static PyObject * TVertex_back_svertex_get(BPy_TVertex *self, void *UNUSED(closure))
static PyGetSetDef BPy_TVertex_getseters[]
static PyObject * TVertex_get_svertex(BPy_TVertex *self, PyObject *args, PyObject *kwds)
static int TVertex_init(BPy_TVertex *self, PyObject *args, PyObject *kwds)
static int TVertex_back_svertex_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closure))
PyTypeObject ViewEdge_Type
PyTypeObject ViewVertex_Type
ATTR_WARN_UNUSED_RESULT const BMVert * v