Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).
Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
* [TD]Cosmetic geometry and tools update
- all cosmetics to store geometry in same form
- all cosmetics to survive scaling and rotation
- extension functions to survive scaling and rotation
* [TD]overhaul leader point storage and editing
- add py routine makeLeader(points)
* [TD]add leader conversion utility
* [TD]Set Leader RotateWithView default to true
* [TD]fix intersection vertex position
* [TD]add CosmeticEdge::makeLineFromCanonicalPoints
* [TD]fix 2 Extension tools
- positioning in DrawCosmeticCircle
- mishandling of points in execLineParallelPerpendicular
* [TD]Remove duplicate constexpr
* [TD]fix 2x Cosmetic arc tools
* [TD]refactor LineFormat out of Cosmetic
* [TD]move cosmetic appearance settings to LineFormat
* [TD]remove 2 unused methods
* [TD]apply format to blue line & circle tools
* [TD]fix ballon arrowhead does not rotate with view
* [TD]fix CosmeticCircle3Points
* [TD]allow multiple cosmetic object deletions
* [TD]fix extend/shorten centerline
the PR fixes the following things:
- change the way centerlines between 2 lines are calculated. The current implementation leads to many bugs and even crashes (e.g. when the 2 selected lines are parallel ones of a square). There are different forum threads from the last 1.5 years.
The new endpoint line sorting is the one described here: https://forum.freecadweb.org/viewtopic.php?f=35&start=20&t=44255&sid=989a668890f954c13ef81e4a04ee6912#p501179
- as consequence the erroneous and misleading line end flipping can go and is removed (only used internally)
- when creating a new centerline, you see it immediately
- when creating a new or editing an existing centerline and press Cancel, the creation/editing is aborted
- fix crash when the 2 selected lines are bot horizontal and one tries to create a vertical centerline
- fix crash when changing the orientation of an existing centerline and the result would be invalid
- cleanup the code a bit
At the moment one has to specify the LineGroup as string. But one doesn't know what groups exist. So one has to check the Wiki, learn there where the groups are defined and then open the definition file with a text editor.
This PR simplifies this by reading the existing groups out of the definition file and fill the combobox accordingly.
It also give the user info what the selected LineGroup defines via the tooltip.
A nice side effect is that no typos can occur since you don't have to enter the LineGroup name as text.
- merge the flip Ends option to the main dialog
- use a QuantitySpinBox with angular unit for the angle
- store the state of the flipping correctly
- cleanup UI of dialog to avoid vertical whitespace