Here, "small" means that the number of poles of the spline is so low that moving
any piece of the curve without changing shape would require moving all the
poles. In that case the rest of the algorithm in `initBSplinePieceMove()` only
complicates the matter.
===================================================================================================================
This class does not currently support all sketcher geometry and constraints, but it supports the most common types.
======================================================================================
It preserves the SketchObject properties. Therefore it does not trigger any property update, redraws, ...
===============================================================================
* SolverGeometryExtension is extended to:
- Enable to determine whether the x or the y of a point is a dependent or independent parameter
- Extend SolverExtension to provide information on individual edge parameters
- Convenience access to DoF status
* Sketch (solver interface) is extended to store geometry parameter dependency state, for these reasons:
Geometry and Constraint solver information is generated when performing a full solve() [QR decomposition + minimization(e.g. DogLeg)].
Constraint information remains in the sketch object (not SketchObject, but sketch), which is then retrieved by SketchObject.
Geometry information is incorporated to the deep copy of Geometry that the sketch object comprises. However, this information is only
available outside the sketch object, if the Geometry property of SketchObject is assigned. This is always the situation after a successful
full solve. However, it is not the case in a successful temporary minimal diagnosis (here succesful relates to conflicting/redundant constraints and
convergence).
The lightweight solution is to keep a (shallow) copy of the SolverGeometryExtensions (shared pointer) to be retrieved by GeoId, which is what is provided.
Apparently B-Spline knot insertion is challenging the sketcher update process
and spurious GUI updates sometimes occur in the intermediate step after the
knot is inserted but before the internal geometries are re-defined. This set of
comments points to a previous fix and related discussion as a suggestion.
==============================
- Constructor from const vector reference is not allowed to take ownership (as it should not delete the const pointer). The ownership parameter is removed.
- Factory method for const objects cannot either. So the ownership parameter is also removed.
=====================================
- GeometryFacade will throw when instantiated with a const Part::Geometry * that does not have a SketchGeometryExtension. It
cannot create it because it is not supposed to modify a pointer to a const object.
- Static functions will check the passed Part::Geometry * parameters and will throw if nullptr.
- GeometryTypedFacade constructor and factory methods to take owner parameter (defaulted to false) for consistency with GeometryFacade.
- The emplace style factory method will make the GeometryFacade take ownership of the emplaced Part::Geometry *. This should avoid memory leaks. The
user shall setOwner(false) if it needs to release() the underlying Part::Geometry * (to transfer ownership).
- Code comments made into doxygen documentation.
=================================================================================
Apart from simplifying code, the allocated memory is not managed by the lifetime of the unique pointer owned by the GeometryFacade, preventing memory leaks.
================================================================================
GeoEnum static members are used in constexpr in GeoListId.
Previous code worked because the static members where inside the same translation unit.
This code:
1. Declares the static members to use them as constant expressions with the value
2. Definition of the static members (odr-used) shall not contain an initializer.
When new control points are created in a b-spline in a sketch, do not constrain
their weights to be equal to the first, unless they are already equal. This way
if we have unequal weights to begin with and OCC has computed the appropriate
weights so that the new spline is closer to the original, the weights are not
disturbed.
==============================
- Improve GeoList to support GeoElementId input
- Support VertexId to GeoElementId conversion
- GeoListModel gets separate getGeometry and getGeometryFacade naked pointers
- Sketcher: GeoList - make index mappings mutable
- Improve documentation