Lo-Fi's dividing head calculator

Here it is, @dewbane @brino

It rough as rough can be! Literally in "code like stream of consciousness". Apologies for the hacky nature.

But it does work. You'll find compiled versions in the bin/debug folder, though Windows Smartscreen may scream at you. Written in C# targeting .net 4.5 because that's what I know from my days as a Kerbal modder.

Any questions, comments, requests (or abuse for such poor code), feel free to chuck in the thread here. I'll get around to lobbing in a Github repo at some point when I've had time to clean up, comment and understand what the heck I was doing when I wrote it.
 

Attachments

  • IndexingAndGearCalc.zip
    159.6 KB · Views: 12
It rough as rough can be! Literally in "code like stream of consciousness". Apologies for the hacky nature.
If it makes you feel better, it's orders of magnitude better done than anything I was going to bang out. I'm going to have to spend some time studying this, since I speak neither C# nor .net, but the gist of it is interesting. WorkyBits. I love it!
 
If it makes you feel better, it's orders of magnitude better done than anything I was going to bang out. I'm going to have to spend some time studying this, since I speak neither C# nor .net, but the gist of it is interesting. WorkyBits. I love it!

Feel free to ask. No such thing as stupid questions here!

I've done some very quietionable things passing ListView objects around, for example. They're really for displaying stuff, not running iterative calcs on and passing around in the background like I have. I should have created my own objects to store the data, but that takes time and I was just hacking something together for my own use and amusement.

Workybits is where you'll find lots of the interesting stuff ;) One thing to note with the nested iteration while checking for workable ratios for differential dividing: there are other ways to do that, but none I found that elegantly made it possible to check that ratios with two of the same gear are valid because there are actually two of that gear available. A few UI quirks here and there too and much more I'd like to do with it. We could do with more coding stuff on here, I think. Same as having a machine shop: it's just another tool that allows you to think "Hah. I can make that just how I want it" and enjoy doing it. Took me three months to learn enough C# that I didn't feel like I was fumbling around in the dark. Admittedly, I launched myself in at the deep end with a language I didn't know using a totally undocumented API (how bits of code talk to each other) in a game engine. I made it hard for myself!

Ask away, I'll be more than happy to discuss :)
 
Admittedly, I launched myself in at the deep end with a language I didn't know using a totally undocumented API (how bits of code talk to each other) in a game engine. I made it hard for myself!
Strangely enough, the only experience I have with C# is tinkering with Unreal Engine 4. I kept most of my edits to the C++ side of things. My game didn't quite make it off the ground, but I learned a lot in the process. Like if you want to develop a game, you need to hire people, or be prepared to spend 20 years writing it. Lots of hats to wear developing a game. I learned how to do 2D sprite animation inside a 3D world, and other fun stuff, but I was forever tinkering here and not getting anything done there.
 
Thank you for making this available. I have been using ShopCalc but it only does direct dividing. Has a bunch of other useful stuff as well though.
 

Attachments

  • ShopCalc_win32.zip
    2.1 MB · Views: 4
Back
Top