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

User selectable default units. #164

Closed
VanHulleOne opened this issue Feb 24, 2023 · 1 comment · Fixed by #217
Closed

User selectable default units. #164

VanHulleOne opened this issue Feb 24, 2023 · 1 comment · Fixed by #217
Labels
enhancement New feature or request

Comments

@VanHulleOne
Copy link

Feature/enhancement would be to have user selectable default units. Maybe as global/keyword variables?
Default_Length = [mm] or something like that and then any length result that doesn't specifically call out a unit would use that value. I would not expect it to change any other unit for example torque would still come out as N*m and not N*mm. For the scale of my work most of the data is in inches or millimeters and having to add the extra four characters ([mm] or [in]) just to keep my result in the same units as my input data gets old.

The next two ideas are related although I'd aim for the above one first:

  1. Detect local cell units, if I type 25[mm] + 75 [mm] = it would notice than all of my values use the same units and then give me my result in mm.

  2. Allow results in multiple units. 25[mm] + 75[mm] = [mm | in] = 100[mm] | 3.937[in] I do a lot of work back and forth between English and metric and different people have a better feel for one or the other so I often just present both values. This would save an extra cell just for unit conversion.

In case you couldn't tell I discovered your application this week and think it is pretty great. I am a full time mechanical engineer and was looking for an open source solver that would help me keep track of units and provide easy graphs etc, pretty much everything your work is doing. These "issues" are just to help give you some user feedback. Please keep up the great work!

@mgreminger
Copy link
Owner

Thanks for the feedback and encouragement, much appreciated. I don't notice some of the pain points a new user may notice, so I appreciate the feedback from that prospective.

Yes, I agree that output units should match user units. I actually prefer the approach to keeping track of the units the user is using and mirroring those in the results as apposed to manually specifying the preferred unit. Would need to keep track of units across the entire sheet, since using variables, the user might not specify units in the cell they are querying the result in. This could apply to units on the RHS of a query statement as well, so that a unit would only need to be specified once for compatible units.

Nice idea about allowing querying values with multiple units. It's a little more involved since it involves changing the equation parser, but doable.

I'm working on updating some of the core code from JavaScript to TypeScript (#163) to make some of these changes easier to implement. The current core code is a bit gnarly and hard to update safely because of how it constructs objects on the fly rather than all at once with types.

@mgreminger mgreminger added the enhancement New feature or request label Feb 24, 2023
@mgreminger mgreminger linked a pull request Nov 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants