Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
7c089ba1
Commit
7c089ba1
authored
Jun 03, 2017
by
amandaghassaei
Browse files
fixed rebase
parent
677339f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/pattern.js
View file @
7c089ba1
...
...
@@ -371,7 +371,7 @@ function initPattern(globals){
function
parseSVG
(
_verticesRaw
,
_outlinesRaw
,
_mountainsRaw
,
_valleysRaw
,
_cutsRaw
,
_triangulationsRaw
){
findIntersections
(
_verticesRaw
,
_outlinesRaw
,
_mountainsRaw
,
_valleysRaw
,
_cutsRaw
,
_triangulationsRaw
);
//
findIntersections(_verticesRaw, _outlinesRaw, _mountainsRaw, _valleysRaw, _cutsRaw, _triangulationsRaw);
verticesRaw
=
_verticesRaw
;
outlinesRaw
=
_outlinesRaw
;
mountainsRaw
=
_mountainsRaw
;
...
...
@@ -394,12 +394,12 @@ function initPattern(globals){
_
.
each
(
_mountainsRaw
,
function
(
edge
,
i
){
foldData
.
edges_vertices
.
push
([
edge
[
0
],
edge
[
1
]]);
foldData
.
edges_assignment
.
push
(
"
M
"
);
foldData
.
edges_foldAngles
.
push
(
_mountainAngles
[
i
]);
foldData
.
edges_foldAngles
.
push
(
edge
[
2
]);
});
_
.
each
(
_valleysRaw
,
function
(
edge
,
i
){
foldData
.
edges_vertices
.
push
([
edge
[
0
],
edge
[
1
]]);
foldData
.
edges_assignment
.
push
(
"
V
"
);
foldData
.
edges_foldAngles
.
push
(
_valleyAngles
[
i
]);
foldData
.
edges_foldAngles
.
push
(
edge
[
2
]);
});
_
.
each
(
_triangulationsRaw
,
function
(
edge
){
foldData
.
edges_vertices
.
push
([
edge
[
0
],
edge
[
1
]]);
...
...
@@ -407,22 +407,22 @@ function initPattern(globals){
foldData
.
edges_foldAngles
.
push
(
0
);
});
var
error
=
mergeVertices
();
if
(
error
)
{
console
.
warn
(
"
aborting file import
"
);
return
;
}
console
.
log
(
JSON
.
stringify
(
foldData
.
vertices_coords
));
foldData
=
FOLD
.
filter
.
collapseNearbyVertices
(
foldData
,
3
);
console
.
log
(
JSON
.
stringify
(
foldData
.
vertices_coords
));
// var error = mergeVertices();
// if (error) {
// console.warn("aborting file import");
// return;
// }
// console.log(JSON.stringify(foldData.edges_vertices));
// console.log(FOLD.filter.subdivideCrossingEdges_vertices(foldData, 3));
// console.log(JSON.stringify(foldData.edges_vertices));
mergeVertices
();
//
var
nullEdges
=
0
;
nullEdges
+=
removeNullEdges
(
outlines
);
nullEdges
+=
removeNullEdges
(
mountains
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment