Previously they were in `draftobjects`, but since they
don't define new objects, just create objects,
they are moved to `draftmake`.
Also ajust the `CMakeLists.txt` and the corresponding Gui Commands
which use these make functions.
These functions internally use the `Draft.makeArray` function.
We will put comments as reminders so that when this function
is moved to its own module, we can update the derived functions.
Also make various improvements in style, PEP8, return value
is now a tuple of lists instead of a list of lists.
Delay the import of other modules like `Part` and `DraftGeomUtils`
using the `LazyLoader` class.
Update the Gui Command as well.
The maximum button size was too small to fit the icon
together with the text, if the text size was large.
Also added more tooltips to all widgets of the editor.
Introduced in 1b887fa0f5, 4555a77663, 5b3fea59e0.
Make it PEP8 compliant, and shorten line lengths.
It is based on `GuiCommandSimplest` to inherit basic behavior
such as `IsActive` returning `True` when a document exists.
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.
Since we know how the old class looks like,
we can write code to save the value of the older properties,
and then remove them.
Then we can assign the new class, which will create new properties,
and then we can assign the old values to these.
This can be done for both the proxy object and
for the viewprovider.
Identify the previous object as `DraftFillet.Fillet`
and then use the new proxy class `draftobjects.fillet.Fillet`
and new viewprovider `view_fillet.ViewProviderFillet` on it.
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`.
In this moment the old fillet tool is `Draft_Fillet`
and the new tool is `Draft_Fillet_new`. They are imported both,
so they can both be tested from the interface.
The original code was in `DraftFillet.py` which is split
into a different modules like the rest of the workbench.
The object code is in `draftobjects`, the viewprovider
is in `draftviewproviders`, and the function to create it
is in `draftmake`.
This annotation class implements `onDocumentRestored`
in order to add the `ScaleMultiplier` property to older
`Dimension`, `Label`, and `Text` objects.
The improvements are done to `ViewProviderWire` which propagates
to many objects like Line, Wire (polyline), BSpline, BezCurve,
Fillet, etc.
The initialization of the properties is moved to a method
`_set_properties`. The properties `EndArrow`, `ArrowSize`,
`ArrowType` are created only if they do not exist.
This allows calling `ViewProviderWire(obj.ViewObject)`
to migrate an older object to this viewprovider
but without adding duplicated properties.
In particular, this is done to support the migration of the older
`Fillet` object.
The improvements are done to `ViewProviderDraft` which propagates
to the majority of the Draft objects by derived classes
like `ViewProviederWire`.
The initialization of the properties is moved to a method
`_set_properties`. The properties `Pattern` and `PatternSize`
are created only if they do not exist.
This allows calling `ViewProviderDraft(obj.ViewObject)`
to migrate an older object to this viewprovider
but without adding duplicated properties.
In particular, this is done to support the migration of the older
`Fillet` object.
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.
Otherwise the function will not work in a terminal only session
without the graphical user interface (GUI).
Also small changes for style, documentation,
and removing unused modules.
These modules provide supporting functions for dealing
with the scripted objects and Gui Commands defined
within the workbench.
If the functions do very basic tasks or are too generic,
they are more appropriate inside the `draftutils` package.
These function are imported in the main `Draft.py` module
so they form part of the public programming interface (API)
of the workbench.
Remove trailing spaces in CMakeLists.txt.
These modules provide the functions that are used to create
the scripted objects defined within the workbench.
The functions import and use the proxy classes
and viewprovider classes in `draftobjects`
and `draftviewproviders`.
These functions are imported in the main `Draft.py` module
so they form part of the public programming interface (API)
of the workbench.