Commit 20731721 authored by amandaghassaei's avatar amandaghassaei

hopefully fixed the extra vertex problem

parent 61ec0d94
...@@ -256,13 +256,16 @@ function initPattern(globals){ ...@@ -256,13 +256,16 @@ function initPattern(globals){
} }
if (badVertices.length>0){ if (badVertices.length>0){
console.log(badVertices);
//bad vertices in ascending order //bad vertices in ascending order
for (var i=badVertices.length-1;i>=0;i--){ for (var i=badVertices.length-1;i>=0;i--){
vertices.splice(badVertices[i], 1); vertices.splice(badVertices[i], 1);
// for (var j=badVertices[i];j<set.length;j++){ for (var j=0;j<set.length;j++){
// set[j][0]--; var edge = set[j];
// set[j][1]--; if (edge[0]>badVertices[i]) edge[0]--;
// } if (edge[1]>badVertices[i]) edge[1]--;
}
} }
removeDuplicates(outlines, outlines); removeDuplicates(outlines, outlines);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment