Skip to content

Instantly share code, notes, and snippets.

@ridercz
Created January 14, 2021 01:17
Show Gist options
  • Save ridercz/040c35e86e2c20f776b936fe445a57ad to your computer and use it in GitHub Desktop.
Save ridercz/040c35e86e2c20f776b936fe445a57ad to your computer and use it in GitHub Desktop.
Vzpěra na židli
include <A2D.scad>; // https://github.com/ridercz/A2D
assert(a2d_required([1, 6, 0]), "Please upgrade A2D library to version 1.6.0 or higher.");
/* [General] */
height = 15;
main_hole_size = [35.5, 42.5];
prop_hole_size = [40, 15];
wall_thickness = 6;
radius = 3;
/* [Main screws] */
main_screw_diameter = 4;
main_head_diameter = 8;
main_head_height = 3;
/* [Prop screws] */
prop_screw_diameter = 4.5;
prop_head_diameter = 8;
prop_head_height = 4;
prop_nut_diameter = 10;
prop_nut_sides = 4;
/* [Hidden] */
$fn = 16;
$fudge = 1;
X = 0; Y = 1; Z = 2;
sl = [main_hole_size[X] + wall_thickness, main_hole_size[Y] + 2 * wall_thickness];
sr = [main_hole_size[X] + wall_thickness + prop_hole_size[X], prop_hole_size[Y] + 2 * wall_thickness];
difference() {
// Outer 3D shape
linear_extrude(height) difference() {
// Outer shape footprint
hull() {
r_square(sl, radius);
translate([0, (sl[Y] - sr[Y]) / 2]) r_square(sr, radius);
}
// Main hole
translate([0, wall_thickness]) square(main_hole_size);
// Prop hole
translate([sl[X], (sl[Y] - prop_hole_size[Y]) / 2]) square(prop_hole_size);
}
// Main screw holes
msh_pos = [
[main_hole_size[X] * .30, -$fudge, height / 2],
[main_hole_size[X] * .70, -$fudge, height / 2],
];
for(pos = msh_pos) translate(pos) {
rotate([-90, 0, 0]) {
cylinder(d = main_screw_diameter, h = wall_thickness + 2 * $fudge);
cylinder(d = main_head_diameter, h = main_head_height + $fudge);
}
translate([0, sl[Y] + 2 * $fudge]) rotate([+90, 0, 0]) {
cylinder(d = main_screw_diameter, h = wall_thickness + 2 * $fudge);
cylinder(d = main_head_diameter, h = main_head_height + $fudge);
}
}
// Prop screw holes
extra_hole_size = (sl[Y] - prop_hole_size[Y]) / 2 - (wall_thickness - prop_head_height);
psh_pos = [
[sl[X] + prop_hole_size[X] * .30, 0, height / 2],
[sl[X] + prop_hole_size[X] * .70, 0, height / 2],
];
for(pos = psh_pos) translate(pos) {
rotate([-90, 0, 0]) {
cylinder(d = prop_screw_diameter, h = sl[Y]);
cylinder(d = prop_head_diameter, h = extra_hole_size);
translate([0, 0, sl[Y] - extra_hole_size]) cylinder(d = prop_nut_diameter, h = extra_hole_size, $fn = prop_nut_sides);
}
}
}
// Signature
translate([main_hole_size[X] + wall_thickness / 2, sl[Y] / 2, height]) rotate([0,0,90]) linear_extrude(.6) text(text = "RIDER.CZ 2021", font = "Arial:bold", size = 4, halign = "center", valign = "center");
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment