Skip to content

Conversation

@ellisgl
Copy link

@ellisgl ellisgl commented Feb 13, 2020

No description provided.

…the config window and changed their default step for up/down actions to be 0.0125
@ellisgl
Copy link
Author

ellisgl commented Feb 13, 2020

#271

@MarkJeronimus
Copy link

MarkJeronimus commented Feb 14, 2020

It probably doesn't need to be 0.0001. It can probably be 0.0005 without loss of functionality, because useful steps are usually repeatedly divisions by 2:

0.5
0.25
0.125
0.0625 ← possible with 0.0005 resolution (or even 0.0025)
0.03125 ←not possible with 0.0001 resolution

Btw, does changing the parameters of just the spinner boxes also prevent rounding the coordinates down the line? Is this tested?

@ellisgl
Copy link
Author

ellisgl commented Feb 16, 2020

I looked for reference to those two inputs and couldn't find anything about rounding. I'll double check that.
I can change it to 0.0005 - I was just selecting something as the at highest res available for 4 decimal places.

0.03125 would not be possible with 0.0005 either.

ellisgl added 3 commits February 15, 2020 21:53
…and moveStep in the options set to match html (0.0125) and updated the round function to have 4 decimal places, instead of two.
@ellisgl
Copy link
Author

ellisgl commented Mar 5, 2020

@MarkJeronimus I tested and just fixed a couple rounding issues. Floating point addition in JS is silly.

@MarkJeronimus
Copy link

Best way is to adopt the strategy used by monetary calculations. Use integer fixed-point precision (i.e. cents or hundreds of cents) and only convert to floating point when presenting values to the user.

I just realized the most common steps also includes the binary divisions of 0.75". Thats:
0.75
0.375
0.1875
0.09375
0.046875

You could use integer units which are 1/64th of an inch (0.015625") which would accommodate all those and the divisions of 0.5".

@ellisgl
Copy link
Author

ellisgl commented Mar 6, 2020

I was using 19.05 mm as 1 U. So in my setup in KiCAD, I use a 1.190625 mm grid, which is 1/16th (0.0625) of 1 U based on 19.05. But from what I can tell, this is all based on U, not in or mm, so you could go down to 0.0005 U, if you wanted to.

@iandoug
Copy link
Contributor

iandoug commented Jun 10, 2021

FWIW, back in the day I set move step to 0.1, but IJP pushed it back to 0.5. Same with sizes and rotate.

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