diff --git a/src/Mod/Part/App/GeometrySurfacePy.xml b/src/Mod/Part/App/GeometrySurfacePy.xml index a15a2d63fd..c4378cb449 100644 --- a/src/Mod/Part/App/GeometrySurfacePy.xml +++ b/src/Mod/Part/App/GeometrySurfacePy.xml @@ -176,14 +176,15 @@ of the nearest orthogonal projection of the point. Returns a B-Spline representation of this surface. -The required arguments are: -* tolerance -* continuity in u (as string e.g. C0, G0, G1, C1, G2, C3, CN) -* continuity in v (as string e.g. C0, G0, G1, C1, G2, C3, CN) -* maximum degree in u -* maximum degree in v -* maximum number of segments -* precision code (optional, default=0) + The optional arguments are: + * tolerance (default=1e-7) + * continuity in u (as string e.g. C0, G0, G1, C1, G2, C3, CN) (default='C1') + * continuity in v (as string e.g. C0, G0, G1, C1, G2, C3, CN) (default='C1') + * maximum degree in u (default=25) + * maximum degree in v (default=25) + * maximum number of segments (default=1000) + * precision code (default=0) + Will raise an exception if surface is infinite in U or V (like planes, cones or cylinders) diff --git a/src/Mod/Part/App/GeometrySurfacePyImp.cpp b/src/Mod/Part/App/GeometrySurfacePyImp.cpp index 8caa982058..eac5e656bf 100644 --- a/src/Mod/Part/App/GeometrySurfacePyImp.cpp +++ b/src/Mod/Part/App/GeometrySurfacePyImp.cpp @@ -708,8 +708,10 @@ Py::String GeometrySurfacePy::getContinuity(void) const PyObject* GeometrySurfacePy::toBSpline(PyObject * args) { double tol3d=Precision::Confusion(); - char *ucont="G2", *vcont="G2"; - int maxDegU=25,maxDegV=25,maxSegm=1e5,prec=0; + char *ucont="C1", *vcont="C1"; + // 25 = Geom_BSplineSurface.MaxDegree() + int maxDegU=25, maxDegV=25; + int maxSegm=1000, prec=0; if (!PyArg_ParseTuple(args, "|dssiiii",&tol3d,&ucont,&vcont, &maxDegU,&maxDegV,&maxSegm,&prec)) return 0;