From edge to polygons



  • (1) Using PolyInfo one can get the unique edge index that is between 2 polygons of a mesh (via Neighbor::GetPolyInfo).
    (2) Using Neighbor::GetEdgePolys one could obtain the 2 polygons sharing the edge defined by 2 points making up the edge between these 2 polygons ... or only the one polygon if this edge is at the boundary o the mesh.

    But is there a way to go from a unique edge index - obtained via (1) - back to the polygons sharing that edge, without the need of iterating over all polygons and finding out if a polygon has the specified unique edge index as one of its edges via (1) ?



  • hello,

    Except from what you already said, we don't see any solution to go from edge to polygons.

    Do you have performance issue with those ?

    Cheers
    Manuel



  • @m_magalhaes said in From edge to polygons:

    Do you have performance issue with those ?

    I am just investigating options for designing the better data structure to hold selected points, or edges or polygons.
    In case of edges, I was looking into the possibility to only store a single value: the unique edge index
    But iterating over all available polygons could be a potential bottleneck. As such it seems that using unique edge index as data is not the best solution.
    I will probably be better off by storing a pair of (4 * polygon + edge) values instead.

    The purpose of this exercise was to find an easy way to go from polygon to edge and back ... selecting two neighboring polygons, finding the shared edge, storing this edge value, reading the edge value, and from this knowing which are the 2 neighbor polygons.



  • hello,

    @C4DS said in From edge to polygons:

    I will probably be better off by storing a pair of (4 * polygon + edge) values instead.

    This look like what the edge selection tag is already doing.

    Cheers
    Manuel



  • @C4DS said in From edge to polygons:

    storing a pair of (4 * polygon + edge) values

    ... it will be.
    Thanks for the confirmation