Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/24/2013 in all areas

  1. You're right. The thickness of the wire lets you have more or less coils to get a better spheric shape. The thinner the better. One of the good things or our CNC machines is that you can program the amount of milimeters on each step or just say to the machine "go from an Outer Diameter of 4.00mm to an Outer Diameters of 5.17mm using one coil" and it will do it smoothly and synchronizing the movement of the diameter with the wire feeding. I guess that is very complicated to get a perfect shape because is not possible to start the spring with a diameter of 2 times the wire (you have to cut the finished spring). And also there is the point that the coils that I've drawed are represented perfectly paralel to the ecuator of the sphere and in the real world they are a spiral and not cutted rings superposed (as jchd has pointed it is an idealized drawing). Another interesting possibilty is that I can create the same shape with less wire giving some space beetween the coils (so it would be a real spring that can be compressed). I'm going to test now the solution given by jchd. If it works I will post pictures of the finished spring when I have it (there are no requeriments in the size or the wire, we are just playing to see how we can do it). Thanks again. PS: thanks a lot for the hypotenuse correction. As a non-English speaker I really appreciate any correction in my grammar.
    1 point
  2. This is rather interesting. Of course the radius R decreases (or increases) in relation to the thickness of the coil as you follow the spring round. I'm not sure what the best approach is to work this out. Perhaps calculating the length of coil needed to cover the surface area of the sphere is a useful step, but I'll leave this to the experts. I'm curious how this would be done. BTW adolfito121 it's spelt hypotenuse.
    1 point
  3. jchd

    Help with trigonometrics

    Ha! What you're looking at is a spiral mapped on a sphere. In your idealized drawing, there are 15 wires (turns) for the (right or left) upper half-sphere drawn. The first half-turn on the right (the wire just above the right angle named makes angle A = 90/15 = 6° or (Pi/2 * 1/15) = Pi/30. If we call R the radius, then c = R * Sin(Pi/30) For the second wire on the right, c = R * Sin(2 * Pi/30) For the third wire on the right, c = R * Sin(3 * Pi/30) I leave it to you to code the loop.
    1 point
  4. To get infos about xbuttons there is a little modification to do #include <winapi.au3> #include <WindowsConstants.au3> HotKeySet('{ESC}', '_Close') Global Const $MSLLHOOKSTRUCT = $tagPOINT & ";dword mouseData;dword flags;dword time;ulong_ptr dwExtraInfo" Global $hHook Local $hFunc, $pFunc, $hMod $hFunc = DllCallbackRegister('_MouseProc', 'long', 'int;wparam;lparam') $pFunc = DllCallbackGetPtr($hFunc) $hMod = _WinAPI_GetModuleHandle(0) $hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, $pFunc, $hMod) While 1 Sleep(20) WEnd Func _MouseProc($iCode, $iwParam, $ilParam) If $iCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam) Local $info = DllStructCreate($MSLLHOOKSTRUCT, $ilParam) Switch $iwParam Case $WM_XBUTTONDOWN MsgBox(4096, "", "XButton " & _WinAPI_HiWord(DllStructGetData($info, "mouseData"))) EndSwitch Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam) EndFunc Func _Close() _WinAPI_UnhookWindowsHookEx($hHook) DllCallbackFree($hHook) Exit EndFunc
    1 point
  5. Hey, does it work for you on Windows 7 x64 SP1 ? _Update_Explorer does not seem to update the explorer (even if I can see a flickering of icons when triggered).
    1 point
  6. Sigh, this is why I don't help you people. I end up having to do all the work myself because you can't manage to solve even the most simple of problems. First, Obviously different versions of Windows are using a different class. CabinetWClass is pre-Vista and the other is post-Vista. Or something like that, I don't feel like booting Vista to verify. Second, who gives a fuck, really? Get the right handle to start with and cut out 60% of the code in the process. Func _Update_Explorer() Local $bOld = Opt("WinSearchChildren", True) Local $a = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To UBound($a) - 1 DllCall("user32.dll", "long", "SendMessage", "hwnd", $a[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld) EndFunc;==>_Update_Explorer
    1 point
  7. It's not? A lot of times it won't refresh the tray icons that were in place. Show some respect. Maybe you don't understand the inconvenience of having to "restart" things: What if you had to restart your car to turn the headlights on? Think back to Windows 98 when you had to restart to install any driver and almost every program.
    1 point
×
×
  • Create New...