FreeCAD: master be8e5ac3

Author Committer Branch Timestamp Parent
abdullah abdullahtahiriyo master 2020-12-06 09:53:37 master 00cf07d1
Changeset GCS: Simple refactor magic numbers into enum

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

A new enum to remove magic numbers for constraint tags.

A previous version of the commit introduced more magic numbers, which
demonstrated not to be up for the task.

About the Tag numbers:
- Positive Tags identify a higher level constraint form which the solver constraint originates
- Negative Tags represent temporary constraints, used for example in moving operations, these
have a different handling in component splitting, see GCS::initSolution. Lifetime is defined by
the container object via GCS::clearByTag
- Hardcoded value -1 is used for these constraints.The effect is parameters are not truly enforced
  (it gives a nice effect when dragging the edge of an unconstrained circle, that the center won't
  move if the edge can be dragged, and only when/if the edge cannot be dragged, e.g. radius constraint,
  the center is moved).
mod - src/Mod/Sketcher/App/planegcs/GCS.h Diff File