Subject: CGAL users discussion list
List archive
- From: David Arken <>
- To:
- Subject: Re: [cgal-discuss] Changing a regular triangulation
- Date: Tue, 25 Sep 2012 11:21:14 -0400
I do something very simple. I create a convex hull of 8 points.
CGAL::convex_hull_3(cube_vertices.begin(), cube_vertices.end(), P);
My typedefs for polyhedron P are:
// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain;
typedef CGAL::Mesh_polyhedron_3<K>::Type Polyhedron;
and some other typedefs i use:
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef
CGAL::Mesh_complex_3_in_triangulation_3<Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_segment_index>
C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
The code then uses:
Mesh_domain domain(polyhedron);
domain.detect_features();
Mesh_criteria criteria(edge_size = 20.0,
facet_angle = 15, facet_size = 15.0,
facet_distance = 0.05,
cell_radius_edge_ratio = 3, cell_size = 50.0);
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, no_perturb(),
no_exude());
Then I insert a bunch of weighted points in the c3t3 triangulation
(inside the cube) and run a refine_mesh on this new mesh with points.
CGAL::refine_mesh_3(c3t3, domain, new_criteria, no_exude(), no_perturb());
That is when I see the problems. Surface tetrahedra missing from the
convex hull. Am not sure if the orientation is a problem as well.
On Tue, Sep 25, 2012 at 10:41 AM, Mariette Yvinec
<>
wrote:
>
> Usually the cgal mesher has no problem to mesh a cube
> with or without an accurate representation of the edges ....
> There might be some problem in the way you
> input the domain to the mesher ...
>
>
>
> Le 25/09/12 16:32, David Arken a écrit :
>
> Can we force the mesher to decompose the convex hull in any way? I
> think my problem is not orientation but missing tetrahedra on the
> surface of the cube.
>
> On Tue, Sep 25, 2012 at 10:30 AM, Mariette Yvinec
> <>
> wrote:
>
> The regular triangulation computed always fills the convex hull
> of it vertices,
> but the mesher does not consider
> all the tetrahedra as being part of the mesh :
> only the tets with their dual (weighted) center point
> within the cube are considered as part of the mesh
> and listed by the C3T3.
>
>
> Le 25/09/12 16:24, David Arken a écrit :
>
> Thanks for all the help. Another followup question:
>
> When I force the weights of a regular triangulation of a cube to be
> all zeros, the output triangulation I get is not a decomposition of
> the convex hull. Is this expected or a bug?
>
> Thanks,
> --Ram
>
> On Tue, Sep 25, 2012 at 7:19 AM, Mariette Yvinec
> <>
> wrote:
>
> Le 24/09/12 19:10, David Arken a écrit :
>
> Thanks for the quick reply Marriette. I did see the no exuder/perturb
> requirement in the documentation, but missed the part that says the
> other one. A few followup questions.
>
> 1. When I render the regular triangulation either in VTK or .mesh
> format, I see pictures like this:
>
> http://cgal-discuss.949826.n4.nabble.com/file/n4331141/Capture.jpg
>
> I think there are others who have asked about this problem in the
> forum before (as if it was an orientation problem).
>
> One solution to avoid orientation problems
> is to ask the
> the viewer to render both sides of each facet.
>
>
> 2. After I call refine mesh, I can use:
>
> typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
> const Tr& tr_ = c3t3.triangulation();
> for( Finite_vertices_iterator vit = tr_.finite_vertices_begin();
> vit != tr_.finite_vertices_end(); ++vit)
> cout << (*vit) << endl;
>
> and I see 4d output. I am assuming the last number is a weight (most
> of them are zeros). Now if I try to access the weight using
>
> vit->weight()
>
> I get a compilation error (vit->point() compiles and works). What am I
> missing?
>
>
> vit->point().weight() should work better
>
>
> Thanks,
> --Ram.
>
>
>
>
>
>
> On Mon, Sep 24, 2012 at 12:56 PM, Mariette Yvinec
> <>
> wrote:
>
> The weights on the mesh vertices come from two sources
> - the handling of one-dimensional features
> - optimization through the exuder
>
> If you don't want weights, you have
> - to input no one-dimensional feature or use a Polyhedral_mesh_domain_
> rather than a Polyhedral_mesh_domain_with_features_3
> - and choose no_exude()
> in the optimization options.
>
>
>
> Le 24/09/12 15:02, David Arken a écrit :
>
> I've 100k+ points, and the make_mesh+refine_mesh function puts weights
> on a few hundred. I tried to give them no_perturb() and no_exude() --
> but it seems it still puts weights on the points (is that a bug?). You
> think computing the Delaunay from scratch is the right way to solve my
> problem?
>
> I was trying to go thru the list of points, find out the weighted
> points, and was hoping to remove and reinsert them. But the following
> loop does not seem to compile: (Maybe my typedefs dont make sense?)
>
> // Fix regular triangulation
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Mesh_domain;
> typedef CGAL::Mesh_polyhedron_3<K>::Type Polyhedron;
>
> typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
> typedef
> CGAL::Mesh_complex_3_in_triangulation_3<Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_segment_index>
> C3t3;
> typedef C3t3::Triangulation Tr;
> typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator;
> const Tr& tr_ = c3t3.triangulation();
> for( Finite_vertices_iterator vit = tr_.finite_vertices_begin();
> vit != tr_.finite_vertices_end();
> ++vit)
> std::cout << (*vit).weight() << std::endl;
>
>
> Thanks.
>
>
> On Mon, Sep 24, 2012 at 3:42 AM, Olivier Devillers
> <>
> wrote:
>
> Le 9/23/12 5:26 PM, David Arken a écrit :
>
> What is the fastest way to convert a regular triangulation with
> weights on points to another regular triangulation with all weights
> zero. I hope that this will guarantee that the regular triangulation
> is indeed a delaunay triangulation.
>
> Thanks,
>
> ????
>
> compute the Delaunay triangulation of the unweighted points !
>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
>
> --
> Mariette Yvinec
> Geometrica project team
> INRIA Sophia-Antipolis
>
>
>
> --
> Mariette Yvinec
> Geometrica project team
> INRIA Sophia-Antipolis
>
>
>
> --
> Mariette Yvinec
> Geometrica project team
> INRIA Sophia-Antipolis
>
>
>
> --
> Mariette Yvinec
> Geometrica project team
> INRIA Sophia-Antipolis
>
>
- [cgal-discuss] Changing a regular triangulation, David Arken, 09/23/2012
- Re: [cgal-discuss] Changing a regular triangulation, Olivier Devillers, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, Mariette Yvinec, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, Mariette Yvinec, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, Mariette Yvinec, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, Mariette Yvinec, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/25/2012
- Re: Re: [cgal-discuss] Changing a regular triangulation, Laurent Rineau (CGAL/GeometryFactory), 09/25/2012
- Re: Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/26/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, Mariette Yvinec, 09/25/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, Mariette Yvinec, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, David Arken, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, Olivier Devillers, 09/24/2012
- Re: [cgal-discuss] Changing a regular triangulation, Monique Teillaud, 09/25/2012
Archive powered by MHonArc 2.6.18.