=========================================================
This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched.
====================================================
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
==============================================
Generally, bounded curves require that the curves are coincident at one point, the vertex to be filleted.
Trimmed curves, like combinations of line segments, arcs of conics, do not require it, as they are able to extend the trimmed
curve using the basis curve. However, they work fine when there is such a coincidence.
====================================================
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.
It turned our that the document could not be dumped as the xml specifier was used as first element. As the dumping added the <content> element around it was invalid. However, content is required to read properties. Hence the xml element generation was moved.