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:
@@ -49,11 +49,11 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
PyErr_Clear();
|
||||
|
||||
char *ConstraintType;
|
||||
int FirstIndex = Constraint::GeoUndef;
|
||||
int FirstIndex = GeoEnum::GeoUndef;
|
||||
int FirstPos = none;
|
||||
int SecondIndex= Constraint::GeoUndef;
|
||||
int SecondIndex= GeoEnum::GeoUndef;
|
||||
int SecondPos = none;
|
||||
int ThirdIndex = Constraint::GeoUndef;
|
||||
int ThirdIndex = GeoEnum::GeoUndef;
|
||||
int ThirdPos = none;
|
||||
double Value = 0;
|
||||
int intArg1, intArg2, intArg3, intArg4, intArg5;
|
||||
@@ -487,20 +487,20 @@ std::string ConstraintPy::representation(void) const
|
||||
case Weight : result << "'Weight'>";break;
|
||||
case Parallel : result << "'Parallel'>";break;
|
||||
case Tangent :
|
||||
if (this->getConstraintPtr()->Third == Constraint::GeoUndef)
|
||||
if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef)
|
||||
result << "'Tangent'>";
|
||||
else
|
||||
result << "'TangentViaPoint'>";
|
||||
break;
|
||||
case Perpendicular :
|
||||
if (this->getConstraintPtr()->Third == Constraint::GeoUndef)
|
||||
if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef)
|
||||
result << "'Perpendicular'>";
|
||||
else
|
||||
result << "'PerpendicularViaPoint'>";
|
||||
break;
|
||||
case Distance : result << "'Distance'>";break;
|
||||
case Angle :
|
||||
if (this->getConstraintPtr()->Third == Constraint::GeoUndef)
|
||||
if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef)
|
||||
result << "'Angle'>";
|
||||
else
|
||||
result << "'AngleViaPoint'>";
|
||||
|
||||
Reference in New Issue
Block a user