title: Edge detection with Single-Pass Wireframe Rendering
body: <p>I would like to implement a typical CAD software and therefore need an edge detection algorithm to draw the silhouette of various meshes. Silhouette includes outline, ridges and creases of various objects. Here is an example of a cube created in Blender where the silhouette is made of thick orange lines:</p>
  
  <p><a href="https://i.stack.imgur.com/OrBa4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OrBa4.png" alt="enter image description here"></a></p>
  
  <p>I want to use a geometrical approach where wireframes are drawn on top of the objects and interior lines like diagonals are omitted. The wireframe rendering is described <a href="http://strattonbrazil.blogspot.co.at/2011/09/single-pass-wireframe-rendering_10.html" rel="nofollow noreferrer">here</a>. In this article, the geometry shader is used to draw the wireframe. 
  It is also explained that one has to set a per-vertex attribute to decide if a line should be omitted or not.</p>
  
  <p>My question is: How could I decide which lines I have to omit? I use OpenGL as rendering API by the way.</p>
  
  <p>EDIT: To clarify, I really want to draw just the edges that constitutes the silhouette but not any diagonals. Here is an example of what I want to achieve:</p>
  
  <p><a href="https://i.stack.imgur.com/tc2TP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tc2TP.png" alt="enter image description here"></a></p>