If a project contains an unknown geometry extension then the attempt to create it returns a null pointer which isn't checked and causes a segmentation fault.
See also forum: https://forum.freecad.org/viewtopic.php?t=81091
When `v == u` we want to "break" the b-spline at `u` (also OCC will raise an
exception if same parameter is provided).
The range of parameter can in general be different than 1.0, so use a general term.
* Maybe you meant to call Primitive::onChanged() instead [-Wclazy-skipped-base-method]
* Maybe you meant to call Primitive::mustExecute() instead [-Wclazy-skipped-base-method]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Use multi-arg instead [-Wclazy-qstring-arg]
* Use midRef() instead [-Wclazy-qstring-ref]
=============================================================================================
Use the geometry specific D0 to calculate value at parameter point.
================================================
If during assignment of weights (during the for loop iteratively setting the poles) all weights
become (temporarily) equal even though weights does not have equal values
OCCT will convert all the weights (the already assigned and those not yet assigned)
to 1.0 (nonrational b-splines have 1.0 weights). This may lead to the assignment of wrong
of weight values.
The work-around is to temporarily set the last weight to be assigned to a value different from
the current value and the to-be-assigned value for the weight at position last-to-be-assign but one.
Fixes:
https://forum.freecadweb.org/viewtopic.php?p=478701#p478702
==================================================================
GeometryExtension was originally designed to be serializable (save/restore). However,
GeometryMigrationExtension and ViewProviderSketchGeometryExtension have demonstrated the
usefulness of runtime-only GeometryExtensions.
The problem with runtime-only extensions being of a serializable type (GeometryExtension before
this commit) arises when Part::Geometry is to serialize the extensions and serialise the number
of extensions the geometry has. If runtime-only GeometryExtensions do not save a tag, then the
restore mechanism will expect more extensions that are actually in the XML file.
This commit makes GeometryExtension by default not serializable and deriving directly from
Base::BaseClass. A new class GeometryPersistentExtension is created, deriving from GeometryExtension
to provide serialisation. All Extensions requiring serialization derive from GeometryPersistentExtension
and those not requiring it from GeometryExtension directly.
This commit adapts all extensions to the new situation:
Part: GeometryDefaultExtension
Part: GeometryMigrationExtension
Sketcher: ViewProvierSketchGeometryExtension
Sketcher: SketchGeometryExtension and ExternalGeometryExtension