Fixed another bug in to_mesh_iter!

This was a more minor bug - but a bug that was making it produce
non-manifold geometry.
This commit is contained in:
Chris Hodapp 2020-04-06 10:38:30 -04:00
parent aba2e24e26
commit c19e65b962
2 changed files with 16 additions and 9 deletions

View File

@ -2,8 +2,7 @@
## Highest priority:
- Clean up `ramhorn_branch` because it's fugly. Also, fix
non-manifold stuff at higher recursions.
- Clean up `ramhorn_branch` because it's fugly.
- See `automata_scratch/examples.py` and implement some of the tougher
examples.
- `spiral_nested_2` & `spiral_nested_3` (how to compose
@ -15,8 +14,9 @@
- Elegance & succinctness (my recent closure work may help with this):
- Why must I repeat myself so much in these definitions?
- What patterns can I factor out? I do some things regularly, like:
the clockwise boundaries, the zigzag connections, the iterating over
a `Vec<Vertex>` to transform each element and make another vector.
the clockwise boundaries, the zigzag connections
- Procedural macro to shorten this `Tag::Parent`, `Tag::Body`
nonsense - and perhaps force to groups of 3?
- Docs on modules
- Grep for all TODOs in code, really.
- Look at performance. Can I save on copies of geometry by using

View File

@ -202,10 +202,17 @@ impl<S> Rule<S> {
geom = geom.connect(vec![(geom2, child.vmap.clone())]).0;
// TODO: Fix clone?
// and backtrack:
stack.pop();
n -= 1;
// If we end recursion on one child, we must end it
// similarly on every sibling (i.e. get its geometry &
// final geometry, and merge it in) - so we increment
// s.next and let the loop re-run.
s.next += 1;
if s.next >= s.rules.len() {
// Backtrack only at the last child:
stack.pop();
n -= 1;
}
continue;
}
@ -248,7 +255,7 @@ impl<S> Rule<S> {
n += 1;
}
}
return (geom, eval_count);
}