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`.
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.
Add DraftObject and ViewProviderDraft to serve as
the parent classes of all Draft objects
and all Draft view providers.
Inside `Draft.py` we need to import
`_DraftObject` from `draftobjects.base`;
and `_ViewProviderDraft`, `_ViewProviderDraftAlt`,
and `_ViewProviderDraftPart` from `draftviewproviders.view_base`.
.
.
.
.
These view providers are not currently in use, the files are just
there for reference, to show how they would be used in the future.
The `super()` instruction is not made compatible with Python 2
because this code won't run with Python 2 anyway.
- corrected super() methods to be Py2 compatible
- further cleanup of the code.
further cleanup
changed again to avoid super method
updated super() functions
updated to correct the parent classess targeted by super()
still have to split viewprovider from object.
[Draft] Dimension Style code cleanup
thx @vocx-fc for reviewing
further cleanup
[Draft] Dimension Style improvements
Added a property to the dimension object to link the dimension style.
Improved the update of dimensions when style changes. This can be done in 2 different ways: by setting AutoUpdate property to True or by activating Update function from the viewprovider context menu.
It replaces the older `Draft_Array` command, and provides
a task panel to select the properties, similar to the
`Draft_PolarArray` and `Draft_CircularArray` commands.
It can also create `App::Links` directly from this task
panel, so it also replaces the `Draft_LinkArray`
introduced by the LinkMerge.