Tool to solve torus problems - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: Models and Parts (https://forums.ldraw.org/forum-18.html) +--- Forum: Parts Authoring (https://forums.ldraw.org/forum-19.html) +--- Thread: Tool to solve torus problems (/thread-11772.html) Pages: 1 2 Tool to solve torus problems - Stan Isachenko - 2014-01-07 I know there is great tool ring and cons, for working with Rings, and Cones, but i had problem with torus, is there tool to colculate toruses? Re: Tool to solve torus problems - Max Martin Richter - 2014-01-07 I wrote an Excel file...it is Vera simple made. maybe somebody can adapt it to an commandline version. For the moment I have no time to write it by myself :-( I can send you the excel file or attach it here. if you like... /Max Re: Tool to solve torus problems - Stan Isachenko - 2014-01-07 ok, attach it here i will try to use it Re: Tool to solve torus problems - Max Martin Richter - 2014-01-07 Ok, here is a very simple calculation program... When I find the time, I'll try to write it as a commandline program. (The original file extension is: .xls) /Max Re: Tool to solve torus problems - Stan Isachenko - 2014-01-07 thanks, but i do not understand how toruses work. I attache file where i need replace dat with primitive, it has 2,5 inside radius, and 10 outside. Using you tool i got t04o6000.dat from primgen, and when I used this primitive outer radius was great , but inner was not. Re: Tool to solve torus problems - Max Martin Richter - 2014-01-07 Hehe, this was a bit tricky ;-) What you need here is a reverse ratio tori. If you use your outer radius of 10 and you now your inner radius is at 2.5, than it is a space of 7.5 LDU between. Now you have to substract 7.5 from 2.5 . You will get -5 as an "imaginary real inner radius". So you have to type 10 for the outer radius and -5 for the inner one in my excel sheet. You will get Major: 2,5 and Minor: 7.5 -> Multiply by 2 you get 5 and 15. Just put these values in PrimGen2 and you will receive: r04o3000.dat Fill the your rotation matrix with the major radius to stretch it the right way Code:`1 0 -12.1 -8.562 0 2.5 0 0 0 -2.5 0 0 0 2.5 r04o3000.dat`Please note, that you have to find a value for the high by yourself. (I did by try and error - but I will think about a calculation solution in the evening) 3.5 for y seems to work. I don't know for the moment. Just try it! Stupid me - found a solution... Just calculate your high (in your example: 10.515 LDU and devide it by the ratio in this case) - you will get 3.505 /Max Re: Tool to solve torus problems - Stan Isachenko - 2014-01-07 thanks a lot Re: Tool to solve torus problems - Max Martin Richter - 2014-01-07 You're wolcome. I'll install a compiler and give a try to write such a programme. /Max Re: Tool to solve torus problems - Max Martin Richter - 2014-01-08 Here is a somewhat beta version of a programme I wrote for this purpose. I hope the calculation is correct in every case. Just type, which torus you want and input its inner and outer radius. Feel free, to report any bugs. Next steps: exclude negative and wrong values for the input and add a calculator for y-scaling of tori. (Please remove the .dat to use this programme) /Max Re: Tool to solve torus problems - Philippe Hurbain - 2014-01-08 It seems that if you make several calculations the programs keeps major/minor radii of 1st calculation... Calculated ratio is correct nonetheless.