PetterS/curve_extraction — pull request #15 by PetterS (2014-02-09 10:12:11+00:00)
Title: Removing 'check for bad pairs' from curvature code.

@johannesu, The only test I had for this code (and the reason I added it in the first place) was demo_2d. It did not work without this check. If it works for your code as well you can merge it.

Now it does! This means that this code does not have any tests and therefore should be removed.

It seems that the following code in the mesh would prevent bad pairs from happening anyway:

void Mesh::get_adjacent_edges(int e, std::vector* adjacent) const
{
adjacent->clear();
int p1 = edges[e].first;
int p2 = edges[e].second;

// Find reverse edge.
int e_rev = this->find_edge(p2, p1);

auto& adjacency = points[p2].adjacent_points;
for (auto itr = adjacency.begin(); itr != adjacency.end(); ++itr) {
int e2 = this->find_edge(p2, *itr);
if (e2 != e && e2 != e_rev) {
adjacent->push_back(e2);
}
}
}

Note the e2 != e_rev part.