Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drill zero suppression parsing issue (?) #421

Open
Gianarci opened this issue Feb 20, 2024 · 0 comments
Open

Drill zero suppression parsing issue (?) #421

Gianarci opened this issue Feb 20, 2024 · 0 comments

Comments

@Gianarci
Copy link

Gianarci commented Feb 20, 2024

Hi,

looks like that many drill files have rendering issue. I believe that mostly are due to wrong number format identification. I see the following code inside the file src/syntax/drill.ts at line 37 (5.0.0-alpha version) that is weird for me:

const zeroSuppression = tokens
      .filter(t => t.type === Lexer.DRILL_ZERO_INCLUSION)
      .map(t => {
        if (t.value === 'LZ') return Constants.TRAILING
        if (t.value === 'TZ') return Constants.LEADING
        return null
      })

Is that correct? When t.value is 'LZ' we return TRAILING... it shouldn't be LEADING?

I've a drill file with "METRIC,TZ" but the rendering is completely wrong. I tried to change it to "METRIC,LZ" and then the rendering of drills is ALMOST correct! There's only an issue with G93X0Y0 that is interpreted as a hole (I've already seen this bug opened #353).
Other file with "INCH,TZ" renders correctly so I don't know if such condition should be inverted or if it's a problem only with "METRIC,TZ"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant