diff options
author | Christian Hodgden <chrhodgden@gmail.com> | 2024-07-24 09:11:37 -0500 |
---|---|---|
committer | Christian Hodgden <chrhodgden@gmail.com> | 2024-07-24 09:11:37 -0500 |
commit | dc72cafb0e1bcfeb2b18b03e595c6a1cfb30109f (patch) | |
tree | 64fe1ef8bc0a1f565bd1a4301ae3ff5fcc5c4f74 /chess | |
parent | 92d30e11eea4344eda2dbe41a8c1081c14f0fa3d (diff) |
chess: completed rook model
Diffstat (limited to 'chess')
-rw-r--r-- | chess/demo.scad | 3 | ||||
-rw-r--r-- | chess/rook.scad | 24 | ||||
-rw-r--r-- | chess/rook.stl | bin | 0 -> 7084 bytes |
3 files changed, 20 insertions, 7 deletions
diff --git a/chess/demo.scad b/chess/demo.scad new file mode 100644 index 0000000..fb0ed95 --- /dev/null +++ b/chess/demo.scad @@ -0,0 +1,3 @@ +rotate_extrude (angle = 90) { + square(1); +}
\ No newline at end of file diff --git a/chess/rook.scad b/chess/rook.scad index b75476f..e8801dc 100644 --- a/chess/rook.scad +++ b/chess/rook.scad @@ -35,15 +35,25 @@ head_radius = 1; head_height = 1; stem_height = total_height - base_height - (head_height / 2); +// ridge_offset will set the ridges to go over the corners +ridge_offset_check = 0; +ridge_offset = ridge_offset_check * ((360/$fn)/2); + cylinder(base_height/2, r = base_radius); translate([0, 0, base_height/2]) cylinder(base_height/2, base_radius, stem_base_radius); translate([0, 0, base_height]) cylinder(stem_height, stem_base_radius, stem_radius); -translate([0, 0, total_height - head_height]) - cylinder(head_height/2, r = head_radius); -translate([0, 0, total_height - (head_height/2)]) - // I think I might try rotate_extrude - // take a differemce with an internal cylinder as well - %cylinder(head_height/2, r = head_radius); - +difference() { + translate([0, 0, total_height - head_height]) + cylinder(head_height, r = head_radius); + translate([0, 0, total_height - (head_height/4)]) { + cylinder(head_height, r = head_radius * 0.75); + // this rotation will work for $fn = 8 or 6 + for (i = [0:(($fn/2)-1)]) { + rotate([0, 0, (i * (360/($fn/2))) - ridge_offset]) + rotate_extrude(angle = 360/$fn) + square([head_radius + 0.25, head_height]); + } + } +} diff --git a/chess/rook.stl b/chess/rook.stl Binary files differnew file mode 100644 index 0000000..331b910 --- /dev/null +++ b/chess/rook.stl |