mirror of
https://github.com/adrianschlatter/threadlib.git
synced 2025-08-18 04:31:20 +02:00
re-org docs/
This commit is contained in:
32
docs/img_prep/Makefile
Normal file
32
docs/img_prep/Makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
os = /usr/local/bin/openscad
|
||||
opts =
|
||||
imgs = bolt-M4.png nut-M12x0.5.png nutNbolt.png thread-G1o2-ext.png thread-G1o2-ext-10turns.png flexible.png tap.png
|
||||
|
||||
.PHONY: all
|
||||
all: $(imgs)
|
||||
|
||||
bolt-M4.png: bolt.scad
|
||||
$(os) $(opts) --D 'type="M4"' --D 'turns=5' --D 'higbee_arc=30' --camera=0.49,-0.26,1.55,74.6,0.0,78.9,20 --imgsize=2048,2048 -o $@ $<
|
||||
|
||||
nut-M12x0.5.png: nut.scad
|
||||
$(os) $(opts) --D 'type="M12x0.5"' --D 'turns=10' --D 'higbee_arc=20' --D 'Douter=16' --camera=-2.2,1.2,1.8,66,0,73,52 --imgsize=2048,2048 --projection=ortho -o $@ $<
|
||||
|
||||
nutNbolt.png: nutNbolt.scad
|
||||
$(os) $(opts) --camera=-0.24,1.19,4.24,83,0,326.9,40.3 --imgsize=2048,2048 --projection=ortho -o $@ $<
|
||||
|
||||
thread-G1o2-ext-10turns.png: thread.scad
|
||||
$(os) $(opts) --D 'type="G1/2-ext"' --D 'turns=10' --D 'higbee_arc=20' --camera=-0.7,-0.6,3.4,75,0,110,100 --imgsize=2048,2048 --projection=ortho -o $@ $<
|
||||
|
||||
thread-G1o2-ext.png: thread.scad
|
||||
$(os) $(opts) --D 'type="G1/2-ext"' --D 'turns=5' --D 'higbee_arc=20' --camera=-0.7,-0.6,3.4,75,0,110,57 --imgsize=2048,2048 --projection=ortho -o $@ $<
|
||||
|
||||
flexible.png: flexible.scad
|
||||
$(os) $(opts) --D 'type="G1/2-ext"' --D 'turns=5' --D 'higbee_arc=20' --camera=-0.7,-0.6,3.4,75,0,110,57 --imgsize=2048,2048 --projection=ortho -o $@ $<
|
||||
|
||||
tap.png: tap.scad
|
||||
$(os) $(opts) --D 'type="G1/2"' --D 'turns=5' --D 'higbee_arc=20' --camera=7,15.3,3.45,87,0,333,65 --imgsize=2048,2048 --projection=ortho -o $@ $<
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm *.png
|
15
docs/img_prep/bolt.scad
Normal file
15
docs/img_prep/bolt.scad
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
Create nice previews for documentation
|
||||
|
||||
:Author: Adrian Schlatter
|
||||
:Date: 2019-04-10
|
||||
:License: 3-Clause BSD. See LICENSE.
|
||||
*/
|
||||
|
||||
use <threadlib/threadlib.scad>
|
||||
|
||||
type = "M6";
|
||||
turns = 5;
|
||||
higbee_arc = 45;
|
||||
|
||||
bolt(type, turns, higbee_arc=higbee_arc);
|
22
docs/img_prep/flexible.scad
Normal file
22
docs/img_prep/flexible.scad
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Create nice previews for documentation
|
||||
|
||||
:Author: Adrian Schlatter
|
||||
:Date: 2019-04-13
|
||||
:License: 3-Clause BSD. See LICENSE.
|
||||
*/
|
||||
|
||||
use <threadlib/threadlib.scad>
|
||||
|
||||
type = "G1/2-ext";
|
||||
turns = 5;
|
||||
higbee_arc = 20;
|
||||
|
||||
thread(type, turns, higbee_arc=higbee_arc);
|
||||
|
||||
specs = thread_specs(type);
|
||||
P = specs[0]; Rrot = specs[1]; Dsupport = specs[2];
|
||||
section_profile = specs[3];
|
||||
H = (turns + 1) * P;
|
||||
translate([0, 0, -P / 2])
|
||||
cylinder(h=H, d=Dsupport, $fn=120);
|
16
docs/img_prep/nut.scad
Normal file
16
docs/img_prep/nut.scad
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Create nice previews for documentation
|
||||
|
||||
:Author: Adrian Schlatter
|
||||
:Date: 2019-04-10
|
||||
:License: 3-Clause BSD. See LICENSE.
|
||||
*/
|
||||
|
||||
use <threadlib/threadlib.scad>
|
||||
|
||||
type = "M12x0.5";
|
||||
turns = 10;
|
||||
Douter = 16;
|
||||
higbee_arc = 45;
|
||||
|
||||
nut(type, turns, Douter, higbee_arc=higbee_arc);
|
26
docs/img_prep/nutNbolt.scad
Normal file
26
docs/img_prep/nutNbolt.scad
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
Create nice previews for documentation
|
||||
|
||||
:Author: Adrian Schlatter
|
||||
:Date: 2019-04-10
|
||||
:License: 3-Clause BSD. See LICENSE.
|
||||
*/
|
||||
|
||||
use <threadlib/threadlib.scad>
|
||||
|
||||
type = "M6";
|
||||
turns = 6;
|
||||
higbee_arc = 45;
|
||||
|
||||
P = thread_specs(str(type, "-ext"))[0];
|
||||
dz = (turns / 2 - 1/4) * P;
|
||||
Douter = thread_specs(str(type, "-int"))[2] * 1.5;
|
||||
|
||||
translate([0, 0, dz])
|
||||
rotate([0, 0, -90])
|
||||
bolt(type, turns, higbee_arc=higbee_arc);
|
||||
intersection() {
|
||||
nut(type, turns, Douter, higbee_arc=higbee_arc);
|
||||
translate([-100, 0, 0])
|
||||
cube([200, 200, 200]);
|
||||
};
|
3
docs/img_prep/tap.scad
Normal file
3
docs/img_prep/tap.scad
Normal file
@@ -0,0 +1,3 @@
|
||||
use <threadlib/threadlib.scad>;
|
||||
|
||||
tap("G1/2", 5);
|
15
docs/img_prep/thread.scad
Normal file
15
docs/img_prep/thread.scad
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
Create nice previews for documentation
|
||||
|
||||
:Author: Adrian Schlatter
|
||||
:Date: 2019-04-13
|
||||
:License: 3-Clause BSD. See LICENSE.
|
||||
*/
|
||||
|
||||
use <threadlib/threadlib.scad>
|
||||
|
||||
type = "G1/2-ext";
|
||||
turns = 10;
|
||||
higbee_arc = 45;
|
||||
|
||||
thread(type, turns, higbee_arc=higbee_arc);
|
Reference in New Issue
Block a user