Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded profile docs #79

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions docs/DesignOfThreadlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,51 @@ where
- Dsup: Recommended diameter of support structure of the thread (i.e., of cylinder for external thread and hole for internal thread)
- profile: A vector of 2D [delta_r, z]-vectors describing the shape of the thread

Let's look at an example:
Let's look at an example - the M4:

["M4-int", [0.7, -2.1095, 4.1095,
[
[0, 0.3465],
[0, -0.3465],
[0.43304671, -0.09648036],
[0.43304671, 0.09648036]
]]]
["M4-int", [0.7, -2.1095, 4.1095, [[0, 0.3465], [0, -0.3465], [0.43304671, -0.09648036], [0.43304671, 0.09648036]]]],
["M4-ext", [0.7, 1.5010, 3.1110, [[0, -0.3124], [0, 0.3124], [0.4530, 0.0509], [0.4530, -0.0509] ]]],

## Overview

While each thread profile is defined individually, they have a naming convention ( -int, -ext ) and are meant to work togenter. The following is an overview of how they relate.

![Profile Overview](img_prep/8_M4_Nut_Bolt.png)

The designator is the name of the thread "M4-int" or "M4-ext". The "-int" and "-ext" are not necessary to create a thread, it is encouraged to create them as they are used with the helper functions - bolt, nut and tap - and an error will occure if the coresponding "-ext" ( for bolt ) or "-int" ( for nut and tap ) profiles do not exist.

- The Bolt is the union of the "-ext" thread and a cylynder of diameter "Dsup".
- The Tap is the difference of a cyliner of diamter "Dsup" minus "-int" thread.
- The Nut is the cylyder of diameter Douter minus the Tap.

This arrangement of two profiles allows us to add in tollerences so the bolt can properly fit into the tap/nut .

The following is the `thread("M4-int")`. The INT is used to designate a thread on the INSIDE of something. For the parameters, Rrot is the radius of rotation. In the image, this coresponds to the outer radius of the thread.
![Profile Overview](img_prep/1_M4-int.png)

The following illustrates the thread with the supporting cylinder drawn in. The Diamter of the supporting cylinder, in the case of the interior thread, will be smaller than than the diameter (2xRrot) of the interior thread.

![Profile Overview](img_prep/2_Dsup_M4-int.png)

If we take the difference of the supporting cylinder and the thread, you get the `tap("M4")`. When using the tap method, the `-int`is added to the base designator. This means the diameter of the tap will be Dsup.

![Profile Overview](img_prep/3_TAP_M4.png)

This is the tap extended to make it obvious.
![Profile Overview](img_prep/4_TAP_M4_longer.png)

The following displays the cylinder drawn by the douter paramter in the `nut("M4", douter=6)` module, with the M4 tap illustrated. Again, notice how we do not request "-int", it is appended to the designator.

![Profile Overview](img_prep/5_NUT_Douter_TAPed.png)

The difference of the douter cylinder and the tap will result in nut from `nut("M4", douter=6)`.
![Profile Overview](img_prep/6_NUT_M4.png)

We can now add the thread, `thread("M4-ext")`, "-ext" as it is on the exteririor of a cylynder. In this case the Rrot of the profile is the interior surface of the thread, and should be smaller than the diameter of the supporting cylinder.
![Profile Overview](img_prep/7_M4-ext.png)

Finally, if we add the support cylinder - dsup - we get the resulting `bolt("M4")`. The Dsup parameter in this case is the diameter of the thread valley of the bolt.
![Profile Overview](img_prep/8_M4_Nut_Bolt.png)

## Definition of profile

Expand Down
Binary file added docs/img_prep/1_M4-int.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/img_prep/1_M4-int.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

use <threadlib/threadlib.scad>

//rotate([15,0,0])

difference () {
step_1();
translate([-5,-3,-5]) cube( [10,3,10], center=false);
}


// Thread for interior surfaces
module step_1() {
thread("M4-int", turns=2);
}

// Overlap with diameter
module step_2() {
#translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}

// Create TAP to porper diameter
module step_3() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show full tap
module step_4() {
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show nut and tap
module step_5() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
#difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Create NUT from douter - TAP
module step_6() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}
}

// Thread for exterior surfaces
module step_7() {
step_6();
thread("M4-ext", turns=2);
}

// Add support material to create BOLT
module step_8() {
step_6();
thread("M4-ext", turns=2);
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=3.1110,d2=3.1110,$fn=100);
}



Binary file added docs/img_prep/2_Dsup_M4-int.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/img_prep/2_Dsup_M4-int.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

use <threadlib/threadlib.scad>

//rotate([15,0,0])

difference () {
step_2();
translate([-5,-3,-5]) cube( [10,3,10], center=false);
}


// Thread for interior surfaces
module step_1() {
thread("M4-int", turns=2);
}

// Overlap with diameter
module step_2() {
#translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}

// Create TAP to porper diameter
module step_3() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show full tap
module step_4() {
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show nut and tap
module step_5() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
#difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Create NUT from douter - TAP
module step_6() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}
}

// Thread for exterior surfaces
module step_7() {
step_6();
thread("M4-ext", turns=2);
}

// Add support material to create BOLT
module step_8() {
step_6();
thread("M4-ext", turns=2);
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=3.1110,d2=3.1110,$fn=100);
}



Binary file added docs/img_prep/3_TAP_M4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/img_prep/3_TAP_M4.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

use <threadlib/threadlib.scad>

//rotate([15,0,0])

difference () {
step_3();
translate([-5,-3,-5]) cube( [10,3,10], center=false);
}


// Thread for interior surfaces
module step_1() {
thread("M4-int", turns=2);
}

// Overlap with diameter
module step_2() {
#translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}

// Create TAP to porper diameter
module step_3() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show full tap
module step_4() {
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show nut and tap
module step_5() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
#difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Create NUT from douter - TAP
module step_6() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}
}

// Thread for exterior surfaces
module step_7() {
step_6();
thread("M4-ext", turns=2);
}

// Add support material to create BOLT
module step_8() {
step_6();
thread("M4-ext", turns=2);
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=3.1110,d2=3.1110,$fn=100);
}



Binary file added docs/img_prep/4_TAP_M4_longer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/img_prep/4_TAP_M4_longer.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

use <threadlib/threadlib.scad>

//rotate([15,0,0])

difference () {
step_4();
translate([-5,-3,-5]) cube( [10,3,10], center=false);
}


// Thread for interior surfaces
module step_1() {
thread("M4-int", turns=2);
}

// Overlap with diameter
module step_2() {
#translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}

// Create TAP to porper diameter
module step_3() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show full tap
module step_4() {
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Show nut and tap
module step_5() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
#difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}

// Create NUT from douter - TAP
module step_6() {
difference() {
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=6,d2=6,$fn=100);
difference() {
translate([0,0,-1.0]) color([1,0,0]) cylinder(h=4,d1=4.1095,d2=4.1095,$fn=100);
thread("M4-int", turns=2);
}
}
}

// Thread for exterior surfaces
module step_7() {
step_6();
thread("M4-ext", turns=2);
}

// Add support material to create BOLT
module step_8() {
step_6();
thread("M4-ext", turns=2);
translate([0,0,-0.5]) color([1,0,0]) cylinder(h=2,d1=3.1110,d2=3.1110,$fn=100);
}



Binary file added docs/img_prep/5_NUT_Douter_TAPed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading