| 135 | } |
| 136 | |
| 137 | int MeshChecker::get_genus() const { |
| 138 | // Need num boundary loops |
| 139 | int double_genus = 2 - int(get_euler_characteristic()) - |
| 140 | int(get_num_boundary_loops()); |
| 141 | if (double_genus % 2 != 0) { |
| 142 | std::cerr << "Genus computation is incorrect due to nonmanifold surface" |
| 143 | <<std::endl; |
| 144 | } |
| 145 | return double_genus / 2; |
| 146 | } |
| 147 | |
| 148 | int MeshChecker::get_euler_characteristic() const { |
| 149 | int num_vertices = m_vertices.rows(); |