-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodelb.scad
93 lines (79 loc) · 1.91 KB
/
modelb.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
include <measures.scad>;
module lid_surface()
{
// center
circle(r=lid_center_radius);
// appendix
translate([lid_appendix_excentricity, 0, 0])
circle(r=lid_appendix_radius);
// flattened connection
polygon([
[0, -lid_center_radius],
[lid_appendix_excentricity, -lid_appendix_radius],
[lid_appendix_excentricity, +lid_appendix_radius],
[0, +lid_center_radius]
]);
}
module lid()
{
linear_extrude(lid_height)
lid_surface();
}
module body()
{
// top
translate([0, 0, -body_top_height])
linear_extrude(body_top_height)
difference()
{
circle(r=body_top_outer_radius);
circle(r=body_top_inner_radius);
}
// center
center_offset_z = - body_top_height;
translate([0, 0, center_offset_z - body_center_height])
difference()
{
cylinder(r=body_center_radius, h=body_center_height);
cylinder(
r=body_center_radius-material_thickness,
h=body_center_height + nothing
);
}
// cone
cone_offset_z = center_offset_z - body_center_height;
translate([0, 0, cone_offset_z - body_cone_height])
difference()
{
cylinder(
h=body_cone_height,
r1=body_cone_lower_radius,
r2=body_cone_upper_radius
);
cylinder(
h=body_cone_height + nothing,
r1=body_cone_lower_radius - material_thickness,
r2=body_cone_upper_radius - material_thickness
);
}
// bottom sphere
sphere_offset_z = cone_offset_z - body_cone_height;
translate([0, 0, sphere_offset_z])
sphere(r=body_bottom_radius);
}
module joint()
{
translate([-lid_center_radius-1.75, 0, 0])
cube([3.5, 3.2, 2.5], center=true);
}
//body();
//lid();
//joint();
module tube()
{
body();
lid();
joint();
}
tube();
//Volumen muß noch ausgerechnet werden