109 lines
3.2 KiB
OpenSCAD
109 lines
3.2 KiB
OpenSCAD
include <BOSL2/std.scad>
|
|
use <../Color.scad>
|
|
use <../Polygon.scad>
|
|
use <../Box-Lid.scad>
|
|
|
|
raceLidUpper(138, 53.5, 3);
|
|
|
|
module raceLidUpper(x, y, z) {
|
|
makeColor("yellow") {
|
|
translate([ 0, y, z ]) rotate([ 180, 0, 0 ]) {
|
|
difference() {
|
|
cube([ x, y, z], false);
|
|
|
|
translate([ 3.5, 0, -1 ]) linear_extrude(height=5) polygon(points=leftLower);
|
|
translate([ 3.5, 0, 2 ]) loft_between(leftLower, leftUpper, 0, 1.01);
|
|
translate([ 3.5, 0, -1 ]) linear_extrude(height=5) polygon(points=rightLower);
|
|
translate([ 3.5, 0, 2 ]) loft_between(rightLower, rightUpper, 0, 1.01);
|
|
}
|
|
|
|
translate([ 7.5, 1, -3 ]) rotate([ 0, 0, 45 ]) cuboid(
|
|
[ 3, 4.5, 3 ],
|
|
anchor = [ -1, -1, -1 ],
|
|
rounding = 1,
|
|
edges = [
|
|
BOTTOM,
|
|
FRONT+LEFT,
|
|
FRONT+RIGHT,
|
|
BACK+LEFT,
|
|
BACK+RIGHT
|
|
]
|
|
);
|
|
translate([4, 50, -3]) rotate([ 0, 0, -45 ]) cuboid(
|
|
[ 3, 4.5, 3 ],
|
|
anchor = [ -1, -1, -1 ],
|
|
rounding = 1,
|
|
edges = [
|
|
BOTTOM,
|
|
FRONT+LEFT,
|
|
FRONT+RIGHT,
|
|
BACK+LEFT,
|
|
BACK+RIGHT
|
|
]
|
|
);
|
|
translate([128.5, 3, -3]) rotate([ 0, 0, -45 ]) cuboid(
|
|
[ 3, 4.5, 3 ],
|
|
anchor = [ -1, -1, -1 ],
|
|
rounding = 1,
|
|
edges = [
|
|
BOTTOM,
|
|
FRONT+LEFT,
|
|
FRONT+RIGHT,
|
|
BACK+LEFT,
|
|
BACK+RIGHT
|
|
]
|
|
);
|
|
translate([131.5, 47, -3]) rotate([ 0, 0, 45 ]) cuboid(
|
|
[ 3, 4.5, 3 ],
|
|
anchor = [ -1, -1, -1 ],
|
|
rounding = 1,
|
|
edges = [
|
|
BOTTOM,
|
|
FRONT+LEFT,
|
|
FRONT+RIGHT,
|
|
BACK+LEFT,
|
|
BACK+RIGHT
|
|
]
|
|
);
|
|
}
|
|
|
|
translate([ 0, 0 ,3 ]) cube([3, y, 3], false);
|
|
translate([ x - 3, 0 ,3 ]) cube([3, y, 3], false);
|
|
|
|
translate([ 0, 0 ,3 ]) sideCut(y);
|
|
translate([ x, 0, 3 ]) mirror([ 1, 0, 0 ]) sideCut(y);
|
|
}
|
|
}
|
|
|
|
leftLower = concat(
|
|
[[ 45.65, 2.8 ]],
|
|
arc_points([ 11.82, 11.82 ], [ 11.75, 2.8 ], [ 2.6, 11.75 ], steps=30, ccw=false),
|
|
arc_points([ 9.24, 44.26 ], [ 2.6, 44.25 ], [ 9.25, 50.5 ], steps=30, ccw=false),
|
|
[[ 40.3, 50.5 ]],
|
|
arc_points([ 25.7, 26.6 ], [ 41.09, 46 ], [ 44.78, 10.81 ], steps=30, ccw=false)
|
|
);
|
|
|
|
leftUpper = concat(
|
|
[[ 45.65, 1.8 ]],
|
|
arc_points([ 11.82, 11.82 ], [ 11.75, 1.8 ], [ 1.6, 11.75 ], steps=30, ccw=false),
|
|
arc_points([ 9.24, 44.26 ], [ 1.6, 44.25 ], [ 9.25, 51.5 ], steps=30, ccw=false),
|
|
[[ 40.3, 51.5 ]],
|
|
arc_points([ 25.7, 26.6 ], [ 41.09, 46 ], [ 44.78, 10.81 ], steps=30, ccw=false)
|
|
);
|
|
|
|
rightLower = concat(
|
|
[[ 43.88, 47.5 ]],
|
|
arc_points([ 104.21, 26.67 ], [ 104.5, 47.5 ], [ 125.44, 26.75 ], steps=30, ccw=false),
|
|
arc_points([ 119.25, 11.75 ], [ 125.44, 11.75 ], [ 119.3, 5.8 ], steps=30, ccw=false),
|
|
[[ 48.36, 5.8 ]],
|
|
arc_points([ 28.22, 26.60 ], [ 47.84, 10.66 ], [ 44.09, 46.27 ], steps=30, ccw=true)
|
|
);
|
|
|
|
rightUpper = concat(
|
|
[[ 41.7, 49.6 ]],
|
|
arc_points([ 104.21, 26.67 ], [ 104.5, 49.6 ], [ 127.44, 26.75 ], steps=30, ccw=false),
|
|
arc_points([ 119.25, 11.75 ], [ 127.44, 11.75 ], [ 119.3, 3.9 ], steps=30, ccw=false),
|
|
[[ 46.36, 3.9 ]],
|
|
arc_points([ 28.22, 26.60 ], [ 45.84, 10.66 ], [ 42.60, 45.30 ], steps=30, ccw=true)
|
|
);
|