Part: Add support for reversing a geomcurve
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user