Code On Github: https://github.com/brandondrury/PlacementFlip
WARNING! This code is not pretty! This is tourniquet code I wrote to solve a problem with a time budget of about zero seconds. The design pattern used was “fast as hell”. It’s not easy to maintain. Error checking is probably non-existent. This “prototype” has value, though, and there’s no reason it should die so I’m putting it here.
The Problem
There is no exact standard on the orientation of the placement of electronics components on a circuit board. At least there isn’t one that everyone agrees to. Some EDA tools use the top perspective for components placed on the bottom and the top using the same origin and simply specify the side for each part. Some flip the board over and look from the perspective of the bottom. Some times the EDA tool will export the board with the Y-axis values flipped. Philosophers ponder why.
Solution
This Python script allows us to quickly flip the the placement of a .tsv file on either the top, bottom, or both sides and we can flip along either the x-axis or y-axis.
Use
- Place the PlacementFlip.cmd in Windows > Run > shell:sendto
- Find the .tsv file with placement that requires flipping.
- Right click on that .tsv file and select SendTo > PlacementFlip.cmd
- Follow the menu
- A FILENAME_flipped.tsv file will be generated in the same directory as the original file.