Sketcher: ConverttoNURBS python implementation
This commit is contained in:
parent
ce7e186049
commit
4abe462a41
|
@ -156,7 +156,12 @@
|
|||
<Documentation>
|
||||
<UserDocu>Deletes all unused (not further constrained) internal geometry</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</Methode>
|
||||
<Methode Name="ConvertToNURBS">
|
||||
<Documentation>
|
||||
<UserDocu>Approximates the given geometry with a B-Spline</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="calculateAngleViaPoint">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
|
|
|
@ -998,6 +998,24 @@ PyObject* SketchObjectPy::DeleteUnusedInternalGeometry(PyObject *args)
|
|||
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());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
|
||||
Py::Int SketchObjectPy::getConstraintCount(void) const
|
||||
{
|
||||
return Py::Int(this->getSketchObjectPtr()->Constraints.getSize());
|
||||
|
|
Loading…
Reference in New Issue
Block a user