Generating G-code
G-code is generated by your slicer. The slicer is a program that takes the file of your 3D model and slices it up into many layers. A model created for 3D printing is constructed by a contiguous surface of triangles. This forms the entire skin of your model, without any gaps or overlapping.
The following image is a model created with TopMod.

When the slicer program slices the model, it generates a perimeter of each Z layer. A sliced layer is illustrated in the following image:

In order to create a perimeter for the slicer, some or all of the triangles that intersect the XY plane for the Z height may be used. In the following image, we can see the places where some triangles may be eliminated due to size or redundancy:

This is one reason why different slicers may produce different results. As shown in the following image, we can see a difference in the 39th Z height layer of this model:

The narrow undercut of the perimeter is sharper in the Slic3r profile as opposed to the...