64 lines
2.3 KiB
OpenSCAD
64 lines
2.3 KiB
OpenSCAD
/* https://github.com/BelfrySCAD/BOSL2 */
|
|
include <BOSL2/std.scad>
|
|
|
|
$fn = 150;
|
|
|
|
pattern_width = 375; // Total width of pattern (mm)
|
|
pattern_height = 230; // Total height of pattern (mm)
|
|
pattern_thickness = 4; // Thickness of the entire pattern (mm)
|
|
ring_inner_diameter = 38; // Inner diameter of rings (mm)
|
|
ring_width = 2; // Width of ring walls (mm)
|
|
perimeter_width = 4; // Width of outer perimeter walls (mm)
|
|
|
|
ring_chamfer = 0.3*ring_width;
|
|
ring_spacing = ring_inner_diameter+ring_width+ring_chamfer;
|
|
|
|
module hex_insert() {
|
|
/* Outer perimeter */
|
|
difference() {
|
|
cube([pattern_width,pattern_height,pattern_thickness], anchor=[0,0,-1]);
|
|
cube([pattern_width-2*perimeter_width,pattern_height-2*perimeter_width,pattern_thickness], anchor=[0,0,-1]);
|
|
}
|
|
|
|
/* Circle pattern */
|
|
intersection() {
|
|
cube([pattern_width-2*perimeter_width,pattern_height-2*perimeter_width,pattern_thickness], anchor=[0,0,-1]);
|
|
|
|
/* Rings (the extra `ring_spacing` for pattern height is for better alignment) */
|
|
grid_copies(size=[pattern_width,pattern_height+ring_spacing], spacing=ring_spacing, stagger=true)
|
|
tube(id=ring_inner_diameter, wall=ring_width, h=pattern_thickness, ichamfer2=ring_chamfer, anchor=[0,0,-1]);
|
|
}
|
|
}
|
|
|
|
module hex_insert_left() {
|
|
difference() {
|
|
hex_insert();
|
|
|
|
group() {
|
|
right(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=3*pattern_thickness, realign=true, anchor=[0,0,0]);
|
|
right(ring_spacing/2)
|
|
cube([pattern_width/2,1.5*pattern_height,3*pattern_thickness], anchor=[-1,0,0]);
|
|
}
|
|
}
|
|
}
|
|
|
|
module hex_insert_right() {
|
|
difference() {
|
|
hex_insert();
|
|
|
|
group() {
|
|
left(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=3*pattern_thickness, realign=true, anchor=[0,0,0]);
|
|
//left(ring_spacing/2)
|
|
cube([pattern_width/2,1.5*pattern_height,3*pattern_thickness], anchor=[1,0,0]);
|
|
}
|
|
}
|
|
}
|
|
|
|
hex_insert();
|
|
//left(5) hex_insert_left();
|
|
//right(5) hex_insert_right();
|