29 "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n"
31 "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n"
32 "edge of the input mesh. It can be a silhouette, a crease or a border.\n"
33 "If it is a crease edge, then it is bordered by two faces of the mesh.\n"
34 "Face a lies on its right whereas Face b lies on its left. If it is a\n"
35 "border edge, then it doesn't have any face on its right, and thus Face\n"
38 ".. method:: __init__()\n"
39 " __init__(brother)\n"
40 " __init__(first_vertex, second_vertex)\n"
42 " Builds an :class:`FEdgeSharp` using the default constructor,\n"
43 " copy constructor, or between two :class:`SVertex` objects.\n"
45 " :arg brother: An FEdgeSharp object.\n"
46 " :type brother: :class:`FEdgeSharp`\n"
47 " :arg first_vertex: The first SVertex object.\n"
48 " :type first_vertex: :class:`SVertex`\n"
49 " :arg second_vertex: The second SVertex object.\n"
50 " :type second_vertex: :class:`SVertex`");
54 static const char *kwlist_1[] = {
"brother",
nullptr};
55 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
nullptr};
56 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
58 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
FEdgeSharp_Type, &obj1)) {
66 else if ((
void)PyErr_Clear(),
67 PyArg_ParseTupleAndKeywords(
73 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
77 self->py_fe.py_if1D.if1D =
self->fes;
78 self->py_fe.py_if1D.borrowed =
false;
85#define MATHUTILS_SUBTYPE_NORMAL_A 1
86#define MATHUTILS_SUBTYPE_NORMAL_B 2
125 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
126 self->fes->setNormalA(p);
130 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
131 self->fes->setNormalB(p);
146 bmo->data[index] = p[index];
151 bmo->data[index] = p[index];
166 p[index] = bmo->data[index];
167 self->fes->setNormalA(p);
172 p[index] = bmo->data[index];
173 self->fes->setNormalB(p);
201 FEdgeSharp_normal_right_doc,
202 "The normal to the face lying on the right of the FEdge. If this FEdge\n"
203 "is a border, it has no Face on its right and therefore no normal.\n"
205 ":type: :class:`mathutils.Vector`");
220 self->fes->setNormalA(p);
226 FEdgeSharp_normal_left_doc,
227 "The normal to the face lying on the left of the FEdge.\n"
229 ":type: :class:`mathutils.Vector`");
244 self->fes->setNormalB(p);
250 FEdgeSharp_material_index_right_doc,
251 "The index of the material of the face lying on the right of the FEdge.\n"
252 "If this FEdge is a border, it has no Face on its right and therefore\n"
259 return PyLong_FromLong(
self->fes->aFrsMaterialIndex());
266 uint i = PyLong_AsUnsignedLong(value);
267 if (PyErr_Occurred()) {
270 self->fes->setaFrsMaterialIndex(i);
276 FEdgeSharp_material_index_left_doc,
277 "The index of the material of the face lying on the left of the FEdge.\n"
283 return PyLong_FromLong(
self->fes->bFrsMaterialIndex());
290 uint i = PyLong_AsUnsignedLong(value);
291 if (PyErr_Occurred()) {
294 self->fes->setbFrsMaterialIndex(i);
300 FEdgeSharp_material_right_doc,
301 "The material of the face lying on the right of the FEdge. If this FEdge\n"
302 "is a border, it has no Face on its right and therefore no material.\n"
304 ":type: :class:`Material`");
313 FEdgeSharp_material_left_doc,
314 "The material of the face lying on the left of the FEdge.\n"
316 ":type: :class:`Material`");
325 FEdgeSharp_face_mark_right_doc,
326 "The face mark of the face lying on the right of the FEdge. If this FEdge\n"
327 "is a border, it has no face on the right and thus this property is set to\n"
341 if (!PyBool_Check(value)) {
350 FEdgeSharp_face_mark_left_doc,
351 "The face mark of the face lying on the left of the FEdge.\n"
362 if (!PyBool_Check(value)) {
373 FEdgeSharp_normal_right_doc,
378 FEdgeSharp_normal_left_doc,
380 {
"material_index_right",
383 FEdgeSharp_material_index_right_doc,
385 {
"material_index_left",
388 FEdgeSharp_material_index_left_doc,
393 FEdgeSharp_material_right_doc,
398 FEdgeSharp_material_left_doc,
403 FEdgeSharp_face_mark_right_doc,
408 FEdgeSharp_face_mark_left_doc,
410 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
416 PyVarObject_HEAD_INIT(
nullptr, 0)
435 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
bool bool_from_PyBool(PyObject *b)
PyObject * PyBool_from_bool(bool b)
PyObject * BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial &m)
static PyObject * FEdgeSharp_normal_left_get(BPy_FEdgeSharp *self, void *)
#define MATHUTILS_SUBTYPE_NORMAL_B
static int FEdgeSharp_mathutils_set(BaseMathObject *bmo, int subtype)
PyDoc_STRVAR(FEdgeSharp_doc, "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n" "\n" "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n" "edge of the input mesh. It can be a silhouette, a crease or a border.\n" "If it is a crease edge, then it is bordered by two faces of the mesh.\n" "Face a lies on its right whereas Face b lies on its left. If it is a\n" "border edge, then it doesn't have any face on its right, and thus Face\n" "a is None.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(first_vertex, second_vertex)\n" "\n" " Builds an :class:`FEdgeSharp` using the default constructor,\n" " copy constructor, or between two :class:`SVertex` objects.\n" "\n" " :arg brother: An FEdgeSharp object.\n" " :type brother: :class:`FEdgeSharp`\n" " :arg first_vertex: The first SVertex object.\n" " :type first_vertex: :class:`SVertex`\n" " :arg second_vertex: The second SVertex object.\n" " :type second_vertex: :class:`SVertex`")
static int FEdgeSharp_normal_left_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static uchar FEdgeSharp_mathutils_cb_index
static int FEdgeSharp_face_mark_left_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static PyObject * FEdgeSharp_material_left_get(BPy_FEdgeSharp *self, void *)
static PyObject * FEdgeSharp_face_mark_left_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_face_mark_right_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static int FEdgeSharp_mathutils_get(BaseMathObject *bmo, int subtype)
static int FEdgeSharp_normal_right_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds)
static PyObject * FEdgeSharp_normal_right_get(BPy_FEdgeSharp *self, void *)
static PyObject * FEdgeSharp_face_mark_right_get(BPy_FEdgeSharp *self, void *)
#define MATHUTILS_SUBTYPE_NORMAL_A
static int FEdgeSharp_material_index_right_set(BPy_FEdgeSharp *self, PyObject *value, void *)
static PyObject * FEdgeSharp_material_index_right_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_material_index_left_set(BPy_FEdgeSharp *self, PyObject *value, void *)
PyTypeObject FEdgeSharp_Type
static Mathutils_Callback FEdgeSharp_mathutils_cb
static PyObject * FEdgeSharp_material_right_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_mathutils_set_index(BaseMathObject *bmo, int subtype, int index)
static int FEdgeSharp_mathutils_get_index(BaseMathObject *bmo, int subtype, int index)
void FEdgeSharp_mathutils_register_callback()
static PyObject * FEdgeSharp_material_index_left_get(BPy_FEdgeSharp *self, void *)
static int FEdgeSharp_mathutils_check(BaseMathObject *bmo)
static PyGetSetDef BPy_FEdgeSharp_getseters[]
#define BPy_FEdgeSharp_Check(v)
PyTypeObject SVertex_Type
ATTR_WARN_UNUSED_RESULT const BMVert * v
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
uchar Mathutils_RegisterCallback(Mathutils_Callback *cb)
PyObject * Vector_CreatePyObject_cb(PyObject *cb_user, int vec_num, uchar cb_type, uchar cb_subtype)