Closed THX2112 closed 6 years ago
Oh, that's bad! I agree with your supposition.
Why do you have an alias that is identical to your component name? The component name is hard matched (string compared) against the component name from the board. If it matches it uses it. If it doesn't match then the ULP will try the aliases. Remove your 2K-R0805 alias and it should avoid this particular issue in the future. But there's a bigger issue here...
Aliases are meant for the odd-ball names that sometimes sneak in when different libraries use different naming conventions. But they can lead to false positives, as you've experienced...
Here's a few ideas to fix the problem:
We could scan all the component names and if there's not a match, try again with aliases...
or
We could tighten the check so that aliases must be a one to one match, but allow partial matches on the NoMount line (it's better to get a false positive on the NoMount than swapping 2K where a 22K should be).
Slight correction, the ULP checks to see if the component name from the feeder sheet is contained inside the component name. This leads to your "2K" is inside "22K" problem.
Ok, I re-wrote the getFeederId() function to do the following priorities:
I believe this latest version will prevent your "2K is inside 22K" issue. Please give it a try.
Weird issue where 2K resistors are placed where 22K resistors should be. I think that "2K" is being matched in the alias for 22K. No other components are doing this, but I don't have 3K and 33K or 1K and 11K components.
Relevant feeders.csv:
Workaround is to remove 2K components and use 2.2K instead (which we're doing anyway).