If you use Freestyle, one of its parameters is 'Crease Angle'.

[![enter image description here][1]][1] 

If you set that high in Freestyle's general settings, and one of the discriminants for the Line Set is *Edge Type > Crease*, then Freestyle will [pick up edges][2] between faces where the internal angle between them is below the given threshold.

There is a 'Face Smoothness' checkbox for the Crease Angle. If it is unchecked, it will use the angle between face-normals in the underlying geometry. If checked, it will use the normals as interpolated by the smooth shading algorithm...

[![enter image description here][3]][3]

...above, with 'Face Smoothness' checked. The left cylinder is flat-shaded, and the right cylinder smooth-shaded, with Autosmooth set to split out its caps.

There is also a *Crease Angle* modifier available for attributes of the Line Style. So you can, for example, vary the color of the line, depending on the angle between the faces it separates:

[![enter image description here][4]][4]

You can always render out Freestyle as a separate pass, to composite with other components as you choose.


  [1]: https://i.sstatic.net/BJEsp.png
  [2]: https://docs.blender.org/manual/en/dev/render/freestyle/parameter_editor/line_set.html#edge-types
  [3]: https://i.sstatic.net/fvEeW.png
  [4]: https://i.sstatic.net/yNdEb.png