Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
3
3d_models
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gyuri
3d_models
Commits
38a79b7b
Commit
38a79b7b
authored
Jun 23, 2019
by
György Kurucz
Browse files
Options
Downloads
Patches
Plain Diff
Add pill box and screwdriver bit holder.
parent
beb06ed4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/screw.scad
+7
-0
7 additions, 0 deletions
include/screw.scad
src/pill_box.scad
+124
-0
124 additions, 0 deletions
src/pill_box.scad
src/screw_bit_holder.scad
+106
-0
106 additions, 0 deletions
src/screw_bit_holder.scad
with
237 additions
and
0 deletions
include/screw.scad
+
7
−
0
View file @
38a79b7b
...
@@ -49,6 +49,13 @@ module _screw_thread(N=10, R=10, R_min=12, R_maj=15, P=3, taper=true) {
...
@@ -49,6 +49,13 @@ module _screw_thread(N=10, R=10, R_min=12, R_maj=15, P=3, taper=true) {
);
);
}
}
/*
P: pitch
D_maj: major diameter
tol: tolerance
h: height
taper: taper
*/
module metric_screw(P=3, D_maj=14, tol=0, h=30, taper=true) {
module metric_screw(P=3, D_maj=14, tol=0, h=30, taper=true) {
R_maj=D_maj/2+tol;
R_maj=D_maj/2+tol;
R_min=R_maj-5/16*sqrt(3)*P;
R_min=R_maj-5/16*sqrt(3)*P;
...
...
This diff is collapsed.
Click to expand it.
src/pill_box.scad
0 → 100644
+
124
−
0
View file @
38a79b7b
use </home/kgy/repos/3d_models/include/screw.scad>;
slots=8;
r=40;
corner_r=2.3;
center_gap_r=9;
edge_gap_r=3;
height=20;
center_bulge_r=8;
center_bulge=2;
bottom_thickness=1;
notch_r = 2;
screw_head_thickness=2;
lid_height = center_bulge-0.5;
//preview();
print();
module print() {
translate([0,0,lid_height])
rotate([180,0,0]) lid();
/*intersection() {
linear_extrude(20) union() { polygon([
[0,0], [50, 10], [10, 50]
]); circle(r=13); }
box();
}*/
/*intersection() {
rotate([0,0,-135]) linear_extrude(20) union() { polygon([
[0,0], [50, 10], [10, 50]
]); circle(r=13); }
translate([0,0,lid_height]) rotate([180,0,0]) lid();
}*/
//translate([27,0,height+2]) rotate([180,0,0]) screw();
}
module preview() {
box();
translate([0,0,height+5]) screw();
translate([0,0,height+5]) lid();
}
module flower(r=10, v=1, petals=8) {
function rfn(a) = r + sin(a*petals)*v;
polygon([ for (i=[1:360])
[ cos(i)*rfn(i), sin(i)*rfn(i) ] ]);
}
module screw() {
intersection() {
screw_thread(taper=true);
translate([-50,-50,0]) cube([100,100,height+1]);
}
translate([0,0,height])
linear_extrude(screw_head_thickness)
flower(v=0.8, r=10);
}
module screw_thread(taper=false, tol=0) {
intersection() {
translate([0,0,taper ? bottom_thickness : -1])
metric_screw(P=3, D_maj=14, tol=tol, taper=taper);
translate([-50,-50,bottom_thickness])
cube([100, 100, 100]);
}
}
module lid() {
union() {
linear_extrude(lid_height) difference() {
union() {
lid_tab_r = 15;
circle(r=r,$fn=200);
translate([0,r-lid_tab_r*(2/3),0])
flower(r=lid_tab_r, v=2, petals=5);
}
circle(r=center_bulge_r+0.3, $fn=100);
segment();
}
for (i=[-2:1]) {
rotate([0,0,(360/slots)*(i+.5)])
translate([0, r-edge_gap_r, lid_height/2])
intersection() {
sphere(r=notch_r, $fn=30);
translate([-50,-50,-notch_r+.3])
cube([100,100,notch_r-.3]);
}
}
}
}
module box() {
difference() {
union() {
cylinder(r=r, h=height, $fn=200);
cylinder(r=center_bulge_r,
h=height+center_bulge, $fn=50);
}
for (i=[1:slots]) rotate([0,0,(360/slots)*i ]) {
translate([0,0,bottom_thickness])
linear_extrude(height) segment();
rotate([0,0,360/slots/2])
translate([0, r-edge_gap_r, height])
sphere(r=notch_r, $fn=30);
}
screw_thread(tol=0.7);
}
}
module segment() {
minkowski() {
circle(r=corner_r, $fn=20);
intersection() {
circle(r=r-corner_r-edge_gap_r, $fn=100);
alpha=360/slots;
polygon([
[0,corner_r+center_gap_r],
[tan(alpha/2)*r,r+corner_r+center_gap_r],
[tan(-alpha/2)*r,r+corner_r+center_gap_r]
]);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/screw_bit_holder.scad
0 → 100644
+
106
−
0
View file @
38a79b7b
use <../include/screw.scad>;
$fn=100;
bit_h = 30;
bit_raise = 1;
base_r = 30;
r = base_r - 3;
corner_r = 2;
base_h = 5;
cap_h = bit_h + bit_raise*2 - base_h
/* tolerance */ + 1;
pitch = 5;
module bit() {
translate([0,0,bit_raise])
cylinder(r=4/sqrt(3)+0.4, $fn=6, h=bit_h);
}
module bits() {
// https://en.wikipedia.org/wiki/Fermat%27s_spiral
b = .33;
angle_step = 137.5;
for (i = [1:30]) {
theta = angle_step*i;
r = b*sqrt(theta);
rotate([0,0,theta])
translate([r,0,0])
//rotate([0,0,-theta])
bit();
}
}
module screw(tol=0) {
/* screw */
R_min=r-5/16*sqrt(3)*pitch;
metric_screw(P=pitch, D_maj=r*2,
tol=tol, h=30, taper=true);
cylinder(r=R_min, h=100);
}
module box() {
intersection() {
union() {
/* base */
minkowski() {
translate([0,0,corner_r])
cylinder(h=base_h - corner_r * 2,
r=base_r - corner_r);
sphere(r=corner_r);
}
translate([0,0,base_h/2])
cylinder(h=base_h/2, r=base_r);
translate([0,0,5])
translate([0,0,11])
rotate([180,0,0])
screw();
}
translate([-50, -50, 0]) cube([100, 100, bit_raise + bit_h / 2]);
}
}
module cap() {
difference() {
union() {
minkowski() {
translate([0,0,corner_r])
cylinder(h=cap_h - corner_r * 2,
r=base_r - corner_r);
sphere(r=corner_r);
}
cylinder(h=cap_h/2, r=base_r);
}
intersection() {
translate([0,0,-4])
screw(tol=1);
cube([100,100,(cap_h - bit_raise)*2], center=true);
}
}
}
module bottom() {
difference() {
box();
bits();
}
}
module cutaway() {
rot = 10;
intersection() {
rotate([0,0,100]) union() {
bottom();
rotate([0,0,rot])
translate([0,0,base_h +
(rot/360)*pitch])
cap();
}
translate([-50,0,0])
cube([100,100,100]);
}
}
//cutaway();
bottom();
//cap();
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment