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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user