Related issue:
#5603
Previous PR:
#11010
* This PR implements the new PlaneGui class for the Draft_SelectPlane command.
* As mentioned in the previous PR, almost all working plane related code has been removed from gui_selectplane.py.
* The task panel has a new button "Next" to switch to the next working plane in the history.
* Both the "Previous" and "Next" buttons are only enabled if there is a corresponding step in the history.
* PlaneGui stores a working plane per 3D view, but the other commands have to be updated before that system is fully functional.
* Code to update the toolbar when switching to a different view will be added later.
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81956
This PR basically reverts PR #10556.
The angular offset required for the Draft_Arc command is handled in the gui_arc.py file instead. Also removed the unused `urotated` variable from that file.
* Added uppercase extensions for supported formats
In the file App\Application.cpp
* Added file types in upper case
* Adds uppercase file types to the file import filter.
Fixes#10879
* Added filter for *.fcmacro *.fcscript
* Adding the Help module - fixes 10527, fixes#10512
* Aded Help to pre-commit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
===============================================
Sets the full interface between the DrawSketchHandler and a tool widget available somewhere in the UI.
Signalling is as follows:
1. On activation of the tool, DrawSketchHandler notifies the tool widget.
2. The tool widget retrieves tool information necessary for representation (type of widget, visibility, ...)
3. When the tool widget has created an appropriate widget, it notifies back a widget change.
4. The tool receives the widget handler and can now configure and interact with the widget.
Related issue:
#5603.
Previous PRs:
#10766#10838#10931
Short explanation:
* The PlaneGui class handles several GUI related aspects of the WP including a WP history.
* The `get_working_plane` function should be used to get a WP.
* Some of the code was taken from gui_selectplane.py. The intention is to remove almost all WP related code from that file. The icon, tooltip and label for the draftToolBar are also handled by PlaneGui.
* The tooltip shows extended information about the WP (position and axes vectors). An asteriks is appended to the label if the origin does not match the global origin.
* The `_update_all` function still updates FreeCAD.DraftWorkingPlane for compatibility.
* Some confusing names from the Plane class have been changed: `weak` -> `auto`, `reset` -> `set_to_auto`, `setup` -> `auto_align`.
Next step:
Implementing PlaneGui in Draft and Arch. The gui_selectplane.py file will be updated first.
* Import: Support DXF text rotation - fixes#10882
- Reads and supports text rotation in builtin DXF import
- Makes the builtin DXF import produce Draft texts instead of App::Annotations
- Extends the arguments of Draft make_text()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes#6187.
Other fixes:
* Made handling of shapes and global placement more consistent.
* Shapes without curves were also triangulated.
* Polygonal faces could have flipped normals and duplicate points.
The commit adds some new functions:
* getThumbnailDir()
Returns the path to the thumbnail directory which is a sub-directory of the Cache directory.
There is no need to always create a unique directory after each restart because it doesn't harm
if the thumbnail directoy contains deprecated files.
* createThumbnailDir()
Creates the thumbnail directoy if it doesn't exist yet.
* getSha1Hash
Helper function to compute a SHA-1 hash of a given path. If the same path is passed
then the hash value will be the same.
This way it can be avoided to create a different image file from a project file
after each restart.
* getUniquePNG
Computes the path of a PNG image file for a given project file. It's also possible
to pass an arbitrary string as argument.
* useCachedPNG
If the PNG image exists and if it's newer than the project file True is returned
and False otherwise.
The changes in detail are:
1. For a given project file it is checked if the thumbnail directory already contains
a cached image. If it's newer than the project file it will used, otherwise it will
be re-created.
2. For the system icon to a given file format it is only checked if the icon already exists.
If yes, it will be used.
Update Python tests to work with other locales
This fixes issues #10917 and #10924
Numeric values were beign compared to strings that did not take into account localizations. The test was modified to work regardless of localization.
There is still a known issue when working with pt_BR.UTF8. The default encoder for this localization is not UTF8 resulting in an error working with a parameter that returned the UTF character for the Greek letter mu in its units.
=================================================================
When in Sketcher edit mode, a tool button is activated, while the view has been changing to view of a different type, it segfaults.
This commit checks the pointer of the view to ensure correct type before activation, and refusing to activate if not of the correct type.
fixes#10809