Thread cutting script - WIP
 1-9  10-29  30-49  50-69  70-89  90-109  110

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: 201 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: 63 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
 

Reply to All Reply to All

 

 
Show messages:  1-9  10-29  30-49  50-69  70-89  90-109  110