I have come to the conclusion that it is the height which enabled the cat to get into my box. It has two partial partitions, so that the hog has to turn immediately left on entering, along the corridor, then immediately right, another corridor, then immediately left. These with only narrow corridors, just enough for a hog to get through and a fairly small chamber at the end (only just about room for a hog to turn round). Yet, a cat somehow managed to get in and out again frontwards. I then put a half brick in the first corner, so that it took up almost the whole width of the path, but only half the height. I knew the hog would be able to climb over, but hoped the cat would find it too shallow at that point. So far it seems to have worked. So if your box is big enough you could try something similar inside the box. For instance if the box is high enough for a hog to climb over a brick, block it off, to the height of a brick, after a small entrance area. You could make a sort of step arrangement for the hog if they are big bricks, but hogs are quite good climbers.