Thread cutting script - WIP
 1-16  17-36  37-56  57-76  77-96  97-110

Previous
Next
 From:  Michael Gibson
5451.37 In reply to 5451.36 
Hi Martin, so yeah you do have self-intersection in that case after performing the sweep. Sorry, I was not able to understand what kind of self intersection you were referring to in the previous 2D only image.

I think it's pretty unlikely that something like that is going to be feasible to automatically clean up.

I guess though that the self intersection in your case here ends up trying to form pretty much a cylinder surface on the outside, if you want a result like that you would probably be looking at something like only sweeping the inside surfaces and having just a solid cylinder surface as the outer piece rather than a self-intersecting sweep that ends up filling up the same area as a cylinder.

- 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:  bemfarmer
5451.38 
Metric Series Head Dimension Chart:

http://www.spaenaur.com/pdf/sectionR/R11.pdf

Or better yet:
http://www.spaenaur.com/products.asp?PageID=R

 

There are lots of dimensions here, but no pictures:

http://www.numberfactory.com/index.htm
  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:  OSTexo
5451.39 
Hello Martin,

Perhaps this graphic will help to see how I produce my manual thread cutting profile. The helix start point is also the point where the edge of the cylinder to be cut should be placed (major diameter). Since the profile is ratio based that profile should work for any pitch size.

As a side note, to determine that arc in the root of the cutting profile I just drew two construction lines perpendicular to the walls of the profile and used the intersection as the center for the arc.

If I'm thinking correctly, that profile in red should be able to be fixed and scaled accordingly. Perhaps the profile should be scaled down from the scaling point indicated on the image by .9375? For example if the pitch is 2mm, if you scale the cutting profile down by .9375 using the indicated scale point as the origin, you end up with a correctly placed and scaled cutting profile. Then, the helix start point (and position of the cylinder edge to the cut, and outward point on the major diameter on the callout) would be at the center vertically of the cutter profile, and would be placed from the top of the cutter profile downward at pitch * .125, correct? Since you have the helix start point determined, which also is the outward point of the major diameter, you can then determine the start point for the axis of your helix depending on what diameter of screw you would like to produce, just by dropping straight down from the helix start point, then inputting the length of the screw (In the case od an M2 the major diameter usually is 16mm). The third position of the callout is the length of the screw thread, which you could enter numerically to determine the end point on the helix axis. The tricky part would be how to determine how many extra turns you need to run the helix so the cutting profile clears the end of the bolt, but I'm guessing that is probably some sort of formula that can determine that. What is also probably tricky is how to lift the cutting object if you want screws that have a longer total length than thread length. You already know the pitch, so that probably could be put into the pitch field of the helix function. That profile also avoids any problems with intersections and should result in a successful Boolean. Does that make sense?

Attachments:

  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.40 In reply to 5451.39 
Thank you OSTexo for the thorough explanation.

I attached the newest version of this script to the first post of this thread. It should run quite stable and reliable the only thing not working correctly is the cancel button. That requires help from a certain Michael Gibson.
The longer the thread the longer it takes so bear with it.
Enjoy!


Attachments:

  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.41 In reply to 5451.40 
Man this is so cool... thanks...


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:  Martin (MARTIN3D)
5451.42 In reply to 5451.41 
Hi Rich_Art, I'm glad you are having fun with the script :)

OSTexo: I just discovered that I made a mistake and that my script cuts the thread too deep. You do it correctly but there's no need to construct the radius. The thread depth is pitch times cos(30°) and the radius is 1/6 of that. The German Wikipedia has a very clear drawing of the thread geometry: http://de.wikipedia.org/w/index.php?title=Datei:Gewinde_Profil.svg&page=1&filetimestamp=20100609192805 The one I used was too complicated therefore the oversight by me.

I attached a corrected drawing of the profile placement and will update my script tomorrow. The good thing is that the script is also faster now because the Boolean Diff operation has more difference between rod and cutting object.
Image Attachments:
Size: 111.8 KB, Downloaded: 94 times, Dimensions: 759x549px
  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.43 In reply to 5451.42 
Script in the first post is updated. This is it, I was able to cut a 1000 mm long thread in just 14 minutes. No chance to do that in the previous version.
  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.44 In reply to 5451.43 
Cool m8..... Thanks.. Will download the updated version.

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:  Rich_Art
5451.45 In reply to 5451.44 
Could you also make a pointed thread Script?? That would be nice to have.






Peace,
Rich_Art. ;-)

| C4DLounge.eu | Our Dutch/Belgium C4D forum. |
Attachments:

  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.46 
Sorry for the question, but is there a tutorial on how to use this script?

Thanks,

Michael T.
Michael Tuttle a.k.a. mictu http://www.coroflot.com/DesignsByTuttle
  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.47 
WOW!!!

This is truly an amazing tool Martin! I will definitely get some use from it.

I hope there will be some future consideration for non-metric sizes/modes.

An might I add another suggestion for the script:

If you Rebuild the final profile cutting shape (the triangle with the filleted tip) you should be able to eliminate the two seams that reside in the recess of the thread cut.

Thanks!
  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.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
 

Reply to All Reply to All

 

 
Show messages:  1-16  17-36  37-56  57-76  77-96  97-110