While gears without a root fillet may have limited real-live use cases,
during number-input it happens regulary to have a zero fillet radius as
intermediate state. With this commit such a situation is now handled
gracefully.
Coverity CID 350580: Uninitialized scalar variable. The analyzer doesn't like the incomplete construction of the ConstraintId object (the 'Type' field was uninitialized).
==========================================
Extend ViewProviderGridExtension so that it is aware of the absolute direction of the XY plane on which the grid is to be drawn.
Fix the calculation of the cam origin.
Sketcher/Grid: fix algorithm computing the automatic grid spacing
Sketcher/Grid: forcefully redraw grid when one of its parameter is changed
Sketcher/Grid: always authorize user to change grid spacing, even if 'auto spacing' is enabled
Sketcher/Grid: apply a default factor of 10 for 'auto spacing' if number of subdivision is 1
===============================================
Removal of ViewProviderGridExtension properties:
-GridStyle
-GridSnap
Improvement of ViewProviderGridExtension API:
- color via App::Color
Toolbar grid command:
- Conversion of Snapping to edit parameter
- Snap gets a class enum to support future Snapping functionalities as edit parameter
Sketcher Settings:
- Removal of snap preference
Behaviour:
- ShowGrid, GridAuto, GridSize preferences do not change any existing VP. They apply to any newly created sketch.
- Do not limit grid to hardcoded values
Snap to grid:
- Code updated to use closestpoint functionality provided by the extension,
Several other fixes
==================================
- Move all grid specific code out of ViewProviderSketch and EditModeCoinManager.
- The code in made into a new extension in Part - ViewProviderGridExtension
- ViewProviderSketch starts deriving from this new extension
- ViewProviderSketch configures the extension according to its Grid preferences
- Grid code refactored to remove hardcoded sketcher preference parameters.
- ViewProviderGridExtension handles property name/type changes within its competence.
==============================
Fix unresolved issues:
https://github.com/FreeCAD/FreeCAD/pull/7754/files#r1025493443https://github.com/FreeCAD/FreeCAD/pull/7754/files#r1019077589https://github.com/FreeCAD/FreeCAD/pull/7754/files#r1025502204
Summary:
- EventFilter unnecessary in light of new implemented signal aboutToshow. The data of the drop-down action is updated only when necessary (when it is going to be shown).
- Structure of individual commands under drop-down simplified to a single action, rendering the need for groupcommands obsolete, while keeping all the grid related controls and
the logic for controlling the grid in a single action class.
- Reduce the complexity and overload of isActive to the bare minimum (determining if it is active and updating the icon to the right icon if so).
Refactor:
- Better name for utils functions, as when a DSH is active, the edit mode VPSketch is a data member of DSH, sketchgui (so this function is not really necessary when the DSH is active).