Some fixes of pr 538
fix -Wreturn-type homogenous naming style use official spelling of B-spline
This commit is contained in:
@@ -964,6 +964,7 @@ PyObject* SketchObjectPy::changeConstraintsLocking(PyObject *args)
|
||||
return Py::new_reference_to(Py::Int(naff));
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
PyObject* SketchObjectPy::ExposeInternalGeometry(PyObject *args)
|
||||
{
|
||||
int GeoId;
|
||||
@@ -971,7 +972,7 @@ PyObject* SketchObjectPy::ExposeInternalGeometry(PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "i", &GeoId))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->ExposeInternalGeometry(GeoId)==-1) {
|
||||
if (this->getSketchObjectPtr()->exposeInternalGeometry(GeoId)==-1) {
|
||||
std::stringstream str;
|
||||
str << "Object does not support internal geometry: " << GeoId;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
@@ -981,6 +982,7 @@ PyObject* SketchObjectPy::ExposeInternalGeometry(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
PyObject* SketchObjectPy::DeleteUnusedInternalGeometry(PyObject *args)
|
||||
{
|
||||
int GeoId;
|
||||
@@ -988,7 +990,7 @@ PyObject* SketchObjectPy::DeleteUnusedInternalGeometry(PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "i", &GeoId))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->DeleteUnusedInternalGeometry(GeoId)==-1) {
|
||||
if (this->getSketchObjectPtr()->deleteUnusedInternalGeometry(GeoId)==-1) {
|
||||
std::stringstream str;
|
||||
str << "Object does not support internal geometry: " << GeoId;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
@@ -998,14 +1000,48 @@ PyObject* SketchObjectPy::DeleteUnusedInternalGeometry(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::ConvertToNURBS(PyObject *args)
|
||||
PyObject* SketchObjectPy::exposeInternalGeometry(PyObject *args)
|
||||
{
|
||||
int GeoId;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "i", &GeoId))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->ConvertToNURBS(GeoId)==false) {
|
||||
if (this->getSketchObjectPtr()->exposeInternalGeometry(GeoId)==-1) {
|
||||
std::stringstream str;
|
||||
str << "Object does not support internal geometry: " << GeoId;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::deleteUnusedInternalGeometry(PyObject *args)
|
||||
{
|
||||
int GeoId;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "i", &GeoId))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->deleteUnusedInternalGeometry(GeoId)==-1) {
|
||||
std::stringstream str;
|
||||
str << "Object does not support internal geometry: " << GeoId;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::convertToNURBS(PyObject *args)
|
||||
{
|
||||
int GeoId;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "i", &GeoId))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->convertToNURBS(GeoId)==false) {
|
||||
std::stringstream str;
|
||||
str << "Object does not support NURBS conversion: " << GeoId;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
@@ -1015,7 +1051,7 @@ PyObject* SketchObjectPy::ConvertToNURBS(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* SketchObjectPy::IncreaseBSplineDegree(PyObject *args)
|
||||
PyObject* SketchObjectPy::increaseBSplineDegree(PyObject *args)
|
||||
{
|
||||
int GeoId;
|
||||
int incr = 1;
|
||||
@@ -1023,7 +1059,7 @@ PyObject* SketchObjectPy::IncreaseBSplineDegree(PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "i|i", &GeoId, &incr))
|
||||
return 0;
|
||||
|
||||
if (this->getSketchObjectPtr()->IncreaseBSplineDegree(GeoId, incr)==false) {
|
||||
if (this->getSketchObjectPtr()->increaseBSplineDegree(GeoId, incr)==false) {
|
||||
std::stringstream str;
|
||||
str << "Degree increase failed for: " << GeoId;
|
||||
PyErr_SetString(PyExc_ValueError, str.str().c_str());
|
||||
|
||||
Reference in New Issue
Block a user