Skip to content

Commit b29ff39

Browse files
committed
Merge PR SolidCode#18 from 'AlbanetcSr/master' into master
2 parents 07f4e22 + 6c815b6 commit b29ff39

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

profiles.scad

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// ==============================================
2+
// Miscellaneous profiles (aluminum etc)
3+
// By Vitaly Mankevich / contraptor.org, (c) 2012
4+
// LGPL 2.1
5+
// ==============================================
6+
//
7+
// PROFILES (DIMENSIONLESS UNLESS SPECIFIED)
8+
// -----------------------------------------
9+
// profile_angle_equal(1, 1/8);
10+
// profile_angle_unequal(1, 1/2, 1/16);
11+
// profile_square_tube(1.5, 1/8);
12+
// profile_rect_tube(1.5, 2, 1/8);
13+
// profile_channel(1.5, 1, 1/8);
14+
//
15+
// profile_8020_fractional_1010(); // inches
16+
// profile_misumi_metric_2020(); // millimeters
17+
// profile_makerbeam(); // millimeters
18+
//
19+
// EXTRUDED PROFILES
20+
// -----------------
21+
// linear_extrude (height = 3.5) profile_square_tube(1.5, 1/8);
22+
//
23+
24+
$fn = 24;
25+
26+
module profile_angle_equal(side, wall) {
27+
difference () {
28+
square (side);
29+
translate([wall, wall, 0]) square (side - wall);
30+
}
31+
}
32+
33+
module profile_angle_unequal(side_x, side_y, wall) {
34+
difference () {
35+
square ([side_x, side_y]);
36+
translate ([wall, wall, 0]) square ([side_x - wall, side_y - wall]);
37+
}
38+
}
39+
40+
module profile_square_tube(side, wall) {
41+
difference () {
42+
square (side, center = true);
43+
square (side-wall*2, center = true);
44+
}
45+
}
46+
47+
module profile_rect_tube(side_x, side_y, wall) {
48+
difference () {
49+
square ([side_x, side_y], center = true);
50+
square ([side_x - wall*2, side_y - wall*2], center = true);
51+
}
52+
}
53+
54+
module profile_channel(base, side, wall) {
55+
translate ([0, side/2, 0]) difference () {
56+
square ([base, side], center = true);
57+
translate ([0, wall/2, 0]) square ([base - wall*2, side - wall], center = true);
58+
}
59+
}
60+
61+
module profile_tslot_generic (pitch, slot, lip, web, hole) {
62+
// pitch = side width, slot = slot width, lip = thickness of the lip, web = thickness of the web, core = side of the center square, hole = center hole diameter
63+
difference () {
64+
union() {
65+
difference () {
66+
square (pitch, center=true);
67+
square (pitch - lip*2, center=true);
68+
square ([pitch, slot], center=true);
69+
square ([slot, pitch], center=true);
70+
}
71+
rotate ([0, 0, 45]) square ([pitch*1.15, web], center=true);
72+
rotate ([0, 0, -45]) square ([pitch*1.15, web], center=true);
73+
square (core, center=true);
74+
}
75+
circle (hole/2, center = true);
76+
}
77+
}
78+
79+
module profile_8020_fractional_1010 () {
80+
profile_tslot_generic (pitch = 1, slot = 0.26, lip = 0.1, web = 0.13, core = 0.45, hole = 0.28);
81+
}
82+
83+
module profile_misumi_metric_2020 () {
84+
profile_tslot_generic (pitch = 20, slot = 5.2, lip = 2, web = 2.6, core = 9, hole = 5.6);
85+
}
86+
87+
module profile_makerbeam () {
88+
profile_tslot_generic (pitch = 10, slot = 2.5, lip = 1, web = 2, core = 1, hole = 0);
89+
}

0 commit comments

Comments
 (0)