The reason the sandbags have trouble connecting is because of the way the game handles fence posts. A fence post projects it's fence from the models origin, and this origin can only be within a single cell of the model. Normally this single cell happens to be the only cell the building occupies, in the case of Guard Towers and Barbed Wire. The sandbags however occupy four cells, meaning the origin can only be located within one of these cells. So by rounding, it chooses the top right most cell to place the fence at.
Now that you know how it works, we can see why it gets blocked.
The game determines if a fence can occupy a cell depending on whether it is occupied by a zipped object, excluding a fence post's origin cell. So for example, we have two barbed wires.
![sHd6PE5.png](./download/file.php?id=1385&sid=e5ffb83b8c08f862418dbcb8f4f1baba)
- sHd6PE5.png (4.97 KiB) Viewed 2856 times
![sHd6PE5.png](./download/file.php?id=1385&sid=e5ffb83b8c08f862418dbcb8f4f1baba)
- sHd6PE5.png (4.97 KiB) Viewed 2856 times
Since none of the cells surrounding them are occupied, and they themselves only occupy one cell, they can project their fence on all the green cells. But now what happens when something like a resource occupies cells?
![Ju1L6rF.png](./download/file.php?id=1383&sid=e5ffb83b8c08f862418dbcb8f4f1baba)
- Ju1L6rF.png (7.18 KiB) Viewed 2856 times
![Ju1L6rF.png](./download/file.php?id=1383&sid=e5ffb83b8c08f862418dbcb8f4f1baba)
- Ju1L6rF.png (7.18 KiB) Viewed 2856 times
Here, the battery occupies the two cells in red. These red cells prevent fences from being projected across themselves, so in this example the fence post at the top can connect to both left and right, but the left post cannot connect to the right post, and vice versa.
The issue comes in when a fence post occupies more than one cell.
![QSKY6Lh.png](./download/file.php?id=1384&sid=e5ffb83b8c08f862418dbcb8f4f1baba)
- QSKY6Lh.png (12.51 KiB) Viewed 2856 times
![QSKY6Lh.png](./download/file.php?id=1384&sid=e5ffb83b8c08f862418dbcb8f4f1baba)
- QSKY6Lh.png (12.51 KiB) Viewed 2856 times
In this example, the sandbags occupy four cells. Since the game only allows the cell that contains the origin to have fences on it, the remaining cells that do not contain the origin are labeled as occupied and therefore block fences. So in this example, the sandbags can connect to the north and east fence posts as there are no red cells in between the origin cells. However the west and south fence posts are blocked by the sandbags' own cells.