Sketcher: Sketch retrieve partially redundant constraints

This commit is contained in:
Abdullah Tahiri
2021-01-19 11:25:37 +01:00
committed by abdullahtahiriyo
parent 65fb44df6c
commit a3c1010800
2 changed files with 7 additions and 0 deletions

View File

@@ -127,6 +127,7 @@ void Sketch::clear(void)
ConstraintsCounter = 0;
Conflicting.clear();
Redundant.clear();
PartiallyRedundant.clear();
MalformedConstraints.clear();
}
@@ -329,6 +330,7 @@ int Sketch::setUpSketch(const std::vector<Part::Geometry *> &GeoList,
// Now we set the Sketch status with the latest solver information
GCSsys.getConflicting(Conflicting);
GCSsys.getRedundant(Redundant);
GCSsys.getPartiallyRedundant (PartiallyRedundant);
GCSsys.getDependentParams(pDependentParametersList);
calculateDependentParametersElements();
@@ -362,6 +364,7 @@ void Sketch::fixParametersAndDiagnose(std::vector<double *> &params_to_block)
GCSsys.initSolution(defaultSolverRedundant);
/*GCSsys.getConflicting(Conflicting);
GCSsys.getRedundant(Redundant);
GCSsys.getPartlyRedundant(PartiallyRedundant);
GCSsys.getDependentParams(pDependentParametersList);
calculateDependentParametersElements();*/
@@ -571,6 +574,7 @@ int Sketch::resetSolver()
GCSsys.initSolution(defaultSolverRedundant);
GCSsys.getConflicting(Conflicting);
GCSsys.getRedundant(Redundant);
GCSsys.getPartiallyRedundant (PartiallyRedundant);
GCSsys.getDependentParams(pDependentParametersList);
calculateDependentParametersElements();

View File

@@ -103,6 +103,8 @@ public:
inline const std::vector<int> &getConflicting(void) const { return Conflicting; }
inline bool hasRedundancies(void) const { return !Redundant.empty(); }
inline const std::vector<int> &getRedundant(void) const { return Redundant; }
inline bool hasPartialRedundancies(void) const { return !PartiallyRedundant.empty(); }
inline const std::vector<int> &getPartiallyRedundant(void) const { return PartiallyRedundant; }
inline float getSolveTime() const { return SolveTime; }
@@ -426,6 +428,7 @@ protected:
int ConstraintsCounter;
std::vector<int> Conflicting;
std::vector<int> Redundant;
std::vector<int> PartiallyRedundant;
std::vector<int> MalformedConstraints;
std::vector<double *> pDependentParametersList;