discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How difficult would it be to make nail-clippers in OpenSCAD?

JS
John Smith
Mon, Jun 19, 2023 4:12 AM

Has anyone tried it before?  Can you share the code?

Has anyone tried it before?  Can you share the code?
DP
David Phillip Oster
Mon, Jun 19, 2023 4:33 AM

I used someone else’s design to make nail clipper holders, to mount
traditional nail clippers so they are easier to grab, but I was not happy
enough with the design for it to be worth posting. I think you need sharp
steel  jaws to make nail clippers work.

On Sun, Jun 18, 2023 at 9:13 PM John Smith yoursurrogategod@gmail.com
wrote:

Has anyone tried it before?  Can you share the code?


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I used someone else’s design to make nail clipper holders, to mount traditional nail clippers so they are easier to grab, but I was not happy enough with the design for it to be worth posting. I think you need sharp steel jaws to make nail clippers work. On Sun, Jun 18, 2023 at 9:13 PM John Smith <yoursurrogategod@gmail.com> wrote: > Has anyone tried it before? Can you share the code? > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JS
John Smith
Mon, Jun 19, 2023 4:42 AM

Yes, but how would one simulate them in OpenSCAD?

On 6/19/2023 12:33 AM, David Phillip Oster wrote:

I used someone else’s design to make nail clipper holders, to mount
traditional nail clippers so they are easier to grab, but I was not
happy enough with the design for it to be worth posting. I think you
need sharp steel  jaws to make nail clippers work.

On Sun, Jun 18, 2023 at 9:13 PM John Smith
yoursurrogategod@gmail.com wrote:

 Has anyone tried it before?  Can you share the code?
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Yes, but how would one simulate them in OpenSCAD? On 6/19/2023 12:33 AM, David Phillip Oster wrote: > I used someone else’s design to make nail clipper holders, to mount > traditional nail clippers so they are easier to grab, but I was not > happy enough with the design for it to be worth posting. I think you > need sharp steel  jaws to make nail clippers work. > > On Sun, Jun 18, 2023 at 9:13 PM John Smith > <yoursurrogategod@gmail.com> wrote: > > Has anyone tried it before?  Can you share the code? > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
JB
Jordan Brown
Mon, Jun 19, 2023 9:22 PM

[ Brain fart, sent privately by accident. ]

On 6/18/2023 9:42 PM, John Smith wrote:

Yes, but how would one simulate them in OpenSCAD?

Tediously :-)

I did some related work a while back to simulate a fancy hinge.  Decide
what parts of the machine are fixed.  They're (relatively) easy to
model.  Model each moving part.  Decide which moving parts have the key
variables.  Calculate the positions and rotations of each moving part
relative to the fixed parts.  Position their models there.

Here's my model of a Blum hinge.  I don't remember exactly what hinge it
attempts to simulate, but it's somewhere in here: 
https://www.blum.com/us/en/products/hingesystems/

Note that for this machine, the position of all of the parts is
determined by one angle, angle BAC.  All of the other positions and
angles are determined from that one angle.

For nail clippers, I'd make the top piece of the body be the fixed part,
ignore rotation of the handle, consider the key variable to be the angle
of the handle relative to the top piece, use that to calculate the
position of the pin relative to the top piece,and use that to calculate
the position of the bottom piece.  (Maybe the pin and bottom piece are
one part with no motion.)

This model is designed for animation.  In case you're not familiar with
animation:  View/Animate.  Note the new toolbar at the bottom of the
preview window.  Set FPS to 10 and Steps to 50.

// Blum hinge

inch = 25.4;

// Notation:
// X - single letter is position of a point.
// XY - two letters is distance between two points.
// XYZ - three letters is angle between three points.
// angleXY - "angle" plus two letters is the angle of that segment.
//
//            F      G      /
//              o----o      R
//    C      /    /      O
//      o-----o----o      O
//    /    / D    E    D
//    o-----o            /
//    A      B
//
//  ---WALL---

AB = 39;
AC = 28;
CD = 40;
BD = 25;
DE = 35;
DF = 20;
FG = 35;
EG = 22;
BDF = 180;
CDE = 180;

$t2 = abs(2*$t-1);  // map 0..1 to 1..0..1
BAC = 30+60*$t2;

A = [0,0];
B = A + [AB,0];
C = A + [ACcos(BAC), ACsin(BAC)];
BC = norm(C-B);
ABC = SSSangleAB(AB,BC,AC);
ACB = 180-BAC-ABC;
CBD = SSSangleAB(BC,BD,CD);
ABD = ABC + CBD;
D = B + [BDcos(180-ABD), BDsin(180-ABD)];
BCD = SSSangleAB(BC,CD,BD);
ACD = ACB + BCD;

angleAB = 0;
angleAC = BAC;
angleBD = 180-ABD;
angleCD = BAC-(180-ACD);
angleDE = angleCD + (180-CDE);
angleDF = angleBD + (180-BDF);

E = D + [DEcos(angleDE), DEsin(angleDE)];
F = D + [DFcos(angleDF), DFsin(angleDF)];
EF = norm(E-F);
DEF = SSSangleAB(DE, EF, DF);
FDE = SSSangleAB(DF, DE, EF);
DFE = 180-DEF-FDE;
EFG = SSSangleAB(EF, FG, EG);
FEG = SSSangleAB(EF, EG, FG);
DFG = DFE + EFG;
DEG = DEF + FEG;

angleFG = angleDF + (DFG-180);
angleEG = angleDE + (180-DEG);
G = E + [EGcos(angleEG), EGsin(angleEG)];

translate(A) rotate(angleAB) line(AB);
translate(A) rotate(angleAC) line(AC);
translate(B) rotate(angleBD) line(BD);
translate(C) rotate(angleCD) line(CD);
translate(D) rotate(angleDE) line(DE);
translate(D) rotate(angleDF) line(DF);
translate(F) rotate(angleFG) line(FG);
translate(E) rotate(angleEG) line(EG);
label(A, "A");
label(B, "B");
label(C, "C");
label(D, "D");
label(E, "E");
label(F, "F");
label(G, "G");

translate(E) rotate(angleEG) translate([-40,-0.75inch,-0.75inch/2]) cube([200,0.75inch,0.75inch]);
translate(B) rotate(angleAB) translate([-180,-0.75inch,-0.75inch/2]) cube([200,0.75inch,0.75inch]);
translate([-130,160,-0.75inch/2]) cube([200,0.75inch,0.75*inch]);

module line(n) {
t = 1;
color("silver") translate([0,-t/2, -t/2]) cube([n, t, t]);
}

module label(p, s) {
translate(concat(p,2))
color("black")
linear_extrude(height=0.2, center=true)
text(s, size=3, halign="center", valign="center");
}

//      .
//    /
//    a  b
//  /   
//  .---c---.
function LawOfCosines(a,b,c) = acos((aa + bb - cc)/(2a*b));
// Given a triangle with sides a, b, c,
// return the angle between a and b.
// Rotate the sides (abc, bca, cab) to get all three angles.
function SSSangleAB(a,b,c) = LawOfCosines(a,b,c);

module testSSS() {
// Test with a 30-60-90 triangle
height = 0.5;
hypotenuse = 1;
base = sqrt(hypotenusehypotenuse - heightheight);
echo(SSSangleAB(base, height, hypotenuse));
echo(SSSangleAB(height, hypotenuse, base));
echo(SSSangleAB(hypotenuse, base, height));
}
//testSSS();

[ Brain fart, sent privately by accident. ] On 6/18/2023 9:42 PM, John Smith wrote: > > Yes, but how would one simulate them in OpenSCAD? > Tediously :-) I did some related work a while back to simulate a fancy hinge.  Decide what parts of the machine are fixed.  They're (relatively) easy to model.  Model each moving part.  Decide which moving parts have the key variables.  Calculate the positions and rotations of each moving part relative to the fixed parts.  Position their models there. Here's my model of a Blum hinge.  I don't remember exactly what hinge it attempts to simulate, but it's somewhere in here:  https://www.blum.com/us/en/products/hingesystems/ Note that for this machine, the position of all of the parts is determined by one angle, angle BAC.  All of the other positions and angles are determined from that one angle. For nail clippers, I'd make the top piece of the body be the fixed part, ignore rotation of the handle, consider the key variable to be the angle of the handle relative to the top piece, use that to calculate the position of the pin relative to the top piece,and use that to calculate the position of the bottom piece.  (Maybe the pin and bottom piece are one part with no motion.) This model is designed for animation.  In case you're not familiar with animation:  View/Animate.  Note the new toolbar at the bottom of the preview window.  Set FPS to 10 and Steps to 50. --- // Blum hinge inch = 25.4; // Notation: // X - single letter is position of a point. // XY - two letters is distance between two points. // XYZ - three letters is angle between three points. // angleXY - "angle" plus two letters is the angle of that segment. // // F G / // o----o R // C / / O // o-----o----o O // / / D E D // o-----o / // A B // // ---WALL--- AB = 39; AC = 28; CD = 40; BD = 25; DE = 35; DF = 20; FG = 35; EG = 22; BDF = 180; CDE = 180; $t2 = abs(2*$t-1); // map 0..1 to 1..0..1 BAC = 30+60*$t2; A = [0,0]; B = A + [AB,0]; C = A + [AC*cos(BAC), AC*sin(BAC)]; BC = norm(C-B); ABC = SSSangleAB(AB,BC,AC); ACB = 180-BAC-ABC; CBD = SSSangleAB(BC,BD,CD); ABD = ABC + CBD; D = B + [BD*cos(180-ABD), BD*sin(180-ABD)]; BCD = SSSangleAB(BC,CD,BD); ACD = ACB + BCD; angleAB = 0; angleAC = BAC; angleBD = 180-ABD; angleCD = BAC-(180-ACD); angleDE = angleCD + (180-CDE); angleDF = angleBD + (180-BDF); E = D + [DE*cos(angleDE), DE*sin(angleDE)]; F = D + [DF*cos(angleDF), DF*sin(angleDF)]; EF = norm(E-F); DEF = SSSangleAB(DE, EF, DF); FDE = SSSangleAB(DF, DE, EF); DFE = 180-DEF-FDE; EFG = SSSangleAB(EF, FG, EG); FEG = SSSangleAB(EF, EG, FG); DFG = DFE + EFG; DEG = DEF + FEG; angleFG = angleDF + (DFG-180); angleEG = angleDE + (180-DEG); G = E + [EG*cos(angleEG), EG*sin(angleEG)]; translate(A) rotate(angleAB) line(AB); translate(A) rotate(angleAC) line(AC); translate(B) rotate(angleBD) line(BD); translate(C) rotate(angleCD) line(CD); translate(D) rotate(angleDE) line(DE); translate(D) rotate(angleDF) line(DF); translate(F) rotate(angleFG) line(FG); translate(E) rotate(angleEG) line(EG); label(A, "A"); label(B, "B"); label(C, "C"); label(D, "D"); label(E, "E"); label(F, "F"); label(G, "G"); translate(E) rotate(angleEG) translate([-40,-0.75*inch,-0.75*inch/2]) cube([200,0.75*inch,0.75*inch]); translate(B) rotate(angleAB) translate([-180,-0.75*inch,-0.75*inch/2]) cube([200,0.75*inch,0.75*inch]); translate([-130,160,-0.75*inch/2]) cube([200,0.75*inch,0.75*inch]); module line(n) { t = 1; color("silver") translate([0,-t/2, -t/2]) cube([n, t, t]); } module label(p, s) { translate(concat(p,2)) color("black") linear_extrude(height=0.2, center=true) text(s, size=3, halign="center", valign="center"); } // . // / \ // a b // / \ // .---c---. function LawOfCosines(a,b,c) = acos((a*a + b*b - c*c)/(2*a*b)); // Given a triangle with sides a, b, c, // return the angle between a and b. // Rotate the sides (abc, bca, cab) to get all three angles. function SSSangleAB(a,b,c) = LawOfCosines(a,b,c); module testSSS() { // Test with a 30-60-90 triangle height = 0.5; hypotenuse = 1; base = sqrt(hypotenuse*hypotenuse - height*height); echo(SSSangleAB(base, height, hypotenuse)); echo(SSSangleAB(height, hypotenuse, base)); echo(SSSangleAB(hypotenuse, base, height)); } //testSSS();