Half-Edge Mesh

half-edge mesh class methods

 key to the HEM class methods and face splitting modifier

This is a class to be used with the Anar+ library for Processing to create a half-edge (or doubly-connected) mesh datastructure which uses the parametric geometry of Anar’s faces, and points. The schema for this HEM class is based on the description of doubly-connected edge lists in Chapter 2 of the excellent Computational Geometry: Algorithms and Applications.

A half-edge mesh records, first of all, the geometry arrays of a mesh: the vertices, edges, and faces. Additionally, each edge, vertex, and face is supplemented by integer arrays which explain the connectivity of the mesh. A half-edge mesh is so called because each edge is split in two; the resulting ‘half-edges’ are associated with one of the two faces that is adjacent to that edge and given a direction (clockwise or anticlockwise) which is consistent for the mesh and opposite of the other half-edge (its ‘twin’).

The value of the Half-Edge datastructure becomes quickly apparent when working with large, irregular face arrays, as are often produced when exporting from CAD software. Future posts will cover intersection, location, and manipulation of the HEM where the speed and efficiency of the half-edge structure is levereged. The sketch which is packaged with this class, however simply gives an example of recursive subdivision of the HEM, and in the code, the process of adding new faces, edges, and vertices in a connected manner.

HEM in p55

recursive subdivision with no translation

HEM in p55

recursive subdivision with new vertices translated in the direction of the face normal

(.pde download)
(for a non Anar+ version see W:Blut’s HEMesh library)

Advertisements
Comments
4 Responses to “Half-Edge Mesh”
Trackbacks
Check out what others are saying...
  1. […] a previous post I covered the implementation of a Half-Edged Mesh as a class in Processing. In that definition, […]

  2. […] sketch expands on the earlier Half-Edge Mesh sketch, demonstrating how to generate a large HEM class from text files containing the vertex […]

  3. […] sketch adds to the Half-Edge Mesh sketch, a function sectionHEM for cutting a planar section through a mesh. It also uses the Mesh […]

  4. […] the logic behind the data-structure of a half-edge mesh can be difficult or unintuitive to work with at first, once it becomes clear, it can become […]



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: