wip'
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
|
||||
$fn=64;
|
||||
// TODO move these to math
|
||||
eps=0.0001;
|
||||
eps=0.00000001;
|
||||
|
||||
inf10 = 10;
|
||||
inf50 = 50;
|
||||
|
||||
44
helper/keystone.scad
Normal file
44
helper/keystone.scad
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
// rj45 slot-to-slot keystone jack model and negative
|
||||
keystoneMainBodyWidth = 15.0;
|
||||
keystoneMainBodyHeight = 16.90;
|
||||
keystoneMainBodyDepth = 32.90;
|
||||
|
||||
heightWithHookBody = 20.2;
|
||||
heightWithHookCatch = 21.30;
|
||||
widthWithSideLugs = 15.96;
|
||||
sideLugWidth = (widthWithSideLugs - keystoneMainBodyWidth) / 2.0;
|
||||
|
||||
heightWithBottomLug = 17.5;
|
||||
|
||||
frontToHookCatch = 8.35;
|
||||
frontToBottomLugBack = 8.23;
|
||||
frontToSideLugFront = 10.63;
|
||||
|
||||
module rj45Keystone() {
|
||||
// main keystone body (no hooks or lugs)
|
||||
cube(size=[keystoneMainBodyWidth, keystoneMainBodyDepth, keystoneMainBodyHeight]);
|
||||
|
||||
// slot for top hook
|
||||
translate(v=[0,frontToHookCatch,0])
|
||||
cube(size=[keystoneMainBodyWidth, keystoneMainBodyDepth -frontToHookCatch, heightWithHookBody]);
|
||||
cube(size=[keystoneMainBodyWidth, frontToHookCatch, heightWithHookCatch]);
|
||||
|
||||
// slots for side lugs
|
||||
translate(v=[-sideLugWidth, frontToSideLugFront,0])
|
||||
cube(size=[widthWithSideLugs, keystoneMainBodyDepth-frontToSideLugFront, keystoneMainBodyHeight]);
|
||||
|
||||
// slots for bottom lugs
|
||||
translate(v=[0,0,-(heightWithBottomLug-keystoneMainBodyHeight)])
|
||||
cube(size=[keystoneMainBodyWidth, frontToBottomLugBack, keystoneMainBodyHeight]);
|
||||
|
||||
}
|
||||
|
||||
module rj45KeystoneJack_N() {
|
||||
translate(v=[0,-4,0.5]) // why?
|
||||
intersection() {
|
||||
translate(v=[-2.5,4,-4])
|
||||
cube(size=[20,6,28]);
|
||||
rj45Keystone();
|
||||
}
|
||||
}
|
||||
@ -5,26 +5,34 @@ for (i=mirror4XY(midpoint=[0,0,0], offsetX=90, offsetY=90)) {
|
||||
something();
|
||||
}
|
||||
*/
|
||||
function mirror4XY(midpoint, offsetX, offsetY) =
|
||||
[[midpoint[0]+offsetX, midpoint[1]+offsetY, midpoint[2]],
|
||||
[midpoint[0]-offsetX, midpoint[1]+offsetY, midpoint[2]],
|
||||
[midpoint[0]-offsetX, midpoint[1]-offsetY, midpoint[2]],
|
||||
[midpoint[0]+offsetX, midpoint[1]-offsetY, midpoint[2]]];
|
||||
|
||||
module mirror4XY(p, dx, dy) {
|
||||
|
||||
px = p[0];
|
||||
py = p[1];
|
||||
|
||||
translate(v=[px, py, 0])
|
||||
children(0);
|
||||
|
||||
translate(v=[px+dx, py, 0])
|
||||
children(0);
|
||||
|
||||
translate(v=[px, py+dy, 0])
|
||||
children(0);
|
||||
|
||||
translate(v=[px+dx, py+dy, 0])
|
||||
children(0);
|
||||
}
|
||||
|
||||
module align(a,b) {
|
||||
//echo("a", a);
|
||||
//echo("b", b);
|
||||
|
||||
rot_axis = cross(a,b);
|
||||
|
||||
if (rot_axis == [0,0,0]) {
|
||||
error("Can't align - provided vectors are parallel");
|
||||
}
|
||||
|
||||
//echo("rot_axis", rot_axis);
|
||||
|
||||
angle = acos(a*b/(norm(a)*norm(b)));
|
||||
//echo("angle", angle)
|
||||
|
||||
rotate(v=rot_axis, a=angle)
|
||||
children(0);
|
||||
|
||||
Reference in New Issue
Block a user