Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] How I get the right normals of facet?

Subject: CGAL users discussion list

List archive

[cgal-discuss] How I get the right normals of facet?


Chronological Thread 
  • From: WChXiong <>
  • To:
  • Subject: [cgal-discuss] How I get the right normals of facet?
  • Date: Thu, 28 Nov 2013 19:17:23 -0800 (PST)

Hi, I'm new on CGAL.
When I use CGAL::make_surface_mesh() to get surface mesh, I need to get
consistency normals of every facets.Here my code:
for (C2t3::Facet_iterator face= c2t3.facets_begin(); face !=
c2t3.facets_end(); ++face)
{
C2t3::Cell_handle ch;
ch = face->first;
int index = face->second;
Point pt0 = ch->vertex((index+1)&3)->point();
Point pt1 = ch->vertex((index+2)&3)->point();
Point pt2 = ch->vertex((index+3)&3)->point();

Vector normals = CGAL::cross_product(pt1 - pt0, pt2- pt0);
normals = normals / CGAL::sqrt(normals * normals );
}
But the result is not correct. The normals is not consistent. The
points(pt0, pt1, pt2) of face are not oriented ?? How I can get consistency
normals of every facets. Thank you.



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-I-get-the-right-normals-of-facet-tp4658491.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page