Pergunta

What would be the best way to generate topological information for an object loaded from a STL file (STL stores just 3 vertices for each face). As a result I would like a winged-edge data structure or something similar.

Foi útil?

Solução

Main issue is to find all unique point positions, so that triangles can be represent as list of point ids (indices) instead as list of coordinates. To do that some nearest neighbour data structure is used. In this case, I think best are space partition data structures.

With that you can get list of unique point positions, and list of triangles that are represented as triple of indices in the list of points. To create winged edge data structure or similar 'connectivity' structure, you have to find all different edges (pairs of points that are in some triangle) and store connectivity data that you need (in which triangles is edge used, for a point in which edges and/or triangles is used, ...)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top