SurfaceOfExtrusion: use uIso and vIso methods of parent class
This commit is contained in:
@@ -151,88 +151,6 @@ void SurfaceOfExtrusionPy::setBasisCurve(Py::Object arg)
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* SurfaceOfExtrusionPy::uIso(PyObject * args)
|
||||
{
|
||||
double v;
|
||||
if (!PyArg_ParseTuple(args, "d", &v))
|
||||
return 0;
|
||||
|
||||
try {
|
||||
Handle(Geom_Surface) surf = Handle(Geom_Surface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
Handle(Geom_Curve) c = surf->UIso(v);
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
|
||||
Handle(Geom_TrimmedCurve) aCurve = Handle(Geom_TrimmedCurve)::DownCast(c);
|
||||
return new GeometryCurvePy(new GeomTrimmedCurve(aCurve));
|
||||
}
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
|
||||
Handle(Geom_BezierCurve) aCurve = Handle(Geom_BezierCurve)::DownCast(c);
|
||||
return new BezierCurvePy(new GeomBezierCurve(aCurve));
|
||||
}
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_BSplineCurve))) {
|
||||
Handle(Geom_BSplineCurve) aCurve = Handle(Geom_BSplineCurve)::DownCast(c);
|
||||
return new BSplineCurvePy(new GeomBSplineCurve(aCurve));
|
||||
}
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_Line))) {
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast(c);
|
||||
GeomLine* line = new GeomLine();
|
||||
Handle(Geom_Line) this_line = Handle(Geom_Line)::DownCast
|
||||
(line->handle());
|
||||
this_line->SetLin(aLine->Lin());
|
||||
return new LinePy(line);
|
||||
}
|
||||
PyErr_Format(PyExc_NotImplementedError, "Iso curve is of type '%s'",
|
||||
c->DynamicType()->Name());
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* SurfaceOfExtrusionPy::vIso(PyObject * args)
|
||||
{
|
||||
double v;
|
||||
if (!PyArg_ParseTuple(args, "d", &v))
|
||||
return 0;
|
||||
|
||||
try {
|
||||
Handle(Geom_Surface) surf = Handle(Geom_Surface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
Handle(Geom_Curve) c = surf->VIso(v);
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
|
||||
Handle(Geom_TrimmedCurve) aCurve = Handle(Geom_TrimmedCurve)::DownCast(c);
|
||||
return new GeometryCurvePy(new GeomTrimmedCurve(aCurve));
|
||||
}
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
|
||||
Handle(Geom_BezierCurve) aCurve = Handle(Geom_BezierCurve)::DownCast(c);
|
||||
return new BezierCurvePy(new GeomBezierCurve(aCurve));
|
||||
}
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_BSplineCurve))) {
|
||||
Handle(Geom_BSplineCurve) aCurve = Handle(Geom_BSplineCurve)::DownCast(c);
|
||||
return new BSplineCurvePy(new GeomBSplineCurve(aCurve));
|
||||
}
|
||||
if (c->IsKind(STANDARD_TYPE(Geom_Line))) {
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast(c);
|
||||
GeomLine* line = new GeomLine();
|
||||
Handle(Geom_Line) this_curv = Handle(Geom_Line)::DownCast
|
||||
(line->handle());
|
||||
this_curv->SetLin(aLine->Lin());
|
||||
return new LinePy(line);
|
||||
}
|
||||
PyErr_Format(PyExc_NotImplementedError, "Iso curve is of type '%s'",
|
||||
c->DynamicType()->Name());
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
PyObject *SurfaceOfExtrusionPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user