Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Access the indices of vertices, edges and facets from power diagram

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Access the indices of vertices, edges and facets from power diagram


Chronological Thread 
  • From: Mael <>
  • To:
  • Subject: Re: [cgal-discuss] Access the indices of vertices, edges and facets from power diagram
  • Date: Tue, 18 Jun 2019 08:00:45 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:gxMSjBV4zsmF4yP5Gt4IX5a+S7DV8LGtZVwlr6E/grcLSJyIuqrYbBKDt8tkgFKBZ4jH8fUM07OQ7/m5HzVesd3Q4TgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrsAndrNQajIphJ6o+zhbEpmZDdvhLy29vOV+dhQv36N2q/J5k/SRQuvYh+NBFXK7nYak2TqFWASo/PWwt68LlqRfMTQ2U5nsBSWoWiQZHAxLE7B7hQJj8tDbxu/dn1ymbOc32Sq00WSin4qx2RhLklDsLOjgk+2zRl8d+jr9UoAi5qhJi3YDUboGbOvlwcKzTctwVR3ZOUMlKWixdAI6xdZcDA/YPMOtaqYT2ulsArQG5BQmpHO7hzSVHiWHy3aYn1OkhFBvJ0xIkH94UqnTUq8j1NagMXuCx1qXIyS/MYOhN1jjj84XIfQ4uofaJXb1ubcrR00kuFw3fgVqMtYzlOCmV1+QXv2eH6OpgUPuihmg6oA9/pTivw90jiojPho8NzFDL7z52z50xJdKmUkJ0fdmkEJ5Iuy6GOIt5WMciT3tvuCYgxb0Lv4OwcisSyJk/2hLSaf+Kf5KG7x/tTuqdPCp0iG5/dL6hiRu/9VCsxvPmWsWp0FtGtCpIn9nWunwQ1xHe5c6KQeZn8Ei7wzaAzQXT5/lEIU8qkarbLIYsz70qmpoWtkTPAzX6mEDsg6+XckUo4++o6/n7Yrn8oZ+cKY90hhv4MqswhsyzGeU4Mg4QUGiH4emwyb/u8E7jTLhEgPA6iLTVvI3GKcgBuKK0DQtY3p4m6xmlDjem1NoYnWMALFJAYB+HipLmNE/KIPziF/e/hEmskTh1yPDCJLHhBo/CIWPYn7j/Zrt95FBTyA02zd9B+5JUELEAIPzpVUDtqNzYCQU5Mgyuz+n7D9V905sSWXiTDa+BLKPSrViI6/ozLOmDfoAVvC/xJOUk5/71kXA5hEQdfbKy0JsMaHG4G+xmLF+DbXrthNcBC2YKsRAkQOzkkl3RGQJUMn29VqZ56jAgA5+9Fq/CQJqsifqPxnSVBJpTM0VPB1TERXLheoHCQfAReC+WZMtomDYJfbesTIosyQu/ugbx1719P6zf/ShO5sGr78R8++CGzUJ6zjdzFcnIizjRHVExpXsBQnoN5I46uVZ0kA7R3qV/hvFED81d7vhVVR0rc5Xbyr4iUoGgakf6Zt6MDW2ebJCjCDA1QMg2xoVXMUlwHNCvkgrS0SOhH7gPhvqAA5lmqvuBjUi0HN50zjP97Idkj1QiRZETZz3gg6kmsQ3aBoqMlFiF0aG0deIa0TKfrGo=

Hello,

Your way to access geometric points is correct.

By default there is no index associated to vertices (internally, everything is done with pointers). However, you can use vertices with info (see e.g. this documentation example https://doc.cgal.org/latest/Triangulation_3/Triangulation_3_2regular_with_info_3_8cpp-example.html) and associate a unique ID to each of your vertex. Then you can simply get the ID with fvi->info().

Best,
Mael

On 18/06/2019 04:32, BRYang wrote:
Hi, I am trying to compute the power diagram of some spheres, and access the
indices of the vertices.
For now, I access the vertices, edges and facets with the
Finite_vertices_iterator fvi, Finite_edges_iterator fei and
Finite_facets_iterator ffi, and access the vertices as follows:
//vertex:
fvi->point()
//two vertices of edge:
fei->first->vertex(fei->second)->point()
fei->first->vertex(fei->third)->point()
//three vertices of facet:
ffi->first->vertex(0)->point()
ffi->first->vertex(1)->point()
ffi->first->vertex(2)->point()

Am I doing it right?

The other problem is that is there a way to access the indices of vertices
of the edges and faces? Thank you!



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page