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 f978765b8a
commit 182596ba08
20 changed files with 277 additions and 192 deletions

View File

@@ -404,10 +404,10 @@ bool PropertyConstraintList::checkGeometry(const std::vector<Part::Geometry *> &
bool PropertyConstraintList::checkConstraintIndices(int geomax, int geomin)
{
int mininternalgeoid = std::numeric_limits<int>::max();
int maxinternalgeoid = Constraint::GeoUndef;
int maxinternalgeoid = GeoEnum::GeoUndef;
auto cmin = [] (int previousmin, int cindex) {
if( cindex == Constraint::GeoUndef )
if( cindex == GeoEnum::GeoUndef )
return previousmin;
return ( cindex < previousmin )? cindex : previousmin;