Fixes a bug where an arc, ellipse, or arc-of-ellipse, being reversed in
XY plane, behaved badly in sketcher (see forum thread "Sketch: how to
handle reversed external arcs?"
http://forum.freecadweb.org/viewtopic.php?f=10&t=9130 ).
Also fixes a problem with rotated arcs (see forum thread "Rotating Arc
in Sketcher"
http://forum.freecadweb.org/viewtopic.php?f=22&t=9145#p74262 ).
This is done by adding an emulation flag to a few methods in
Part::GeomXXX, which makes the shape to pretend being non-reversed
(CCW). This causes endpoints of reversed arcs of circles lineked as
external geometry to swap, causing broken sketches sometimes.
Part: Extension of Geometry::Curve to wrap more functions of OCC
Apart from:
bool tangent(double u, gp_Dir&) const;
that was already implemented, now it also implements:
Base::Vector3d pointAtParameter(double u) const;
Base::Vector3d firstDerivativeAtParameter(double u) const;
Base::Vector3d secondDerivativeAtParameter(double u) const;
bool normal(double u, gp_Dir& dir) const;
bool closestParameter(Base::Vector3d point, double &u);
i.e. apart from giving the tangent vector for a given curve at parameter value u,
it also gives:
- The point cartesian coordinates of the curve point at parameter value u
- The vector of the first derivative at parameter value u
- The vector of the second derivative at parameter value u
- The normal vector to the curve at parameter value u
- The parameter value of a curve closest ot a given point
Code cleanup: Changing Trim functionality of Ellipse to use OCC calculations
Part Curve functions extension: closestParameterToBasicCurve
It provides the parameter of the curve closest to a given point. If the curve is a Trimmed curve, the parameter of the basic underlaying curve closest to the point is provided.