Subject: CGAL users discussion list
List archive
- From: Benjamin Kehlet <>
- To: cgal-discuss <>
- Subject: Re: [cgal-discuss] Unexpected result when meshing polyhedron
- Date: Fri, 18 Jul 2014 13:07:01 +0200
Ah, I see. Thanks!
I will try to come with an implementation of
Construct_initial_points() that makes sure all components are
represented.
Is the reason for shooting random rays that the points should be
spread out over the surface or could I just pick some points (eg. via
the vertex iterator)? (I generally find (bug) reproducability a nice
feature :) )
Benjamin
2014-07-18 12:00 GMT+02:00 Andreas Fabri
<>:
> Hi Benjamin,
>
> the polyhedral domain class has a function
> Polyhedral_mesh_domain::Construct_initial_points
>
> that provides an intial set of points on the surface.
> It currently does this by shooting rays in random
> directions from the center of the bounding box.
>
> When the surface has several connected components
> and for a component no intial point is given
> it may happen that the mesh generator later
> never finds it (by also shooting rays, not random
> though).
>
> What you have to do is to initialize
> the Complex_3_in_triangulation_3 with better
> points by doing what
> Polyhedral_mesh_domain::Construct_initial_points
> Mesh_3::init_c3_t3 do.
>
> If I find the time next week, I will try to provide
> an example.
>
> best,
>
> andreas
>
>
> On 17/07/2014 01:40, Benjamin Kehlet wrote:
>>
>> Hello CGAL people!
>>
>> I got a report of some unexpected results in mshr (a mesh generation
>> component in the FEniCS project which uses CGAL heavily). I have
>> simplified it a bit and reproduced the issue as a standalone CGAL
>> program.
>>
>> When meshing a box with a crude triangulation of a sphere subtracted,
>> the sphere is sometimes "missing" in the resulting mesh.
>>
>> When meshing the polyhedron in smaller.off (which is basically an axis
>> aligned box with corners at (-1, -1, -.4) and (1,1,1) with a sphere
>> with center at origin and radius .3 subtracted) it works fine. See the
>> surface plot of the resulting mesh in smaller.png.
>>
>> However, with bigger.off (where the first corner is at (-1,-1,-.7) and
>> the rest is equal) the inner sphere can not be seen in the plot. See
>> bigger.png.
>>
>> I confirmed that it is not a plotting issue by calculating the volume
>> of the mesh. For bigger.off the result is 6.8 which is equal to the
>> volume of the box (2*2*1.7). For smaller.off it calculates the volume
>> to 5.5223. I assume is the correct solution since it is smaller than
>> 5.6 which is the volume of the box (2*2*1.4=5.6). The program source
>> code is attached. The issue seems to be insensitive to the meshing
>> parameters.
>>
>> Best regards
>>
>> Benjamin Kehlet
>>
>
> --
> Andreas Fabri, PhD
> Chief Officer, GeometryFactory
> Editor, The CGAL Project
>
> phone: +33.492.954.912 skype: andreas.fabri
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
- [cgal-discuss] Unexpected result when meshing polyhedron, Benjamin Kehlet, 07/17/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Andreas Fabri, 07/18/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Benjamin Kehlet, 07/18/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Laurent Rineau (CGAL/GeometryFactory), 07/18/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Benjamin Kehlet, 07/18/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Andreas Fabri, 07/22/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Benjamin Kehlet, 07/23/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Laurent Rineau (CGAL/GeometryFactory), 07/18/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Benjamin Kehlet, 07/18/2014
- Re: [cgal-discuss] Unexpected result when meshing polyhedron, Andreas Fabri, 07/18/2014
Archive powered by MHonArc 2.6.18.