Open
Conversation
Previous approach assumed that drill definitions and positions are in the same order. But Eagle exports positions in reverse order: definitions: T7, T6, T5, T4, T3, T2, T1 positions: T1, T2, T3... T7 When e.g. T3 holes are handled, next from the definition order is T2. Since T2 positions are actually before T3 it is not found (-1), thus current code assumes it is the last one and includes all positions from that point forward (rendering T4-T7 positions with drill size of T3). It continues to T4 and renders T5-T7 positions with T4's size and so on. Offending file drills_1_16.xln: M48 ;GenerationSoftware,Autodesk,EAGLE,9.6.2*% ;CreationDate,2021-11-19T14:46:49Z*% FMAT,2 ICI,OFF METRIC,TZ,000.000 T7C0.200 T6C0.350 T5C0.400 T4C0.500 T3C0.800 T2C1.321 T1C5.200 % G90 M71 T1 X54500Y22225 T2 X69050Y28150 X73925Y28275 X65748Y8625 X15075Y3545 T3 X37825Y20300 X35825Y20300 X33825Y20300 X31825Y20300 T4 X21325Y8425 T5 X110725Y22975 X104725Y22975 X104725Y24975 T6 X26825Y21400 T7 X95950Y25425 X94825Y25425 X93650Y25425 X87750Y25425 M30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous approach assumed that drill definitions and positions are in the same order.
But Eagle exports positions in reverse order:
definitions: T7, T6, T5, T4, T3, T2, T1
positions: T1, T2, T3... T7
When e.g. T3 holes are handled, next from the definition order is T2. Since T2 positions are actually before T3 it is not found (-1), thus current code assumes it is the last one and includes all positions from that point forward (rendering T4-T7 positions with drill size of T3). It continues to T4 and renders T5-T7 positions with T4's size and so on.
So large black circle ends up on every small via's hole.
Offending file drills_1_16.xln: