Holes in mesh

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Holes in mesh

Gabriel Balaban
Dear CGAL people,

I modified the demo mesh_polyhedral complex to make a mesh within a mesh,
but I seem to be getting holes in the outside mesh for some reason. Could you please help me out?

The file holes_in_mesh.png is a screenshot from paraview of the resulting mesh,
and make_mesh.cpp is the c++ program that makes the mesh.
The outer two files are the inner and outer mesh.

I am aware that for cubes it would be easier to use geometric predicates, but I would like to extend the meshing to more complicated meshes so that is why my simple test case has surface meshes.

Cheers,
   Gabriel


Research Associate
Kings College London
St. Thomas Hospital

holes_in_mesh.png (36K) Download Attachment
outer_cube.off (232 bytes) Download Attachment
inner_cube.off (232 bytes) Download Attachment
make_mesh.cpp (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Holes in mesh

Laurent Rineau (CGAL/GeometryFactory)

Le Monday, May 21, 2018 6:33:00 PM CEST Gabriel Balaban a écrit :

> Dear CGAL people,

>

> I modified the demo mesh_polyhedral complex to make a mesh within a mesh,

> but I seem to be getting holes in the outside mesh for some reason. Could

> you please help me out?

>

> The file holes_in_mesh.png is a screenshot from paraview of the resulting

> mesh,

> and make_mesh.cpp is the c++ program that makes the mesh.

> The outer two files are the inner and outer mesh.

>

> I am aware that for cubes it would be easier to use geometric predicates,

> but I would like to extend the meshing to more complicated meshes so that

> is why my simple test case has surface meshes.

>

> Cheers,

> Gabriel

 

Your construction of the mesh domain is strange: `inner_off` is used twice, with different incidences. If you remove the first occurrence of it, the produced mesh is fine. I attached the modified version I had used.

 

--

Laurent Rineau, PhD

R&D Engineer at GeometryFactory http://www.geometryfactory.com/

Release Manager of the CGAL Project http://www.cgal.org/

 


make_mesh.cpp (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Holes in mesh

Gabriel Balaban
Dear Laurent,
Thank you much for taking a look at the files I sent. When I ran your "make_mesh.cpp" I got a mesh in which the holes are gone, but the
element markers are mixed up (see attached).

I think the confusion for me and other people using this example is how to set up the incident subdomains correctly.
Would you please be able to explain how the subdomain numbering works? I couldn't find this in the documentation.

Kind Regards,
   Gabriel



On Tue, May 22, 2018 at 1:29 PM, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:

Le Monday, May 21, 2018 6:33:00 PM CEST Gabriel Balaban a écrit :

> Dear CGAL people,

>

> I modified the demo mesh_polyhedral complex to make a mesh within a mesh,

> but I seem to be getting holes in the outside mesh for some reason. Could

> you please help me out?

>

> The file holes_in_mesh.png is a screenshot from paraview of the resulting

> mesh,

> and make_mesh.cpp is the c++ program that makes the mesh.

> The outer two files are the inner and outer mesh.

>

> I am aware that for cubes it would be easier to use geometric predicates,

> but I would like to extend the meshing to more complicated meshes so that

> is why my simple test case has surface meshes.

>

> Cheers,

> Gabriel

 

Your construction of the mesh domain is strange: `inner_off` is used twice, with different incidences. If you remove the first occurrence of it, the produced mesh is fine. I attached the modified version I had used.

 

--

Laurent Rineau, PhD

R&D Engineer at GeometryFactory http://www.geometryfactory.com/

Release Manager of the CGAL Project http://www.cgal.org/

 




--
Research Associate
Kings College London
St. Thomas Hospital

cube_with_elements.png (100K) Download Attachment