Loading

Metric Screw Thread Library

by marcaxi, published

Metric Screw Thread Library by marcaxi Sep 28, 2012

Description

A library for creating parameterized screw threads.

Recent Comments

view all

just difference() the generated threads with the object you need the threads in. also you should scale([0.92,0.92,1] the threads on X and Y axis by a little margin so the two parts will fit. 0.92 scale factor works for my printer at a high resolution, you need so tweak there to make it fit yours..

a code could look like this:

module closing_lid() { thread(4,28,20,3); }

module closing_lid_resized() { scale([0.92,0.92,1]) thread(4,28,20,3); }

// show difference

%closing_lid();

closing_lid_resized();

voila.

what's the smaller printable screw or female socket? i mean printable with the Makerbot at high resolution?

Great thing! Would you know how to modify the code so that the same specs could be entered, but it would make a female version of the threads?

More from Engineering

view more

Liked By

view all

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

Use this library to generate any size of metric screw threads.

Only use module "thread(P,D,h,step)" using the parameters: P - screw thread pitch D - screw thread major diameter h - screw thread height step - step size in degree

ISO specification from: http://en.wikipedia.org/wiki/ISO_metric_screw_thread

what's the smaller printable screw or female socket? i mean printable with the Makerbot at high resolution?

Great thing! Would you know how to modify the code so that the same specs could be entered, but it would make a female version of the threads?

Mar 1, 2015 - Modified Mar 1, 2015
overflo - in reply to Busterhax

just difference() the generated threads with the object you need the threads in. also you should scale([0.92,0.92,1] the threads on X and Y axis by a little margin so the two parts will fit. 0.92 scale factor works for my printer at a high resolution, you need so tweak there to make it fit yours..

a code could look like this:

module closing_lid() { thread(4,28,20,3); }

module closing_lid_resized() { scale([0.92,0.92,1]) thread(4,28,20,3); }

// show difference

%closing_lid();

closing_lid_resized();

voila.

Hey, Maximilian.

First, thank you so much for this script! It's helped me so much, not only with printing non-standard threads, but also learning OpenSCAD.

I have a slight modification that I think would be useful to others as well and wonder if you'd prefer me to remix it or just share my change and maybe you could update yours? It's such a simple modification that it doesn't seem like it should be an entire remix. It simply allows a person to enter an additional parameter to "thread" to specify a number of rotations:

p, li { white-space: pre-wrap; }

module thread(P,D,h,step,rotations) {

    for(i=[0:rotations])
    translate([0,0,i*P])
    screwthread_onerotation(P,D,step);

}

hey, good idea, I just added "screwthread_v2.scad" with your proposed additional parameter

This is exactly what I'm looking for, but I'm new to openSCAD. I was able to generate the screw using the Compile and Render command, and I was looking to export it to something I could import into Sketchup so I could integrate it with my project. I tried Export as DXF... but came up with the error "Current top level object is not a 2d object." Any instruction you can give me on how to accomplish what I'm trying to here?

Export to "stl".

Download the STL import plugin from Google Extension Warehouse and Import it.

http://extensions.sketchup.com/en/content/sketchup-stlhttp://extensions.sketchup.com...

This is wat I am searching for. If I want to make a screwable lid by this,

I think I need to: A:design a thread on a bottle and print, B:Boolean difference the same from the lid and print

Will that fit, or do I need to scale either of the two ?

Thomas

Hi, I can not use the file screwthread.scad because I get an error WARNING: hull() is not implemented yet for 3D objects!

What can I do?

My version of OpenSCAD is 2011.06 under Windows. Thanks Regards, Icare

Hi! I am quite new to this and using AutoCAD2012. My method to extract the screw from the .stl format to .dxf format is by using the CAD forum convertor - with this you have one specific size of the thread. How are you choosing the specifics for this screw? If someone could please help me with this it would be greatly appreciated? :)

Thank you in advance!

If you want to create different sizes you need to use the file "screwthread.scad" with OpenScad (http://www.openscad.org/)http://www.openscad.org/), and change the parameters in the file. OpenScad then generates the new stl file for you.

Hi thats so cool i tried an Standard M12 (for my drawing to extract it for an inner thread) but i just did get an "full" cylinder any hint for me ?

its working for me with "thread(1.75,12.0,10,20);" using openscad version 2012.05.12

what version are you using and/or what parameters have you tested?

My bad i used an outdated scad version ,.. I did Test 1.75 which is the pitch , i used 12 as well ,The screw had 9,85 by numbers and i did not get the step size in degrees ? I thought 360 degrees will be i turn ;)- Now i have to find a way how to substract it from my stl file ,.. thank you so much

Top