-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtableClamp.scad
34 lines (27 loc) · 1.69 KB
/
tableClamp.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
use <cubes.scad>
use <./bosl/constants.scad>
include <./bosl/threading.scad>
use <./knurled/knurledFinishLib-v2.scad>
//The length of the clamp is based off the needed clamping area, the actual length will be clampInnerLength + clampThickness
module clamp(clampInnerLength = 26, clampWidth = 21, clampInnerHeight = 50, clampThickness = 10.5, innerRoundedRadius = 5, outerRoundedRadius = 1,
screwDiameter = 10, screwThreadPitch = 2, threadHoleAdjustment = 0.7) {
screwHoleMargin = (clampInnerLength - clampThickness) / 2;
screwHoleHeight = clampThickness * 2;
clampOuterHeight = clampInnerHeight + 2 * clampThickness;
hollowAreaHeight = clampOuterHeight - 2 * clampThickness;
clampOuterLength = clampInnerLength + clampThickness;
difference() {
roundedCube(length = clampOuterLength, width = clampWidth, height = clampOuterHeight, radius = outerRoundedRadius, center = false, roundingShape = "sphere", topRoundingShape = "sphere");
diffWidth = clampWidth + 2 * innerRoundedRadius;
diffY = diffWidth / 2 - clampWidth / 2;
translate([-clampThickness, -diffY, clampThickness]) roundedCube(length = clampOuterLength, width = diffWidth, height = hollowAreaHeight, radius = innerRoundedRadius, center = false, roundingShape = "sphere", topRoundingShape = "sphere");
screwX = screwDiameter / 2 + screwHoleMargin;
screwY = clampWidth / 2;
translate([screwX, screwY, -1]) threads();
}
module threads(internal = true) {
threaded_rod(d = screwDiameter, l = screwHoleHeight, pitch = screwThreadPitch, internal = internal, slop = threadHoleAdjustment, orient = ORIENT_Z, align = V_UP);
}
}
//$fn = 30;
//clamp(outerRoundedRadius = 2);