====================================================
Part of the geometry was using CADKernelError and part was using RunTimeError exceptions, so unify criteria.
Runtime is very generic and does not need to stem from OCCT.
- Also rename of a typo basic to basis, to be coherent with OCCT terminology
====================================================
The new hierarchy is as this:
GeomArcOfConic:GeomTrimmedCurve:GeomBoundedCurve:GeomCurve
A bounded curve is one having a start and endpoint, like an arc, a line segment, or a b-spline
A trimmed curve is one arising from trimming a basis curve, line an arc or a line segment, but NOT a b-spline.
An arc of Conic is one arising from a conic section, line an arc, but neither a line segment, nor a b-spline.
This new hierarchy enables a more consistent handling of geometry and it is closer to the OCCT hierarchy.
===============================================
Extrema algorithms sometimes fails when coincident endpoints
I am not sure if it is a bug in OCCT or it is just not intended.
This commits adds an extra check to add endpoints if within tolerance.
https://forum.freecadweb.org/viewtopic.php?f=10&t=31700
=======================================
routine for closest parameter to point was failing on endpoints. The former version
used the parameter of the basis curve, which sometimes was giving parameter values
incoherent. This version uses distance to endpoints when a projection on the trimmed
curve can not be found.
======================================
Added for curves:
getFirstParameter
getLastParameter
curvatureAt
length
Modified:
normalAt(double u, Base::Vector3d& dir)
as it was not working properly.
===========================
It stores a rational BSpline even if non-rational.
It should be extended to store in addition whether it is periodic or not, i.e. to support periodic BSplines.
==============================================================
1) Basic set/get interface for poles, weights, knots and multiplicities
2) Introduction of GeomBoundedCurve class replicating OCC hierarchy. Why? To provide seamless start/end point interface for any bounded curve, i.e. Bezier, BSpline,
Note: The ArcOfConic start/end point interface relies on GeomTrimmedCurve, and introduces CCW/CW correcting code which relies on Axis. Axis are introduced in GeomConic and are
not part of GeomBounded.
Note 2: In the future, it may be thought to make GeomArcOfConic (the equivalent of GeomTrimmedCurve) deriving from GeomBoundedCurve, as to fully replicate OCC hierarchy. GeomBoundedCurve
defines the functions as virtual to allow seamless integration.