Added Unittest for modified butterfly

This commit is contained in:
Jan Möbius
2019-04-09 13:44:17 +02:00
parent 752c8ef7d2
commit 9eee36de6d
3 changed files with 233 additions and 6 deletions

View File

@@ -356,7 +356,11 @@ private: // topological modifiers
_m.set_face_handle( new_heh, _m.face_handle(heh) );
_m.set_halfedge_handle( vh, new_heh);
_m.set_halfedge_handle( _m.face_handle(heh), heh );
// We cant reconnect a non existing face, so we skip this here if necessary
if ( !_m.is_boundary(heh) )
_m.set_halfedge_handle( _m.face_handle(heh), heh );
_m.set_halfedge_handle( vh1, opp_new_heh );
// Never forget this, when playing with the topology
@@ -383,7 +387,7 @@ private: // geometry helper
{
pos = _m.point(a_0);
pos += _m.point(a_1);
pos *= static_cast<typename mesh_t::Point::value_type>(9.0/16.0);
pos *= static_cast<RealType>(9.0/16.0);
typename mesh_t::Point tpos;
if(_m.is_boundary(heh))
{
@@ -396,7 +400,7 @@ private: // geometry helper
tpos = _m.point(_m.to_vertex_handle(_m.next_halfedge_handle(opp_heh)));
tpos += _m.point(_m.to_vertex_handle(_m.opposite_halfedge_handle(_m.prev_halfedge_handle(opp_heh))));
}
tpos *= static_cast<typename mesh_t::Point::value_type>(-1.0/16.0);
tpos *= static_cast<RealType>(-1.0/16.0);
pos += tpos;
}
else
@@ -499,7 +503,7 @@ private: // geometry helper
}
else //at least one endpoint is [irregular and not in boundary]
{
typename mesh_t::Point::value_type normFactor = static_cast<typename mesh_t::Point::value_type>(0.0);
RealType normFactor = static_cast<RealType>(0.0);
if(valence_a_0!=6 && !_m.is_boundary(a_0))
{