Rename to libclasp

This commit is contained in:
Matthias Neeracher 2024-09-07 15:46:47 +02:00
parent 8ed1f2772a
commit 650e8f4add

View File

@ -1,5 +1,5 @@
/* /*
* Latch * Libclasp
* *
* Copyright (C) 2024 Matthias Neeracher <microtherion@gmail.com> * Copyright (C) 2024 Matthias Neeracher <microtherion@gmail.com>
*/ */
@ -41,12 +41,12 @@ module _top_post(THICK, AXLE, CLEAR, TOL) {
} }
} }
module latch_top(WIDTH=width, THICK=thickness, AXLE=axle, CLEAR=clearance, TOL=tolerance) { module clasp_top(WIDTH=width, THICK=thickness, AXLE=axle, CLEAR=clearance, TOL=tolerance) {
translate([WIDTH/2+TOL, 0, 0]) _top_post(THICK, AXLE, CLEAR, TOL); translate([WIDTH/2+TOL, 0, 0]) _top_post(THICK, AXLE, CLEAR, TOL);
translate([-WIDTH/2-THICK-TOL, 0, 0]) _top_post(THICK, AXLE, CLEAR, TOL); translate([-WIDTH/2-THICK-TOL, 0, 0]) _top_post(THICK, AXLE, CLEAR, TOL);
} }
module latch_tongue(LENGTH=length, WIDTH=width, THICK=thickness, AXLE=axle, TOL=tolerance) { module clasp_tongue(LENGTH=length, WIDTH=width, THICK=thickness, AXLE=axle, TOL=tolerance) {
angle = 50; angle = 50;
mid = THICK/2; mid = THICK/2;
translate([0, 0, THICK]) linear_extrude(WIDTH) { translate([0, 0, THICK]) linear_extrude(WIDTH) {
@ -69,7 +69,7 @@ module latch_tongue(LENGTH=length, WIDTH=width, THICK=thickness, AXLE=axle, TOL=
translate([AXLE/2+THICK, 0]) cylinder(h=WIDTH+2*THICK, d=AXLE); translate([AXLE/2+THICK, 0]) cylinder(h=WIDTH+2*THICK, d=AXLE);
} }
module latch_catch(WIDTH=width, THICK=thickness, AXLE=axle, CLEAR=clearance, TOL=tolerance) { module clasp_catch(WIDTH=width, THICK=thickness, AXLE=axle, CLEAR=clearance, TOL=tolerance) {
center = AXLE/2+CLEAR; center = AXLE/2+CLEAR;
translate([WIDTH/2+THICK+TOL, AXLE/2, center]) rotate([0, -90, 0]) cylinder(h=WIDTH+2*THICK+2*TOL, d=AXLE); translate([WIDTH/2+THICK+TOL, AXLE/2, center]) rotate([0, -90, 0]) cylinder(h=WIDTH+2*THICK+2*TOL, d=AXLE);
translate([WIDTH/2+TOL, 0, 0]) cube([THICK, AXLE, center]); translate([WIDTH/2+TOL, 0, 0]) cube([THICK, AXLE, center]);
@ -78,7 +78,7 @@ module latch_catch(WIDTH=width, THICK=thickness, AXLE=axle, CLEAR=clearance, TOL
translate([0, 0, 8.2]) rotate([0, 90, 0]) { translate([0, 0, 8.2]) rotate([0, 90, 0]) {
translate([-8.2, -20, 0]) cube([16.4, 24.25, 3]); translate([-8.2, -20, 0]) cube([16.4, 24.25, 3]);
translate([0, 0, 3]) latch_top(); translate([0, 0, 3]) clasp_top();
translate([0, -20, 3]) latch_catch(); translate([0, -20, 3]) clasp_catch();
} }
translate([20, 0, 0]) latch_tongue(); translate([20, 0, 0]) clasp_tongue();