Sariel Posted May 9, 2014 Posted May 9, 2014 I found myself needing utility like that recently, so I made one: http://studs.sariel.pl/ Please note that the results are shown with 0.001 accuracy and the last digit is rounded. I'm open to new units suggestions. No, hamsters don't qualify, their shape and size are too inconstant. Quote
JGW3000 Posted May 9, 2014 Posted May 9, 2014 Sariel, very useful and thank you for creating, but I get: 12 inches = 0.99 feet 1 foot = 12.115 inches 1 inch = 2.539 cm I haven't checked the others Quote
Sariel Posted May 9, 2014 Author Posted May 9, 2014 (edited) I get: 12 inches = 0.99 feet 1 foot = 12.115 inches 1 inch = 2.539 cm Well, I need to do something about the rounding. The converter actually calculates everything twice, first the value you enter is converted to studs, then all other units are calculated from studs. Perhaps not the best solution. Edited May 9, 2014 by Sariel Quote
Blakbird Posted May 9, 2014 Posted May 9, 2014 Well, I need to do something about the rounding. The converter actually calculates everything twice, first the value you enter is converted to studs, then all other units are calculated from studs. Perhaps not the best solution. Well, I don't think this tool is going to be used by NASA to calculate the footprint for the next Mars lander. The level of accuracy the tool provides seems entirely reasonable for designing scale LEGO models. Quote
Sariel Posted May 9, 2014 Author Posted May 9, 2014 (edited) Well, I don't think this tool is going to be used by NASA to calculate the footprint for the next Mars lander. Aaaaaand there go my dreams ;) I did some inch/foot corrections and enabled entering dots into values. Any script that has you looking up ASCII tables is a fun script ;) Edited May 9, 2014 by Sariel Quote
darsedz Posted May 9, 2014 Posted May 9, 2014 Very useful tool for LEGO forum and MOC builders :) Quote
Hrafn Posted May 9, 2014 Posted May 9, 2014 Well, I don't think this tool is going to be used by NASA to calculate the footprint for the next Mars lander. The level of accuracy the tool provides seems entirely reasonable for designing scale LEGO models. Perhaps they should use it for that - it's been an issue for NASA before. Quote
Blakbird Posted May 9, 2014 Posted May 9, 2014 Perhaps they should use it for that - it's been an issue for NASA before. That's why I mentioned it! They clearly need a new unit converter. Quote
dikkie klijn Posted May 9, 2014 Posted May 9, 2014 ...I'm open to new units suggestions. No, hamsters don't qualify, their shape and size are too inconstant. Quote
Captainowie Posted May 10, 2014 Posted May 10, 2014 Well, I need to do something about the rounding. The converter actually calculates everything twice, first the value you enter is converted to studs, then all other units are calculated from studs. Perhaps not the best solution. If rounding is a problem, then perhaps you could use some really small unit as your base, instead of studs. Something like LDU perhaps. Come to think of it, LDU might be a good unit to add. Quote
legolijntje Posted May 10, 2014 Posted May 10, 2014 What is ldu? It stands for LDraw Unit. Here and here is a bit of info about it. Quote
Sariel Posted May 10, 2014 Author Posted May 10, 2014 Good idea, I have updated the converter to operate on LDUs, and added results in LDUs and in stacked plates. I have also rewritten formulas for units, they seem accurate now. If you are interested, my formulas for calculating LDUs into different units are below, perhaps you can come up with better ones. So, if 1 LDU = 1/20 of a stud, then: 1 stud = 20 * LDU 1 cm = 25 * LDU 1 m = 2500 * LDU 1 inch = 25 * 2.54 * LDU 1 feet = 25 * 30.48 * LDU 1 brick = 24 * LDU 1 plate = 8 * LDU 1 small track link = 20 * 13/15 * LDU 1 large track link = 20 * 13/8 * LDU Quote
garethjellis Posted May 10, 2014 Posted May 10, 2014 It would be great to be able to enter how many feet = how many studs so you can then scale the rest of your model. For example I build 7 and 8 wide trains to match 8 to 10 feet wide in real life. so using that measurement I then calculate the length etc. Just an idea to make your great tool even better Quote
Captainowie Posted May 12, 2014 Posted May 12, 2014 Good idea Glad to be of service! Now, it's only because you said perhaps you can come up with better ones that I'm mentioning this, but you might want to re-write your code so that you only have to do one operation per conversion. For example, your conversion from LDU to either of the track links currently uses three operations, but only the LDU value ever changes, so you could do the computation for the conversion factor only once, instead of every time. For the small track link, then, this would reduce to 17.33 or, if you don't want to limit your precision you could use 52/3. That said, the performance gain you'd get would be immeasurably small, so there's probably little point, other than neater code. I'd also redo the conversion factors for the imperial units. In your Inch conversion you are using the approximation for LDU-to-cm, and the approximation for cm-inch. It could be that the inaccuracies for the two approximations cancel each other out, but it could also be that they make each other worse. In the LDraw spec the approximation is 1 inch = 64 LDU, whereas 25*2.54 = 63.5 (over a foot that adds up to 6 LDU discrepancy - almost a whole plate thickness). This one is a little more insidious, but in the grand scheme of things probably isn't going to cause anyone too much grief. Feel free to ignore either or both suggestion. Owen. Quote
Paul B Technic Posted May 12, 2014 Posted May 12, 2014 This looks like a great tool, thanks for sharing it. Quote
richwoodrocket Posted May 13, 2014 Posted May 13, 2014 Another amazing resource by Sariel. Good job. Quote
Sariel Posted May 19, 2014 Author Posted May 19, 2014 (edited) Captainowie, thanks for ideas, I need to wrap my mind around these :) Update: the converter now shows scaled results for a specified scale (right column). The scaled results are updated whenever you change any value in the left column, or the scale factor. On the funny side, it's not possible to change value of the scaled results :P Also, using backspace in the inputs is now possible. Please note that due to rounding, the scaled results may not be fully accurate for scales smaller than 1:999. Edited May 19, 2014 by Sariel Quote
garethjellis Posted May 19, 2014 Posted May 19, 2014 This is excellent. The scale function is fantastic. What a great tool! Quote
LOTRfan Posted May 19, 2014 Posted May 19, 2014 For train fans, how about adding straight tracks, it would make planning layouts so much easier. Quote
Captainowie Posted May 28, 2014 Posted May 28, 2014 Captainowie, thanks for ideas, I need to wrap my mind around these :) No problem. If anything needs further explanation, feel free to PM me. Quote
darsedz Posted May 28, 2014 Posted May 28, 2014 On my android phone I'm using ConvertPad application. It has a user defined conversions. I will try to implement some of LEGO calculations. Maybe they can offer it as a standard in near future ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.