Sketcher: GeoId, GeoElementId and GeoUndef refactor

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

This commit is an independent refactor of the identifications used at Sketcher level.

It introduces a new type "GeoElementId" as a combination of GeoId and PointPos.

It moves the Undefined GeoId, previous Constraint::GeoUndef to GeoEnum, together with all
other fixed values of GeoIds.
This commit is contained in:
Abdullah Tahiri
2021-12-11 14:40:21 +01:00
parent 56d86df5bb
commit bb76be1371
20 changed files with 277 additions and 192 deletions

View File

@@ -43,18 +43,16 @@ using namespace Base;
TYPESYSTEM_SOURCE(Sketcher::Constraint, Base::Persistence)
const int Constraint::GeoUndef = -2000;
Constraint::Constraint()
: Value(0.0),
Type(None),
AlignmentType(Undef),
Name(""),
First(GeoUndef),
First(GeoEnum::GeoUndef),
FirstPos(none),
Second(GeoUndef),
Second(GeoEnum::GeoUndef),
SecondPos(none),
Third(GeoUndef),
Third(GeoEnum::GeoUndef),
ThirdPos(none),
LabelDistance(10.f),
LabelPosition(0.f),