diff options
Diffstat (limited to 'source/blender/freestyle')
5 files changed, 286 insertions, 187 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 6ab2dc9ebfb..1edc4cf1e16 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -12,10 +12,11 @@ #include "Iterator/BPy_Interface0DIterator.h" #include "Iterator/BPy_orientedViewEdgeIterator.h" #include "Iterator/BPy_StrokeVertexIterator.h" -#include "BPy_SShape.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" +#include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" +#include "BPy_ViewShape.h" #ifdef __cplusplus extern "C" { @@ -152,6 +153,13 @@ PyObject * BPy_SShape_from_SShape( SShape& ss ) { return py_ss; } +PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) { + PyObject *py_vs = ViewShape_Type.tp_new( &ViewShape_Type, 0, 0 ); + ((BPy_ViewShape *) py_vs)->vs = new ViewShape( vs ); + + return py_vs; +} + PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) { PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 ); ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it ); @@ -173,6 +181,8 @@ PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::S return py_sv_it; } + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 05f002656c7..ab80908cf8f 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -65,6 +65,7 @@ PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ); PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ); +PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ); PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ); PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index 24c0263bc5f..541ef4f4516 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -395,17 +395,19 @@ PyObject * StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *ar } PyObject * StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ) { - int i = 0; + PyObject *py_b; - if(!( PyArg_ParseTuple(args, "i", &i) )) { + if(!( PyArg_ParseTuple(args, "O", &py_b) && PyBool_Check(py_b) )) { cout << "ERROR: StrokeAttribute_setVisible" << endl; Py_RETURN_NONE; } - self->sa->setVisible( i ); + self->sa->setVisible( bool_from_PyBool(py_b) ); + Py_RETURN_NONE; } + PyObject * StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ) { char *s = 0; double d = 0; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 3eaad2bd8c4..369dd7c61a5 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -337,14 +337,14 @@ PyObject * FEdge_setViewEdge( BPy_FEdge *self, PyObject *args ) { PyObject *FEdge_setSmooth( BPy_FEdge *self , PyObject *args) { - int b; + PyObject *py_b; - if(!( PyArg_ParseTuple(args, "i", &b) )) { + if(!( PyArg_ParseTuple(args, "O", &py_b) && PyBool_Check(py_b) )) { cout << "ERROR: FEdge_setSmooth" << endl; Py_RETURN_NONE; } - self->fe->setSmooth( (bool) b ); + self->fe->setSmooth( bool_from_PyBool(py_b) ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index 02d06757fcb..e32b90a2382 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -1,6 +1,12 @@ #include "BPy_ViewEdge.h" #include "../BPy_Convert.h" +#include "../BPy_Id.h" +#include "../Interface0D/BPy_ViewVertex.h" +#include "../Interface1D/BPy_FEdge.h" +#include "../Interface1D/BPy_ViewEdge.h" +#include "../BPy_Nature.h" +#include "../BPy_ViewShape.h" #ifdef __cplusplus extern "C" { @@ -13,13 +19,54 @@ static int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) static PyObject * ViewEdge_A( BPy_ViewEdge *self ); static PyObject * ViewEdge_B( BPy_ViewEdge *self ); +static PyObject * ViewEdge_fedgeA( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_fedgeB( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_viewShape( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_aShape( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_isClosed( BPy_ViewEdge *self ); +static PyObject * ViewEdge_getChainingTimeStamp( BPy_ViewEdge *self ); +static PyObject * ViewEdge_setChainingTimeStamp( BPy_ViewEdge *self, PyObject *args) ; +static PyObject * ViewEdge_setA( BPy_ViewEdge *self , PyObject *args) ; +static PyObject * ViewEdge_setB( BPy_ViewEdge *self , PyObject *args); +static PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_setFEdgeA( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_setFEdgeB( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_setShape( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_setId( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_UpdateFEdges( BPy_ViewEdge *self ); +static PyObject * ViewEdge_setaShape( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_setQI( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_verticesBegin( BPy_ViewEdge *self ); +static PyObject * ViewEdge_verticesEnd( BPy_ViewEdge *self ); +static PyObject * ViewEdge_pointsBegin( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args ); /*----------------------ViewEdge instance definitions ----------------------------*/ static PyMethodDef BPy_ViewEdge_methods[] = { - {"A", ( PyCFunction ) ViewEdge_A, METH_NOARGS, "() Returns the first ViewVertex."}, {"B", ( PyCFunction ) ViewEdge_B, METH_NOARGS, "() Returns the second ViewVertex."}, + {"fedgeA", ( PyCFunction ) ViewEdge_fedgeA, METH_NOARGS, "() Returns the first FEdge that constitues this ViewEdge."}, + {"fedgeB", ( PyCFunction ) ViewEdge_fedgeB, METH_NOARGS, "() Returns the last FEdge that constitues this ViewEdge."}, + {"viewShape", ( PyCFunction ) ViewEdge_viewShape, METH_NOARGS, "() Returns the ViewShape to which this ViewEdge belongs to . "}, + {"aShape", ( PyCFunction ) ViewEdge_aShape, METH_NOARGS, "() Returns the shape that is occluded by the ViewShape to which this ViewEdge belongs to. If no object is occluded, 0 is returned."}, + {"isClosed", ( PyCFunction ) ViewEdge_isClosed, METH_NOARGS, "() Tells whether this ViewEdge forms a closed loop or not."}, + {"getChainingTimeStamp", ( PyCFunction ) ViewEdge_getChainingTimeStamp, METH_NOARGS, "() Returns the time stamp of this ViewEdge."}, + {"setChainingTimeStamp", ( PyCFunction ) ViewEdge_setChainingTimeStamp, METH_VARARGS, "(int ts) Sets the time stamp value."}, + {"setA", ( PyCFunction ) ViewEdge_setA, METH_VARARGS, "(ViewVertex sv) Sets the first ViewVertex of the ViewEdge."}, + {"setB", ( PyCFunction ) ViewEdge_setB, METH_VARARGS, "(ViewVertex sv) Sets the last ViewVertex of the ViewEdge."}, + {"setNature", ( PyCFunction ) ViewEdge_setNature, METH_VARARGS, "(Nature n) Sets the nature of the ViewEdge."}, + {"setFEdgeA", ( PyCFunction ) ViewEdge_setFEdgeA, METH_VARARGS, "(FEdge fe) Sets the first FEdge of the ViewEdge."}, + {"setFEdgeB", ( PyCFunction ) ViewEdge_setFEdgeB, METH_VARARGS, "(FEdge fe) Sets the last FEdge of the ViewEdge."}, + {"setShape", ( PyCFunction ) ViewEdge_setShape, METH_VARARGS, "(ViewShape vs) Sets the ViewShape to which this ViewEdge belongs to."}, + {"setId", ( PyCFunction ) ViewEdge_setId, METH_VARARGS, "(Id id) Sets the ViewEdge id."}, + {"UpdateFEdges", ( PyCFunction ) ViewEdge_UpdateFEdges, METH_NOARGS, "() Sets ViewEdge to this for all embedded fedges"}, + {"setaShape", ( PyCFunction ) ViewEdge_setaShape, METH_VARARGS, "(ViewShape vs) Sets the occluded ViewShape"}, + {"setQI", ( PyCFunction ) ViewEdge_setQI, METH_VARARGS, "(int qi) Sets the quantitative invisibility value."}, + {"verticesBegin", ( PyCFunction ) ViewEdge_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator to iterate over the SVertex constituing the embedding of this ViewEdge. The returned Interface0DIterator points to the first SVertex of the ViewEdge."}, + {"verticesEnd", ( PyCFunction ) ViewEdge_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator to iterate over the SVertex constituing the embedding of this ViewEdge. The returned Interface0DIterator points after the last SVertex of the ViewEdge."}, + {"pointsBegin", ( PyCFunction ) ViewEdge_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given resolution t. The returned Interface0DIterator points on the first Point of the ViewEdge."}, + {"pointsEnd", ( PyCFunction ) ViewEdge_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given resolution t. The returned Interface0DIterator points after the last Point of the ViewEdge."}, {NULL, NULL, 0, NULL} }; @@ -120,195 +167,234 @@ int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) PyObject * ViewEdge_A( BPy_ViewEdge *self ) { - // if( self->ve->A() ){ - // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->A() ); - // } - // + if( self->ve->A() ){ + return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->A() ); + } + Py_RETURN_NONE; } PyObject * ViewEdge_B( BPy_ViewEdge *self ) { - // if( self->ve->B() ){ - // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->B() ); - // } + if( self->ve->B() ){ + return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->B() ); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_fedgeA( BPy_ViewEdge *self ) { + if( self->ve->fedgeA() ){ + return BPy_FEdge_from_FEdge(*( self->ve->fedgeA() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_fedgeB( BPy_ViewEdge *self ) { + if( self->ve->fedgeB() ){ + return BPy_FEdge_from_FEdge(*( self->ve->fedgeB() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_viewShape( BPy_ViewEdge *self ) { + if( self->ve->viewShape() ){ + return BPy_ViewShape_from_ViewShape(*( self->ve->viewShape() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_aShape( BPy_ViewEdge *self ) { + if( self->ve->aShape() ){ + return BPy_ViewShape_from_ViewShape(*( self->ve->aShape() )); + } Py_RETURN_NONE; } -// -// PyObject * ViewEdge___getitem__( BPy_ViewEdge *self, PyObject *args ) { -// int i; -// -// if(!( PyArg_ParseTuple(args, "i", &i) && (i == 0 || i == 1) )) { -// cout << "ERROR: ViewEdge___getitem__" << endl; -// Py_RETURN_NONE; -// } -// -// if( SVertex *v = self->ve->operator[](i) ) -// return BPy_SVertex_from_SVertex( *v ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_nextEdge( BPy_ViewEdge *self ) { -// if( ViewEdge *fe = self->ve->nextEdge() ) -// return BPy_ViewEdge_from_ViewEdge( *fe ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_previousEdge( BPy_ViewEdge *self ) { -// if( ViewEdge *fe = self->ve->previousEdge() ) -// return BPy_ViewEdge_from_ViewEdge( *fe ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_isSmooth( BPy_ViewEdge *self ) { -// return PyBool_from_bool( self->ve->isSmooth() ); -// } -// -// PyObject *ViewEdge_setVertexA( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_sv; -// -// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { -// cout << "ERROR: ViewEdge_setVertexA" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setVertexA( ((BPy_SVertex *) py_sv)->sv ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setVertexB( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_sv; -// -// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { -// cout << "ERROR: ViewEdge_setVertexB" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setVertexB( ((BPy_SVertex *) py_sv)->sv ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setId( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_id; -// -// if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { -// cout << "ERROR: ViewEdge_setId" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setId(*( ((BPy_Id *) py_id)->id )); -// -// Py_RETURN_NONE; -// } -// -// -// PyObject *ViewEdge_setNextEdge( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_fe; -// -// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) { -// cout << "ERROR: ViewEdge_setNextEdge" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setNextEdge( ((BPy_ViewEdge *) py_fe)->ve ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setPreviousEdge( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_fe; -// -// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) { -// cout << "ERROR: ViewEdge_setPreviousEdge" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setPreviousEdge( ((BPy_ViewEdge *) py_fe)->ve ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setSmooth( BPy_ViewEdge *self , PyObject *args) { -// int b; -// -// if(!( PyArg_ParseTuple(args, "i", &b) )) { -// cout << "ERROR: ViewEdge_setSmooth" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setSmooth( (bool) b ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ) { -// PyObject *py_n; -// -// if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { -// cout << "ERROR: ViewEdge_setNature" << endl; -// Py_RETURN_NONE; -// } -// -// PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); -// ((ViewEdge *) self->py_if1D.if1D)->setNature( PyInt_AsLong(i) ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_getVertices( BPy_ViewEdge *self ) { -// PyObject *py_vertices = PyList_New(NULL); -// -// for( Interface0DIterator it = self->ve->verticesBegin(); it != self->ve->verticesEnd(); it++ ) { -// PyList_Append( py_vertices, BPy_Interface0D_from_Interface0D( *it ) ); -// } -// -// return py_vertices; -// } -// -// PyObject *ViewEdge_getPoints( BPy_ViewEdge *self ) { -// PyObject *py_points = PyList_New(NULL); -// -// for( Interface0DIterator it = self->ve->pointsBegin(); it != self->ve->pointsEnd(); it++ ) { -// PyList_Append( py_points, BPy_Interface0D_from_Interface0D( *it ) ); -// } -// -// return py_points; -// } -// -// -// -// -// -// FEdge * fedgeA () -// FEdge * fedgeB () -// ViewShape * viewShape () -// ViewShape * aShape () -// bool isClosed () -// unsigned getChainingTimeStamp () -// void SetA (ViewVertex *iA) -// void SetB (ViewVertex *iB) -// void SetNature (Nature::EdgeNature iNature) -// void SetFEdgeA (FEdge *iFEdge) -// void SetFEdgeB (FEdge *iFEdge) -// void SetShape (ViewShape *iVShape) -// void SetId (const Id &id) -// void UpdateFEdges () -// void SetaShape (ViewShape *iShape) -// void SetQI (int qi) -// void setChainingTimeStamp (unsigned ts) -// real getLength2D () const -// virtual Interface0DIterator verticesBegin () -// virtual Interface0DIterator verticesEnd () -// virtual Interface0DIterator pointsBegin (float t=0.f) -// virtual Interface0DIterator pointsEnd (float t=0.f) +PyObject * ViewEdge_isClosed( BPy_ViewEdge *self ) { + return PyBool_from_bool( self->ve->isClosed() ); +} + +PyObject * ViewEdge_getChainingTimeStamp( BPy_ViewEdge *self ) { + return PyInt_FromLong( self->ve->getChainingTimeStamp() ); +} + +PyObject * ViewEdge_setChainingTimeStamp( BPy_ViewEdge *self, PyObject *args) { + int timestamp = 0 ; + + if( !PyArg_ParseTuple(args, "i", ×tamp) ) { + cout << "ERROR: ViewEdge_setChainingTimeStamp" << endl; + Py_RETURN_NONE; + } + + self->ve->setChainingTimeStamp( timestamp ); + + Py_RETURN_NONE; +} + +PyObject *ViewEdge_setA( BPy_ViewEdge *self , PyObject *args) { + PyObject *py_vv; + + if(!( PyArg_ParseTuple(args, "O", &py_vv) && BPy_ViewVertex_Check(py_vv) )) { + cout << "ERROR: ViewEdge_setA" << endl; + Py_RETURN_NONE; + } + + self->ve->setA( ((BPy_ViewVertex *) py_vv)->vv ); + + Py_RETURN_NONE; +} + +PyObject *ViewEdge_setB( BPy_ViewEdge *self , PyObject *args) { + PyObject *py_vv; + + if(!( PyArg_ParseTuple(args, "O", &py_vv) && BPy_ViewVertex_Check(py_vv) )) { + cout << "ERROR: ViewEdge_setB" << endl; + Py_RETURN_NONE; + } + + self->ve->setB( ((BPy_ViewVertex *) py_vv)->vv ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_n; + + if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { + cout << "ERROR: ViewEdge_setNature" << endl; + Py_RETURN_NONE; + } + + PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); + self->ve->setNature( PyInt_AsLong(i) ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setFEdgeA( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_fe; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: ViewEdge_setFEdgeA" << endl; + Py_RETURN_NONE; + } + + self->ve->setFEdgeA( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setFEdgeB( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_fe; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: ViewEdge_setFEdgeB" << endl; + Py_RETURN_NONE; + } + + self->ve->setFEdgeB( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setShape( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_vs; + + if(!( PyArg_ParseTuple(args, "O", &py_vs) && BPy_ViewShape_Check(py_vs) )) { + cout << "ERROR: ViewEdge_setShape" << endl; + Py_RETURN_NONE; + } + + self->ve->setShape( ((BPy_ViewShape *) py_vs)->vs ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setId( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_id; + + if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { + cout << "ERROR: ViewEdge_setId" << endl; + Py_RETURN_NONE; + } + + Id id(*( ((BPy_Id *) py_id)->id )); + self->ve->setId( id ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_UpdateFEdges( BPy_ViewEdge *self ) { + self->ve->UpdateFEdges(); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setaShape( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_vs; + + if(!( PyArg_ParseTuple(args, "O", &py_vs) && BPy_ViewShape_Check(py_vs) )) { + cout << "ERROR: ViewEdge_setaShape" << endl; + Py_RETURN_NONE; + } + + ViewShape *vs = ((BPy_ViewShape *) py_vs)->vs; + self->ve->setaShape( vs ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setQI( BPy_ViewEdge *self, PyObject *args ) { + int qi; + + if(!( PyArg_ParseTuple(args, "i", &qi) )) { + cout << "ERROR: ViewEdge_setQI" << endl; + Py_RETURN_NONE; + } + + self->ve->setQI( qi ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_verticesBegin( BPy_ViewEdge *self ) { + Interface0DIterator if0D_it( self->ve->verticesBegin() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * ViewEdge_verticesEnd( BPy_ViewEdge *self ) { + Interface0DIterator if0D_it( self->ve->verticesEnd() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * ViewEdge_pointsBegin( BPy_ViewEdge *self, PyObject *args ) { + float f = 0; + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: ViewEdge_pointsBegin" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->ve->pointsBegin(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: ViewEdge_pointsEnd" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->ve->pointsEnd(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} /////////////////////////////////////////////////////////////////////////////////////////// |