Commit b9215ce6 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'master' into AngleBasedEdgeSelection

parent e636de1f
......@@ -78,4 +78,8 @@ find_package_handle_standard_args(CLP DEFAULT_MSG
mark_as_advanced(CLP_INCLUDE_DIR CLP_LIBRARY)
<<<<<<< HEAD
endif(NOT CLP_FOUND)
=======
endif( NOT CLP_FOUND)
>>>>>>> de50b89d4c22e69eb9f024dd18a994331b44d056
......@@ -521,13 +521,14 @@ std::vector< int > getArea(MeshT* _mesh, unsigned int _type , bool& _invert) {
template< typename MeshT >
inline
void selectEdges(MeshT* _mesh, const std::vector< int >& _edges) {
void selectEdges(MeshT* _mesh, const std::vector< int >& _edges, const double _dihedral_angle_threshold) {
const int n_edges = (int)_mesh->n_edges();
for ( uint i = 0 ; i < _edges.size() ; ++i )
if ( (_edges[i] >= 0) && ( _edges[i] < n_edges ) ) {
typename MeshT::EdgeHandle eh(_edges[i]);
_mesh->status(eh).set_selected(true);
if(!_mesh->has_face_normals() || std::abs(_mesh->calc_dihedral_angle_fast(eh)) >= _dihedral_angle_threshold)
_mesh->status(eh).set_selected(true);
}
}
......
......@@ -261,7 +261,7 @@ std::vector< int > getArea(MeshT* _mesh, unsigned int _type , bool& _invert);
/// Select given edges of a mesh
template< typename MeshT >
inline
void selectEdges(MeshT* _mesh, const std::vector< int >& _edges);
void selectEdges(MeshT* _mesh, const std::vector< int >& _edges, const double _dihedral_angle_threshold = 0.0);
/// Unselect given edges of a mesh
template< typename MeshT >
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment