Skip to content

Fix "Can't compare with units and without." exception#580

Closed
ndilieto wants to merge 3 commits into
pcb2gcode:masterfrom
ndilieto:master
Closed

Fix "Can't compare with units and without." exception#580
ndilieto wants to merge 3 commits into
pcb2gcode:masterfrom
ndilieto:master

Conversation

@ndilieto

Copy link
Copy Markdown
Contributor

Enabling milldrill-diameter and min-milldrill-hole-diameter
makes the program abort with the following exception:

Exporting milldrill... terminate called after throwing an instance of 'comparison_exception'
what(): Can't compare with units and without.

This patch fixes it.

Signed-off-by: Nicola Di Lieto [email protected]

Enabling milldrill-diameter and min-milldrill-hole-diameter
makes the program abort with the following exception:

> Exporting milldrill... terminate called after throwing an instance of 'comparison_exception'
>   what():  Can't compare with units and without.

This patch fixes it.

Signed-off-by: Nicola Di Lieto <[email protected]>
@ndilieto

Copy link
Copy Markdown
Contributor Author

Also added a fix for #582

The %s format sometimes produces invalid g-code as
small numbers are converted to exponential form. In
addition larger numbers are truncated.

Therefore change the format to %.5f which, as an
example, outputs

> o1 call [0.00003] [13.26319] [-0.08000]

instead of

> o1 call [2.54e-05] [13.2632] [-0.08]

Signed-off-by: Nicola Di Lieto <[email protected]>
@coveralls

coveralls commented May 24, 2021

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage remained the same at 69.294% when pulling 78dceac on ndilieto:master into 41b1c52 on pcb2gcode:master.

@eyal0

eyal0 commented May 24, 2021

Copy link
Copy Markdown
Contributor

No file diffs between this and master anymore so I think that we're done. Thanks for your work, both finding the issues and fixing them!

@eyal0 eyal0 closed this May 24, 2021
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

Successfully merging this pull request may close these issues.

3 participants