Thread cutting script - WIP
 1-14  15-34  35-54  55-74  75-94  95-110

Previous
Next
 From:  bemfarmer
5451.55 
(Reposted twice due to server switch)
Looked up a little bit of information on how wood screw threads are cut. Some are "rolled." Have not found much information.

For gimlet point wood screws, from an 1858 patent, with one cutting tool, found here:


http://cool.conservation-us.org/coolaic/sg/wag/Am_Wood_Screws.pdf

(I think the point is that one cutting tool was used, which is shown in three positions. So the tool was
advanced from the right to the left. So for a boolean, the profile would reflect this.



EDITED: 29 Dec 2012 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5451.56 In reply to 5451.55 
Thanks Brian, also for the added explanation I see now how this single cutting tool does all the work. This will help in making those threads manually. Unfortunately unlike bolt threads there seems to be no standardisation so it looks like it's much harder to make an universal script.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael T. (MICTU_UTCIM)
5451.57 
Thanks Martin,

I have script installed, but my question was how to use the script. i.e. do I need to have a cylinder model and selected prior to using the command?

Update: I just figured it out. Thanks for such a cool script!

Michael T.

EDITED: 16 Oct 2012 by MICTU_UTCIM

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5451.58 In reply to 5451.57 
Hi Michael,

glad you figured it out that it's a lean-back-and-watch sort of script :)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Colin
5451.59 In reply to 5451.58 
Hi Martin,

You've done a great job on the script, Well done!!

regards Colin
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5451.60 In reply to 5451.54 
Hi Martin,

> Michael, I use moi:CommandDoneCancel and WaitForDialogDone(). How do I handle the
> Cancel button correctly. At the moment it doesn't work as it should.

WaitForDialogDone will return false if the cancel button was pushed.

So you can do something like (example here taken from Rebuild.js) :

code:
	if ( !WaitForDialogDone() )
		return;


Under normal circumstances where a command just has one factory you can just not call factory.commit() if you want to cancel and any objects that were shown previously from calls to .update() will be automatically cleared out.

But if you've previously called .commit() on any factories, those will be considered complete at the time of the .commit() call so you actually may not want to call .commit() on any ones that are meant to be used for temporary calculations.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5451.61 In reply to 5451.60 
Thanks Colin!

Many thanks Michael, that help was neccessary. I didn't think of the WaitForDialogDone() function to actually return a boolean value. I thought it just waits and then continues.
I will use
code:
if ( WaitForDialogDone() ) makeExternalThread();

in the next update of the script.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5451.62 In reply to 5451.61 
I attached a further optimized version of this script to the first post of this thread.

- The Cancel button works now correctly
- The thread length will no longer be automatically corrected to get full turns
- A rebuildcurve factory for the profile can be found in the script if someone wants to experiment. I didn't get it to work.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Rich_Art
5451.63 In reply to 5451.62 
Thanks for the effort. Will test it later today when I got back from work.

Peace,
Rich_Art. ;-)

| C4DLounge.eu | Our Dutch/Belgium C4D forum. |
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  TpwUK
5451.64 
Will your script thread ready cut holes like those that are required for this model ?

Martin
Image Attachments:
Size: 203.3 KB, Downloaded: 205 times, Dimensions: 1804x974px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5451.65 In reply to 5451.64 
Hi Martin,

all the holes outlined in yellow need a thread? Just make a thread tap http://moi3d.com/forum/index.php?webtag=MOI&msg=5473.1 and start cutting almost like in real live but without grease. Enjoy.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Spunkhart
5451.66 In reply to 5451.1 
Hi,
when I open the script, there are no fields for entering the length.

When I try to execute the script, I get an error saying:
"Runtime error in Microsoft JScript:
Illegal procedure call or illegal argument
Line 148 Column 1:"

I downloaded "makeExternalThread-Oct-17-2012.zip" and my MOI version is Version 2.0 May-27-2010

What am I doing wrong?
Image Attachments:
Size: 201.1 KB, Downloaded: 69 times, Dimensions: 1165x750px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5451.67 In reply to 5451.66 
Hi Spunkhart, most likely the script is set up to run under V3, which uses a different engine for the HTML UI and the scripting part.

You can get the current v3 beta here: http://moi3d.com/beta.htm

Most of the people doing scripts and such are running the current v3 beta and not doing much stuff with v2.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Spunkhart
5451.68 In reply to 5451.67 
Hi Michael,

that does the trick.
Thank You.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Fabri (FABERTRIKE)
5451.69 

Iwant just to say I am experiencing the same problem ( I hadn't when using OSX...) on a notebook, win XP sp3

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5451.70 In reply to 5451.69 
Hi Fabri,

> Iwant just to say I am experiencing the same problem
> ( I hadn't when using OSX...) on a notebook, win XP sp3

Are you using MoI version 2 on the notebook? I think this script needs v3, you can get the current v3 beta here: http://moi3d.com/beta.htm

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Fabri (FABERTRIKE)
5451.71 In reply to 5451.70 
Yes I am running version 2 because notebook it is not mine… (my wife…) and I am really scared when installing/uninstalling some software under Windows…
I gave up. I like best to use MoI under OSX; less troubles; I hope…
However both files didn't work (the older and the younger). I feel there is some problem about interpreter files in Windows.
Thank you
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5451.72 In reply to 5451.71 
Hi Fabri,

> However both files didn't work (the older and the younger). I feel there
> is some problem about interpreter files in Windows.

If I remember right, both of those (the older and the younger) require MoI v3 in order to run, you just won't be able to run them using v2.

There isn't really any reason to be scared of installing the v3 beta, I mean it's just a newer version of MoI with more stuff in it, if you're using v2 it just means you're using old stuff...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
5451.73 In reply to 5451.71 
"""""and I am really scared when installing/uninstalling some software under Windows…""""""

The install is pretty much "standalone", which means it doesn't require anything special about windows. It will install in pretty much 6 seconds.

Just go for it!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
5451.74 
Wrote this script for myself. It's a rewritten version of the Martin's script.

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-14  15-34  35-54  55-74  75-94  95-110