sparkfunX / Desktop-PickAndPlace-CHMT36VA

Tools and conversion scripts for the CHM-T36VA Desktop Pick and Place from SparkFun
GNU General Public License v3.0
66 stars 32 forks source link

Auto offset is causing problems #4

Closed nseidle closed 6 years ago

nseidle commented 6 years ago

https://github.com/sparkfunX/Desktop-PickAndPlace-CHMT36VA/blob/master/Eagle-Conversion/ConvertToCharm.ulp#L676

We often use dimension lines to indicate v-scores. These lines cause the AutoOffset feature to kick in and cause all our placements to be off.

image

Our fix is to remove the v-score lines before running ULP. What is the purpose of the auto offset feature?

nseidle commented 6 years ago

image

6mm on both axis is a problem.

berniwa commented 6 years ago

I see

I could just allow the auto offset feature to be turned off and add some warning if the output file includes negative coordinates. (and the machine really doesn't like those)

But then the user would also have to define the board width/heigth in order for the mirroring of the bottom parts to work.

nseidle commented 6 years ago

I agree, negative coordinates really messes up the machine.

I think a warning if the board has negative coordinates is a good idea. Let's scan the design with dimension layer off. If copper layers has negative coordinates then show warning.

berniwa commented 6 years ago

I thought about scanning any other layer than the dimensions layer to detect the board outline, but it turned out to be problematic.

Unfortunately a ground polygon, that will not exactely start at the dimension layer, will screw things up. Eagle only allows to extract the drawn outline of a polygon, but with most boards people (like me), will just handdraw the polygon outline somewhat larger than the dimension and let Eagle's polygon fill, just fill it to the edge of the dimension layer. As I can only detect the drawn outline, not the generated, this means that I will always get an offset error in that situation.

In the pull request I sent now, I'll allow disabling the auto-offset and fill in the values manually. I also show the corrected values in the list and an error if there are negative coordinates. This should do the trick with your boards.

nseidle commented 6 years ago

Pull request https://github.com/sparkfunX/Desktop-PickAndPlace-CHMT36VA/pull/8 fixed this.