1

絵が描けないので、何を探せばいいのか、質問の仕方がわかりません。我慢してください。

円形のエンドキャップを持つ長方形がある場合。四角形のエッジの一部を削除して、全体に滑らかなパスを作成したいと考えています。端を伸ばすと真ん中が細くなるみたいな。

円が接触する場所を見つけようとして行き詰まるまで、私はより大きな外側の円の弦を考え出そうとしていました.

三角法の関係はいくつかわかりますが、私の脳はそれ以上のことはできません。

誰でも私を正しい方向に向けるのを手伝ってくれませんか。

ありがとう。

4

1 に答える 1

1

答えは次のとおりです。

// Small value for CSG
Delta = 0.01;
2Delta = 2 * Delta;
$fa=1; $fs=$fa;

module roudedArm(xl=50, yt=10, zh=5, in=2, bh=0.8) {
    EndRadius = yt/2; // size of outer ends
    EndSpacing = xl-yt; // distance between end point radii
    ArmConcavity = in; // how much in does it go in on each side
    ArmThickness = zh; // height in z

    // Negative curve to narrow the Arm (calculated by pythagoras)
    ArmCurveRadius = (pow((EndSpacing / 2), 2) - 2 * EndRadius * ArmConcavity + pow(ArmConcavity, 2)) / (2 * ArmConcavity);

    // The orthogonal distance between the middle of the Arm the point it touches the round pillar sections
    ArmSectionLength = (EndSpacing / 2) * ArmCurveRadius / (ArmCurveRadius + EndRadius);

    // end points
    lbxcylinder(r=EndRadius, h=ArmThickness);
    translate([EndSpacing, 0, 0]) lbxcylinder(r=EndRadius, h=ArmThickness);

    // inner curve
    difference()
    {
        translate([EndSpacing / 2 - ArmSectionLength, -EndRadius -ArmThickness, 0])
            translate([ArmSectionLength, (EndRadius + ArmThickness),0]) 
                lbxcube([ArmSectionLength * 2, 2 * (EndRadius + ArmThickness), ArmThickness], bh=bh);

            // Cut out Arm curve
            translate([EndSpacing / 2, ArmCurveRadius + EndRadius - ArmConcavity, -Delta])
                lbxcylinder(r = ArmCurveRadius, h = ArmThickness + 2Delta, bh=-bh);
            translate([EndSpacing / 2, -(ArmCurveRadius + EndRadius - ArmConcavity), -Delta])
                lbxcylinder(r = ArmCurveRadius, h = ArmThickness + 2Delta, bh=-bh);
    }
}

module lbxcube(size, bh=0.8) {
    // don't support bevelling in demo
    translate([-size[0]/2, -size[1]/2, 0]) cube(size);
}

module lbxcylinder(r, h, bh=0.8) {
    // don't support bevelling in demo
    cylinder(r=r, h=h);
}

roudedArm(xl=50, yt=10, zh=5, in=2, bh=0.8);

Rupert とThingiverseのCurvy Door Handleに感謝します。

于 2016-11-29T12:53:28.893 に答える