FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't delete the constraints that the solver couldn't satisfy. by ruevs · Pull Request #1744 · solvespace/solvespace · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cpp  (3) .slvs  (1) .txt  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 4 additions & 0 deletions src/generate.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void SolveSpaceUI::MarkGroupDirty(hGroup hg, bool onlyThis) {

bool SolveSpaceUI::PruneOrphans() {
const int requests = SK.request.n;
SK.request.ClearTags();
for(Request &r : SK.request) {
if(!GroupExists(r.group))
r.tag = 1;
Expand All @@ -41,6 +42,7 @@ bool SolveSpaceUI::PruneOrphans() {
deleted.requests += requests - SK.request.n;

const int constraints = SK.constraint.n;
SK.constraint.ClearTags();
for(Constraint &c : SK.constraint) {
if(!GroupExists(c.group))
c.tag = 1;
Expand Down Expand Up @@ -106,6 +108,7 @@ bool SolveSpaceUI::PruneRequestsAndConstraints(hGroup hg) {
};

const int requests = SK.request.n;
SK.request.ClearTags();
for(Request &r : SK.request) {
if(r.group != hg) {
continue;
Expand All @@ -121,6 +124,7 @@ bool SolveSpaceUI::PruneRequestsAndConstraints(hGroup hg) {
deleted.requests += requests - SK.request.n;

const int constraints = SK.constraint.n;
SK.constraint.ClearTags();
for(Constraint &c : SK.constraint) {
if(c.group != hg)
continue;
Expand Down
1 change: 1 addition & 0 deletions src/group.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const hGroup Group::HGROUP_REFERENCES = { 1 };
// memory. This clears and frees them all.
//-----------------------------------------------------------------------------
void Group::Clear() {
solved.remove.Clear();
polyLoops.Clear();
bezierLoops.Clear();
bezierOpens.Clear();
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set(testsuite_SOURCES
core/expr/test.cpp
core/locale/test.cpp
core/path/test.cpp
core/prune/test.cpp
constraint/points_coincident/test.cpp
constraint/pt_pt_distance/test.cpp
constraint/pt_plane_distance/test.cpp
Expand Down
Loading
Loading

Back | FazBrowse Home | New Git URL