The added functions are test_scale_part_feature_arcs, test_scale_part_feature_lines, test_scale_rectangle, test_scale_spline and test_scale_wire.
When comparing vectors and floats a tolerance of 1e-8 is used, but only for the midpoints of the arcs in test_scale_part_feature_arcs is this tolerance required. Scaling a part feature is not possible with the Draft_Scale command, but Draft.scale does support it.
Small fixes where the `get_svg` function is used, for example,
in the (obsolete) `DrawingView` class and `Arch_SectionPlane`.
Also update the unit tests accordingly.
This includes `auxiliary`, `draft_test_objects`, `test_airfoildat`,
`test_creation`, `test_dwg`, `test_dxf`, `test_import`,
`test_import_gui`, `test_import_tools`, `test_modification`,
`test_oca`, `test_pivy`, `test_svg`.
These are added to the `drafttests` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
A single `make_dimension` handles three types of dimensions,
(1) simple linear, (2) linear linked to an object, and (3) linked
to a circular edge.
So, we provide a new function, `make_radial_dimension_obj`,
to handle the third case. In this way we can check the input
parameters much better.
We adjust the `Draft_Dimension` Gui Command accordingly.
A single `make_dimension` handles three types of dimensions,
(1) simple linear, (2) linear linked to an object, and (3) linked
to a circular edge.
So, we provide two new functions, `make_linear_dimension`
and `make_linear_dimension_obj`, to handle the first two cases.
In this way we can check the input parameters much better.
We adjust the `Draft_Dimension` Gui Command accordingly.
Previously the `make_dimension` and `make_angular_dimension`
functions were in `draftobjects/dimension.py`.
Now they are moved to `draftmake/make_dimension.py`.
The original `makeAngularDimension` function requires angles
in radians which is counterintuitive for most cases. Also
the order is `[big, small]`.
The new function `make_angular_dimension` accepts angles
in degrees, and the order is `[small, big]`. The older
function is retained for compatibility purposes.
Also perform several improvements such as PEP8 cleanup,
writing complete docstrings, type checking the input arguments,
and depreacting the older call.
The `Draft.py` module, Gui Command, unit test, and test script
are updated accordingly.
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.
Test the inputs to the `make_path_array` function
and return `None` if there is a problem.
Now the make function accepts as input a `"String"` which must be
the `Label` of an object in the document, so it is easier to create
arrays quickly from the Python console.
Add the new parameters to the make function, `align_mode`,
`tan_vector`, `force_vertical`, and `vertical_vector`.
These properties were added to the proxy object in ff323ebdb5.
Add message deprecating the older call `makePathArray`.
Adjust the GuiCommand accordingly. Now it uses the commit
mechanism of the parent `Modifier` class so that the executed
functions are recorded in the Python console.
Clean up the `PathArray` class as well.
Also fix the name of certain functions.
Do not import `DraftFillet` any more as it's just kept
for compatibility purposes.
Do not test OCA nor AirfoilDAT as it's very improbable
that these formats will gain more support any time soon.
Move the docstring, set the frame as a private function,
and set `MakeFace` to `False`.
Use user's home directory to create the file. Move the order of
the parameters of the function.
Remove the make function that creates the old object,
its corresponding Gui Command, and the old `DraftFillet.Fillet`
proxy class, which now is a redirection to the new `Fillet`
class defined in `draftobjects.fillet`.
Also change the unit test, and the `draft_test_object` script
to run `Draft.make_fillet`.
Also import it in the `Draft` namespace so that is available
as `Draft.make_arc_3points`.
Use this new function in the unit test `drafttests.test_creation`,
in the GuiCommand `draftguitools.gui_arcs`, and in the
`draft_test_objects` script.
Those unit tests that are registered in `Init.py` will always run,
while those that are registerd in `InitGui.py` will only run
when the graphical interface is available.
This allows us to more clearly distinguish functions that
should be able to run always, from those that may run only
when the interfce is available.
This solves a small bug in the radial dimension
unit test introduced in 81c2896928, where a circle shape
is used before it is recomputed.
```
drafttests/test_creation.DraftCreation.test_dimension_radial
```
Previously the `makeAngularDimension` function produced
error messages in the report view due to internal rounding
of `App::PropertyAngles`.
This was fixed in `Base::Quantity`, which now supports
Python's `__round__` function.
The test script can be run by the program's executable
or run as a macro.
```
freecad draft_test_objects.py
```
It can also be used as a Python module within the program
to create a test file on demand.
```
import drafttests.draft_test_objects as dt
dt.create_test_file()
```
The produced test file will be added in a different commit
once this commit is merged.
The idea is to have a test file created by a certain
stable version of the master branch. Then as the code
continues to change and grow, this file can be opened
with future versions of the program to test for compatibility
and regressions.