* Add new method ExportOCAF::exportObjects() to avoid code duplication
* Simplify handling of arguments passed to Python handler
* Fix several lint warnings
* Move ImportOCAFExt to the corresponding source files
This adds G43 tool height compensation to the centroid CAM post-processor using
a similar approach to the G43 support in the MACH3 post.
Specifically, G43 is emitted at every tool change by default and a new
`--no-tlo` post argument can restore the old behaviour of no height
compensation being emitted. These both match how the MACH3 post does it.
After this PR the `Plane` class inherits from the `PlaneBase` class.
Related issue:
#5603.
Previous PR:
#10766
The following functions have been updated:
`__init__`
* `u` argument can be a WP now.
* Input vectors are copied.
* Added the `weak` argument.
* the `doc` attribute was not used and has been removed.
`__repr__`
* Inherited.
* The `position` is now also shown.
`copy`
* Uses `match` from the parent class which uses the local `_get_prop_list` function. Again vectors are copied.
`offsetToPoint`
* I could not find evidence that this function is used anywhere.
* The `direction` argument did not make a lot of sense (only worked in 2D). It is now ignored.
* Removed the overly long docstring.
* The function now uses an external function: `DraftGeomUtils.distance_to_plane`.
`projectPoint`
* The function calls `super().project_point` which in turn calls `DraftGeomUtils.project_point_on_plane`.
* `from sys import float_info` is no longer required.
`projectPointOld`
* Obsolete and removed.
`align*`
* All align* functions now have an `offset` argument.
* All align* functions return `True` or `False`.
`alignToPointAndAxis`
* The function ignored `upvec` if `axis` was parallel to the global X axis. This meant that the "Set WP" button of the Draft_Wire command did not work properly if the WP was aligned with the Right or Left view.
* The function calls `align_to_point_and_axis` which determines the rotation with `FreeCAD.Rotation(Vector(), upvec, axis, "ZYX")`.
`alignToPointAndAxis_SVG`
* The function calls `super().align_to_point_and_axis_svg` which contains the code from the old function.
`alignToCurve`
* Was not implemented.
`alignToEdges`
* Original code required two parallel edges (for example from an axis system), else the `u` and `v` vectors would not be perpendicular.
* The function calls `super().align_to_edges_vertexes` now.
`alignToFace`
* The function now uses an external function: `DraftGeomUtils.placement_from_face`. The rotation algorithm for the `u` and `v` vectors has been moved there.
`alignTo3Points`
* Basically unchanged. `Part` is already imported at the top of the file.
`alignToSelection`
* Basically unchanged. Will be replaced in the `PlaneGui` class.