Get coordinates from face vertex in a Polyhedron

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

Get coordinates from face vertex in a Polyhedron

cisant
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Get coordinates from face vertex in a Polyhedron

Sebastien Loriot (GeometryFactory)
face->halfedge()->vertex()->point().x() // first vertex
face->halfedge()->next()->vertex()->point().x() // second vertex
face->halfedge()->next()->next()->vertex()->point().x() // third vertex
etc...

This is based on a halfedge data structure.

If you are using Surface_mesh you should do:
sm.point( target(sm.halfedge(face), sm) ).x()

Sebastien.

On 5/23/19 6:12 PM, cisant wrote:

> The title speaks for itself. I need help on how to get the XYZ coordinates of
> vertex of each face of a Polyhedron.
>
> I think on a logic working like:
>
> face[0].vertex(1).x();
> face[0].vertex(1).y();
> face[0].vertex(1).z();
>
> This should be the way to get the coordinates of second vertex on first
> face;
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Get coordinates from face vertex in a Polyhedron

cisant
CONTENTS DELETED
The author has deleted this message.