Thread cutting script - WIP
 1-8  9-28  29-48  49-68  69-88  …  109-110

Previous
Next
 From:  OSTexo
5451.29 
Hello Martin,

Really cool stuff. How did you manage to knock off the two sides of the triangle that are perpendicular to the cylinder before the cutting operation? I never could get that to work without knocking off the edges so there wouldn't be that sort of self intersecting situation and the cutting surface wasn't skimming to closely to the cylinder. Of course that was a manual operation, perhaps the scripted operations behave differently?
  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.30 In reply to 5451.26 
Wicked!! I'de like to see this developed to include inches and other variations.

Thanks Martin.
  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.31 In reply to 5451.30 
Thanks to all. UNC threads should be no problem as they seem to have the same geometry as Metric threads: http://en.wikipedia.org/wiki/Unified_Thread_Standard. Other threads e.g Acme will require a different cutter shape.

I'm satisfied when the final version of this script can make make metric normal and fine threads plus UNC and UNF.
I imagine
- a dropdown list where the different threads like "M6 x 1" or "1/4 UNC" can be chosen
- a input field for the thread lenght (which has to be slightly corrected by the script to allow full turns)
- a input field for the length of the not threaded part
- if that is possible by scripting the MoI units will be set to mm

I agree OSTexo making a cutting object that actually cuts as wanted is tricky. If the sweep overlaps or touches over a wider area you're out of luck.
I do it like shown below. The height of the cutting object is equal to the thread pitch and the sweeped profiles only touch at one edge.
The final trick to make this work was to move the profiles out by a tiny amount so the the boolean diff operation sees some difference.
I use 0.1 mm at the moment but I just checked that 0.01 mm seems to work too.

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.32 In reply to 5451.31 
>If the sweep overlaps or touches over a wider area you're out of luck.

I don't know if this makes sense but I wonder if its possible to kind of "boolean union" an object (e.g. a self intersecting sweep) by itself i.e. remove any overlaps and make it one solid object.
  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.33 In reply to 5451.32 
Hi Martin,

> I don't know if this makes sense but I wonder if its possible to kind of "boolean union" an
> object (e.g. a self intersecting sweep) by itself i.e. remove any overlaps and make it one
> solid object.

I guess it could be possible in some situations, but it would definitely require a lot more work done to get something that would work well.

Many kinds of self intersecting surfaces are also poorly formed in the intersection area with things like lumpy ripples and not an actual totally clean self intersection even.

- 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.34 In reply to 5451.33 
Hi Michael,

it would be handy in a situation like this where profile, rail and sweep are generated cleanly by script and the Boolean Diff still doesn't work because the sweep profile is intersecting or touching over a larger area. I could then use the cutter profile below for example which just doesn't boolean diff when sweeped because its touching over a larger area I guess. If I could "bake" this sweeped cutting object into one firm solid it would work in the Boolean Diff operation.



I updated the script from yesterday. It now corrects the thread length slightly to allow full turns so it produces correct results for any settings.

EDITED: 8 Oct 2012 by MARTIN3D

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 Gibson
5451.35 In reply to 5451.34 
Hi Martin, from what you're showing there that's not quite a "self intersection" like when a surface is actually crossing back over its own self.

What you're showing there is more of a "edge overlapping" intersection. Those can work ok if you've got pretty precise geometry, like for instance doing a union on the attached 3DM file seems to work ok.

But when you have something that has edges barely grazing each other and it's constructed from some kind of fitting process like sweeps, what can happen is that in actuality the edge is sort of barely wiggling back and forth above and below the surface and that kind of thing becomes quite difficult for the intersector to get a clean intersection from.

- 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.36 In reply to 5451.35 
Hi Michael,

I attached an example. The 2 mm high profile is generated and placed by a script. The helix pitch is 2 mm. So the profiles just touch when sweeped. The sweeped cutting objects sticks completely into the cylinder so there are no edges sort of barely wiggling back and forth above and below the surface. Still when you boolean diff the cylinder with the sweep it gives no result. Why?
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 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?

EDITED: 8 Aug by OSTEXO

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

Reply to All Reply to All

 

 
Show messages:  1-8  9-28  29-48  49-68  69-88  89-108  109-110