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.
Also fix an error in determining the objects of type group.
Also call `finish` to properly terminate the command,
otherwise it stays active and behaves incorrectly.
Also import `DraftGeomUtils` where necessary.
These modules were previously imported globaly when the base
`DraftTool` class was first called by the individual tools
through the `Creator` and `Modifier` classes.
However, since `DraftTool` was moved to a separate module,
these `Part` and `DraftGeomUtils` modules are no longer
in the `DraftTools` namespace, and therefore they
cannot be imported globally anymore.
Now the `Part` and `DraftGeomUtils` modules are imported
in the specific functions where they are actually needed.
This is the base class of most Draft Gui Commands,
particularly those which were developed a long time ago.
It is inherited by `Creator` and `Modifier`
to set some specific options for some tools.
Newer Gui Commands do not use these classes and thus
are independent of `DraftTool`.
Nevertheless, in the future we expect to organize further
the commands so that they all derive from a few classes,
so that they all share some common properties and behaviors.
These small functions and utilities are placed in another
module, so they can be imported and called
by the individual Gui Command classes as necessary.
When these Gui Command classes are moved to their respective
modules, they will be able to import this auxiliary module as well.
Previously they were imported directly in `InitGui.py`,
now they are collected in `DraftTools.py`, so that they
are imported at the same time as other modules.
Also provide an icon so this icon appears in the menu.