Move logic for handling allowRedundant out of System. NFC.
This commit is contained in:
parent
cf2f0e5d44
commit
beea4444ab
@ -542,7 +542,7 @@ void SolveSpaceUI::SolveGroup(hGroup hg, bool andFindFree) {
|
||||
SolveResult how = sys.Solve(g, NULL,
|
||||
&(g->solved.dof),
|
||||
&(g->solved.remove),
|
||||
/*andFindBad=*/true,
|
||||
/*andFindBad=*/!g->allowRedundant,
|
||||
/*andFindFree=*/andFindFree,
|
||||
/*forceDofCheck=*/!g->dofCheckOk);
|
||||
if(how == SolveResult::OKAY) {
|
||||
|
@ -470,9 +470,7 @@ SolveResult System::Solve(Group *g, int *rank, int *dof, List<hConstraint> *bad,
|
||||
|
||||
rankOk = TestRank(rank);
|
||||
if(!rankOk) {
|
||||
if(!g->allowRedundant) {
|
||||
if(andFindBad) FindWhichToRemoveToFixJacobian(g, bad, forceDofCheck);
|
||||
}
|
||||
if(andFindBad) FindWhichToRemoveToFixJacobian(g, bad, forceDofCheck);
|
||||
} else {
|
||||
// This is not the full Jacobian, but any substitutions or single-eq
|
||||
// solves removed one equation and one unknown, therefore no effect
|
||||
@ -536,9 +534,7 @@ SolveResult System::SolveRank(Group *g, int *rank, int *dof, List<hConstraint> *
|
||||
|
||||
bool rankOk = TestRank(rank);
|
||||
if(!rankOk) {
|
||||
if(!g->allowRedundant) {
|
||||
if(andFindBad) FindWhichToRemoveToFixJacobian(g, bad, /*forceDofCheck=*/true);
|
||||
}
|
||||
if(andFindBad) FindWhichToRemoveToFixJacobian(g, bad, /*forceDofCheck=*/true);
|
||||
} else {
|
||||
if(dof) *dof = CalculateDof();
|
||||
MarkParamsFree(andFindFree);
|
||||
|
Loading…
Reference in New Issue
Block a user