Question: 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:

[![enter image description here](https://i.stack.imgur.com/OrBa4.png)](https://i.stack.imgur.com/OrBa4.png)

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 [here](http://strattonbrazil.blogspot.co.at/2011/09/single-pass-wireframe-rendering_10.html). 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.

My question is: How could I decide which lines I have to omit? I use OpenGL as rendering API by the way.

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:

[![enter image description here](https://i.stack.imgur.com/tc2TP.png)](https://i.stack.imgur.com/tc2TP.png)

Answer: 
From your sample pictures I infer that you want to enhance 

* the silhouette edges, i.e. those that belong to the outline of the projections,
* the salient edges, i.e. those that join two angled faces.

The former are determined by looking at the orientation of the faces: a face is "facing" when the observer is outside the half-space it delimits and conversely. A silhouette edge is one that belongs to a facing face and a non-facing face. Note that this is a viewer-dependent property.

A salient edge is such that it joins two faces forming a sufficiently large angle that the connection is considered non-smooth. (The angle threshold is up to you.) This is a viewer-independent property.
Consider freestyle
<https://www.blender.org/manual/en/render/freestyle/index.html>

> 
> Freestyle is an edge- and line-based non-photorealistic (NPR) rendering >engine. It relies on mesh data and z-depth information to draw lines on >selected edge types. Various line styles can be added to produce >artistic (“hand drawn”, “painted”, etc.) or technical (hard line) looks.
> 
> 
> 

I haven't used it yet, but am planning to give it a try for creating line drawings from 3d models.