Compare commits
2 Commits
master
...
test_edits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d78ac97e3 | |||
| 9a6486e44e |
@@ -1,44 +0,0 @@
|
|||||||
printer_offset = 0.5;
|
|
||||||
top_slot_width = 8;
|
|
||||||
top_slot_height = 2;
|
|
||||||
middle_slot_width = 14;
|
|
||||||
middle_slot_height = 7;
|
|
||||||
|
|
||||||
length = 20;
|
|
||||||
|
|
||||||
module T_nut(){
|
|
||||||
translate([-middle_slot_width/2, length/2, middle_slot_height-printer_offset])
|
|
||||||
rotate([90, 0, 0])
|
|
||||||
linear_extrude(length)
|
|
||||||
offset(delta = -printer_offset/3)
|
|
||||||
polygon(
|
|
||||||
[
|
|
||||||
[0,0],
|
|
||||||
[0, -middle_slot_height],
|
|
||||||
[middle_slot_width, -middle_slot_height],
|
|
||||||
[middle_slot_width, 0],
|
|
||||||
[middle_slot_width - (middle_slot_width - top_slot_width)/2, 0],
|
|
||||||
[middle_slot_width - (middle_slot_width - top_slot_width)/2, top_slot_height],
|
|
||||||
[middle_slot_width - (middle_slot_width - top_slot_width)/2 - top_slot_width, top_slot_height],
|
|
||||||
[middle_slot_width - (middle_slot_width - top_slot_width)/2 - top_slot_width, 0]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
module cylinder_outer(height,radius,fn){
|
|
||||||
fudge = 1/cos(180/fn);
|
|
||||||
cylinder(h=height,r=radius*fudge, center=true, $fn=fn);}
|
|
||||||
|
|
||||||
module hex(size, height){
|
|
||||||
cylinder_outer(height, size/2, 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
difference(){
|
|
||||||
T_nut();
|
|
||||||
cylinder(r=3+printer_offset/2, h=100, center=true, $fn=30);
|
|
||||||
|
|
||||||
translate([0,0,-0.3])
|
|
||||||
rotate([0,0,30])
|
|
||||||
hex(10, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
width = 140;
|
|
||||||
height = 85;
|
|
||||||
|
|
||||||
diameter = 120;
|
|
||||||
shape_length = 50;
|
|
||||||
vent_length = 18;
|
|
||||||
|
|
||||||
wall_thickness = 3;
|
|
||||||
|
|
||||||
$fn = 100;
|
|
||||||
|
|
||||||
module squareToCircle(width, height, length, diameter, ovalfactor) {
|
|
||||||
ovalf_h = 1.15;
|
|
||||||
ovalf_w = 0.70;
|
|
||||||
hull(){
|
|
||||||
rotate([90,0,0])
|
|
||||||
linear_extrude(1)
|
|
||||||
square(size=[width, height], center=true);
|
|
||||||
|
|
||||||
translate([0, length])
|
|
||||||
rotate([90,0,0])
|
|
||||||
linear_extrude(1)
|
|
||||||
scale([ovalf_h, ovalf_w, 1])
|
|
||||||
circle(r=diameter/2);
|
|
||||||
}
|
|
||||||
translate([0, length+10, 0])
|
|
||||||
rotate([90, 0, 0])
|
|
||||||
linear_extrude(10)
|
|
||||||
scale([ovalf_h, ovalf_w, 1])
|
|
||||||
circle(r=diameter/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
module hollowStoC(width, height, length, diameter, ovalfactor, wall_thickness){
|
|
||||||
difference(){
|
|
||||||
squareToCircle(width, height, length, diameter, ovalfactor);
|
|
||||||
translate([0, -0.005, 0])
|
|
||||||
squareToCircle(width-2*wall_thickness, height-2*wall_thickness, length+0.01, diameter-2*wall_thickness, ovalfactor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module squareHole(width, height, length, wall_thickness) {
|
|
||||||
translate([0, -length/2-1, 0])
|
|
||||||
rotate([90, 0, 0])
|
|
||||||
difference(){
|
|
||||||
cube(size=[width, height, length], center=true);
|
|
||||||
cube(size=[width-2*wall_thickness, height-2*wall_thickness, length+0.01], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module diagonalPlate(width, length, thickness){
|
|
||||||
difference(){
|
|
||||||
rotate([-45, 0, 0])
|
|
||||||
cube(size=[width, length, thickness], center=true);
|
|
||||||
translate([0, -length*cos(45), 0])
|
|
||||||
cube(size=[width+3, length, 20], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module vent(width, height, length, wall_thickness) {
|
|
||||||
squareHole(width, height, length, wall_thickness);
|
|
||||||
translate([0, -length+1.1, 30])
|
|
||||||
diagonalPlate(width, 10, 2);
|
|
||||||
translate([0, -length+1.1, 15])
|
|
||||||
diagonalPlate(width, 10, 2);
|
|
||||||
translate([0, -length+1.1, 0])
|
|
||||||
diagonalPlate(width, 10, 2);
|
|
||||||
translate([0, -length+1.1, -15])
|
|
||||||
diagonalPlate(width, 10, 2);
|
|
||||||
translate([0, -length+1.1, -30])
|
|
||||||
diagonalPlate(width, 10, 2);
|
|
||||||
|
|
||||||
translate([0, -length, 0])
|
|
||||||
rotate([90,0,0])
|
|
||||||
difference(){
|
|
||||||
cube(size=[width+15, height+15, 2], center=true);
|
|
||||||
cube(size=[width, height, 2.01], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hollowStoC(width, height, shape_length, diameter, 1, wall_thickness);
|
|
||||||
vent(width, height, vent_length, wall_thickness);
|
|
||||||
|
|
||||||
// translate([-120,0,0])
|
|
||||||
// cube(size=[100, 250, 10], center=true);
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
thickness = 3;
|
|
||||||
inside_dia = 67;
|
|
||||||
|
|
||||||
height = 60;
|
|
||||||
|
|
||||||
module piece(){
|
|
||||||
translate([0,0,height/4])
|
|
||||||
difference(){
|
|
||||||
cylinder(r=inside_dia/2+thickness, h=height/2, center=true);
|
|
||||||
translate([0,0,thickness])
|
|
||||||
cylinder(r=inside_dia/2, h=height/2, center=true);
|
|
||||||
translate([0,0,-height/4+thickness/2-0.1])
|
|
||||||
cylinder(r1=inside_dia/2-thickness, r2=inside_dia/2, h=thickness+0.3, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$fn=150;
|
|
||||||
union(){
|
|
||||||
piece();
|
|
||||||
rotate([180,0,0])
|
|
||||||
piece();
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
width = 337;
|
|
||||||
height = 174;
|
|
||||||
thickness = 3;
|
|
||||||
|
|
||||||
tube_diam = 125;
|
|
||||||
wall_thickness = 3;
|
|
||||||
tube_mount_height = 30;
|
|
||||||
|
|
||||||
conical_height = 40;
|
|
||||||
|
|
||||||
cone_scale_x = 2.5;
|
|
||||||
cone_scale_y = 1.2;
|
|
||||||
|
|
||||||
$fn = 100;
|
|
||||||
difference(){
|
|
||||||
union(){
|
|
||||||
difference(){
|
|
||||||
cube(size=[width, height, thickness], center=true);
|
|
||||||
scale([cone_scale_x, cone_scale_y, 1])
|
|
||||||
cylinder(r=tube_diam/2-wall_thickness, h=2*thickness, center=true);
|
|
||||||
}
|
|
||||||
translate([0,0, (tube_mount_height+thickness)/2+conical_height])
|
|
||||||
difference(){
|
|
||||||
cylinder(r=tube_diam/2, h=tube_mount_height, center=true);
|
|
||||||
cylinder(r=tube_diam/2-wall_thickness, h=tube_mount_height+1, center=true);
|
|
||||||
}
|
|
||||||
translate([0, 0, (conical_height+thickness)/2])
|
|
||||||
walledCone(tube_diam);
|
|
||||||
|
|
||||||
|
|
||||||
// translate([0, 0, (conical_height+thickness)/2])
|
|
||||||
// difference(){
|
|
||||||
// cylinder(h=conical_height, r1=tube_diam/2+20, r2=tube_diam/2, center=true);
|
|
||||||
// cylinder(h=conical_height+1, r1=tube_diam/2+20-wall_thickness, r2=tube_diam/2-wall_thickness, center=true);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
translate([width/2, 0, -5])
|
|
||||||
cube([width,height+5,200], center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module cone(diam, hei=conical_height){
|
|
||||||
hull(){
|
|
||||||
scale([cone_scale_x, cone_scale_y, 1])
|
|
||||||
cylinder(h=hei, r1=diam/2, r2=0, center=true);
|
|
||||||
cylinder(h=hei, r=diam/2, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module walledCone(diam){
|
|
||||||
difference(){
|
|
||||||
cone(diam);
|
|
||||||
cone(diam-2*wall_thickness, hei=conical_height+0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
0
another_bullshit_file
Normal file
0
another_bullshit_file
Normal file
@@ -1,21 +0,0 @@
|
|||||||
inner_hole_dia = 14 + 0.5;
|
|
||||||
mid_hole_dia = 30 - 0.5;
|
|
||||||
|
|
||||||
outer_dia = 40;
|
|
||||||
|
|
||||||
height_step = 5;
|
|
||||||
height_step_small = height_step/3;
|
|
||||||
|
|
||||||
$fn=150;
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
translate([0,0,-height_step_small])
|
|
||||||
cylinder(r=mid_hole_dia/2, h=height_step+height_step_small, center=true);
|
|
||||||
translate([0,0,height_step_small/2])
|
|
||||||
cylinder(r=outer_dia/2, h=height_step_small, center=true);
|
|
||||||
}
|
|
||||||
cylinder(r=inner_hole_dia/2, h=height_step*2+0.01, center=true);
|
|
||||||
translate([0,-20,-20])
|
|
||||||
cube(size=[40, 40, 40], center=false);
|
|
||||||
}
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
// Door measurements
|
|
||||||
width = 516;
|
|
||||||
height = 766;
|
|
||||||
thickness = 18;
|
|
||||||
|
|
||||||
// Pattern parameters
|
|
||||||
border_margin = 80;
|
|
||||||
border_width = 40;
|
|
||||||
// border_angle = 30;
|
|
||||||
border_depth = 10;
|
|
||||||
border_depth_2 = 4;
|
|
||||||
|
|
||||||
small_border_width = 4;
|
|
||||||
small_border_thickness = 2;
|
|
||||||
|
|
||||||
outside_border_width = border_width / 2;
|
|
||||||
outside_border_depth_2 = 2;
|
|
||||||
|
|
||||||
inner_depth = 2;
|
|
||||||
|
|
||||||
// Technical params
|
|
||||||
mill_diameter = 8;
|
|
||||||
|
|
||||||
module door(){
|
|
||||||
difference(){
|
|
||||||
cube(size=[width, height, thickness], center=false);
|
|
||||||
translate([border_margin, border_margin, thickness+0.01])
|
|
||||||
union(){
|
|
||||||
borders(height-2*border_margin, width-2*border_margin, border_width, border_depth, border_depth_2);
|
|
||||||
outside_borders(height-2*border_margin, width-2*border_margin, border_width, border_depth, border_depth_2);
|
|
||||||
}
|
|
||||||
translate([border_margin-outside_border_width, 0, thickness-small_border_thickness+0.01])
|
|
||||||
cube(size=[small_border_width, height, small_border_thickness], center=false);
|
|
||||||
translate([width-border_margin-small_border_width+outside_border_width, 0, thickness-small_border_thickness+0.01])
|
|
||||||
cube(size=[small_border_width, height, small_border_thickness], center=false);
|
|
||||||
|
|
||||||
translate([border_margin, border_margin, thickness-inner_depth])
|
|
||||||
cube(size=[width-2*border_margin, height-2*border_margin, 10], center=false);
|
|
||||||
// Custom small border
|
|
||||||
// translate([border_margin-border_depth_2, border_margin-border_depth_2, thickness-border_depth_2])
|
|
||||||
// cube(size=[width-2*border_margin+2*border_depth_2, height-2*border_margin+2*border_depth_2, border_depth_2+0.01], center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module border(length, width, depth1, depth2, mill_dia){
|
|
||||||
points = [[0,depth2], [0,0], [width,0], [width, depth1], [width-mill_dia, depth1]];
|
|
||||||
rotate([-90,0,0])
|
|
||||||
linear_extrude(height=length){
|
|
||||||
polygon(points=points);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module outside_border(length, width, depth1, depth2) {
|
|
||||||
translate([0, length, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
border(length, width, depth1, depth2, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
module borders(length_border, width_border, width, depth1, depth2){
|
|
||||||
union(){
|
|
||||||
translate([width_border-width, 0, 0])
|
|
||||||
border(length_border, width, depth1, depth2, mill_diameter);
|
|
||||||
translate([width, length_border, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
border(length_border, width, depth1, depth2, mill_diameter);
|
|
||||||
translate([0, width, 0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
border(width_border, width, depth1, depth2, mill_diameter);
|
|
||||||
translate([width_border, length_border-width, 0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
border(width_border, width, depth1, depth2, mill_diameter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module outside_border_corner(length_border, width_border, width, depth1, depth2){
|
|
||||||
intersection(){
|
|
||||||
translate([-outside_border_width+0.01, length_border+outside_border_width, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
outside_border(length_border+2*outside_border_width, outside_border_width, depth1, depth2);
|
|
||||||
translate([-outside_border_width, -outside_border_width+0.01, 0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
outside_border(width_border+2*outside_border_width, outside_border_width, depth1, depth2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module outside_borders(length_border, width_border, width, depth1, depth2){
|
|
||||||
union(){
|
|
||||||
translate([width_border+outside_border_width-0.01, 0, 0])
|
|
||||||
outside_border(length_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
translate([-outside_border_width+0.01, length_border, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
outside_border(length_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
translate([0, -outside_border_width+0.01, 0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
outside_border(width_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
translate([width_border, length_border+outside_border_width-0.01, 0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
outside_border(width_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
// Now add the corners
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
translate([width_border,0,0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
translate([width_border,length_border,0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
translate([0,length_border,0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
color(c = [0.9, 0.9, 0.9]){
|
|
||||||
door();
|
|
||||||
}
|
|
||||||
// door();
|
|
||||||
|
|
||||||
// rotate([90,0,0])
|
|
||||||
// outside_border(500, border_width, border_depth, border_depth_2);
|
|
||||||
|
|
||||||
// outside_borders(height-2*border_margin, width-2*border_margin, border_width, border_depth, border_depth_2);
|
|
||||||
|
|
||||||
// borders(height, width, border_width, border_depth);
|
|
||||||
@@ -1,259 +0,0 @@
|
|||||||
// Door measurements
|
|
||||||
width = 516;
|
|
||||||
height = 767;
|
|
||||||
thickness = 18;
|
|
||||||
|
|
||||||
// Pattern parameters
|
|
||||||
border_margin = 60;
|
|
||||||
border_width = 40;
|
|
||||||
// border_angle = 30;
|
|
||||||
border_depth = 8;
|
|
||||||
border_depth_2 = 4;
|
|
||||||
|
|
||||||
small_border_width = 4;
|
|
||||||
small_border_thickness = 2;
|
|
||||||
|
|
||||||
outside_border_width = border_width / 2;
|
|
||||||
outside_border_depth_2 = 2;
|
|
||||||
|
|
||||||
inner_depth = 8;
|
|
||||||
|
|
||||||
round_radius = 8;
|
|
||||||
|
|
||||||
// Technical params
|
|
||||||
mill_diameter = 8;
|
|
||||||
|
|
||||||
module door(){
|
|
||||||
difference(){
|
|
||||||
cube(size=[width, height, thickness], center=false);
|
|
||||||
translate([border_margin, border_margin, thickness+0.01])
|
|
||||||
|
|
||||||
// outside_borders(height-2*border_margin, width-2*border_margin, border_width, border_depth, border_depth_2);
|
|
||||||
translate([border_margin-outside_border_width, 0, thickness-small_border_thickness+0.01])
|
|
||||||
cube(size=[small_border_width, height, small_border_thickness], center=false);
|
|
||||||
|
|
||||||
// lines
|
|
||||||
translate([width/2,border_margin+10,10.01])
|
|
||||||
carving_pattern(width-2*border_margin, height-2*border_margin-20, 10, 40);
|
|
||||||
|
|
||||||
translate([border_margin, border_margin, thickness-inner_depth])
|
|
||||||
cube(size=[width-2*border_margin, height-2*border_margin, 10], center=false);
|
|
||||||
|
|
||||||
// round inner edges
|
|
||||||
translate([width/2, height/2, thickness-round_radius])
|
|
||||||
rounded_square_cutter(width-2*border_margin, height-2*border_margin, round_radius);
|
|
||||||
|
|
||||||
// Custom small border
|
|
||||||
// translate([width-border_margin-small_border_width+outside_border_width, 0, thickness-small_border_thickness+0.01])
|
|
||||||
// cube(size=[small_border_width, height, small_border_thickness], center=false);
|
|
||||||
// translate([border_margin-border_depth_2, border_margin-border_depth_2, thickness-border_depth_2])
|
|
||||||
// cube(size=[width-2*border_margin+2*border_depth_2, height-2*border_margin+2*border_depth_2, border_depth_2+0.01], center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module border(length, width, depth1, depth2, mill_dia){
|
|
||||||
points = [[0,depth2], [0,0], [width,0], [width, depth1], [width-mill_dia, depth1]];
|
|
||||||
rotate([-90,0,0])
|
|
||||||
linear_extrude(height=length){
|
|
||||||
polygon(points=points);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module outside_border(length, width, depth1, depth2) {
|
|
||||||
translate([0, length, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
border(length, width, depth1, depth2, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
module borders(length_border, width_border, width, depth1, depth2){
|
|
||||||
union(){
|
|
||||||
translate([width_border-width, 0, 0])
|
|
||||||
border(length_border, width, depth1, depth2, mill_diameter);
|
|
||||||
translate([width, length_border, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
border(length_border, width, depth1, depth2, mill_diameter);
|
|
||||||
translate([0, width, 0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
border(width_border, width, depth1, depth2, mill_diameter);
|
|
||||||
translate([width_border, length_border-width, 0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
border(width_border, width, depth1, depth2, mill_diameter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module outside_border_corner(length_border, width_border, width, depth1, depth2){
|
|
||||||
intersection(){
|
|
||||||
translate([-outside_border_width+0.01, length_border+outside_border_width, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
outside_border(length_border+2*outside_border_width, outside_border_width, depth1, depth2);
|
|
||||||
translate([-outside_border_width, -outside_border_width+0.01, 0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
outside_border(width_border+2*outside_border_width, outside_border_width, depth1, depth2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module outside_borders(length_border, width_border, width, depth1, depth2){
|
|
||||||
union(){
|
|
||||||
translate([width_border+outside_border_width-0.01, 0, 0])
|
|
||||||
outside_border(length_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
translate([-outside_border_width+0.01, length_border, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
outside_border(length_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
translate([0, -outside_border_width+0.01, 0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
outside_border(width_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
translate([width_border, length_border+outside_border_width-0.01, 0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
outside_border(width_border, outside_border_width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
// Now add the corners
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
translate([width_border,0,0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
translate([width_border,length_border,0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
|
|
||||||
translate([0,length_border,0])
|
|
||||||
rotate([0,0,-90])
|
|
||||||
outside_border_corner(length_border, width_border, width, depth1, outside_border_depth_2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module carving_face() {
|
|
||||||
difference(){
|
|
||||||
square(size=[10, 4], center=true);
|
|
||||||
|
|
||||||
translate([-4.5, -2, 0])
|
|
||||||
circle(r=4, $fn=50);
|
|
||||||
|
|
||||||
translate([4.5, -2, 0])
|
|
||||||
circle(r=4, $fn=50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module carving_tip(){
|
|
||||||
translate([0,0,-2])
|
|
||||||
difference(){
|
|
||||||
rotate_extrude() {
|
|
||||||
difference(){
|
|
||||||
carving_face();
|
|
||||||
translate([0,-5,0])
|
|
||||||
square(size=[10, 10], center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
translate([0,5,0])
|
|
||||||
cube(size=[10, 10, 10], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module carving(length) {
|
|
||||||
translate([0,length,0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
carving_tip();
|
|
||||||
carving_tip();
|
|
||||||
translate([0,length,-2])
|
|
||||||
rotate([90,0,0])
|
|
||||||
linear_extrude(height=length){
|
|
||||||
carving_face();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module carving_pattern(width, height, inter_dist_small, inter_dist_large) {
|
|
||||||
max_iter = floor(width/(2*(inter_dist_small+inter_dist_large)))+1;
|
|
||||||
for(i=[-max_iter:max_iter]) {
|
|
||||||
translate([i*inter_dist_large,0,0])
|
|
||||||
union(){
|
|
||||||
translate([-inter_dist_small/2,0,0])
|
|
||||||
carving(height);
|
|
||||||
translate([inter_dist_small/2,0,0])
|
|
||||||
carving(height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module round_cutter(radius){
|
|
||||||
difference(){
|
|
||||||
square(size=[radius, radius], center=false);
|
|
||||||
circle(r=radius, $fn=50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module round_long_cutter(length, radius){
|
|
||||||
translate([0, length, 0])
|
|
||||||
rotate([90,0,0]){
|
|
||||||
linear_extrude(height=length)
|
|
||||||
round_cutter(radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module round_corner(radius){
|
|
||||||
rotate_extrude(angle=90) {
|
|
||||||
translate([-radius,0,0])
|
|
||||||
round_cutter(radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module rounded_cutter(length, radius) {
|
|
||||||
translate([0, -length/2, 0])
|
|
||||||
union(){
|
|
||||||
translate([radius, length, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
round_long_cutter(length, radius);
|
|
||||||
rotate([0,0,90])
|
|
||||||
round_corner(radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module rounded_square_cutter(width, height, radius) {
|
|
||||||
union(){
|
|
||||||
translate([width/2, 0, 0])
|
|
||||||
rounded_cutter(height, radius);
|
|
||||||
|
|
||||||
translate([0, height/2, 0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
rounded_cutter(width, radius);
|
|
||||||
|
|
||||||
translate([-width/2, 0, 0])
|
|
||||||
rotate([0,0,180])
|
|
||||||
rounded_cutter(height, radius);
|
|
||||||
|
|
||||||
translate([0, -height/2, 0])
|
|
||||||
rotate([0,0,270])
|
|
||||||
rounded_cutter(width, radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
color(c = [0.9, 0.9, 0.9]){
|
|
||||||
door();
|
|
||||||
}
|
|
||||||
// door();
|
|
||||||
|
|
||||||
// rotate([90,0,0])
|
|
||||||
// outside_border(500, border_width, border_depth, border_depth_2);
|
|
||||||
|
|
||||||
// outside_borders(height-2*border_margin, width-2*border_margin, border_width, border_depth, border_depth_2);
|
|
||||||
|
|
||||||
// borders(height, width, border_width, border_depth);
|
|
||||||
|
|
||||||
|
|
||||||
// carving_pattern(width, height, 20, 60);
|
|
||||||
|
|
||||||
// translate([width/2,border_margin,10])
|
|
||||||
// carving_pattern(width-2*border_margin, height-2*border_margin, 20, 80);
|
|
||||||
|
|
||||||
// carving_tip();
|
|
||||||
// carving(100);
|
|
||||||
|
|
||||||
// round_corner(5);
|
|
||||||
|
|
||||||
// round_long_cutter(100,5);
|
|
||||||
|
|
||||||
// rounded_cutter(200,5);
|
|
||||||
// rounded_square_cutter(200, 100, 5);
|
|
||||||
|
|
||||||
// translate([width/2, height/2, 0])
|
|
||||||
// rounded_square_cutter(width-2*border_margin, height-2*border_margin, 5);
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
thickness = 18;
|
|
||||||
|
|
||||||
height = 1980;
|
|
||||||
width = 600;
|
|
||||||
|
|
||||||
step = 30;
|
|
||||||
|
|
||||||
points_panel_1_top = [120, 110, 100, 90, 75, 60, 50 ,30, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20];
|
|
||||||
points_panel_1_side = [120, 110, 100, 90, 75, 60, 50 ,30, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20];
|
|
||||||
|
|
||||||
|
|
||||||
module top_diff(width, points, step){
|
|
||||||
max_iter = floor(width/step);
|
|
||||||
mymax = max(points);
|
|
||||||
echo(max_iter);
|
|
||||||
poly = [
|
|
||||||
for(i = [0:max_iter]) [(i)*step, points[i]-mymax],
|
|
||||||
[width, 0.01],
|
|
||||||
[0, 0.01]
|
|
||||||
];
|
|
||||||
|
|
||||||
polygon(poly);
|
|
||||||
}
|
|
||||||
|
|
||||||
module side_diff(width, points, step){
|
|
||||||
max_iter = len(points)-1;
|
|
||||||
height = step*max_iter;
|
|
||||||
mymax = max(points);
|
|
||||||
echo(max_iter);
|
|
||||||
poly = [
|
|
||||||
for(i = [0:max_iter]) [width-points[i],-(i)*step],
|
|
||||||
[width + 0.01, -height],
|
|
||||||
[width + 0.01, 0]
|
|
||||||
];
|
|
||||||
|
|
||||||
polygon(poly);
|
|
||||||
}
|
|
||||||
|
|
||||||
module door_top(width, height, thickness, points, step){
|
|
||||||
difference(){
|
|
||||||
translate([0, -height, 0])
|
|
||||||
cube(size=[width, height, thickness], center=false);
|
|
||||||
|
|
||||||
translate([0,0,-0.005])
|
|
||||||
linear_extrude(thickness+0.01)
|
|
||||||
top_diff(width, points, step);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module door_side(width, height, thickness, points, step){
|
|
||||||
difference(){
|
|
||||||
translate([0, -height, 0])
|
|
||||||
cube(size=[width, height, thickness], center=false);
|
|
||||||
|
|
||||||
translate([0,0,-0.005])
|
|
||||||
linear_extrude(thickness+0.01)
|
|
||||||
side_diff(width, points, step);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module door_complete(width, height, thickness, points_top, points_side, step){
|
|
||||||
intersection(){
|
|
||||||
door_top(width, height, thickness, points_top, step);
|
|
||||||
door_side(width, height, thickness, points_side, step);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// top_diff(width, points_panel_1_top, step);
|
|
||||||
// door_top(width, height, thickness, points_panel_1_top, step);
|
|
||||||
// side_diff(width, points_panel_1_side, step);
|
|
||||||
// door_side(width, height, thickness, points_panel_1_side, step);
|
|
||||||
door_complete(width, height, thickness, points_panel_1_top, points_panel_1_side, step);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
outer_dia = 16;
|
|
||||||
hole_dia = 5.5;
|
|
||||||
height=9;
|
|
||||||
|
|
||||||
linear_extrude(height=height){
|
|
||||||
difference() {
|
|
||||||
circle(r=outer_dia/2, $fn=50);
|
|
||||||
circle(r=hole_dia/2, $fn=20);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
small_dist = 0.1;
|
|
||||||
|
|
||||||
depth = 20;
|
|
||||||
width = 340;
|
|
||||||
height = 152;
|
|
||||||
thickness = 3;
|
|
||||||
tab_width = 20;
|
|
||||||
tab_hole_r = 2.5;
|
|
||||||
|
|
||||||
mount(depth, width, height, thickness);
|
|
||||||
|
|
||||||
module mount(depth, width, height, thickness){
|
|
||||||
union(){
|
|
||||||
tab(depth, tab_width, thickness, tab_hole_r);
|
|
||||||
translate([(width+tab_width)/2, 0, -height])
|
|
||||||
U(width, height, depth, thickness);
|
|
||||||
translate([width+tab_width, 0, 0])
|
|
||||||
tab(depth, tab_width, thickness, tab_hole_r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module tab(depth, width, thickness, hole_r) {
|
|
||||||
difference(){
|
|
||||||
cube([width, depth, thickness], center=true);
|
|
||||||
cylinder(r=hole_r, h=thickness+small_dist, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module U(width, height, depth, thickness){
|
|
||||||
union(){
|
|
||||||
cube([width+2*thickness, depth, thickness], center=true);
|
|
||||||
translate([-(width+thickness)/2, 0, height/2])
|
|
||||||
cube([thickness, depth, height], center=true);
|
|
||||||
translate([(width+thickness)/2, 0, height/2])
|
|
||||||
cube([thickness, depth, height], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
//****************************************************************
|
|
||||||
//* Name : Jack Feet *
|
|
||||||
//* Author : Robert Joseph Korn *
|
|
||||||
//* Notice : Copyright (c) 2015 Open Valley Consulting Corp *
|
|
||||||
//* : All Rights Reserved *
|
|
||||||
//* Date : 3/12/15 *
|
|
||||||
//* Version : 1.0 *
|
|
||||||
//* Notes : Simple feet to protect CNC table *
|
|
||||||
//* : *
|
|
||||||
//****************************************************************
|
|
||||||
|
|
||||||
bolt_dia = 6;
|
|
||||||
|
|
||||||
difference(){
|
|
||||||
cylinder (r1=10,r2=(bolt_dia+2)/2,h=10, $fn=8);
|
|
||||||
translate(v=[0,0,4]) cylinder(r=bolt_dia/2,h=8, $fn=50);
|
|
||||||
}
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
// spindle params
|
|
||||||
inner_dia = 80;
|
|
||||||
dia_offset = 1;
|
|
||||||
|
|
||||||
// threaded insert params
|
|
||||||
insert_height = 7;
|
|
||||||
insert_dia = 5;
|
|
||||||
insert_bottom_dia = 4.2;
|
|
||||||
|
|
||||||
// magnet params
|
|
||||||
magnet_dia = 3;
|
|
||||||
magnet_height = 1;
|
|
||||||
magnet_number = 10;
|
|
||||||
|
|
||||||
// shape params
|
|
||||||
extra_offset = 4;
|
|
||||||
width = magnet_dia+extra_offset;
|
|
||||||
wedge_size = insert_dia + 3;
|
|
||||||
thickness = insert_dia + 3;
|
|
||||||
wedge_width = insert_height;
|
|
||||||
spacing_distance = 5;
|
|
||||||
|
|
||||||
$fn=100;
|
|
||||||
|
|
||||||
module ring(){
|
|
||||||
difference(){
|
|
||||||
linear_extrude(height=thickness, center=false, convexity=10, twist=0) {
|
|
||||||
difference(){
|
|
||||||
union(){
|
|
||||||
radius = (inner_dia+dia_offset)/2+width;
|
|
||||||
circle(r=radius);
|
|
||||||
|
|
||||||
squ_width = wedge_size+width;
|
|
||||||
squ_height = 2*wedge_width + spacing_distance + 1;
|
|
||||||
translate([-wedge_size/2-radius,0,0])
|
|
||||||
square(size=[squ_width, squ_height], center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
union(){
|
|
||||||
radius = (inner_dia+dia_offset)/2;
|
|
||||||
circle(r=radius);
|
|
||||||
|
|
||||||
squ_width = wedge_size+width+20;
|
|
||||||
squ_height = spacing_distance + 1;
|
|
||||||
translate([-wedge_size/2-radius,0,0])
|
|
||||||
square(size=[squ_width, squ_height], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = [0:magnet_number]){
|
|
||||||
rotate([0,0,i*36])
|
|
||||||
translate([0, (inner_dia+dia_offset)/2+width/2-0.5, -0.01])
|
|
||||||
cube(size=[15, 5, 3], center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// threaded insert hole
|
|
||||||
translate([-(inner_dia+dia_offset)/2-width-wedge_size/1.5, (spacing_distance + 1)/2-0.005, thickness/2])
|
|
||||||
threaded_insert();
|
|
||||||
|
|
||||||
// bolt hole
|
|
||||||
translate([-(inner_dia+dia_offset)/2-width-wedge_size/1.5, -(spacing_distance + 1)/2+0.005, thickness/2])
|
|
||||||
rotate([90,0,0])
|
|
||||||
cylinder(h=insert_height+0.01, r=3.5/2, center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module threaded_insert(){
|
|
||||||
rotate([-90,0,0])
|
|
||||||
cylinder(h=insert_height+0.01, r1=insert_bottom_dia/2, r2=insert_dia/2, center=false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// vacuum params
|
|
||||||
vacuum_pipe_dia_start = 32;
|
|
||||||
vacuum_pipe_dia_end = 30;
|
|
||||||
pipe_thickness = 2;
|
|
||||||
pipe_length = 50;
|
|
||||||
rotation_angle = 60;
|
|
||||||
|
|
||||||
pipe_height = 50;
|
|
||||||
|
|
||||||
module pipe(){
|
|
||||||
// hollow pipe for vacuum cleaner
|
|
||||||
rotate([0,rotation_angle,0])
|
|
||||||
difference(){
|
|
||||||
cylinder(h=pipe_length, r1=vacuum_pipe_dia_end/2+pipe_thickness, r2=vacuum_pipe_dia_start/2+pipe_thickness, center=false);
|
|
||||||
translate([0,0,-0.005])
|
|
||||||
cylinder(h=pipe_length+0.01, r1=vacuum_pipe_dia_end/2, r2=vacuum_pipe_dia_start/2, center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module vacuum_vent() {
|
|
||||||
rotate([180,0,0])
|
|
||||||
difference(){
|
|
||||||
linear_extrude(height=pipe_height, center=false, convexity=10, twist=0) {
|
|
||||||
difference(){
|
|
||||||
union(){
|
|
||||||
radius = (inner_dia+dia_offset)/2+width;
|
|
||||||
circle(r=radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
union(){
|
|
||||||
radius = (inner_dia+dia_offset)/2+2;
|
|
||||||
circle(r=radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = [0:magnet_number]){
|
|
||||||
rotate([0,0,i*36])
|
|
||||||
translate([0, (inner_dia+dia_offset)/2+width/2, -0.01])
|
|
||||||
cylinder(r=(magnet_dia+0.5)/2, h=magnet_height+0.5, center=false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ring for metal
|
|
||||||
translate([0,0,-8])
|
|
||||||
cylinder(r=(inner_dia+dia_offset)/2+6, h=10, center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ring();
|
|
||||||
// pipe_x = cos(rotation_angle)*(vacuum_pipe_dia_end+pipe_thickness)/2;
|
|
||||||
// difference(){
|
|
||||||
// vacuum_vent();
|
|
||||||
// translate([-pipe_x+(inner_dia+dia_offset)/2+2,0,-30])
|
|
||||||
// hull(){pipe();}
|
|
||||||
|
|
||||||
// // threaded insert holes
|
|
||||||
// for(i = [0:magnet_number]){
|
|
||||||
// rotate([0,0,i*36])
|
|
||||||
// translate([0, (inner_dia+dia_offset)/2+width+0.9-7, -pipe_height+5])
|
|
||||||
// rotate([0,0,0])
|
|
||||||
// threaded_insert();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// difference(){
|
|
||||||
// translate([-pipe_x+(inner_dia+dia_offset)/2+2,0,-30])
|
|
||||||
// pipe();
|
|
||||||
// translate([0,0,-pipe_height/2])
|
|
||||||
// cylinder(r=(inner_dia+dia_offset)/2+2, h=pipe_height, center=true);
|
|
||||||
// }
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
// fitting params
|
|
||||||
fitting_inside_diam_top = 66;
|
|
||||||
fitting_inside_diam_bottom = 61;
|
|
||||||
fitting_length = 23;
|
|
||||||
|
|
||||||
wall_thickness = 2.5;
|
|
||||||
curve_angle = 30;
|
|
||||||
|
|
||||||
$fn=100;
|
|
||||||
module fitting(r_in, r_out, length){
|
|
||||||
rotate(90,[1,0,0])
|
|
||||||
difference(){
|
|
||||||
linear_extrude(length)
|
|
||||||
circle(r=r_out);
|
|
||||||
linear_extrude(length)
|
|
||||||
circle(r=r_in);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function custom_y(w, angle) = (w/2-w*(1-cos(angle)))/tan(angle)+w*sin(angle);
|
|
||||||
|
|
||||||
module one_side(r, w, angle){
|
|
||||||
rotate_extrude(angle=angle)
|
|
||||||
translate([w/2,0,0])
|
|
||||||
circle(r=r);
|
|
||||||
|
|
||||||
y = custom_y(w, angle);
|
|
||||||
translate([w/2,y,0])
|
|
||||||
rotate(angle)
|
|
||||||
mirror([1,0,0])
|
|
||||||
rotate_extrude(angle=angle)
|
|
||||||
translate([w/2,0,0])
|
|
||||||
circle(r=r);
|
|
||||||
|
|
||||||
tri_x = w/2-w*(1-cos(angle));
|
|
||||||
tri_y = tri_x/tan(angle);
|
|
||||||
length = sqrt(pow(tri_y, 2) + pow(tri_x,2));
|
|
||||||
rotate(angle,[0,0,1])
|
|
||||||
translate([w/2,length,0])
|
|
||||||
rotate(90,[1,0,0])
|
|
||||||
linear_extrude(length)
|
|
||||||
circle(r=r);
|
|
||||||
}
|
|
||||||
|
|
||||||
module split_shape(r, w, angle){
|
|
||||||
union(){
|
|
||||||
one_side(r,w,angle);
|
|
||||||
mirror([1,0,0])
|
|
||||||
one_side(r,w,angle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
my_w = fitting_inside_diam_top+2*wall_thickness;
|
|
||||||
difference(){
|
|
||||||
split_shape(fitting_inside_diam_top/2+wall_thickness,
|
|
||||||
my_w,
|
|
||||||
curve_angle);
|
|
||||||
split_shape(fitting_inside_diam_bottom/2,
|
|
||||||
my_w,
|
|
||||||
curve_angle);
|
|
||||||
}
|
|
||||||
|
|
||||||
// one_side(fitting_inside_diam_top/2+wall_thickness,
|
|
||||||
// my_w,
|
|
||||||
// curve_angle);
|
|
||||||
|
|
||||||
translate([-my_w/2,0,0])
|
|
||||||
fitting(fitting_inside_diam_top/2,
|
|
||||||
fitting_inside_diam_top/2+wall_thickness,
|
|
||||||
fitting_length);
|
|
||||||
|
|
||||||
translate([my_w/2,0,0])
|
|
||||||
fitting(fitting_inside_diam_top/2,
|
|
||||||
fitting_inside_diam_top/2+wall_thickness,
|
|
||||||
fitting_length);
|
|
||||||
|
|
||||||
translate([0,custom_y(my_w, curve_angle)+fitting_length,0])
|
|
||||||
fitting(fitting_inside_diam_top/2,
|
|
||||||
fitting_inside_diam_top/2+wall_thickness,
|
|
||||||
fitting_length);
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
wedge_thickness = 2;
|
|
||||||
slots_x = 4;
|
|
||||||
slots_y = 4;
|
|
||||||
|
|
||||||
x_outside = 56;
|
|
||||||
y_outside = 68;
|
|
||||||
|
|
||||||
outside_offset = 2;
|
|
||||||
outside_offset_seat = 1;
|
|
||||||
seat_width = 1;
|
|
||||||
|
|
||||||
union(){
|
|
||||||
linear_extrude(2){
|
|
||||||
difference(){
|
|
||||||
slot_width = (x_outside - 2 * outside_offset - (slots_x-1)*wedge_thickness) / slots_x;
|
|
||||||
slot_height = (y_outside - 2 * outside_offset - (slots_y-1)*wedge_thickness) / slots_y;
|
|
||||||
square(size=[x_outside, y_outside], center=false);
|
|
||||||
translate([outside_offset, outside_offset, 0])
|
|
||||||
for (i =[0:slots_y-1]){
|
|
||||||
for (j = [0:slots_x-1]){
|
|
||||||
translate([j*(slot_width+wedge_thickness), i*(slot_height+wedge_thickness), 0])
|
|
||||||
square(size=[slot_width, slot_height], center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
linear_extrude(5){
|
|
||||||
translate([outside_offset_seat, outside_offset_seat])
|
|
||||||
difference(){
|
|
||||||
square(size=[x_outside-2*outside_offset_seat, y_outside-2*outside_offset_seat], center=false);
|
|
||||||
translate([outside_offset_seat, outside_offset_seat, 0])
|
|
||||||
square(size=[x_outside-2*outside_offset_seat-2*seat_width, y_outside-2*outside_offset_seat-2*seat_width], center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
hole_dia = 14;
|
|
||||||
hole_depth = 29;
|
|
||||||
|
|
||||||
wall_thickness = 3;
|
|
||||||
|
|
||||||
screw_hole_dia = 4;
|
|
||||||
screw_hole_chamfer = 2;
|
|
||||||
|
|
||||||
module slot(width, height) {
|
|
||||||
radius = width / 2;
|
|
||||||
squ_height = height-2*radius;
|
|
||||||
|
|
||||||
union(){
|
|
||||||
square(size=[width, squ_height], center=true);
|
|
||||||
translate([0,squ_height/2,0])
|
|
||||||
circle(r=radius);
|
|
||||||
translate([0,-squ_height/2,0])
|
|
||||||
circle(r=radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module sector(radius, angles, fn = 24) {
|
|
||||||
r = radius / cos(180 / fn);
|
|
||||||
step = -360 / fn;
|
|
||||||
|
|
||||||
points = concat([[0, 0]],
|
|
||||||
[for(a = [angles[0] : step : angles[1] - 360])
|
|
||||||
[r * cos(a), r * sin(a)]
|
|
||||||
],
|
|
||||||
[[r * cos(angles[1]), r * sin(angles[1])]]
|
|
||||||
);
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
circle(radius, $fn = fn);
|
|
||||||
polygon(points);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module holder() {
|
|
||||||
inner_radius = 10.5;
|
|
||||||
round_radius = 3;
|
|
||||||
|
|
||||||
|
|
||||||
minkowski() {
|
|
||||||
difference(){
|
|
||||||
circle(r=inner_radius+round_radius+0.1);
|
|
||||||
circle(r=inner_radius+round_radius);
|
|
||||||
sector(inner_radius+round_radius+2, [-30, 210]);
|
|
||||||
}
|
|
||||||
circle(r=round_radius, $fn=25);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module safety() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
linear_extrude(wall_thickness){
|
|
||||||
slot(30, 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
my_offset = -13;
|
|
||||||
|
|
||||||
translate([0,my_offset,wall_thickness])
|
|
||||||
linear_extrude(wall_thickness)
|
|
||||||
holder($fn=100);
|
|
||||||
|
|
||||||
color("lavender") {
|
|
||||||
translate([0,my_offset,4])
|
|
||||||
circle(r=10);
|
|
||||||
}
|
|
||||||
@@ -1,161 +0,0 @@
|
|||||||
inner_dia = 70;
|
|
||||||
outer_dia = 75;
|
|
||||||
wall_thickness = (outer_dia-inner_dia)/2;
|
|
||||||
|
|
||||||
nub_thickness = 2;
|
|
||||||
nub_height = 1;
|
|
||||||
nub_width = 18;
|
|
||||||
|
|
||||||
connector_height = 15;
|
|
||||||
|
|
||||||
curve_angle = 45;
|
|
||||||
connector_dist = 5;
|
|
||||||
|
|
||||||
$fn=100;
|
|
||||||
|
|
||||||
module nub(width, height, thickness, dia){
|
|
||||||
radius = 0.5;
|
|
||||||
new_thickness = thickness - radius*2;
|
|
||||||
|
|
||||||
translate([0,0,-1.8])
|
|
||||||
minkowski() {
|
|
||||||
intersection(){
|
|
||||||
linear_extrude(5)
|
|
||||||
translate([-width/2,0,0])
|
|
||||||
polygon(points=[[0,0],[width/4,new_thickness],[3*width/4,new_thickness],[width,0]]);
|
|
||||||
|
|
||||||
translate([0,0,-outer_dia/2+3])
|
|
||||||
rotate([90,0,0])
|
|
||||||
difference(){
|
|
||||||
cylinder(r=outer_dia/2, h=10, center=true, $fn=50);
|
|
||||||
cylinder(r=outer_dia/2-height, h=10, center=true, $fn=50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sphere(r=radius, $fn=20);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module connector(inner_dia, outer_dia, height){
|
|
||||||
translate([0,0, height/2]){
|
|
||||||
difference(){
|
|
||||||
cylinder(r=outer_dia/2, h=height, center=true);
|
|
||||||
cylinder(r=inner_dia/2, h=height+0.01, center=true);
|
|
||||||
}
|
|
||||||
translate([0,-outer_dia/2+0.3,height-15])
|
|
||||||
rotate([90,0,0])
|
|
||||||
nub(nub_width, nub_height, nub_thickness, outer_dia);
|
|
||||||
|
|
||||||
rotate([0,0,180])
|
|
||||||
translate([0,-outer_dia/2+0.3,height-15])
|
|
||||||
rotate([90,0,0])
|
|
||||||
nub(nub_width, nub_height, nub_thickness, outer_dia);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module tCyls(outer_dia, height_factor = 1){
|
|
||||||
union(){
|
|
||||||
cylinder(r=outer_dia/2, h=outer_dia*height_factor, center=true);
|
|
||||||
translate([0,outer_dia*height_factor/4,0])
|
|
||||||
rotate([90, 0, 0])
|
|
||||||
cylinder(r=outer_dia/2, h=outer_dia/2*height_factor, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module tPiece(inner_dia, outer_dia){
|
|
||||||
difference(){
|
|
||||||
tCyls(outer_dia);
|
|
||||||
tCyls(inner_dia, height_factor=1.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module tSplitter(inner_dia, outer_dia, connector_height){
|
|
||||||
union(){
|
|
||||||
tPiece(inner_dia, outer_dia);
|
|
||||||
|
|
||||||
translate([0,0,outer_dia/2])
|
|
||||||
rotate([0,0,90])
|
|
||||||
connector(inner_dia, outer_dia, connector_height);
|
|
||||||
|
|
||||||
translate([0,outer_dia/2,0])
|
|
||||||
rotate([-90,0,0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
connector(inner_dia, outer_dia, connector_height);
|
|
||||||
|
|
||||||
translate([0,0,-outer_dia/2])
|
|
||||||
rotate([180,0,0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
connector(inner_dia, outer_dia, connector_height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function custom_y(w, angle) = (w/2-w*(1-cos(angle)))/tan(angle)+w*sin(angle);
|
|
||||||
|
|
||||||
module one_side(r, w, angle){
|
|
||||||
rotate_extrude(angle=angle)
|
|
||||||
translate([w/2,0,0])
|
|
||||||
circle(r=r);
|
|
||||||
|
|
||||||
y = custom_y(w, angle);
|
|
||||||
translate([w/2,y,0])
|
|
||||||
rotate(angle)
|
|
||||||
mirror([1,0,0])
|
|
||||||
rotate_extrude(angle=angle)
|
|
||||||
translate([w/2,0,0])
|
|
||||||
circle(r=r);
|
|
||||||
|
|
||||||
tri_x = w/2-w*(1-cos(angle));
|
|
||||||
tri_y = tri_x/tan(angle);
|
|
||||||
length = sqrt(pow(tri_y, 2) + pow(tri_x,2));
|
|
||||||
rotate(angle,[0,0,1])
|
|
||||||
translate([w/2,length,0])
|
|
||||||
rotate(90,[1,0,0])
|
|
||||||
linear_extrude(length)
|
|
||||||
circle(r=r);
|
|
||||||
}
|
|
||||||
|
|
||||||
module split_shape(r, w, angle){
|
|
||||||
union(){
|
|
||||||
one_side(r,w,angle);
|
|
||||||
mirror([1,0,0])
|
|
||||||
one_side(r,w,angle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module yTubes(inner_dia, wall_thickness, curve_angle, connector_dist){
|
|
||||||
my_w = inner_dia+2*wall_thickness+connector_dist;
|
|
||||||
difference(){
|
|
||||||
split_shape(inner_dia/2+wall_thickness,
|
|
||||||
my_w,
|
|
||||||
curve_angle);
|
|
||||||
split_shape(inner_dia/2,
|
|
||||||
my_w,
|
|
||||||
curve_angle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module ySplitter(inner_dia, wall_thickness, curve_angle, connector_height, connector_dist){
|
|
||||||
union(){
|
|
||||||
yTubes(inner_dia, wall_thickness, curve_angle, connector_dist);
|
|
||||||
translate([0,outer_dia-2,0])
|
|
||||||
rotate([-90,0,0])
|
|
||||||
rotate([0,0,90])
|
|
||||||
connector(inner_dia, outer_dia, connector_height);
|
|
||||||
|
|
||||||
translate([outer_dia/2+connector_dist/2,0,0])
|
|
||||||
rotate([90,0,0])
|
|
||||||
connector(inner_dia, outer_dia, connector_height);
|
|
||||||
|
|
||||||
translate([-outer_dia/2-connector_dist/2,0,0])
|
|
||||||
rotate([90,0,0])
|
|
||||||
connector(inner_dia, outer_dia, connector_height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// connector(inner_dia, outer_dia, connector_height);
|
|
||||||
|
|
||||||
// nub(nub_width, nub_height, nub_thickness, outer_dia);
|
|
||||||
|
|
||||||
// tSplitter(inner_dia, outer_dia, connector_height);
|
|
||||||
|
|
||||||
ySplitter(inner_dia, wall_thickness, curve_angle, connector_height, connector_dist);
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
|
|
||||||
linear_extrude(1)
|
|
||||||
pattern(1000, 1, 4){
|
|
||||||
// square(size=[50, 50], center=true);
|
|
||||||
scale_uniform(3){
|
|
||||||
import("/home/bart/Downloads/laura_bag_1.svg");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module pattern(mesh_size, line_width, spacing){
|
|
||||||
union(){
|
|
||||||
intersection(){
|
|
||||||
mesh(mesh_size, line_width, spacing);
|
|
||||||
children(0);
|
|
||||||
}
|
|
||||||
// calculate border
|
|
||||||
difference(){
|
|
||||||
children(0);
|
|
||||||
offset(r=-line_width){
|
|
||||||
children(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module mesh(size, line_width, spacing){
|
|
||||||
// Note that mesh always has to be even.
|
|
||||||
// This translates into the first lines being perfectly centered.
|
|
||||||
|
|
||||||
// Start by calculating amount of spacings
|
|
||||||
n_size = (size-line_width)/(line_width+spacing);
|
|
||||||
|
|
||||||
step = line_width + spacing;
|
|
||||||
for(i=[0:n_size/2]){
|
|
||||||
// vertical lines
|
|
||||||
translate([i*step, 0, 0])
|
|
||||||
square(size=[line_width, size], center=true);
|
|
||||||
translate([-i*step, 0, 0])
|
|
||||||
square(size=[line_width, size], center=true);
|
|
||||||
|
|
||||||
// horizontal lines
|
|
||||||
translate([0, i*step, 0])
|
|
||||||
square(size=[size, line_width], center=true);
|
|
||||||
translate([0, -i*step, 0])
|
|
||||||
square(size=[size, line_width], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module scale_uniform(my_scale){
|
|
||||||
scale([my_scale, my_scale]){
|
|
||||||
children(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
safety_dist = 1;
|
|
||||||
diameter = 290 - safety_dist;
|
|
||||||
width = 5;
|
|
||||||
thickness = 3;
|
|
||||||
|
|
||||||
$fn = 100;
|
|
||||||
|
|
||||||
linear_extrude(thickness)
|
|
||||||
difference(){
|
|
||||||
circle(r=diameter/2);
|
|
||||||
circle(r=diameter/2-width);
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
inner_dia = 17;
|
|
||||||
thickness = 1.6;
|
|
||||||
outer_dia = inner_dia + 2*thickness;
|
|
||||||
|
|
||||||
module ring(){
|
|
||||||
translate([0,-outer_dia/2,0])
|
|
||||||
linear_extrude(height=2)
|
|
||||||
difference(){
|
|
||||||
union(){
|
|
||||||
circle(r=inner_dia/2+thickness);
|
|
||||||
translate([-outer_dia/2,0,0])
|
|
||||||
square(size=[outer_dia, outer_dia/2], center=false);
|
|
||||||
}
|
|
||||||
circle(r=inner_dia/2);
|
|
||||||
|
|
||||||
squ_height = 15;
|
|
||||||
translate([0,-squ_height/2,0])
|
|
||||||
square(size=[inner_dia-thickness, squ_height], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
union(){
|
|
||||||
ring();
|
|
||||||
translate([0,thickness/2,0])
|
|
||||||
cube(size=[outer_dia, thickness, outer_dia], center=true);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
third_dia = 63;
|
|
||||||
outer_dia = 81;
|
|
||||||
|
|
||||||
$fn=50;
|
|
||||||
|
|
||||||
linear_extrude(height=2, center=true, convexity=10, twist=0) {
|
|
||||||
difference(){
|
|
||||||
circle(r=outer_dia/2);
|
|
||||||
circle(r=third_dia/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
inner_hole_dia = 6.5;
|
|
||||||
second_dia = 44;
|
|
||||||
third_dia = 63;
|
|
||||||
outer_dia = 83;
|
|
||||||
|
|
||||||
thickness = 3;
|
|
||||||
outer_thickness = 7;
|
|
||||||
|
|
||||||
$fn=50;
|
|
||||||
|
|
||||||
translate([0,0,thickness/2])
|
|
||||||
linear_extrude(height=thickness, center=true, convexity=10, twist=0) {
|
|
||||||
difference(){
|
|
||||||
circle(r=second_dia/2);
|
|
||||||
circle(r=inner_hole_dia/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
translate([0,-25,0])
|
|
||||||
square(size=[25, 20], center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0,0,outer_thickness/2])
|
|
||||||
linear_extrude(height=outer_thickness, center=true, convexity=10, twist=0) {
|
|
||||||
difference(){
|
|
||||||
circle(r=outer_dia/2);
|
|
||||||
circle(r=third_dia/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
main_inner_dia = 60;
|
|
||||||
main_outer_dia = 70;
|
|
||||||
inner_dia_small = 40;
|
|
||||||
height = 15;
|
|
||||||
|
|
||||||
thickness = (main_outer_dia - main_inner_dia)/2;
|
|
||||||
|
|
||||||
inner_radius = 2;
|
|
||||||
outer_radius = inner_radius + thickness;
|
|
||||||
|
|
||||||
extra_size = (main_inner_dia - inner_dia_small) / 2 - inner_radius;
|
|
||||||
|
|
||||||
module ring(inner_radius, outer_radius){
|
|
||||||
difference(){
|
|
||||||
circle(r=outer_radius);
|
|
||||||
circle(r=inner_radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module quarter_ring(inner_r, outer_r,){
|
|
||||||
difference(){
|
|
||||||
ring(inner_r, outer_r);
|
|
||||||
difference(){
|
|
||||||
square(size=[2*outer_r, 2*outer_r], center=true);
|
|
||||||
translate([0,-outer_r,0])
|
|
||||||
square(size=[outer_r, outer_r], center=false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rotate_extrude(convexity=10, $fn=100) {
|
|
||||||
translate([main_inner_dia/2,0,0]){
|
|
||||||
union(){
|
|
||||||
square(size=[thickness, height]);
|
|
||||||
translate([-inner_radius,0,0])
|
|
||||||
quarter_ring(inner_radius, outer_radius);
|
|
||||||
translate([-extra_size-inner_radius,-thickness-inner_radius,0])
|
|
||||||
square(size=[extra_size, thickness]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
angle = 120;
|
|
||||||
thickness = 4;
|
|
||||||
diam_offset = 1;
|
|
||||||
$fn=100;
|
|
||||||
|
|
||||||
module arm(inner_radius, angle, thickness){
|
|
||||||
rotate_extrude(angle=angle){
|
|
||||||
translate([inner_radius+thickness/2,0,0]) square(size=[thickness, thickness], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module grasp(inner_radius, angle, thickness){
|
|
||||||
arm(inner_radius, angle, thickness);
|
|
||||||
mirror([0, 1, 0]) {
|
|
||||||
arm(inner_radius, angle, thickness);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
grasp(8+diam_offset/2, angle, thickness);
|
|
||||||
translate([1.5, 25,0]) grasp(6.12+diam_offset/2, angle, thickness);
|
|
||||||
translate([3, 46,0]) grasp(4.25+diam_offset/2, angle, thickness);
|
|
||||||
|
|
||||||
translate([16,23,15-thickness/2])
|
|
||||||
difference(){
|
|
||||||
cube(size=[thickness, 60, 30], center=true);
|
|
||||||
|
|
||||||
translate([0,10,0])
|
|
||||||
rotate([0,90,0])
|
|
||||||
cylinder(r=2, h=10, center=true);
|
|
||||||
translate([0,-10,0])
|
|
||||||
rotate([0,90,0])
|
|
||||||
cylinder(r=2, h=10, center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([12, 23, 0])
|
|
||||||
cube(size=[thickness, 60, 4], center=true);
|
|
||||||
9
rod.scad
9
rod.scad
@@ -1,9 +0,0 @@
|
|||||||
diam = 12.5;
|
|
||||||
difference()
|
|
||||||
{
|
|
||||||
translate([0,0,4.5])
|
|
||||||
rotate([90,0,0])
|
|
||||||
cylinder(r=diam/2, h=200, center=true, $fn=100);
|
|
||||||
translate([0,0,-250])
|
|
||||||
cube(size=[500, 500, 500], center=true);
|
|
||||||
}
|
|
||||||
11
rod_cap.scad
11
rod_cap.scad
@@ -1,11 +0,0 @@
|
|||||||
thickness = 2;
|
|
||||||
inside = 12.5;
|
|
||||||
$fn=100;
|
|
||||||
|
|
||||||
union(){
|
|
||||||
difference(){
|
|
||||||
cylinder(r=inside/2+thickness, h=10, center=true);
|
|
||||||
translate([0,0,thickness])
|
|
||||||
cylinder(r=inside/2, h=10, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
$fn=20;
|
|
||||||
|
|
||||||
linear_extrude(2) {
|
|
||||||
difference(){
|
|
||||||
circle(r=2.5);
|
|
||||||
circle(r=1.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
linear_extrude(30){
|
|
||||||
difference(){
|
|
||||||
circle(r=13.5);
|
|
||||||
circle(r=10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
thickness = 3;
|
|
||||||
width = 3;
|
|
||||||
length = 250;
|
|
||||||
|
|
||||||
linear_extrude(thickness)
|
|
||||||
square(size=[width, length], center=true);
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
small_dist = 0.01;
|
|
||||||
|
|
||||||
inner_diam = 142;
|
|
||||||
wall_thickness = 3;
|
|
||||||
outside_diam = inner_diam + 2*wall_thickness;
|
|
||||||
height=210;
|
|
||||||
|
|
||||||
small_edge_thickness = 1;
|
|
||||||
small_edge_width = 0.8 + small_dist;
|
|
||||||
small_edge_inner_diam = inner_diam + 2*0.8;
|
|
||||||
|
|
||||||
$fn=200;
|
|
||||||
|
|
||||||
linear_extrude(wall_thickness)
|
|
||||||
circle(r=outside_diam/2);
|
|
||||||
|
|
||||||
linear_extrude(height)
|
|
||||||
difference(){
|
|
||||||
circle(r=outside_diam/2);
|
|
||||||
circle(r=inner_diam/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0, 0, height]) {
|
|
||||||
linear_extrude(small_edge_thickness)
|
|
||||||
difference(){
|
|
||||||
circle(r=small_edge_inner_diam/2+small_edge_width);
|
|
||||||
circle(r=small_edge_inner_diam/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,255 +0,0 @@
|
|||||||
wood_size = 12;
|
|
||||||
extra_offset = 20;
|
|
||||||
thickness_offset = 1;
|
|
||||||
|
|
||||||
measurements_window_test = [
|
|
||||||
[1.5, 2.5, 3.8, 5.3, 6.4, 7, 7.25, 7, 6.26, 5.7, 5.5, 4.3, 2.8, 2, 1.3, 0.2],
|
|
||||||
[1.5, 2.5, 3.8, 5.3, 6.4, 7, 7.25, 7, 6.26, 5.7, 5.5, 4.3, 2.8, 2, 1.3, 0.2],
|
|
||||||
[1.5, 2.5, 3.8, 5.3, 6.4, 7, 7.25, 7, 6.26, 5.7, 5.5, 4.3, 2.8, 2, 1.3, 0.2],
|
|
||||||
[1.5, 2.5, 3.8, 5.3, 6.4, 7, 7.25, 7, 6.26, 5.7, 5.5, 4.3, 2.8, 2, 1.3, 0.2]
|
|
||||||
];
|
|
||||||
|
|
||||||
// WINDOW 1
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_1 = 595;
|
|
||||||
height_window_1 = 595;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_1 = [70, 71, 62, 61];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_1 = [
|
|
||||||
[-0.5, -0.9, -1.9, -2.9, -4.4, -5, -6.4, -7.5, -8.2, -8.1, -7.4, -6.8, -6.2, -4.8, -4.5, -2.7, -1.6, -0.7, -0.2],
|
|
||||||
[0.7, 2, 2.6, 3.6, 4.5, 5, 5.5, 6, 6, 5.6, 5.4, 5, 4.6, 4.3, 3.2, 2.2, 1.6, 0.4, 0],
|
|
||||||
[1.4, 2.9, 4.1, 5.5, 6.5, 7.7, 7.7, 7.7, 7.6, 7.4, 7.3, 6.9, 6.3, 5.4, 5, 4, 3.2, 2.4, 1.2],
|
|
||||||
[0.5, 0.6, 0.9, 2, 2.9, 3.7, 4.4, 4.5, 4.5, 4.6, 4.1, 3.8, 3.2, 2.2, 2.1, 1.6, 0.9, 0.5, 0]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_1 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// WINDOW 2
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_2 = 595;
|
|
||||||
height_window_2 = 595;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_2 = [62, 72, 68, 61];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_2 = [
|
|
||||||
[1.5, 2.3, 2.6, 2.2, 2, 1.6, 1.1, 1.1, 1.1, 1.1, 1.1, 0.9, 0.5, 0.1, 0, -0.5, -0.8, -0.8, -0.4],
|
|
||||||
[0.8, 0.6, 2.7, 4, 4.6, 5.2, 5.3, 6, 6.2, 6.3, 5.9, 5.3, 4.8, 3.7, 2.2, 1.1, 0.4, 0.1, 0],
|
|
||||||
[1.3, 1.9, 2.7, 3.1, 4, 4.5, 4.5, 4.9, 4.3, 4.3, 4.2, 3.5, 3.5, 2.9, 2.2, 1.7, 1.3, 0.7, 0.1],
|
|
||||||
[0.3, 0.1, 0, 0, 0, 0, 0, -0.4, -0.7, -0.8, -1.5, -1.6, -2.2, -2.1, -1.5, -0.9, -0.4, -0.1, 0]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_2 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// WINDOW 3
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_3 = 890;
|
|
||||||
height_window_3 = 539;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_3 = [63, 72, 70, 65];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_3 = [
|
|
||||||
[-0.4, -0.9, -1.4, -1.5, -1, -0.8, -0.4, -0.2, -1, -1.2, -1.5, -1.4, -1, -0.8, -0.4, -0.4, -0.9, -1.4, -2, -2.3, -2.4, -1.7, -1.7, -0.8, -0.1, 0, 0, 0, -0.4],
|
|
||||||
[2.5, 4.7, 5.8, 6.3, 6.9, 6.7, 6.7, 6.6, 6.3, 5.8, 4.8, 4.2, 3.8, 2.6, 1.7, 0.7, 0.1],
|
|
||||||
[0, 0, 0, 0, 0, -0.7, -1, -1, -1, -0.4, -0.1, 0, 0.1, 0.4, 1, 1, 0.6, 0.7, 0.7, 0.9, 0.9, 1, 1, 1.1, 1.2, 1.4, 1.2, 0.6, 0.1],
|
|
||||||
[1.1, 2.4, 3, 3.5, 3, 2.8, 2.4, 2.3, 2.3, 2.3, 2.1, 1.6, 1.3, 1.3, 0.5, 0.2, 0.2]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_3 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// WINDOW 4
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_4 = 899;
|
|
||||||
height_window_4 = 555;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_4 = [67, 74, 64, 64];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_4 = [
|
|
||||||
[0.5, 2.4, 3.9, 4.2, 5.2, 4.7, 4.8, 4.4, 5.4, 6.2, 6, 6.5, 6.9, 6.9, 7.3, 7.2, 6.8, 7.4, 7.2, 7.2, 6, 4.2, 2.9, 1.5, 0.7, 0, 0, 0, 0],
|
|
||||||
[0.1, 0, 0, 0, 0, 0.5, 1.1, 1.6, 2.6, 3.2, 3.7, 3.2, 2.7, 1.6, 1.4, 1.1, 0.4, 0],
|
|
||||||
[-0.5, -0.6, -1.3, -1.3, -1.2, -0.8, -0.1, -0.4, -0.3, -0.1, -0.4, -0.6, -0.6, -0.6, -0.8, -1.4, -1.4, -1.4, -1.6, -1.7, -1.8, -1.4, -1.5, -1.3, -0.9, -1.1, -0.8, -0.4, -0.1],
|
|
||||||
[0.3, 1.3, 2.3, 3, 4, 4, 3.4, 2.6, 2.2, 1.5, 0.9, 0.6, 0.5, 0.5, 0.5, 0.5, 0.2, 0]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_4 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// WINDOW 5
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_5 = 1002;
|
|
||||||
height_window_5 = 806;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_5 = [68, 73, 72, 66];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_5 = [
|
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
||||||
[1.2, 2.6, 3.7, 4.7, 5.9, 7.1, 7.5, 8.2, 8.2, 8.2, 7.9, 7.8, 7.3, 7, 6.5, 6.3, 6.3, 5.9, 5.4, 5.9, 5.6, 5, 4.3, 3.8, 2.1, 0.9],
|
|
||||||
[0, 0.1, 0.3, 0.6, 1.5, 2, 2, 2, 2, 2.5, 2.8, 2.8, 3, 3, 3, 3, 3.6, 3.6, 3.6, 3.8, 4, 4, 4, 4, 5.1, 5.1, 5.4, 5.1, 4.6, 3.7, 1.6, 0.3, 0.5],
|
|
||||||
[1.5, 2.1, 3, 3.9, 4.9, 5.5, 6.1, 6.2, 6.5, 6.1, 5.5, 5.3, 4.9, 4.5, 4.5, 4.8, 4.8, 4.8, 5.2, 6, 5.5, 5.5, 4.4, 3.2, 2.4, 1.2]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_5 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// WINDOW 6
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_6 = 599;
|
|
||||||
height_window_6 = 1006;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_6 = [71, 71, 71, 70];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_6 = [
|
|
||||||
[1.2, 1.2, 0.7, 0.2, 0.2, 0.5, 0.2, 0.2, 0.1, 0.1, 0, 0, 0.1, 0, 0, 0.1, 0.8, 1.5, 2],
|
|
||||||
[0, 0.5, 0.8, 1.1, 1.5, 1.7, 2.6, 3.5, 3.9, 3.9, 4.5, 4.7, 5.3, 5.8, 5.9, 5.9, 5.9, 5.9, 6.4, 6.9, 6.7, 6.7, 6.7, 6.2, 5.6, 5.7, 5.4, 4.2, 3.2, 2.5, 1.5, 1.2, 0.3],
|
|
||||||
[1.5, 3.5, 5.2, 5, 5, 4.4, 4, 4, 4.7, 4.8, 3.9, 3.2, 2.3, 1.9, 2.3, 3.1, 4.4, 4, 1.6],
|
|
||||||
[0, 0, 0, 0.1, 0.7, 2, 2.8, 4.1, 4.9, 6.5, 7.1, 8.3, 9.4, 9.4, 9.8, 9.8, 9.1, 8.6, 8.6, 8.6, 8.8, 8.2, 7.6, 7.5, 6.9, 6.3, 4.9, 4.7, 4.2, 3.8, 3, 1.9, 0.8]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_6 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// WINDOW 7
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width_window_7 = 599;
|
|
||||||
height_window_7 = 1007;
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// tl, tr, br, bl
|
|
||||||
depths_window_7 = [70, 74, 66, 70];
|
|
||||||
|
|
||||||
// Order of measurements:
|
|
||||||
// top, right, bottom, left
|
|
||||||
|
|
||||||
measurements_window_7 = [
|
|
||||||
[1.1, 0.7, 0.5, 0.5, 0.5, 0.5, 1, 1.6, 1.1, 1.1, 1.2, 0.9, 0.1, 0, 0, 0, 0.1, 0.6, 0.9],
|
|
||||||
[0, 0.2, 0.3, 0.5, 0.1, 0, 0.6, 1.1, 1.9, 2.5, 3, 3.2, 3, 3, 2.1, 1.6, 1.6, 1.1, 1.2, 1.1, 1.1, 1.1, 1.1, 1.7, 1.9, 2.4, 3.5, 4, 4, 4, 3.2, 1.6, 0],
|
|
||||||
[1.5, 3.5, 3.9, 3.7, 3.2, 2.8, 2.8, 3.1, 3.1, 4.2, 2.8, 2, 1.8, 1.8, 2.1, 3, 3.9, 2.4, 0.7],
|
|
||||||
[1.5, 2.5, 3.7, 3.8, 4.2, 4.2, 3.9, 3.6, 3.1, 2.8, 2.8, 2.3, 2.3, 1.8, 1.8, 1.8, 1.8, 1.5, 1.7, 2.1, 2.4, 2.9, 2.9, 2.9, 2.9, 3.3, 2.8, 2.4, 1.8, 1.3, 0.9, 0.1, 0]
|
|
||||||
];
|
|
||||||
|
|
||||||
step_window_7 = 30;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
module window_support(length, thickness_left, thickness_right, step, points){
|
|
||||||
max_iter = floor(length/step)-1;
|
|
||||||
poly = [
|
|
||||||
[-extra_offset,-thickness_left-thickness_offset],
|
|
||||||
[-extra_offset,0],
|
|
||||||
for(i = [0:max_iter]) [(i+1)*step, points[i]],
|
|
||||||
[length+extra_offset, points[max_iter]],
|
|
||||||
[length+extra_offset, -thickness_right-thickness_offset]
|
|
||||||
];
|
|
||||||
|
|
||||||
// Calculate z rotation for bottom edge along x axis
|
|
||||||
x = asin((thickness_right-thickness_left)/length);
|
|
||||||
|
|
||||||
linear_extrude(wood_size)
|
|
||||||
rotate(x, [0,0,1])
|
|
||||||
translate([0,thickness_left+thickness_offset,0])
|
|
||||||
polygon(poly);
|
|
||||||
}
|
|
||||||
|
|
||||||
// depths: top-left, top-right, bottom-right, bottom-left
|
|
||||||
// Use show_param to decide on which beam to visualize:
|
|
||||||
// 0: all, 1: top, 2: right, 3: bottom, 4: left
|
|
||||||
module window_frame(width, height, depths, measurements, step, show_param){
|
|
||||||
max_depth = max(depths);
|
|
||||||
depth_tl = max_depth - depths[0];
|
|
||||||
depth_tr = max_depth - depths[1];
|
|
||||||
depth_br = max_depth - depths[2];
|
|
||||||
depth_bl = max_depth - depths[3];
|
|
||||||
|
|
||||||
// top
|
|
||||||
if (show_param==1){
|
|
||||||
rotate(90, [0,0,1])
|
|
||||||
window_support(width, depth_tl, depth_tr, step, measurements[0]);
|
|
||||||
} else if(show_param==0){
|
|
||||||
translate([0,0,height])
|
|
||||||
window_support(width, depth_tl, depth_tr, step, measurements[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// right
|
|
||||||
if (show_param==2){
|
|
||||||
rotate(90, [0,0,1])
|
|
||||||
window_support(height, depth_tr, depth_br, step, measurements[1]);
|
|
||||||
} else if(show_param==0){
|
|
||||||
translate([width,0,height])
|
|
||||||
rotate(90, [0,1,0])
|
|
||||||
window_support(height, depth_tr, depth_br, step, measurements[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// bottom
|
|
||||||
if (show_param==3){
|
|
||||||
rotate(90, [0,0,1])
|
|
||||||
window_support(width, depth_bl, depth_br, step, measurements[2]);
|
|
||||||
} else if(show_param==0){
|
|
||||||
translate([0,0,-wood_size])
|
|
||||||
window_support(width, depth_bl, depth_br, step, measurements[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// left
|
|
||||||
if (show_param==4){
|
|
||||||
rotate(90, [0,0,1])
|
|
||||||
window_support(height, depth_tl, depth_bl, step, measurements[3]);
|
|
||||||
} else if(show_param==0){
|
|
||||||
translate([-wood_size,0,height])
|
|
||||||
rotate(90, [0,1,0])
|
|
||||||
window_support(height, depth_tl, depth_bl, step, measurements[3]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// window_frame(width_window_1, height_window_1, depths_window_1, measurements_window_1, step_window_1, 0);
|
|
||||||
// window_frame(width_window_2, height_window_2, depths_window_2, measurements_window_2, step_window_2, 4);
|
|
||||||
// window_frame(width_window_3, height_window_3, depths_window_3, measurements_window_3, step_window_3, 4);
|
|
||||||
// window_frame(width_window_4, height_window_4, depths_window_4, measurements_window_4, step_window_4, 4);
|
|
||||||
// window_frame(width_window_5, height_window_5, depths_window_5, measurements_window_5, step_window_5, 4);
|
|
||||||
// window_frame(width_window_6, height_window_6, depths_window_6, measurements_window_6, step_window_6, 4);
|
|
||||||
window_frame(width_window_7, height_window_7, depths_window_7, measurements_window_7, step_window_7, 3);
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
p0 = [0, 20];
|
|
||||||
p1 = [2, 18.5];
|
|
||||||
p2 = [4.0, 16];
|
|
||||||
p3 = [6, 12];
|
|
||||||
p4 = [8, 7.5];
|
|
||||||
p5 = [10, 0];
|
|
||||||
p6 = [0, 0];
|
|
||||||
|
|
||||||
points = [p0, p1, p2, p3, p4, p5,p6];
|
|
||||||
// Polygon
|
|
||||||
rotate([-90,0,0]){
|
|
||||||
difference(){
|
|
||||||
difference(){
|
|
||||||
difference(){
|
|
||||||
rotate([90,0,0]){
|
|
||||||
linear_extrude(height=15)
|
|
||||||
polygon(points);
|
|
||||||
}
|
|
||||||
translate([6,-7.5,12]){
|
|
||||||
rotate([0,180+43,0]){
|
|
||||||
translate([-3.5,0,0]){
|
|
||||||
$fn = 50;
|
|
||||||
cylinder(h = 6, r = 3.8);
|
|
||||||
cylinder(h = 7.5, r = 3.3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
translate([7.9,0,0]){
|
|
||||||
rotate([0,-47,0]){
|
|
||||||
translate([-10,-19,0]){
|
|
||||||
cube([10,20,15]);
|
|
||||||
}}}}
|
|
||||||
translate([1.5,0,0]){
|
|
||||||
rotate([0,-47,0]){
|
|
||||||
translate([-10,-6,0]){
|
|
||||||
cube([25,10,2.8]);
|
|
||||||
}}}}}
|
|
||||||
Reference in New Issue
Block a user