Menu

Just curious about the PolyMesh format

Pete
2016-02-10
2016-02-11
  • Pete

    Pete - 2016-02-10

    Hi!

    Just recently I was shown an imported PolyMesh, that had issues with a boundary. The problem was solved by deleting the faces at the boundary and recreating...

    Anyhow, trying to write a script to analyze the mesh, I ended up looking at the code of PolyMesh and I noticed that the edges in PME are defined as half-edges, with one vertex and a reference to the other half. On a cube there are 24 half edges.

    Obviously it works, but just out of my mechanical head, I began to wonder if this is not a kind of a tricky way of handling it? What are the reasons to use halves? Any benefits in defining edges as halves instead of just edges?

    -Pete-

     

    Last edit: Pete 2016-02-10
  • Harald G

    Harald G - 2016-02-10

    Hi Pete,
    I remeber Fracois talking about half-edged or winged edged format when it comes to Polymesh. Very similar to "Wings3D" as I remember...
    https://en.wikipedia.org/wiki/Winged_edge

     
  • Pete

    Pete - 2016-02-11

    Thanks, I get the principle. It actually seems very handy now :)

    So for every face the perimeter elements are listed in the counter-clockwise order. An edge would carry the information of two vertices and two faces and half of the times it would be backwards, concidering any particular face.

    A half edge, on the other hand, always refers to just one face, one vertex and the next half edge that refers to the same face.

    So with the half edges you don't need a separate list of vertices and edges to define a face. The half-edges contain all the information that is needed.

    I'm not sure if, what Wikipedia says about the Winged edges is exactly correct or if it really is supposed to be a different thing. François has commented PME to be a "Winged edge mesh", but what really seems to be happeing is described in the "Doubly connected edge list" a.k.a "Half-edge data sructure" https://en.wikipedia.org/wiki/Doubly_connected_edge_list.

    :)

     
  • francois guillet

    Yes a Polymesh is described by Half-Edge data structure. A half edge is indeed half of a winged edge so the combination of two opposite half edges are a winged edge.

     

Log in to post a comment.