Skip to content

Instantly share code, notes, and snippets.

@nezuppo
Last active September 24, 2018 11:38
Show Gist options
  • Save nezuppo/243df51ea0fd5d06fefe56e32efde68b to your computer and use it in GitHub Desktop.
Save nezuppo/243df51ea0fd5d06fefe56e32efde68b to your computer and use it in GitHub Desktop.
我が家の水切り固定用パーツ。
$fa = 0.01;
distance_y = 3.5;
pole_radius = 7;
thickness = 3;
outline_radius = 20;
pole_center = [outline_radius, distance_y + pole_radius];
l0_height = 5;
l1_height = 6;
l2_height = thickness;
l3_height = 10;
l1_face_z = l1_height * -1;
l2_face_z = 0;
l3_face_z = l2_height;
l0_face_z = l1_face_z - l0_height;
// layer 3
translate([0, 0, l3_face_z]) {
linear_extrude(l3_height) {
difference() {
translate(pole_center)
circle(pole_radius + thickness);
translate(pole_center)
circle(pole_radius);
}
}
}
module l2_semicircle() {
translate(pole_center) {
difference() {
circle(outline_radius);
translate([0, outline_radius / -2])
square([outline_radius * 2, outline_radius], center=true);
}
}
}
// layer 2
translate([0, 0, l2_face_z]) {
linear_extrude(l2_height) {
difference() {
union() {
l2_semicircle();
square([outline_radius * 2, pole_center[1]]);
translate([0, thickness * -1])
square([outline_radius * 2, thickness]);
}
translate(pole_center)
circle(pole_radius);
}
}
}
// layer 1
translate([0, 0, l1_face_z]) {
linear_extrude(l1_height)
translate([0, thickness * -1])
square([outline_radius * 2, thickness]);
}
// layer 0
translate([0, 0, l0_face_z]) {
linear_extrude(l0_height)
translate([0, -9])
square([thickness, thickness]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment