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

Display edge length when picking edges

Display closest edge length when picking faces

closes #283



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13471 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 44224f74
......@@ -164,6 +164,14 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _
info_->closestEdgeLabel->show();
info_->edgeHandle->show();
// Closest Edge Length
info_->edgeLengthLabel->setText( tr("Closest Edge Length:") );
info_->edgeLengthLabel->show();
const typename MeshT::Point from = _mesh->point(_mesh->from_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
const typename MeshT::Point to = _mesh->point(_mesh->to_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
info_->edgeLength->setText( locale.toString( (to - from).norm() ) );
info_->edgeLength->show();
//adjacent vertex handles
typename MeshT::FaceHandle fh = _mesh->face_handle(_index);
......@@ -228,6 +236,14 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _
info_->closestEdgeLabel->show();
info_->edgeHandle->show();
// Edge Length
info_->edgeLengthLabel->setText( tr("Edge Length:") );
info_->edgeLengthLabel->show();
const typename MeshT::Point from = _mesh->point(_mesh->from_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
const typename MeshT::Point to = _mesh->point(_mesh->to_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
info_->edgeLength->setText( locale.toString( (to - from).norm() ) );
info_->edgeLength->show();
// Normal
info_->normalLabel->hide();
info_->normalLeft->hide();
......@@ -257,6 +273,10 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _
info_->closestEdgeLabel->hide();
info_->edgeHandle->hide();
// Edge Length
info_->edgeLengthLabel->hide();
info_->edgeLength->hide();
// Normal
typename MeshT::VertexHandle vh = _mesh->vertex_handle(_index);
info_->normalLabel->setText(tr("Normal of picked vertex:"));
......
This diff is collapsed.
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