Fixed python format flags "f" from float to double "d"

This commit is contained in:
jrheinlaender 2013-03-27 18:59:41 +04:30
parent fdc3e50811
commit 15573eea04
4 changed files with 9 additions and 9 deletions

View File

@ -356,7 +356,7 @@ static PyObject * offset(PyObject *self,PyObject *args)
{
double offset;
PyObject *pcObj;
if (!PyArg_ParseTuple(args, "O!f",&(TopoShapePy::Type), &pcObj,&offset ))
if (!PyArg_ParseTuple(args, "O!d",&(TopoShapePy::Type), &pcObj,&offset ))
return NULL;
TopoShapePy *pcShape = static_cast<TopoShapePy*>(pcObj); //Original-Shape wird hier übergeben

View File

@ -168,12 +168,12 @@ PROPERTY_SOURCE(Part::Line, Part::Primitive)
Line::Line()
{
ADD_PROPERTY_TYPE(X1,(0.0f),"Vertex 1 - Start",App::Prop_None,"X value of the start vertex");
ADD_PROPERTY_TYPE(Y1,(0.0f),"Vertex 1 - Start",App::Prop_None,"Y value of the Start vertex");
ADD_PROPERTY_TYPE(Z1,(0.0f),"Vertex 1 - Start",App::Prop_None,"Z value of the Start vertex");
ADD_PROPERTY_TYPE(X2,(0.0f),"Vertex 2 - Finish",App::Prop_None,"X value of the finish vertex");
ADD_PROPERTY_TYPE(Y2,(0.0f),"Vertex 2 - Finish",App::Prop_None,"Y value of the finish vertex");
ADD_PROPERTY_TYPE(Z2,(1.0f),"Vertex 2 - Finish",App::Prop_None,"Z value of the finish vertex");
ADD_PROPERTY_TYPE(X1,(0.0),"Vertex 1 - Start",App::Prop_None,"X value of the start vertex");
ADD_PROPERTY_TYPE(Y1,(0.0),"Vertex 1 - Start",App::Prop_None,"Y value of the Start vertex");
ADD_PROPERTY_TYPE(Z1,(0.0),"Vertex 1 - Start",App::Prop_None,"Z value of the Start vertex");
ADD_PROPERTY_TYPE(X2,(0.0),"Vertex 2 - Finish",App::Prop_None,"X value of the finish vertex");
ADD_PROPERTY_TYPE(Y2,(0.0),"Vertex 2 - Finish",App::Prop_None,"Y value of the finish vertex");
ADD_PROPERTY_TYPE(Z2,(1.0),"Vertex 2 - Finish",App::Prop_None,"Z value of the finish vertex");
}
Line::~Line()

View File

@ -242,7 +242,7 @@ int TopoShapeFacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyObject* TopoShapeFacePy::makeOffset(PyObject *args)
{
double dist;
if (!PyArg_ParseTuple(args, "f",&dist))
if (!PyArg_ParseTuple(args, "d",&dist))
return 0;
const TopoDS_Face& f = TopoDS::Face(getTopoShapePtr()->_Shape);

View File

@ -210,7 +210,7 @@ PyObject* TopoShapeWirePy::fixWire(PyObject *args)
PyObject* TopoShapeWirePy::makeOffset(PyObject *args)
{
double dist;
if (!PyArg_ParseTuple(args, "f",&dist))
if (!PyArg_ParseTuple(args, "d",&dist))
return 0;
const TopoDS_Wire& w = TopoDS::Wire(getTopoShapePtr()->_Shape);