As a side-effect also prevents a segfault possible by providing just 3 points.
[Sketcher] Clarify that mults might not be followed
Some examples when this may be ignored include:
1. A number higher than 3 is given (because cubic B-splines are created)
2. If the knots just before and just after have multiplicities >=3, the piece
between these two is fully continuous, and this (middles) point will only be
constrained with point-on-object.
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
Some parts of `DrawSketchHandlerBSplineByInterpolation` were taken from
`DrawSketchHandlerBSpline` but not modified to reflect the differences.
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
Specifically, when drawing by interpolation, only cubic splines are currently
supported.
Some related "TODO" comments are also removed or modified.
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
Only creates 1-degree splines by describing knots.
This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
================================================
This should fix this (I cannot reproduce it):
https://forum.freecad.org/viewtopic.php?p=667579#p667579
Lately I added the geometry pointer to the item. This has indeed
the potential for an already deleted pointer being accessed.
This PR removes the geometry pointer from the item and relies on the
ViewProvider to indirectly access an updated pointer.
====================================================================================
As reported:
https://forum.freecad.org/viewtopic.php?p=667426#p667426
Support for moving external geometry to another layer will come in the future.
==========================================================================
- Migration of all constraints to the new non-intrusive notification framework.
- Removal of internal geometry command
- Command to create manually internal geometries is removed (deprecated).
========================================================
- CriticalMessage old signal is reconverted to new notification system. This enables to remove the obsolete old system.
- An example of how common errors can be provided with translation support is added, so that App notifications appear
translated in the NotificationArea.
=====================================================
In a previous commit the Edit Section and its preferences where removed, however
Adrián Insaurralde realised that the setting for showing or not this section had been left behind:
https://github.com/FreeCAD/FreeCAD/pull/8716#issuecomment-1462364487
This commit just removes that settings.
=======================================
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
============================================================
This class needs quite some rework, as it is mixing model-view model and item model.
Eventually, the whole needs to be moved to a QTreeWidget for layers' implementation.
This commit:
1. Moves back implementation only class item to the cpp file.
2. Adds a contextual submenu to change the selection from one layer to another in the
naive fixed 3 layer implementation.
3. Adds checkboxes to hide geometry.
It is the minimal modification to enable a user work with the 3 layer implementation.
==================================================
Naive 3 layer implementation to enable the removal of current rendering order.
Layers is conceived to be much more powerful, when combining User Layers, which
work at structural level (conceptually grouping of geometry by the user) and visual
layers (which control the representation of parts of User layers).
However, that implementation will take quite some time and effort to get it right.
This commit enables 3 layers:
1. Normal layer (legacy one)
2. Discontinuous layer (experimental layer which discontinuous edges)
3. Hidden layer (a normal layer which is hidden)
One geometry can be added to one and only one visual layer at a given time.
So this enables to hide geometry (by assigning it to the hidden layer), which is
useful for selection when lines are overlapping, acting as a work-around for the
rendering order. It also allows to rework the rendering order (without the user
being affected), which is also necessary for the final visual layers implementation.