Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: orient triangles

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: orient triangles


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: orient triangles
  • Date: Thu, 08 Nov 2012 09:04:17 +0100
  • Organization: GeometryFactory

IIRC, there is a plugin in the Polyhedron demo which is orienting
a soup of polygon.

Sebastien.

On 11/07/2012 08:36 AM, Guillaume Damiand wrote:
Le 06/11/2012 18:18, johnzjq a écrit :
Is there any simpler solution to it, without knowing the global knowledge
about the polyhedron?

Orientation is a global property.
Indeed, you can build two objects having exactly a same local
configuration but with two opposite orientations.

To orient correctly a polyhedron, you can take a face with a given
orientation, compute its normal, take a point in the face, translate it
along the normal, and test if this point is inside or outside to the
polyhedron (counting the number of intersections of a half-line starting
from the point and the polyhedron).
Depending on which orientation you want, you conclude if the initial
orientation is correct or wrong; then you propagate the correct
orientation to all the faces of the polyhedron.

Guillaume





--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/orient-triangles-tp952874p4656161.html

Sent from the cgal-discuss mailing list archive at Nabble.com.







Archive powered by MHonArc 2.6.18.

Top of Page