Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] "Facet-vise" distortion of a Polyhedron_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] "Facet-vise" distortion of a Polyhedron_3


Chronological Thread 
  • From: Merlin Etzold <>
  • To:
  • Subject: Re: [cgal-discuss] "Facet-vise" distortion of a Polyhedron_3
  • Date: Tue, 5 Apr 2016 18:25:01 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:GBEp0Ry+P5Eq0YTXCy+O+j09IxM/srCxBDY+r6Qd0eMfIJqq85mqBkHD//Il1AaPBtWLrakVwLOP6ujJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6CyZ/mnLnrotX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86FpyshbTK+vf7gkVacKS3M9ImUt7YvqswPCRE2B/DwHQ2AOm11JBQbCqxr1V5O0virhvfdmw3qmOpj9QrkwHDij9Kx2UwTAiSEdNjd//nuEpNZ3ifd+rQilpho37pLGZ4WZfK57c7nZfNUTSHZTWcJdfyNEC4K4KYAICrxSbq5js4Dhqg5W/lOFDg62Cba3xw==

Dear Andres,

As a follow on (again, the inexperienced user is speaking ;-) ): now I have all the vertices, but I had naively assumed that I would have write access to the coordinates?

Thank you and best wishes,
Merlin :)

Merlin A. Etzold, PhD
24 Oyster Row
Cambridge
CB5 8LJ
United Kindgom
+44 7851 467997

On 5 April 2016 at 10:29, Andreas Fabri <> wrote:
Hello,

You can use
http://doc.cgal.org/4.8/BGL/group__PkgBGLIterators.html#ga7746cb7b28520877375dfff6ec7bd32c

as follows:

typedef boost::graph_traits<Polyhedron>::vertex_descriptor
  vertex_descriptor;
typedef boost::graph_traits<Polyhedron>::face_descriptor
  face_descriptor;

Polyhedron P;

BOOST_FOREACH(face_descriptor fd, faces(P)){
  BOOST_FOREACH(vertex_descriptor vd,
                CGAL::vertices_around_face(halfedge(fd,P),P)){
    std::cout << vd->point() << std::endl;
  }
}

andreas


On 05/04/2016 11:22, Merlin Etzold wrote:
Dear All,

I have 3D Polyhedra which I want to represent as Polyhedron_3 which
shall represent growing shapes. To simulate the growth process I want to
shift individual facets along their normal direction. My strategy to do
this is to access the vertices belong to the facets and apply a
translation them towards the desired direction.

However, as an inexperienced CGAL user I struggle a bit finding the best
strategy to access the vertices belonging to the neighbouring facets. Is
there an easy way to get an iterator for the vertices belonging to a facet?

Thank you and best wishes,
Merlin


--
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






Archive powered by MHonArc 2.6.18.

Top of Page