Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Remeshing a surface

Subject: CGAL users discussion list

List archive

[cgal-discuss] Remeshing a surface


Chronological Thread 
  • From: gupta61 <>
  • To:
  • Subject: [cgal-discuss] Remeshing a surface
  • Date: Sun, 17 Feb 2013 12:08:13 -0800 (PST)

Hi,

I am starting a new thread for surface remeshing as suggested by Philippe. I
will first try to explain what I am trying to achieve. I work in the field
of computational mechanics and currently is working on crack propagation in
3D. So I create an initial crack surface and then update the crack surface
at each step. So as you can imagine after a lot of propagation steps, the
crack becomes really large and thus have many vertices and edges. So the
idea is to remesh the crack surface so as to replace the finer triangulation
with a coarser triangulation while preserving the geometry of the surface. I
am attaching three images in the post. So imagine that the first image is
the first surface I am starting with, second one is what I have computed
after a few 100 steps. Now as it can be easily seen that it has a lot of
vertices and triangles. So I would like it to convert to a surface as shown
in image 3.

cgal_image_1.png
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/cgal_image_1.png>
cgal_image_2.png
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/cgal_image_2.png>
cgal_image_3.png
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/cgal_image_3.png>

So I would start by just asking if you have any suggestions how can I
achieve this using CGAL? Only thing to keep in mind is that the surface I
have posted here is planar but for my case the surfaces can also be
non-planar.

I tried using function "make_surface_mesh" to do this. The problem I am
encountering is that the code hangs and never returns back if I try to
remesh. I am attaching a simple example with this message which can recreate
the problem. There are 4 files attached:
*test_CGAL_remesh.C* - File with main() where I am reading the input
surface, getting the points and trying to make another surface from those
points.
*test_CGAL_config.h* - Configuration file for defining the typedef and
kernel etc.
*Polyhedron_circular.off* - This is the input file. So this is analogous to
image 2 i.e. a surface with a fine triangulation.
*Complex_2_in_triangulation_3_file_writer.h* - This is a modified file from
me. The only difference is that I convert the coordinates in "double" in
order to print them.

test_CGAL_remesh.C
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/test_CGAL_remesh.C>
test_CGAL_config.h
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/test_CGAL_config.h>
Polyhedron_circular.off
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/Polyhedron_circular.off>

Complex_2_in_triangulation_3_file_writer.h
<http://cgal-discuss.949826.n4.nabble.com/file/n4656749/Complex_2_in_triangulation_3_file_writer.h>


After a successful compilation, when I run it, I get the following output:



Build AABB tree...done (0 ms)
Insert initial point set...
Add Boundaries
vertex coordinates:
0.100083 0.0229944 -0.0229944

Add Boundaries
vertex coordinates:
0.102934 0.015471 -0.015471

Add Boundaries
vertex coordinates:
0.104657 0.0077781 -0.0077781

Add Boundaries
vertex coordinates:
0.105234 0 0

. (some more coordinate information)
.
.
.

Add Boundaries
vertex coordinates:
0.0851358 0.0437379 -0.0437379

Add Boundaries
vertex coordinates:
0.0911349 0.0372056 -0.0372056
Number of Points in myPoints container = 59
Number of Point in triangulation 3D = 59
done (0.004 ms)


At this point, the code hangs. I have waited for more than a few minutes and
nothing happens. So my interpretation of the situation is that somewhere it
goes in an infinite loop and never comes back.

I would like to know if there is anything I can change in the way I am
remeshing the surface. Thanks a lot for the patience to go through this long
post. I really appreciate any help I can get on this.





-----
Piyush Gupta
UIUC
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Remeshing-a-surface-tp4656749.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page