| 1694 | } |
| 1695 | |
| 1696 | bool is_parallel_2degree_node(Graph2D<K>::vertex_const_iterator vit) { |
| 1697 | auto it = vit->second.begin(); |
| 1698 | auto& P = *it++; |
| 1699 | auto& Q = *it++; |
| 1700 | auto e1 = P - vit->first; |
| 1701 | auto e2 = vit->first - Q; |
| 1702 | if (e1.squared_length() == 0 || e2.squared_length() == 0) { |
| 1703 | // @todo why does this happen? |
| 1704 | return false; |
| 1705 | } |
| 1706 | e1 /= std::sqrt(CGAL::to_double(e1.squared_length())); |
| 1707 | e2 /= std::sqrt(CGAL::to_double(e2.squared_length())); |
| 1708 | return std::abs(CGAL::to_double(e1 * e2)) > (1. - 1.e-5); |
| 1709 | }; |
| 1710 | |
| 1711 | |
| 1712 | void eliminate_colinear_vertices(Graph2D<K>& G) { |
no test coverage detected