Part: Wrap PyArg_ParseTupleAndKeywords
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include <Base/GeometryPyCXX.h>
|
||||
#include <Base/PyWrapParseTupleAndKeywords.h>
|
||||
#include <Base/VectorPy.h>
|
||||
|
||||
#include "HLRBRep/HLRBRep_PolyAlgoPy.h"
|
||||
@@ -85,12 +86,12 @@ PyObject* HLRBRep_PolyAlgoPy::setProjector(PyObject *args, PyObject *kwds)
|
||||
PyObject* xd = nullptr;
|
||||
double focus = std::numeric_limits<double>::quiet_NaN();
|
||||
|
||||
static char *kwlist[] = {"Origin", "ZDir", "XDir", nullptr};
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!O!O!d", kwlist,
|
||||
&Base::VectorPy::Type, &ps,
|
||||
&Base::VectorPy::Type, &zd,
|
||||
&Base::VectorPy::Type, &xd,
|
||||
&focus)) {
|
||||
static const std::array<const char *, 4> kwlist {"Origin", "ZDir", "XDir", nullptr};
|
||||
if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "|O!O!O!d", kwlist,
|
||||
&Base::VectorPy::Type, &ps,
|
||||
&Base::VectorPy::Type, &zd,
|
||||
&Base::VectorPy::Type, &xd,
|
||||
&focus)) {
|
||||
gp_Ax2 ax2;
|
||||
if (ps && zd && xd) {
|
||||
Base::Vector3d p = Py::Vector(ps,false).toVector();
|
||||
|
||||
Reference in New Issue
Block a user