Thursday, May 21, 2009

Programming: Inches to mm, sure, it's simple.

Another idea for a program, that I know, it's already been done a bunch. However, I wanted to do it MY way.

90% of the time, the reason I use the calculator program is to convert inches to mm, and most of the time now days I don't even need to, certain conversions are just burned into my brain.

But, in CAD it's nice to have round numbers. Not just because they look pretty but because whoever is reading your CAD file will be more comfortable knowing it wasn't some mistake.

Deliberate dimensions shouldn't usually go beyond the digits of tollerance.

What does this have to do with, um... anything?

Well if you convert from inches to mm or vice versa, there's a bit of extra, irrelavent stuff going on, as I mentioned before, that's outside of tollerance/relavence. So if we have a program that goes to a decent number of tollerance digits, we can then see the implications of our numbers in either units.

Or another way of looking at it is if you understand mm or inches in terms of spacial relationships and tollerances, but not the other way around (e.g. you know what 0.005" difference in diameter is, but what is that in mm.... 0.2mm )

Say you're designing a snap feature, 0.002" can make a difference, but you're doing this in mm because that's what the client wants. OK, so now you have to convert your numbers or something.

Sure you could work in inches to begin with, but what's the fun in that. :) LEARN and ADAPT - or die a painful death!

ok... so What is it I want, I want pair of inputs (mm and inches) in relative proximity to each other, with a clear labelling. I want no extra blech around them, and a simple way to close this. I want it to be positionable on top of the title-bar or something like that, but could be placed anywhere. Whenever I press enter it switches between fields allowing me to start with one measurement, then adjust the other units to a round number and see what that effect is. It should accept a single key to copy one unit or the other to the clipboard.

Would be kinda cool if you could stick it to a particular working window. If that window would close the position would revert relatively to the same spot on the users screen as it was in that active window.

I'll see what I can do =- until then, any other suggestions, I'll take into account:

BTW, a friend also suggested it could run in the startup section of the start menu (easy enough) and then of course, save it's position between uses (also, easy enough)

:)



Continuing:


I'm thinking it would be a more useful tool for more people, other than me, if there was a general conversion, instead of a fixed conversion (obviously, duh).

I had intially thought it would be better if it was just simple and worked for only this one task, the one I needed it for, but why not have it be a super fast push-pull generalized calculator. That is, the function is set by a drop-down list, in between two fields. The two fields each take values, and the one not recieving input updates in real time.

Since I'm doing this in C#, I can use delegate functions for the math,,whereby the function is held in a variable, and is selected by the user from a sneaky drop-down list box.. However, the value fields remain simple. either can be used for input, and the other updates in real time. Instead of using a fixed equation however, they are acted upon by the currently delegated function.

BTW, I've started an open source project over at sourceforge.net. if you're interested in taking a look, I'll post a link once I've got the program SVN'ed and uploaded.

for now it's just a fixed mm to inches. The aformentioned will be added once the interface is working the way i want it: FAST and SIMPLE

:)



Continuing:


OK, so as a continuation of the idea of a generalized conversion tool. Rather than having a delegate function in between the two fields, it'd be better to have each units settable independently. and the stored value is in some raw, or base unit. This foregoes a lot of the complexity of the program in general. Essentially the two boxes are input / display windows onto the same piece of data. VERY simple.

Here's a snapshot of version 0.0.0.1 ;) Still with only the single conversion, but using the just-described methodology.



it's designed to sit in the upper right corner of other windows.... to have it automated would be kinda great.... grab the handle of the top-most window (active) and stick to the titlebar and even insert itself as a tab-stop would be useful.

So, how could I maintain the simplicity and use this for modelling simple volumes and areas? maybe that becomes outside the scope of the project, and a new project in and of itself?

No comments:

Post a Comment