Since not all Geometry sub-classes fully implement Save() / Restore() raising an exception instead may invalidate a project. To avoid this
PropertyGeometryList now explicitly handles NotImplementedError exceptions.
See also: https://forum.freecad.org/viewtopic.php?t=77148
=======================================
Refactor:
- Substitute the use of variadic templates with parameter packs.
- Use recently incorporated external library "fmt" to handle printf like formating.
- Extensive cleaning of pragmas and unnecessary forward declarations.
- Parameter packs and libfmt provide a much stronger type checking now, so
conversions that are by standard implicit as bool to int need an explicit static_cast
to avoid compilation warnings.
Extension:
- Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
- Include a new type of message called CriticalMessage, this message is intended to have
special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
It will be used to substitute the current signal/slot mechanism.
- Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
are already translated.
Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:
Crt = FreeCAD.Console.PrintCritical
Ntf = FreeCAD.Console.PrintNotification
Tnf = FreeCAD.Console.PrintTranslatedNotification
* If the compound contains solids then other shape types like faces or edges are ignored
* If the compound contains no solids but faces then edges are ignored
* If the compound contains no faces but edges then vertexes are ignored
==========================================
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.
- it is a well-known and often feed-backed missing feature that SectionCuttings fails for intersecting objects.
To resolve this, the objects must be put int a BooleanFragments object.
- this PR adds this functionality as option.
- since a BooleanFragments objects has a specific color, the different colors of the objects cannot be preserved. Because of this disadvantage, the BooleanFragments option will not be the default.
- this PR also modernize all for loops
Mesh generation parameters are taken from PrusaSlicer's STEP importer,
which does a just-in-time STEP->STL conversion in memory.
Resulting meshes have better geometry, but are a little larger as a result.