Part: Geometry tangent with Vector3d overload

This commit is contained in:
Abdullah Tahiri
2018-11-03 19:53:33 +01:00
committed by Yorik van Havre
parent f202961a6c
commit 3e85954f6d
2 changed files with 15 additions and 1 deletions

View File

@@ -394,6 +394,19 @@ bool GeomCurve::tangent(double u, gp_Dir& dir) const
return false;
}
bool GeomCurve::tangent(double u, Base::Vector3d& dir) const
{
gp_Dir gdir;
if(tangent(u, gdir)) {
dir = Base::Vector3d(gdir.X(),gdir.Y(),gdir.Z());
return true;
}
return false;
}
Base::Vector3d GeomCurve::pointAtParameter(double u) const
{
Handle(Geom_Curve) c = Handle(Geom_Curve)::DownCast(handle());
@@ -427,7 +440,7 @@ Base::Vector3d GeomCurve::secondDerivativeAtParameter(double u) const
bool GeomCurve::normalAt(double u, Base::Vector3d& dir) const
{
Handle(Geom_Curve) c = Handle(Geom_Curve)::DownCast(handle());
try {
if (!c.IsNull()) {
GeomLProp_CLProps prop(c,u,2,Precision::Confusion());