Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Converting polygon into mesh

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Converting polygon into mesh


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Converting polygon into mesh
  • Date: Tue, 11 Oct 2011 10:59:30 +0200

The first thing to do is to compute snap rounded version of your
polygons and then process them. You will avoid degenerate cases handling.
I have no idea what is the expected output but your either use a
Constrained Delaunay Triangulation or an arrangement to compute one.

Relevant documentation pages:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_2/Chapter_main.html#Section_36.8
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Snap_rounding_2/Chapter_main.html
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2/Chapter_main.html

Sebastien.

Graviton wrote:
I have a lot of polygons. Ideally, all the polygons must not overlap one
other, but they can be located adjacent to one another. You can assume that
these polygons represent countries on a map, and I import these polygons
from a drawing. Due to rounding errors, I would have to allow for slight
polygon overlap ( defined by a certain tolerance) because all these polygons
are obtained from user hand drawing input, which is not as machine-precised
as I want them to be.
My question is how to convert these polygons into mesh ( with vertexes and
faces) and at the same time, one still knows which face it belongs to in the
original polygon. Any idea how to proceed with this?

My current idea is that I would

1. create one arrangement for each polygon ( a country), tag the faces in
the arrangement, see whether it is an unbounded face, or a bounded one. So
that each bounded face, I can still keep track it back to the original
polygon ( a country)
2. overlay all the arrangement together, and obtain an arrangement. Inside
this arrangement there will be a lot of faces, some of the faces are
correctly belonged to the only 1 face, some of the face is a result of two
polygon slightly overlapped one another. 3. After obtaining the faces, I will use snap rounding to clear off all the
sliver (http://en.mimi.hu/gis/sliver_polygon.html) and maybe eliminate a few
of the faces resulting from two polygon overlapped one another. This should
properly clean up the topology
4. Now all the polygons are in proper topology, i.e, no more sliver, no more
overlapped polygon, I can then collect the points and the face to construct
a mesh.

What do you think about the above approach? Or is there any other more
direct way of doing things?

This is a SO post, asking about the same thing.
http://stackoverflow.com/questions/7495487/convert-polygons-into-mesh


--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Converting-polygon-into-mesh-tp3893218p3893218.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.16.

Top of Page