FreeCAD: master ec5976ec

Author Committer Branch Timestamp Parent
abdullah abdullahtahiriyo master 2020-12-02 12:19:01 master 6a024968
Changeset Part: GeometryMigrationExtension classes

========================================

This is a light-weight c++ only geometry extension to enable migration of information that was stored within
the Part WB and should be migrated to another WB (for example Sketcher WB)

It is designed so that a single extension can migrate different types of data (current and future).

When new data needs to be migrated, first a new enum bit is to be added to the class enum and new data members are to
be added to store the information within GeometryMigrationExtension class.

In the Restore() function restoring the data to be migrated, a GeometryMigrationExtension extension is added to the
geometry to be migrated with the data information and the corresponding enum bit set.

In the object to receive the migration data, onDocumentRestored() it is checked whether an extension of type
GeometryMigrationExtension is present, if yes, it is checked whether a bit used for migration is set and, if yes,
the data is retrieved and the GeometryMigrationExtension extension (preferably) removed from the Geometry object.
mod - src/Mod/Part/App/AppPart.cpp Diff File
mod - src/Mod/Part/App/CMakeLists.txt Diff File
add - src/Mod/Part/App/GeometryMigrationExtension.cpp Diff File
add - src/Mod/Part/App/GeometryMigrationExtension.h Diff File