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) |
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 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. Re: Tool to solve torus problems - Max Martin Richter - 2014-01-08 I will check this. I found the problem. The inner calculation was right, but there was a boolean, that wasn't reset when restart the calculation. Will be gone in the next version. I have also implement that the programme don't except negative values for the inner radius and checks if the outer radius is greater than the inner one. Nevertheless I hope, that I can implement a y-scale area today, after this there will be more bug fixing (if necessary) and maybe I make a GUI, too. /Max |