Subject: CGAL users discussion list
List archive
- From: Me Myself <>
- To:
- Subject: Re: [cgal-discuss] Triangulation_3 and C3t3 questions
- Date: Sat, 22 Sep 2012 17:45:14 -0400
Hi Everyone,
It seems that when one renders the regular triangulations output by
refine_mesh, they are either:
1. Not oriented properly
2. Or are not a decomposition of the convex hull of the input
3. Or perhaps I'm missing something after reading this post, since the
original poster had exactly the same problem, but I cant figure out
how it was solved.
Which one is it? The following post saw this orientation problem, and
I see it as well. When I do a refine_mesh and write the output file
into either a mesh format or vtk, both do not render properly (some
tetrahedra have color problems).
Thanks,
On Sat, Jul 14, 2012 at 6:59 AM, Zohar
<>
wrote:
>
> Hi,
>
> Instead of posting a few threads I thought to group my questions into one
> thread.
> My first two questions please:
>
> C3t3 c3t3;
> tet_generation(srcPoly, c3t3); // Uses 3D mesh generation where
> srcPoly is
> a polyhedron
>
> // Triangulation 3
> typedef C3t3::Triangulation Tr3;
> typedef Tr3::Vertex_handle Vertex_handle;
> Tr3& tr = c3t3.triangulation();
>
> // Add points
> ...
> for ( int i = 0 ; i < nV ; i++ )
> tr.insert(GT::Point_3(V(0,i), V(1,i), V(2,i)));
>
> // draw tr facets
> vector<GT::Point_3> points;
> vector<int> tris;
> int vInd = 0;
> for ( Tr3::Finite_cells_iterator cit = tr.finite_cells_begin()
> ; cit != tr.finite_cells_end() ; cit++ ) {
> for ( int ti = 0 ; ti < 4 ; ti++ ) {
> for ( int i = 0 ; i < 3 ; i++ ) {
>
> points.push_back(cit->vertex((ti+i)%4)->point());
> tris.push_back(vInd);
> vInd++;
> }
> }
> }
> MObject omesh = cgal2mesh(points, tris); // draws the facets
>
>
> 1. I just arbitrarily iterated the facets of a cell. How do I iterated them
> such that they would have proper orientation (ccw)?
>
> 2. I'm working with the triangulation of the mesh generation. I understand
> it's Regular_triangulation_3. When I add the new points, I get intersections
> by very long faces, while I expected to get a clean delaunay triangulation.
> Does the regular triangulation behaves differently (or perhaps I misused the
> c3t3)? If it is, is there an easy way to convert it to delaunay?
> The mesh generation generates a fine triangulation, and adding the points by
> themselves also generates a fine triangulation. It is as if the two are
> colliding.
>
> Thanks
>
>
>
>
>
>
>
> --
> View this message in context:
> http://cgal-discuss.949826.n4.nabble.com/Triangulation-3-and-C3t3-questions-tp4655454.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
- Re: [cgal-discuss] Triangulation_3 and C3t3 questions, Me Myself, 09/22/2012
Archive powered by MHonArc 2.6.18.