How to create a representation of a half-edge structure for a polygonal mesh?

I would like to generate output to display the numerical data of the Half-Edge structure based on the input of the polygon mesh data (as numerical data).

The concept of reading a polygonal model is basically this:

For INPUT, the file is in the OFF format and includes data such as
(a) The first part: the number of vertices, the number of faces, and the number of edges.
(b) The second part: the line of each vertex,
(c) The last part: the line of each polygonal face.

Example: (based on top)
First part:
4 4 6

Second part:
-1.7 0.0 1.0
1.7 0.0 1.0
0.0 0.0 -2.0
0.0 3.0 0.0

:
3 0 1 2
3 0 3 2
3 3 2 1
3 0 2 3

, :

(a) :
  1. ( )
  2. x, y-, z-
() :
  1. ( , 2. )
  2. , , .
(c) :
  1. ( , b.2., 0)
  2. .

, , Half-Edge Structure, OUTPUT Notepad ..

+3
1

OpenMesh - ++, , , ... ;)

-1

Source: https://habr.com/ru/post/1767139/


All Articles