The SVG icon was changed in d3ee556467 but the small XPM icon
was not modified.
Unlike other XPM icons which are used in `ViewProviderSketch.cpp`,
this `PointOnPoint` XPM icon doesn't seem to be used at all.
Nevertheless, we still update it so that the XPM matches
its corresponding SVG.
Also update the `README.md` to explain how these XPM icons
are generated.
In Python 3 `super()` can be used without an argument
in order to get the parent class, `super()`.
In Python 2 the present class must be used as an argument,
`super(ThisClass, self)`.
This commit is done to support Python 2,
as without it all Gui Command tools will be broken
and will fail to launch, even if the unit tests pass.
Also, set the `__metaclass__` variable to `type`.
This is done to turn all classes into "new style" classes
in Python 2. This is required so `super()` works correctly
in this version of Pyton.
This commit can be reverted once Python 2 support
is completely dropped, and only Python 3 compatible code
is used.
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.
The internal GuiCommand classes are renamed to `CircularArray`,
`OrthoArray`, and `PolarArray`. This is a shorter name than the
previous `GuiCommandCircularArray`, `GuiCommandOrthoArray`,
and `GuiCommandPolarArray`.
These classes are not part of the scripting interface of Draft
so we don't risk breaking previous files.
The code is kept for historical reasons, but the tool
is no longer accessible from the toolbars or menus,
as it was superseded by the three commands `Draft_OrthoArray`,
`Draft_PolarArray` and `Draft_CircularArray`.
The code is kept for historical reasons, but the tool
is no longer accessible from the toolbars or menus,
as it was superseded by the three commands `Draft_OrthoArray`,
`Draft_PolarArray` and `Draft_CircularArray`.
Also, finally the command is removed from the toolbar
as the Drawing Workbench is obsolete since v0.17.
The command is still loaded and defined by the workbench
but it is no longer presented to the user interface in the menu
or toolbar.
The scale operation can be used with subelements, vertices
and edges, but in this case this only works with polylines
(wires) because internally the functions `scaleVertex`
and `scaleEdges` only work with polylines that have a `Points`
property.
When doing a copy and scale, it also calls `copyScaledEdges`
which calls `joinWires`, so problems with joining wires
may also be present when performing this operation.
Occasionally it fails to join lines even if the lines
visually share a point.
This is a rounding error in the comparison of the shared point;
a small distance will result in the points being considered
different and thus the lines not joining.
The solution is to test properly the two points using
`DraftVecUtils.equals` which considers the value of
the `precision` set in the Draft preferences.