diff options
author | Martin Poirier <theeth@yahoo.com> | 2007-11-29 22:57:40 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2007-11-29 22:57:40 +0300 |
commit | 653f064e71e23037fd3ae8d20890de3f4cc7adb9 (patch) | |
tree | 3e868c0d2b4251e8ae9f85422d09fb2ddf62c9b5 /source/blender/src/reeb.c | |
parent | 1cb7325c2b84a8574697232bb0f765fe2166e4b3 (diff) |
Moved both filtering operations (external and internal) into a loop, since both can create new cases that the other would filter out.
Finish radial symmetry restoration.
Diffstat (limited to 'source/blender/src/reeb.c')
-rw-r--r-- | source/blender/src/reeb.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/src/reeb.c b/source/blender/src/reeb.c index cf826b22e76..cac79f0b0a6 100644 --- a/source/blender/src/reeb.c +++ b/source/blender/src/reeb.c @@ -639,9 +639,10 @@ void filterNullReebGraph(ReebGraph *rg) } } -void filterInternalReebGraph(ReebGraph *rg, float threshold) +int filterInternalReebGraph(ReebGraph *rg, float threshold) { ReebArc *arc = NULL, *nextArc = NULL; + int value = 0; BLI_sortlist(&rg->arcs, compareArcs); @@ -677,15 +678,19 @@ void filterInternalReebGraph(ReebGraph *rg, float threshold) freeArc(arc); BLI_freelinkN(&rg->nodes, removedNode); + value = 1; } arc = nextArc; } + + return value; } -void filterExternalReebGraph(ReebGraph *rg, float threshold) +int filterExternalReebGraph(ReebGraph *rg, float threshold) { ReebArc *arc = NULL, *nextArc = NULL; + int value = 0; BLI_sortlist(&rg->arcs, compareArcs); @@ -748,10 +753,13 @@ void filterExternalReebGraph(ReebGraph *rg, float threshold) freeArc(arc); BLI_freelinkN(&rg->nodes, removedNode); + value = 1; } arc = nextArc; } + + return value; } /************************************** WEIGHT SPREADING ***********************************************/ |