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

OM 3 fixes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17217 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 32c4d88b
...@@ -98,13 +98,13 @@ findClosestBoundary(MeshT* _mesh , typename MeshT::VertexHandle _vh){ ...@@ -98,13 +98,13 @@ findClosestBoundary(MeshT* _mesh , typename MeshT::VertexHandle _vh){
queue.pop(); queue.pop();
if (_mesh->property(visited, vh)) continue; if (_mesh->property(visited, vh)) continue;
for (typename MeshT::VertexOHalfedgeIter voh_it(*_mesh,vh); voh_it; ++voh_it){ for (typename MeshT::VertexOHalfedgeIter voh_it(*_mesh,vh); voh_it.is_valid(); ++voh_it){
if ( _mesh->is_boundary(voh_it) ){ if ( _mesh->is_boundary(*voh_it) ){
_mesh->remove_property(visited); _mesh->remove_property(visited);
return _mesh->to_vertex_handle(voh_it); return _mesh->to_vertex_handle(*voh_it);
}else{ }else{
queue.push( _mesh->to_vertex_handle(voh_it) ); queue.push( _mesh->to_vertex_handle(*voh_it) );
} }
} }
_mesh->property(visited, vh) = true; _mesh->property(visited, vh) = true;
......
...@@ -162,7 +162,7 @@ void shrinkVertexSelection(MeshT* _mesh) { ...@@ -162,7 +162,7 @@ void shrinkVertexSelection(MeshT* _mesh) {
if ( _mesh->property(temp_shrink,*v_it) ) { if ( _mesh->property(temp_shrink,*v_it) ) {
_mesh->status(*v_it).set_selected( true ); _mesh->status(*v_it).set_selected( true );
for ( typename MeshT::VertexVertexIter vv_it(*_mesh,*v_it); vv_it; ++vv_it) for ( typename MeshT::VertexVertexIter vv_it(*_mesh,*v_it); vv_it.is_valid(); ++vv_it)
if ( ! _mesh->property(temp_shrink,*vv_it) ){ if ( ! _mesh->property(temp_shrink,*vv_it) ){
_mesh->status(*v_it).set_selected( false ); _mesh->status(*v_it).set_selected( false );
break; break;
...@@ -280,7 +280,7 @@ void convertVertexToEdgeSelection(MeshT* _mesh, const std::vector< int >& _verti ...@@ -280,7 +280,7 @@ void convertVertexToEdgeSelection(MeshT* _mesh, const std::vector< int >& _verti
for (; ohe_iter.is_valid(); ++ohe_iter) { for (; ohe_iter.is_valid(); ++ohe_iter) {
// test if both incident vertices are in _vertices // test if both incident vertices are in _vertices
typename MeshT::VertexHandle ovh = _mesh->to_vertex_handle(ohe_iter.handle()); typename MeshT::VertexHandle ovh = _mesh->to_vertex_handle(*ohe_iter);
// search for ovh in _vertices // search for ovh in _vertices
for(std::vector<int>::const_iterator it = _vertices.begin(); it != _vertices.end(); ++it) { for(std::vector<int>::const_iterator it = _vertices.begin(); it != _vertices.end(); ++it) {
if((*it) == ovh.idx()) { if((*it) == ovh.idx()) {
...@@ -992,7 +992,7 @@ void shrinkFaceSelection(MeshT* _mesh) { ...@@ -992,7 +992,7 @@ void shrinkFaceSelection(MeshT* _mesh) {
bool boundary = false; bool boundary = false;
for ( typename MeshT::FaceVertexIter fv_it(*_mesh,*f_it); fv_it.is_valid() ; ++fv_it) { for ( typename MeshT::FaceVertexIter fv_it(*_mesh,*f_it); fv_it.is_valid() ; ++fv_it) {
for ( typename MeshT::VertexFaceIter vf_it(*_mesh,*fv_it); vf_it.is_valid() ; ++vf_it) { for ( typename MeshT::VertexFaceIter vf_it(*_mesh,*fv_it); vf_it.is_valid() ; ++vf_it) {
if ( ! _mesh->property(temp_shrink,vf_it) ) { if ( ! _mesh->property(temp_shrink,*vf_it) ) {
boundary = true; boundary = true;
} }
} }
...@@ -1026,7 +1026,7 @@ void growFaceSelection(MeshT* _mesh) { ...@@ -1026,7 +1026,7 @@ void growFaceSelection(MeshT* _mesh) {
if ( _mesh->property(temp_grow,*f_it) ) if ( _mesh->property(temp_grow,*f_it) )
for ( typename MeshT::FaceVertexIter fv_it(*_mesh,*f_it); fv_it.is_valid() ; ++fv_it) for ( typename MeshT::FaceVertexIter fv_it(*_mesh,*f_it); fv_it.is_valid() ; ++fv_it)
for ( typename MeshT::VertexFaceIter vf_it(*_mesh,*fv_it); vf_it.is_valid() ; ++vf_it) for ( typename MeshT::VertexFaceIter vf_it(*_mesh,*fv_it); vf_it.is_valid() ; ++vf_it)
_mesh->status(vf_it).set_selected( true ); _mesh->status(*vf_it).set_selected( true );
_mesh->remove_property(temp_grow); _mesh->remove_property(temp_grow);
} }
......
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