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

Fixed bug in halfedge normal computation, where a boundary halfedge was not...

Fixed bug in halfedge normal computation, where a boundary halfedge was not correctly handled and caused a segfault.



git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@599 fdac6126-5c0c-442c-9429-916003d36597
parent 2f59dc70
......@@ -255,14 +255,17 @@ calc_halfedge_normal(HalfedgeHandle _heh, const double _feature_angle) const
{
heh = Kernel::opposite_halfedge_handle(_heh);
do
{
fhs.push_back(Kernel::face_handle(heh));
if ( !Kernel::is_boundary(heh) ) {
do
{
heh = Kernel::prev_halfedge_handle(heh);
heh = Kernel::opposite_halfedge_handle(heh);
fhs.push_back(Kernel::face_handle(heh));
heh = Kernel::prev_halfedge_handle(heh);
heh = Kernel::opposite_halfedge_handle(heh);
}
while(!Kernel::is_boundary(heh) && !is_estimated_feature_edge(heh, _feature_angle));
}
while(!Kernel::is_boundary(heh) && !is_estimated_feature_edge(heh, _feature_angle));
}
Normal n(0,0,0);
......
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