62 lines
2.3 KiB
OpenSCAD
62 lines
2.3 KiB
OpenSCAD
/* https://github.com/BelfrySCAD/BOSL2 */
|
|
include <BOSL2/std.scad>
|
|
|
|
$fn = 150;
|
|
|
|
pattern_width = 375; // Total width of pattern
|
|
pattern_height = 230; // Total height of pattern
|
|
pattern_thickness = 4; // Thickness of the entire pattern
|
|
ring_inner_diameter = 38; // Inner diameter of rings
|
|
ring_width = 2; // Width of ring walls
|
|
perimeter_width = 4; // Width of outer perimeter walls
|
|
bottom_thickness = 1; // Thickness of the bottom part
|
|
|
|
ring_chamfer = 0.5*ring_width;
|
|
ring_spacing = ring_inner_diameter+ring_width+ring_chamfer;
|
|
|
|
module hex_insert() {
|
|
difference() {
|
|
/* Outer perimeter + bottom */
|
|
cube([pattern_width,pattern_height,pattern_thickness+bottom_thickness], anchor=[0,0,-1]);
|
|
|
|
/* Circle pattern */
|
|
up(bottom_thickness) {
|
|
poly = rect([pattern_width-ring_inner_diameter,pattern_height-ring_inner_diameter]);
|
|
grid_copies(size=[pattern_width+ring_spacing,pattern_height+ring_spacing], spacing=ring_spacing, inside=poly, stagger=true) // adding `ring_spacing` to width and height to ensure the pattern is filled
|
|
cyl(d=ring_inner_diameter, h=pattern_thickness, chamfer2=-ring_chamfer, anchor=[0,0,-1]);
|
|
}
|
|
}
|
|
}
|
|
|
|
module hex_insert_left() {
|
|
difference() {
|
|
hex_insert();
|
|
|
|
group() {
|
|
right(0.25*ring_spacing)
|
|
grid_copies(size=[0.75*ring_spacing,pattern_height+ring_spacing], spacing=ring_spacing, stagger=true)
|
|
regular_prism(6, id=ring_spacing, h=4*pattern_thickness, realign=true, anchor=[0,0,0]);
|
|
// right(0.5*ring_spacing)
|
|
cube([pattern_width/2,1.5*pattern_height,4*pattern_thickness], anchor=[-1,0,0]);
|
|
}
|
|
}
|
|
}
|
|
|
|
module hex_insert_right() {
|
|
difference() {
|
|
hex_insert();
|
|
|
|
group() {
|
|
left(0.75*ring_spacing)
|
|
grid_copies(size=[0.75*ring_spacing,pattern_height+ring_spacing], spacing=ring_spacing, stagger=true)
|
|
regular_prism(6, id=ring_spacing, h=4*pattern_thickness, realign=true, anchor=[0,0,0]);
|
|
left(0.5*ring_spacing)
|
|
cube([pattern_width/2,1.5*pattern_height,4*pattern_thickness], anchor=[1,0,0]);
|
|
}
|
|
}
|
|
}
|
|
|
|
//hex_insert();
|
|
//left(5) hex_insert_left();
|
|
right(5) hex_insert_right();
|