If it is a linear dimension show the older icon;
if it is a radius or diameter dimension show a new icon.
These three modes use the same Proxy class
and the same viewprovider class. Depending on the linked geometry
one icon or the other will be shown.
When there are many Draft objects in the tree view
the icon can be used to tell different objects apart quickly.
One icon is used for objects that are "straight lines",
whose Proxy is of type `Line`, `Wire` or `Polyline`; another icon
for "regular geometrical" shapes of type `Rectangle` or `Polygon`;
and another icon for "curved" objects of type `Circle`,
`Ellipse`, `BSpline`, `BezCurve`, or `Fillet`.
Other objects use the older default icon.
Single returnPressed to accept point if cursor is parallel to xyz axis for bot setfocus on x and on length inputfields.
[Draft] Edit_updated tooltip
[Draft] DraftGui Further cleanup and bugfix
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.
Previously, the arc was entirely created in the GuiCommand
definition. The code to create only the arc is placed inside
a module so that the function can be used in scripting
from the terminal, without a graphical interface.
Inside the class `_DraftLink` the `onDocumentRestored` function
tests for the existence of the old attribute `useLink`. If it is
present, it uses it to define the new variable name `use_link`.
This is done use Python naming conventions.
The old `useLink` is deleted so it is not longer saved
together with the object when the document is saved.
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.
As discussed in the previous request, the icon
is saved as Plain SVG, meaning that Inkscape-specific tags
are removed. This is better for compatibility purposes
for use with other SVG editors and viewers.
The linear and radial dimensions use the same Proxy class,
but the angular dimension uses a different Proxy class.
To recognize quickly in the tree view the different
types of dimensions, we provide a new icon.
The icon is inspired on the `Draft_Dimension.svg` and
`TechDraw_AngleDimensions.svg` icons.
Also other small fixes: cleanup for getting the icon
of the workbench; we don't need to test for PySide because
it should already exist as part of the system
for the entire interface to work; cleanup of the printing
functions.
while fixing a SVG export issue for techDraw I noticed that some SVG files have program-dependent (and thus not clean) code in it. These are traces of the programs Sodipodi and Inkscape, like e.g. this line:
inkscape:export-filename="/home/yorik/PartDesign_Groove.png
This is unnecessary and FC should not use program-dependent code in the SVG but use instead plain SVG strictly following the SVG specification.
This PR transforms the few affected SVGs to a plain version.
The `Taskview` mode (value 1) is set fixed in `DraftGui.py`
even if the widget shows the other value `Toolbar` (value 0),
as this mode is unmaintained and obsolete.
At the same time, clarify the behavior with a new tooltip.
There was semantic change of the division operator ‘/’
from python2 to python3. This fix makes the circular array
work with python2 correctly.
See PEP 238