Specify the Margins for Snaping

Syntax: <SnapMargin>
    <left>...</left>
    <right>...</right>
    <top>...</top>
    <bottom>...</bottom>
</SnapMargin>
Default Value: 0 on every side (the part is snapped with the border of image)
Description: The inside margin in Stud coordinates that must be stripped inside the part to snap the part at the correct place on the grid.

Most of the time, you can keep the default value (no margin), for snapping. For example, when you want to snap the border of a baseplate to the grid line. But if you take a 9V straight track for example, this part is 17 studs long: 16 stud for the rail itself, and half a stud on both sides which will overlap with the next piece of track (connection pins). In this case you don't want to snap this part based on the extremity of its connection pin. If you do so, you will end up with a gap between the grid and the layout of the parts like in this example:

That's why this part has a 0.5 stud margin on both left and right side in its XML file, as you can see here:

<SnapMargin>
    <left>0.5</left>
    <right>0.5</right>
    <top>0</top>
    <bottom>0</bottom>
</SnapMargin>