Do the wi-fi communications from Mac to Mac travel through the access point? Let’s put two Macs MAC1 and MAC2 on the same table. They are connected to the same AirPort (wi-fi) network. They are connected to the access point AP, which is far away, at 10 meters.

The Macs are not in an ad-hoc (computer-to-computer) network.

Now, let’s send a file from MAC1 to MAC2. 

Will the communications go until the access point AP and back ? Or will the waves take the short way between MAC1 and MAC2 ?
They go through the AP.

It's not like the MACs "see" each other just like that in the same network, it's the AP that "tells" them who's in the network. All data recieved and transmitted on a Wi-Fi network must pass through the router. The network is not triangular, all devices in a network except for the AP of course have only 1 connection ( MAC1---AP---MAC2 ).