FreeCAD: master e5eff3f0
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
abdullah | abdullahtahiriyo | master | 2020-11-22 07:30:19 | master 593ade16 |
Changeset | Sketcher: Constraint-Driven geometry status ============================================ This is a new concept which originates from the new ability of sketcher geometry to store a geometry state via geometry extensions. The idea is that some geometry state is enforced via constraints (InternalAlignment constraints and Block constraint) which effectively set the state. However, it is convenient to have direct access of the geometry state from the geometry for representation (ViewProvider) and for the solver. This is the constraint-driven geometry state concept. The addition/removal of the constraint defines the life cycle of the geometry state and is responsible for setting and removing the state, so that geometry state and constraint are kept synchronised. The life cycle is completed with proper serialisation of the geometry state. In summary: 1. Upon restore, the stored state is restored and any migration is handled to set the status for legacy files (backwards compatibility) 2. Functionality adding constraints (of the relevant type) calls addGeometryState to set the status 3. Functionality removing constraints (of the relevant type) calls removeGeometryState to remove the status 4. Save mechanism will ensure persistance of the geometry state |
|||
mod - src/Mod/Sketcher/App/SketchObject.cpp | Diff File | |||
mod - src/Mod/Sketcher/App/SketchObject.h | Diff File |