Commit 5d0ff355 authored by wmayer's avatar wmayer
Browse files

Apply fix for #0001013 and SketchObjectPy::fillet() from master

parent ec7636d7
......@@ -197,6 +197,8 @@ const TopoDS_Face SketchBased::getSupportFace() const {
Part::Feature* SketchBased::getSupport() const {
// get the support of the Sketch if any
if (!Sketch.getValue())
return 0;
App::DocumentObject* SupportLink = static_cast<Part::Part2DObject*>(Sketch.getValue())->Support.getValue();
Part::Feature* SupportObject = NULL;
if (SupportLink && SupportLink->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
......
......@@ -284,10 +284,11 @@ PyObject* SketchObjectPy::fillet(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
// Point, radius
Py_Return;
}
PyErr_Clear();
PyErr_Clear();
// Point, radius
if (PyArg_ParseTuple(args, "iid|i", &geoId1, &posId1, &radius, &trim)) {
if (this->getSketchObjectPtr()->fillet(geoId1, (Sketcher::PointPos) posId1, radius, trim?true:false)) {
std::stringstream str;
......@@ -295,8 +296,13 @@ PyObject* SketchObjectPy::fillet(PyObject *args)
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
Py_Return;
}
Py_Return;
PyErr_SetString(PyExc_TypeError, "fillet() method accepts:\n"
"-- int,int,Vector,Vector,float,[int]\n"
"-- int,int,float,[int]\n");
return 0;
}
PyObject* SketchObjectPy::trim(PyObject *args)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment