Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: Monique Teillaud <>
  • To:
  • Subject: Re: [cgal-discuss] How I get the right normals of facet?
  • Date: Fri, 29 Nov 2013 09:24:32 +0100

Hi

see http://doc.cgal.org/latest/TDS_3/index.html#title0
and in particular a sentence in paragraph "Validity"
====
The set σ 4 of permutations of (0,1,2,3) has cardinality 24, and the set of positive permutations A4 has cardinality 12. Thus, for a given orientation, there are up to 12 different orderings of the four vertices of a cell.
Note that cyclic permutations are negative and so do not preserve the orientation of a cell.
====

whether vertices (i,i+1,i+2,i+3) (mod 4) are positively oriented depends on the parity of i

--
Monique Teillaud
http://www.inria.fr/sophia/members/Monique.Teillaud/
INRIA Sophia Antipolis - Méditerranée
Institut National de Recherche en Informatique et Automatique

Le 29/11/13 04:17, WChXiong a écrit :
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