Part: Add support for reversing a geomcurve

This commit is contained in:
Abdullah Tahiri 2017-02-19 21:37:06 +01:00 committed by wmayer
parent 4fe4792f4d
commit f291942d45
2 changed files with 17 additions and 0 deletions

View File

@ -511,6 +511,21 @@ double GeomCurve::length(double u, double v) const
}
}
void GeomCurve::Reverse(void)
{
Handle_Geom_Curve c = Handle_Geom_Curve::DownCast(handle());
try {
if (!c.IsNull()) {
c->Reverse();
}
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
throw Base::RuntimeError(e->GetMessageString());
}
}
// -------------------------------------------------

View File

@ -146,6 +146,8 @@ public:
double curvatureAt(double u) const;
double length(double u, double v) const;
bool normalAt(double u, Base::Vector3d& dir) const;
void Reverse(void);
};
class PartExport GeomBoundedCurve : public GeomCurve