Compare commits
6
Commits
a5c49f45ad
...
cd6e3d3118
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd6e3d3118 | ||
|
|
c9f613a5f8 | ||
|
|
d73e35068e | ||
|
|
7f1f8a17d5 | ||
|
|
30b9bb327e | ||
|
|
d7ae17c191 |
@@ -12,6 +12,11 @@ The models come with
|
|||||||
## brio-tracks
|
## brio-tracks
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
|
||||||
|
* [README.md](brio-tracks/README.md)
|
||||||
|
|
||||||
Model files:
|
Model files:
|
||||||
|
|
||||||
@@ -20,6 +25,7 @@ Model files:
|
|||||||
* buffer-stops-v1.scad
|
* buffer-stops-v1.scad
|
||||||
* buffer-stops-v2.scad
|
* buffer-stops-v2.scad
|
||||||
* train_tracks_generator.scad
|
* train_tracks_generator.scad
|
||||||
|
* turntable.scad
|
||||||
|
|
||||||
## brio-tunnel-block
|
## brio-tunnel-block
|
||||||
|
|
||||||
@@ -37,6 +43,14 @@ Model files:
|
|||||||
|
|
||||||
* cube-with-square-hole.scad
|
* cube-with-square-hole.scad
|
||||||
|
|
||||||
|
## cup-letter-wrap
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Model files:
|
||||||
|
|
||||||
|
* cup-letter-wrap.scad
|
||||||
|
|
||||||
## cutlery-organizer
|
## cutlery-organizer
|
||||||
|
|
||||||

|

|
||||||
@@ -47,13 +61,6 @@ Model files:
|
|||||||
|
|
||||||
* cutlery-organizer.scad
|
* cutlery-organizer.scad
|
||||||
|
|
||||||
## door-stopper-cheese
|
|
||||||
|
|
||||||
|
|
||||||
Model files:
|
|
||||||
|
|
||||||
* door-stopper-cheese.scad
|
|
||||||
|
|
||||||
## duct-coupler
|
## duct-coupler
|
||||||
|
|
||||||

|

|
||||||
@@ -95,6 +102,17 @@ Model files:
|
|||||||
|
|
||||||
* fluke-lead-holder-hsw.scad
|
* fluke-lead-holder-hsw.scad
|
||||||
|
|
||||||
|
## hex-nespresso-insert
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
Model files:
|
||||||
|
|
||||||
|
* hex-nespresso-insert-variant.scad
|
||||||
|
* hex-nespresso-insert-variant-2.scad
|
||||||
|
* hex-nespresso-insert.scad
|
||||||
|
|
||||||
## home-assistant-voice-wall-mount
|
## home-assistant-voice-wall-mount
|
||||||
|
|
||||||

|

|
||||||
@@ -105,8 +123,8 @@ Model files:
|
|||||||
|
|
||||||
## korg-piano-volume-knob
|
## korg-piano-volume-knob
|
||||||
|
|
||||||

|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
Model files:
|
Model files:
|
||||||
|
|
||||||
@@ -192,8 +210,8 @@ Model files:
|
|||||||
|
|
||||||
## slim-rpi-wall-holder
|
## slim-rpi-wall-holder
|
||||||
|
|
||||||

|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
Model files:
|
Model files:
|
||||||
|
|
||||||
@@ -207,13 +225,6 @@ Model files:
|
|||||||
|
|
||||||
* spice-rack-organizer.scad
|
* spice-rack-organizer.scad
|
||||||
|
|
||||||
## spiral-cable-wrap
|
|
||||||
|
|
||||||
|
|
||||||
Model files:
|
|
||||||
|
|
||||||
* spiral-cable-wrap.scad
|
|
||||||
|
|
||||||
## thirdreality-zigbee-sensor-mount
|
## thirdreality-zigbee-sensor-mount
|
||||||
|
|
||||||

|

|
||||||
@@ -225,20 +236,13 @@ Model files:
|
|||||||
## toy-cubes
|
## toy-cubes
|
||||||
|
|
||||||

|

|
||||||

|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
Model files:
|
Model files:
|
||||||
|
|
||||||
* toy-cubes.scad
|
* toy-cubes.scad
|
||||||
|
|
||||||
## toy-pylon
|
|
||||||
|
|
||||||
|
|
||||||
Model files:
|
|
||||||
|
|
||||||
* toy-pylon.scad
|
|
||||||
|
|
||||||
## tree-stand-floor-protector
|
## tree-stand-floor-protector
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
@@ -0,0 +1,105 @@
|
|||||||
|
include <train_tracks_generator.scad>
|
||||||
|
|
||||||
|
/* https://github.com/BelfrySCAD/BOSL2 */
|
||||||
|
include <BOSL2/std.scad>
|
||||||
|
|
||||||
|
module turntable_4way(turntable_width = 144, insert_width = 86, insert_height = 8, insert_tolerance_width = 0.8, insert_tolerance_height = 0.2) { // make me
|
||||||
|
difference() {
|
||||||
|
// Base
|
||||||
|
cuboid([turntable_width, turntable_width, track_height], chamfer=track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||||
|
|
||||||
|
group() {
|
||||||
|
// Hole for insert
|
||||||
|
up(track_height-insert_height-insert_tolerance_height)
|
||||||
|
cyl(h=insert_height+insert_tolerance_height, d=insert_width+insert_tolerance_width, chamfer2=-track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||||
|
|
||||||
|
// Track grooves
|
||||||
|
translate([-track_width/2,turntable_width/2,0])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(turntable_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
rotate([0,0,90])
|
||||||
|
translate([-track_width/2,turntable_width/2,0])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(turntable_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
|
||||||
|
// Nests
|
||||||
|
left(turntable_width/2) track_nest();
|
||||||
|
rotate([0,0,90]) left(turntable_width/2) track_nest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plugs
|
||||||
|
right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||||
|
rotate([0,0,90]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||||
|
}
|
||||||
|
|
||||||
|
module turntable_8way(turntable_width = 144, insert_width = 86, insert_height = 8, insert_tolerance_width = 0.8, insert_tolerance_height = 0.2) { // make me
|
||||||
|
difference() {
|
||||||
|
// Base
|
||||||
|
regular_prism(8, id=turntable_width, h=track_height, chamfer=track_chamfer/sqrt(2), realign=true, anchor=BOTTOM);
|
||||||
|
|
||||||
|
group() {
|
||||||
|
// Hole for insert
|
||||||
|
up(track_height-insert_height-insert_tolerance_height)
|
||||||
|
cyl(h=insert_height+insert_tolerance_height, d=insert_width+insert_tolerance_width, chamfer2=-track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||||
|
|
||||||
|
// Track grooves
|
||||||
|
translate([-track_width/2,turntable_width/2,0])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(turntable_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
rotate([0,0,45])
|
||||||
|
translate([-track_width/2,turntable_width/2,0])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(turntable_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
rotate([0,0,90])
|
||||||
|
translate([-track_width/2,turntable_width/2,0])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(turntable_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
rotate([0,0,135])
|
||||||
|
translate([-track_width/2,turntable_width/2,0])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(turntable_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
|
||||||
|
// Nests
|
||||||
|
left(turntable_width/2) track_nest();
|
||||||
|
rotate([0,0,45]) left(turntable_width/2) track_nest();
|
||||||
|
rotate([0,0,90]) left(turntable_width/2) track_nest();
|
||||||
|
rotate([0,0,135]) left(turntable_width/2) track_nest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plugs
|
||||||
|
right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||||
|
rotate([0,0,45]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||||
|
rotate([0,0,90]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||||
|
rotate([0,0,135]) right(turntable_width/2-track_plug_neck_length) track_plug(neck_l=2*track_plug_neck_length);
|
||||||
|
}
|
||||||
|
|
||||||
|
module turntable_insert(insert_width = 86, insert_height = 8) { // make me
|
||||||
|
difference() {
|
||||||
|
// Insert
|
||||||
|
cyl(h=insert_height, d=insert_width, chamfer=track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||||
|
|
||||||
|
// Track grooves
|
||||||
|
translate([-track_width/2,insert_width/2,insert_height-track_height])
|
||||||
|
rotate([90,0,0])
|
||||||
|
linear_extrude(insert_width)
|
||||||
|
grooves(both_sides=false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle
|
||||||
|
left(33)
|
||||||
|
cyl(h=track_height+insert_height, d=8, chamfer2=track_chamfer/sqrt(2), anchor=BOTTOM);
|
||||||
|
}
|
||||||
|
|
||||||
|
distribute(sizes=[160,90,160]) {
|
||||||
|
turntable_4way();
|
||||||
|
turntable_insert();
|
||||||
|
turntable_8way();
|
||||||
|
}
|
||||||
Binary file not shown.
+36
-13
@@ -4,23 +4,46 @@ HEADER_FILE="readme-header.md"
|
|||||||
README_FILE="README.md"
|
README_FILE="README.md"
|
||||||
|
|
||||||
# Create or truncate the README file
|
# Create or truncate the README file
|
||||||
> $README_FILE
|
> "$README_FILE"
|
||||||
|
|
||||||
# Add the header to the README file
|
# Add the header to the README file
|
||||||
cat $HEADER_FILE >> $README_FILE
|
cat "$HEADER_FILE" >> "$README_FILE"
|
||||||
|
|
||||||
# Loop through each directory in the current working directory
|
# Get a list of Git‑tracked directories (unique, sorted)
|
||||||
for dir in */; do
|
git_dirs=$(git ls-files | cut -d'/' -f1 | sort -u)
|
||||||
# Extract and print the directory name without the trailing slash
|
|
||||||
echo -e "\n## ${dir%/}\n" >> $README_FILE
|
|
||||||
|
|
||||||
# Loop through all PNG files in the directory and embed them in the README file
|
# Loop through each tracked directory
|
||||||
for png in "$dir"*.png; do
|
for dir in $git_dirs; do
|
||||||
[ -f "$png" ] || break # Break if no more PNG files are found
|
# Ensure it's a directory
|
||||||
echo "" >> $README_FILE
|
[ -d "$dir" ] || continue
|
||||||
|
|
||||||
|
# Add the section header
|
||||||
|
echo -e "\n## ${dir}\n" >> "$README_FILE"
|
||||||
|
|
||||||
|
# Embed PNG images
|
||||||
|
png_files=$(find "$dir" -maxdepth 1 -type f -name '*.png')
|
||||||
|
if [ -n "$png_files" ]; then
|
||||||
|
for png in $png_files; do
|
||||||
|
echo "" >> "$README_FILE"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Print a list of .scad files in the directory
|
# Add links to Markdown files
|
||||||
echo -e "\nModel files:\n" >> $README_FILE
|
md_files=$(find "$dir" -maxdepth 1 -type f -name '*.md')
|
||||||
find "$dir" -type f -name '*.scad' | sed "s|$dir||g" | awk '{ print "* " $0 }' >> $README_FILE
|
if [ -n "$md_files" ]; then
|
||||||
|
echo -e "\nDocumentation:\n" >> "$README_FILE"
|
||||||
|
for md in $md_files; do
|
||||||
|
echo "* [${md##*/}](${md})" >> "$README_FILE"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# List .scad files
|
||||||
|
echo -e "\nModel files:\n" >> "$README_FILE"
|
||||||
|
scad_files=$(find "$dir" -type f -name '*.scad')
|
||||||
|
if [ -n "$scad_files" ]; then
|
||||||
|
for scad in $scad_files; do
|
||||||
|
# Strip leading directory component
|
||||||
|
echo "* ${scad#$dir/}" >> "$README_FILE"
|
||||||
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
@@ -0,0 +1,63 @@
|
|||||||
|
/* 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();
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
/* https://github.com/BelfrySCAD/BOSL2 */
|
||||||
|
include <BOSL2/std.scad>
|
||||||
|
|
||||||
|
$fn = 150;
|
||||||
|
|
||||||
|
pattern_width = 375; // Total width of pattern (mm)
|
||||||
|
pattern_height = 220; // 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)
|
||||||
|
line_width = 2; // Width of connecting lines (mm)
|
||||||
|
perimeter_width = 4; // Width of outer perimeter walls (mm)
|
||||||
|
hex_spacing = 45; // Distance between hex centers (mm)
|
||||||
|
|
||||||
|
ring_outer_radius = (ring_inner_diameter + 2 * ring_width) / 2;
|
||||||
|
|
||||||
|
module hex_ring_pattern_2d() {
|
||||||
|
union() {
|
||||||
|
// Create outer rectangular perimeter using difference
|
||||||
|
difference() {
|
||||||
|
square([pattern_width, pattern_height], center=true);
|
||||||
|
square([pattern_width - 2*perimeter_width, pattern_height - 2*perimeter_width], center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get all valid ring positions
|
||||||
|
positions = get_hex_positions();
|
||||||
|
|
||||||
|
// Create rings at all valid positions
|
||||||
|
for (pos = positions) {
|
||||||
|
translate(pos) ring(r=ring_inner_diameter/2, ring_width=ring_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create all connections
|
||||||
|
create_connections(positions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to get all valid hexagonal ring positions
|
||||||
|
function get_hex_positions() = [
|
||||||
|
for (row = [-8:8])
|
||||||
|
for (col = [-10:10]) let(
|
||||||
|
x_pos = col * hex_spacing + (row % 2) * hex_spacing/2,
|
||||||
|
y_pos = row * hex_spacing * sin(60),
|
||||||
|
pos = [x_pos, y_pos]
|
||||||
|
)
|
||||||
|
if (abs(x_pos) + ring_outer_radius <= pattern_width/2 &&
|
||||||
|
abs(y_pos) + ring_outer_radius <= pattern_height/2)
|
||||||
|
pos
|
||||||
|
];
|
||||||
|
|
||||||
|
// Create all connections (hex grid + perimeter)
|
||||||
|
module create_connections(positions) {
|
||||||
|
if (len(positions) > 1) {
|
||||||
|
// Hex grid connections
|
||||||
|
for (i = [0:len(positions)-2]) {
|
||||||
|
for (j = [i+1:len(positions)-1]) {
|
||||||
|
pos1 = positions[i];
|
||||||
|
pos2 = positions[j];
|
||||||
|
dist = norm(pos2 - pos1);
|
||||||
|
|
||||||
|
// Connect adjacent rings
|
||||||
|
if (dist > hex_spacing * 0.9 && dist < hex_spacing * 1.1) {
|
||||||
|
connect_rings(pos1, pos2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perimeter connections
|
||||||
|
for (pos = positions) {
|
||||||
|
connect_to_edges(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connect two rings with a line
|
||||||
|
module connect_rings(pos1, pos2) {
|
||||||
|
angle = atan2(pos2[1] - pos1[1], pos2[0] - pos1[0]);
|
||||||
|
start_point = pos1 + [cos(angle), sin(angle)] * (ring_inner_diameter/2);
|
||||||
|
end_point = pos2 - [cos(angle), sin(angle)] * (ring_inner_diameter/2);
|
||||||
|
|
||||||
|
move((start_point + end_point)/2)
|
||||||
|
rot(angle)
|
||||||
|
square([norm(end_point - start_point), line_width], center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connect a ring to nearby perimeter edges
|
||||||
|
module connect_to_edges(pos) {
|
||||||
|
x = pos[0]; y = pos[1];
|
||||||
|
half_w = pattern_width/2; half_h = pattern_height/2;
|
||||||
|
|
||||||
|
// Connect to edges if ring is within 1.5 spacing units
|
||||||
|
if (x <= -half_w + hex_spacing * 1.5 && abs(y) <= half_h - perimeter_width) {
|
||||||
|
start = [x - ring_inner_diameter/2, y];
|
||||||
|
end = [-half_w, y];
|
||||||
|
move((start + end)/2) square([norm(end - start), line_width], center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x >= half_w - hex_spacing * 1.5 && abs(y) <= half_h - perimeter_width) {
|
||||||
|
start = [x + ring_inner_diameter/2, y];
|
||||||
|
end = [half_w, y];
|
||||||
|
move((start + end)/2) square([norm(end - start), line_width], center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (y >= half_h - hex_spacing * 1.5 && abs(x) <= half_w - perimeter_width) {
|
||||||
|
start = [x, y + ring_inner_diameter/2];
|
||||||
|
end = [x, half_h];
|
||||||
|
move((start + end)/2) rot(90) square([norm(end - start), line_width], center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (y <= -half_h + hex_spacing * 1.5 && abs(x) <= half_w - perimeter_width) {
|
||||||
|
start = [x, y - ring_inner_diameter/2];
|
||||||
|
end = [x, -half_h];
|
||||||
|
move((start + end)/2) rot(90) square([norm(end - start), line_width], center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
linear_extrude(pattern_thickness) {
|
||||||
|
hex_ring_pattern_2d();
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
@@ -0,0 +1,61 @@
|
|||||||
|
/* 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();
|
||||||
Binary file not shown.
Reference in New Issue
Block a user