Commit 7ac29dc0 authored by amandaghassaei's avatar amandaghassaei

fix

parent ee3b7a44
......@@ -913,8 +913,8 @@
<ul>
<li>All rendering and 3D interaction done with <a target="_blank" href="https://threejs.org/">three.js</a></li>
<li><a href="https://www.npmjs.com/package/path-data-polyfill" target="_blank">path-data-polyfill</a> helps with SVG parsing</li>
<li><a href="https://github.com/edemaine/fold" target="_blank">FOLD</a> is used as the internal data structure, and methods from the
<a href="https://github.com/edemaine/fold/blob/master/doc/api.md" target="_blank">FOLD API</a> are used for SVG parsing</li>
<li><a href="https://github.com/edemaine/fold" target="_blank">FOLD</a> is used as the internal data structure, methods from the
<a href="https://github.com/edemaine/fold/blob/master/doc/api.md" target="_blank">FOLD API</a> used for SVG parsing</li>
<li>Arbitrary polygonal faces of imported geometry are triangulated using the <a target="_blank" href="https://github.com/mapbox/earcut">Earcut Library</a></li>
<li>GIF and WebM video export uses <a target="_blank" href="https://github.com/spite/ccapture.js/">CCapture</a></li>
<li><a target="_blank" href="https://jquery.com/">jQuery</a>, <a target="_blank" href="http://getbootstrap.com/">Bootstrap</a>, and the
......@@ -973,6 +973,7 @@
<img src="assets/patternwithtriangulations.jpg"/>
<ul>
<li>Line style and stroke width do not matter.</li>
<li>Remove all groups and clipping masks from your file before importing.</li>
<li>The final fold angle of a mountain or valley fold is set by its opacity. For example, 1.0 = 180&deg;
(fully folded), 0.5 = 90&deg;, 0 = 0&deg; (flat). Any fold angle between 0&deg; and 180&deg; may be used.</li>
<li>This tool should be able to automatically clean files of slightly misaligned vertices, stray vertices,
......
......@@ -534,27 +534,27 @@ function initPattern(globals){
}
function removeBorderFaces(fold){
var borderVertices = [];
for (var i=0;i<fold.edges_vertices.length;i++){
var assignment = fold.edges_assignment[i];
if (assignment == "B" || assignment == "C"){//border or cut
var edge = fold.edges_vertices[i];
borderVertices.push(edge[0]);
borderVertices.push(edge[1]);
}
}
borderVertices = _.uniq(borderVertices);
for (var i=fold.faces_vertices.length-1;i>=0;i--){
var face = fold.faces_vertices[i];
var allBorder = true;
for (var j=0;j<face.length;j++){
if (borderVertices.indexOf(face[j])<0) {
allBorder = false;
break;
}
}
if (allBorder) fold.faces_vertices.splice(i,1);
}
// var borderVertices = [];
// for (var i=0;i<fold.edges_vertices.length;i++){
// var assignment = fold.edges_assignment[i];
// if (assignment == "B" || assignment == "C"){//border or cut
// var edge = fold.edges_vertices[i];
// borderVertices.push(edge[0]);
// borderVertices.push(edge[1]);
// }
// }
// borderVertices = _.uniq(borderVertices);
// for (var i=fold.faces_vertices.length-1;i>=0;i--){
// var face = fold.faces_vertices[i];
// var allBorder = true;
// for (var j=0;j<face.length;j++){
// if (borderVertices.indexOf(face[j])<0) {
// allBorder = false;
// break;
// }
// }
// if (allBorder) fold.faces_vertices.splice(i,1);
// }
return fold;
}
......
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