In the "Rimworld" mod "Save our Ship 2" I managed to capture a pirate ship. The large, red ship is the pirate ship, and the small asymmetrical ship is mine. First, the pirates send a boarding party using small personal shuttles. These landed spread out around my ship, allowing my colonists to gang up on the individual pirates ad take them out.
Then I send my guys over to the pirate ship, in an effort to take them out. I had them use the airlock as a chokepoint. The pirates threw themselves at my colonists until they routed. The pirates tried running to the edge of the map in order to escape. A lot of the remaining pirates didn't have space suits at this point, and I had lined up my colonists to shoot the fleeing pirates, so none of them actually managed to reach the edge of the map. Which wouldn't have helped them eitherway, because they're in geostationary orbit.
This would be a lot more difficult if the enemy AI wasn't brain dead.