25 "Class hierarchy: :class:`Interface1D` > :class:`FEdge` > :class:`FEdgeSharp`\n"
27 "Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial\n"
28 "edge of the input mesh. It can be a silhouette, a crease or a border.\n"
29 "If it is a crease edge, then it is bordered by two faces of the mesh.\n"
30 "Face a lies on its right whereas Face b lies on its left. If it is a\n"
31 "border edge, then it doesn't have any face on its right, and thus Face\n"
34 ".. method:: __init__()\n"
35 " __init__(brother)\n"
36 " __init__(first_vertex, second_vertex)\n"
38 " Builds an :class:`FEdgeSharp` using the default constructor,\n"
39 " copy constructor, or between two :class:`SVertex` objects.\n"
41 " :arg brother: An FEdgeSharp object.\n"
42 " :type brother: :class:`FEdgeSharp`\n"
43 " :arg first_vertex: The first SVertex object.\n"
44 " :type first_vertex: :class:`SVertex`\n"
45 " :arg second_vertex: The second SVertex object.\n"
46 " :type second_vertex: :class:`SVertex`\n");
49 static const char *kwlist_1[] = {
"brother",
nullptr};
50 static const char *kwlist_2[] = {
"first_vertex",
"second_vertex",
nullptr};
51 PyObject *obj1 =
nullptr, *obj2 =
nullptr;
53 if (PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist_1, &
FEdgeSharp_Type, &obj1)) {
61 else if ((
void)PyErr_Clear(),
62 PyArg_ParseTupleAndKeywords(
68 PyErr_SetString(PyExc_TypeError,
"invalid argument(s)");
72 self->py_fe.py_if1D.if1D =
self->fes;
73 self->py_fe.py_if1D.borrowed =
false;
80#define MATHUTILS_SUBTYPE_NORMAL_A 1
81#define MATHUTILS_SUBTYPE_NORMAL_B 2
120 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
121 self->fes->setNormalA(p);
125 Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]);
126 self->fes->setNormalB(p);
141 bmo->data[index] = p[index];
146 bmo->data[index] = p[index];
161 p[index] = bmo->data[index];
162 self->fes->setNormalA(p);
167 p[index] = bmo->data[index];
168 self->fes->setNormalB(p);
196 FEdgeSharp_normal_right_doc,
197 "The normal to the face lying on the right of the FEdge. If this FEdge\n"
198 "is a border, it has no Face on its right and therefore no normal.\n"
200 ":type: :class:`mathutils.Vector`\n");
214 self->fes->setNormalA(p);
220 FEdgeSharp_normal_left_doc,
221 "The normal to the face lying on the left of the FEdge.\n"
223 ":type: :class:`mathutils.Vector`\n");
237 self->fes->setNormalB(p);
243 FEdgeSharp_material_index_right_doc,
244 "The index of the material of the face lying on the right of the FEdge.\n"
245 "If this FEdge is a border, it has no Face on its right and therefore\n"
251 return PyLong_FromLong(
self->fes->aFrsMaterialIndex());
258 uint i = PyLong_AsUnsignedLong(value);
259 if (PyErr_Occurred()) {
262 self->fes->setaFrsMaterialIndex(
i);
268 FEdgeSharp_material_index_left_doc,
269 "The index of the material of the face lying on the left of the FEdge.\n"
274 return PyLong_FromLong(
self->fes->bFrsMaterialIndex());
281 uint i = PyLong_AsUnsignedLong(value);
282 if (PyErr_Occurred()) {
285 self->fes->setbFrsMaterialIndex(
i);
291 FEdgeSharp_material_right_doc,
292 "The material of the face lying on the right of the FEdge. If this FEdge\n"
293 "is a border, it has no Face on its right and therefore no material.\n"
295 ":type: :class:`Material`\n");
303 FEdgeSharp_material_left_doc,
304 "The material of the face lying on the left of the FEdge.\n"
306 ":type: :class:`Material`\n");
314 FEdgeSharp_face_mark_right_doc,
315 "The face mark of the face lying on the right of the FEdge. If this FEdge\n"
316 "is a border, it has no face on the right and thus this property is set to\n"
329 if (!PyBool_Check(value)) {
338 FEdgeSharp_face_mark_left_doc,
339 "The face mark of the face lying on the left of the FEdge.\n"
349 if (!PyBool_Check(value)) {
360 FEdgeSharp_normal_right_doc,
365 FEdgeSharp_normal_left_doc,
367 {
"material_index_right",
370 FEdgeSharp_material_index_right_doc,
372 {
"material_index_left",
375 FEdgeSharp_material_index_left_doc,
380 FEdgeSharp_material_right_doc,
385 FEdgeSharp_material_left_doc,
390 FEdgeSharp_face_mark_right_doc,
395 FEdgeSharp_face_mark_left_doc,
397 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
403 PyVarObject_HEAD_INIT(
nullptr, 0)
422 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)
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[]
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`\n")
#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)
VecMat::Vec3< real > Vec3r