161 lines
9.7 KiB
JavaScript
161 lines
9.7 KiB
JavaScript
|
|
function _standoffOuterR_extrude_4_outline_fn(){
|
||
|
|
return CAG.circle({"center":[294.475,-63.475],"radius":2.5})
|
||
|
|
.union(
|
||
|
|
CAG.circle({"center":[323,-99.09375],"radius":2.5})
|
||
|
|
).union(
|
||
|
|
CAG.circle({"center":[313.475,-39.525],"radius":2.5})
|
||
|
|
).union(
|
||
|
|
CAG.circle({"center":[370.475,-52.525],"radius":2.5})
|
||
|
|
).extrude({ offset: [0, 0, 4] });
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
function _boardR_extrude_1_5_outline_fn(){
|
||
|
|
return new CSG.Path2D([[391.525,-109.525],[391.525,-33.2290808]]).appendArc([389.785909,-31.2461722],{"radius":2,"clockwise":false,"large":false}).appendPoint([353.792004,-26.5101321]).appendArc([353.276799,-26.3704943],{"radius":2,"clockwise":true,"large":false}).appendPoint([334.8972318,-18.6317292]).appendArc([334.1211178,-18.475],{"radius":2,"clockwise":false,"large":false}).appendPoint([311.7337532,-18.475]).appendArc([311.2247666,-18.5408509],{"radius":2,"clockwise":false,"large":false}).appendPoint([292.5724874,-23.4493454]).appendArc([292.3754259,-23.4907222],{"radius":2,"clockwise":true,"large":false}).appendPoint([273.6300027,-26.4505259]).appendArc([273.3180775,-26.475],{"radius":2,"clockwise":true,"large":false}).appendPoint([252.425,-26.475]).appendArc([250.425,-28.475],{"radius":2,"clockwise":false,"large":false}).appendPoint([250.425,-105.9121954]).appendArc([250.0817002,-107.032617],{"radius":2,"clockwise":true,"large":false}).appendPoint([244.1012711,-115.8755193]).appendArc([243.9453558,-117.8411775],{"radius":2,"clockwise":false,"large":false}).appendPoint([254.9401548,-141.4196002]).appendArc([257.253575,-142.5106475],{"radius":2,"clockwise":false,"large":false}).appendPoint([333.44719,-122.8037671]).appendArc([334.8559621,-121.4620561],{"radius":2,"clockwise":false,"large":false}).appendPoint([337.5124011,-112.9304272]).appendArc([339.4219778,-111.525],{"radius":2,"clockwise":true,"large":false}).appendPoint([389.525,-111.525]).appendArc([391.525,-109.525],{"radius":2,"clockwise":false,"large":false}).close().innerToCAG()
|
||
|
|
.extrude({ offset: [0, 0, 1.5] });
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
function _standoffInnerR_extrude_4_outline_fn(){
|
||
|
|
return CAG.circle({"center":[294.475,-63.475],"radius":1.5})
|
||
|
|
.union(
|
||
|
|
CAG.circle({"center":[323,-99.09375],"radius":1.5})
|
||
|
|
).union(
|
||
|
|
CAG.circle({"center":[313.475,-39.525],"radius":1.5})
|
||
|
|
).union(
|
||
|
|
CAG.circle({"center":[370.475,-52.525],"radius":1.5})
|
||
|
|
).extrude({ offset: [0, 0, 4] });
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function _screwStandoffOuterR_case_fn() {
|
||
|
|
|
||
|
|
|
||
|
|
// creating part 0 of case _screwStandoffOuterR
|
||
|
|
let _screwStandoffOuterR__part_0 = _standoffOuterR_extrude_4_outline_fn();
|
||
|
|
|
||
|
|
// make sure that rotations are relative
|
||
|
|
let _screwStandoffOuterR__part_0_bounds = _screwStandoffOuterR__part_0.getBounds();
|
||
|
|
let _screwStandoffOuterR__part_0_x = _screwStandoffOuterR__part_0_bounds[0].x + (_screwStandoffOuterR__part_0_bounds[1].x - _screwStandoffOuterR__part_0_bounds[0].x) / 2
|
||
|
|
let _screwStandoffOuterR__part_0_y = _screwStandoffOuterR__part_0_bounds[0].y + (_screwStandoffOuterR__part_0_bounds[1].y - _screwStandoffOuterR__part_0_bounds[0].y) / 2
|
||
|
|
_screwStandoffOuterR__part_0 = translate([-_screwStandoffOuterR__part_0_x, -_screwStandoffOuterR__part_0_y, 0], _screwStandoffOuterR__part_0);
|
||
|
|
_screwStandoffOuterR__part_0 = rotate([0,0,0], _screwStandoffOuterR__part_0);
|
||
|
|
_screwStandoffOuterR__part_0 = translate([_screwStandoffOuterR__part_0_x, _screwStandoffOuterR__part_0_y, 0], _screwStandoffOuterR__part_0);
|
||
|
|
|
||
|
|
_screwStandoffOuterR__part_0 = translate([0,0,0], _screwStandoffOuterR__part_0);
|
||
|
|
let result = _screwStandoffOuterR__part_0;
|
||
|
|
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function _caseBottomR1_case_fn() {
|
||
|
|
|
||
|
|
|
||
|
|
// creating part 0 of case _caseBottomR1
|
||
|
|
let _caseBottomR1__part_0 = _boardR_extrude_1_5_outline_fn();
|
||
|
|
|
||
|
|
// make sure that rotations are relative
|
||
|
|
let _caseBottomR1__part_0_bounds = _caseBottomR1__part_0.getBounds();
|
||
|
|
let _caseBottomR1__part_0_x = _caseBottomR1__part_0_bounds[0].x + (_caseBottomR1__part_0_bounds[1].x - _caseBottomR1__part_0_bounds[0].x) / 2
|
||
|
|
let _caseBottomR1__part_0_y = _caseBottomR1__part_0_bounds[0].y + (_caseBottomR1__part_0_bounds[1].y - _caseBottomR1__part_0_bounds[0].y) / 2
|
||
|
|
_caseBottomR1__part_0 = translate([-_caseBottomR1__part_0_x, -_caseBottomR1__part_0_y, 0], _caseBottomR1__part_0);
|
||
|
|
_caseBottomR1__part_0 = rotate([0,0,0], _caseBottomR1__part_0);
|
||
|
|
_caseBottomR1__part_0 = translate([_caseBottomR1__part_0_x, _caseBottomR1__part_0_y, 0], _caseBottomR1__part_0);
|
||
|
|
|
||
|
|
_caseBottomR1__part_0 = translate([0,0,0], _caseBottomR1__part_0);
|
||
|
|
let result = _caseBottomR1__part_0;
|
||
|
|
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function _screwStandoffInnerR_case_fn() {
|
||
|
|
|
||
|
|
|
||
|
|
// creating part 0 of case _screwStandoffInnerR
|
||
|
|
let _screwStandoffInnerR__part_0 = _standoffInnerR_extrude_4_outline_fn();
|
||
|
|
|
||
|
|
// make sure that rotations are relative
|
||
|
|
let _screwStandoffInnerR__part_0_bounds = _screwStandoffInnerR__part_0.getBounds();
|
||
|
|
let _screwStandoffInnerR__part_0_x = _screwStandoffInnerR__part_0_bounds[0].x + (_screwStandoffInnerR__part_0_bounds[1].x - _screwStandoffInnerR__part_0_bounds[0].x) / 2
|
||
|
|
let _screwStandoffInnerR__part_0_y = _screwStandoffInnerR__part_0_bounds[0].y + (_screwStandoffInnerR__part_0_bounds[1].y - _screwStandoffInnerR__part_0_bounds[0].y) / 2
|
||
|
|
_screwStandoffInnerR__part_0 = translate([-_screwStandoffInnerR__part_0_x, -_screwStandoffInnerR__part_0_y, 0], _screwStandoffInnerR__part_0);
|
||
|
|
_screwStandoffInnerR__part_0 = rotate([0,0,0], _screwStandoffInnerR__part_0);
|
||
|
|
_screwStandoffInnerR__part_0 = translate([_screwStandoffInnerR__part_0_x, _screwStandoffInnerR__part_0_y, 0], _screwStandoffInnerR__part_0);
|
||
|
|
|
||
|
|
_screwStandoffInnerR__part_0 = translate([0,0,0], _screwStandoffInnerR__part_0);
|
||
|
|
let result = _screwStandoffInnerR__part_0;
|
||
|
|
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function caseBottomR_case_fn() {
|
||
|
|
|
||
|
|
|
||
|
|
// creating part 0 of case caseBottomR
|
||
|
|
let caseBottomR__part_0 = _screwStandoffOuterR_case_fn();
|
||
|
|
|
||
|
|
// make sure that rotations are relative
|
||
|
|
let caseBottomR__part_0_bounds = caseBottomR__part_0.getBounds();
|
||
|
|
let caseBottomR__part_0_x = caseBottomR__part_0_bounds[0].x + (caseBottomR__part_0_bounds[1].x - caseBottomR__part_0_bounds[0].x) / 2
|
||
|
|
let caseBottomR__part_0_y = caseBottomR__part_0_bounds[0].y + (caseBottomR__part_0_bounds[1].y - caseBottomR__part_0_bounds[0].y) / 2
|
||
|
|
caseBottomR__part_0 = translate([-caseBottomR__part_0_x, -caseBottomR__part_0_y, 0], caseBottomR__part_0);
|
||
|
|
caseBottomR__part_0 = rotate([0,0,0], caseBottomR__part_0);
|
||
|
|
caseBottomR__part_0 = translate([caseBottomR__part_0_x, caseBottomR__part_0_y, 0], caseBottomR__part_0);
|
||
|
|
|
||
|
|
caseBottomR__part_0 = translate([0,0,0], caseBottomR__part_0);
|
||
|
|
let result = caseBottomR__part_0;
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// creating part 1 of case caseBottomR
|
||
|
|
let caseBottomR__part_1 = _caseBottomR1_case_fn();
|
||
|
|
|
||
|
|
// make sure that rotations are relative
|
||
|
|
let caseBottomR__part_1_bounds = caseBottomR__part_1.getBounds();
|
||
|
|
let caseBottomR__part_1_x = caseBottomR__part_1_bounds[0].x + (caseBottomR__part_1_bounds[1].x - caseBottomR__part_1_bounds[0].x) / 2
|
||
|
|
let caseBottomR__part_1_y = caseBottomR__part_1_bounds[0].y + (caseBottomR__part_1_bounds[1].y - caseBottomR__part_1_bounds[0].y) / 2
|
||
|
|
caseBottomR__part_1 = translate([-caseBottomR__part_1_x, -caseBottomR__part_1_y, 0], caseBottomR__part_1);
|
||
|
|
caseBottomR__part_1 = rotate([0,0,0], caseBottomR__part_1);
|
||
|
|
caseBottomR__part_1 = translate([caseBottomR__part_1_x, caseBottomR__part_1_y, 0], caseBottomR__part_1);
|
||
|
|
|
||
|
|
caseBottomR__part_1 = translate([0,0,0], caseBottomR__part_1);
|
||
|
|
result = result.union(caseBottomR__part_1);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// creating part 2 of case caseBottomR
|
||
|
|
let caseBottomR__part_2 = _screwStandoffInnerR_case_fn();
|
||
|
|
|
||
|
|
// make sure that rotations are relative
|
||
|
|
let caseBottomR__part_2_bounds = caseBottomR__part_2.getBounds();
|
||
|
|
let caseBottomR__part_2_x = caseBottomR__part_2_bounds[0].x + (caseBottomR__part_2_bounds[1].x - caseBottomR__part_2_bounds[0].x) / 2
|
||
|
|
let caseBottomR__part_2_y = caseBottomR__part_2_bounds[0].y + (caseBottomR__part_2_bounds[1].y - caseBottomR__part_2_bounds[0].y) / 2
|
||
|
|
caseBottomR__part_2 = translate([-caseBottomR__part_2_x, -caseBottomR__part_2_y, 0], caseBottomR__part_2);
|
||
|
|
caseBottomR__part_2 = rotate([0,0,0], caseBottomR__part_2);
|
||
|
|
caseBottomR__part_2 = translate([caseBottomR__part_2_x, caseBottomR__part_2_y, 0], caseBottomR__part_2);
|
||
|
|
|
||
|
|
caseBottomR__part_2 = translate([0,0,0], caseBottomR__part_2);
|
||
|
|
result = result.subtract(caseBottomR__part_2);
|
||
|
|
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function main() {
|
||
|
|
return caseBottomR_case_fn();
|
||
|
|
}
|
||
|
|
|
||
|
|
|