* Removed outdated UTF8 declaration
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Draft Label ViewObject.Justification property was overriden by Object.StraightDistance property. The Justification in the 3D view was reset after recompute. This commit fixes the problem by setting Object.StraightDistance automatically when ViewObject.Justification is changed and vice versa. Also fixes the frame position when Justification is Center.
Some error messages would only work if objects were supplied as strings. These would fail if objects were passed (as objects) that had already been deleted.
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
This includes `make_arc_3points`, `make_array`, `make_bezcurve`,
`make_block`, `make_bspline`, `make_circle`, `make_circulararray`,
`make_clone`, `make_copy`, `make_dimension`, `make_drawingview`,
`make_ellipse`, `make_facebinder`, `make_fillet`, `make_label`,
`make_line`, `make_orthoarray`, `make_patharray`, `make_point`,
`make_pointarray`, `make_polararray`, `make_polygon`,
`make_rectangle`, `make_shape2dview`, `make_shapestring`,
`make_sketch`, `make_text`, `make_wire`, `make_wpproxy`.
These are added to the `draftmake` Doxygen group
so that the functions contained in each module are listed
appropriately in the automatically generated documentation.
Before, the `make_label` function had a `target` parameter
that had to be a `LinkSub`, `[Part::Feature, "Edge1"]`.
However, it is easier to pass the individual components
separately using two parameters, `target_object` and `subelements`,
which can then be assembled into `[target_object, subelements]`.
The second element is optional, so it can be set to `None`,
and then the second element will be converted to an empty list,
`[target_object, []]`, as required by the Label's underlying `Target`
property.
Also perform several improvements such as PEP8 cleanup,
writing complete docstrings, type checking the input arguments,
and deprecating the older call.
Update `Draft.py`, the Gui Command, the unit test, and test script
as well.