59 lines
1.8 KiB
OpenSCAD
59 lines
1.8 KiB
OpenSCAD
/* https://github.com/BelfrySCAD/BOSL2 */
|
|
include <BOSL2/std.scad>
|
|
|
|
plate_size = 120;
|
|
plate_rounding = 20;
|
|
|
|
wall_thickness = 2;
|
|
|
|
hex_hole_size = 4; // [4:0.5:20]
|
|
hex_spacing = hex_hole_size/2;
|
|
|
|
pipe_outer_diameter = 100;
|
|
pipe_wall_height = 20;
|
|
|
|
mounting_hole_diameter = 4;
|
|
|
|
$fn = 80;
|
|
|
|
assert(plate_size > pipe_outer_diameter+4*wall_thickness, "Plate size too small");
|
|
|
|
module CylinderCutout() {
|
|
cylinder(d=pipe_outer_diameter-2*wall_thickness, h=wall_thickness, center=true);
|
|
}
|
|
|
|
/* Plate */
|
|
difference() {
|
|
cuboid([plate_size, plate_size, wall_thickness], rounding=plate_rounding, edges="Z");
|
|
|
|
group() {
|
|
CylinderCutout();
|
|
|
|
/* Mounting holes */
|
|
mounting_hole_offset = pipe_outer_diameter/2-plate_rounding/4;
|
|
translate([-mounting_hole_offset,-mounting_hole_offset,0])
|
|
cylinder(d=mounting_hole_diameter, h=wall_thickness, center=true);
|
|
translate([mounting_hole_offset,-mounting_hole_offset,0])
|
|
cylinder(d=mounting_hole_diameter, h=wall_thickness, center=true);
|
|
translate([-mounting_hole_offset,mounting_hole_offset,0])
|
|
cylinder(d=mounting_hole_diameter, h=wall_thickness, center=true);
|
|
translate([mounting_hole_offset,mounting_hole_offset,0])
|
|
cylinder(d=mounting_hole_diameter, h=wall_thickness, center=true);
|
|
}
|
|
}
|
|
|
|
/* Hex holes */
|
|
intersection() {
|
|
difference() {
|
|
cube([plate_size,plate_size,wall_thickness], center=true);
|
|
grid_copies(spacing=[sqrt(3)*hex_spacing,hex_spacing], inside=square(plate_size, center=true), stagger=true)
|
|
cylinder(d=hex_hole_size, h=wall_thickness, $fn=6, center=true);
|
|
}
|
|
|
|
CylinderCutout();
|
|
}
|
|
|
|
/* Pipe */
|
|
translate([0,0,pipe_wall_height/2+wall_thickness/2])
|
|
tube(h=pipe_wall_height, od=pipe_outer_diameter, wall=wall_thickness, rounding2=wall_thickness/2, ochamfer1=-min(wall_thickness,5));
|
|
|