Thread cutting script - WIP
 1-7  8-27  28-47  48-67  68-87  88-107  108-110

Previous
Next
 From:  Martin (MARTIN3D)
5451.48 In reply to 5451.47 
Rich_Art: So far I haven't looked closely at this type of wood screw thread. Is there some sort of standard regarding the pitch? Otherwise it looks like the "pointy ends option of the sweep functon is the right choice for this.

Michael T.: You must move the "makeExternalThread.js" and the "makeExternalThread.htm" file into the commands folder of MoI. Then you can either hit TAB, enter makeExternalThread (sounds like Harry Potter isn't it :) and hit return or assign a keyboard short cut to the makeExternalThread command.

Mike: There are already some Imperial sizes included in the script. In the first post of this thread you can find instructions how to add more. Thanks for the tip with the tip. What exact settings would you use in the rebuild process?



Edit: Michael I found better instructions from Michael Gibson on installing scripts in this post http://moi3d.com/forum/index.php?webtag=MOI&msg=5136.1

To set it up, unzip the attachment and copy the 2 files into MoI's commands folder - in Windows you can find this as a sub-folder inside of MoI's main installation folder inside of \Program Files, and under OSX right-click on the MoI .app and choose "Show package contents", and then inside there go to drive_c/moi/commands.

After you have copied the 2 files into MoI's commands folder that will then make a new makeExternalThread command available to MoI and you can set up a shortcut key with that as the command name to launch it, or you can push Tab and type in makeExternalThread and push enter as an alternate way to launch it.

EDITED: 14 Oct 2012 by MARTIN3D

  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.49 In reply to 5451.48 
-----------------
Rich_Art: So far I haven't looked closely at this type of wood screw thread. Is there some sort of standard regarding the pitch? Otherwise it looks like the "pointy ends option of the sweep functon is the right choice for this.
-----------------


Not that I know of. It was just a question. I'm not a carpenter by all means. :-)The pointy end option is good enough I guess.

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:  Mike K4ICY (MAJIKMIKE)
5451.50 In reply to 5451.48 
> There are already some Imperial sizes included in the script.

Ah... Thanks!

> What exact settings would you use in the rebuild process?


I think it would have to be relative to the thread size, but when I did a Rebuild on the profile, using [0.0005 mm] in "refit" mode (for the M3x0.5) it seemed to produce a reasonable facsimile.
Though not perfect, it may be worth trying out.

A place I often use Rebuild are on curves that would later be extruded and then filleted, as Fillet will make separate surfaces for each split in a compound curve.
  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:  bemfarmer
5451.51 
For gimlet point wood screws, from 1858

Edit: Reposted below.

EDITED: 16 Oct 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:  Michael Gibson
5451.52 In reply to 5451.51 
Please note - the forum is moving to a new server so any messages posted here recently will only be on the old server and won't show up when the servers are switched.

I'm nearly done with the switch.

- 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:  DannyT (DANTAS)
5451.53 In reply to 5451.31 
Nice work Martin, will come in very handy!

Thanks!
~Danny~
  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.54 In reply to 5451.53 
Thanks Danny.

Mike, I tried to rebuild the profile via script but it doesn't work reliable. I don't know why but things you do manually often work while they don't within the script. That also brings up a question: what is the benefit of having those lines removed? It doesn't make a difference in the rendering program or does it?

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.
  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:  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
 

Reply to All Reply to All

 

 
Show messages:  1-7  8-27  28-47  48-67  68-87  88-107  108-110