Gas station without pumps

2021 August 23

Dragon key holder

Filed under: Uncategorized — gasstationwithoutpumps @ 15:18
Tags: , , , ,

In 3D printed names, I showed a key holder for my home and office keys, which finally failed after 3 years.  My family has been bugging me to replace it anyway—pointing out that it is stupid to have one’s name on a key holder, as it makes it easy for anyone to figure out what doors the keys are for if they get lost.

broken-name-key-holder

The key holder cracked at one of the bolt holes. It was still sort of usable (the keys were still constrained by the bolt and the cover plate was not yet coming loose), but it looked bad and would sometimes snag when I was trying to get it out.

I decided to make a new key holder with a dragon motif, based on a sweater from Past Times that has gotten too moth-eaten to wear, but that has a pattern I like.

Past-Times-sweater

I took only the dragon part of the pattern, which is 18 pixels by 109 pixels (20 by 111, if you include a 1-pixel white border).

My first job was to transcribe the knitted pattern onto squared paper, then type it into the computer.  I had hoped that OpenSCAD’s “surface” function (which I used successfully for the quantum dot pendant) would let me convert this image easily to a 3D relief, but it did a terrible job, as each black dot became a sharp peak.

I ended up using the Pillow fork of the PIL Python package to manipulate the image and export it in PNG format.

    im_5=im.resize([5*(num_rows+2), 5*(num_cols+2)], Image.NEAREST)
    im_max=im_5.filter(ImageFilter.MaxFilter(3))
    im_big=im_max.filter(ImageFilter.SMOOTH)

I resized it by a factor of 5, ran it through a “max” filter to spread out the black, then smoothed it.

dragon5_smooth

The PNG file is the negative of original image. Unfortunately, the checkerboard grid does not print well at the size I needed to make the image.

hollow-dragon5_smooth

I edited the pixels manually to get a somewhat more printable shape, then did the same sort of spreading and smoothing.

I initially printed just the dragon on a little oval, to see how it would come out, before adding the rest of the key-holder design from the original key holder.  Because OpenSCAD produces huge STL files when the “surface” function is used, I simplified the STL files with https://myminifactory.github.io/Fast-Quadric-Mesh-Simplification/

3-test-samples

Here are the 3 samples. The top one tried just expanding the pixels to 5×5, the second one did the smoothing, and the third one got rid of the checkerboard patterning.

failed-prints

The first two prints were failures. The top print was done face-down on the glass bad (as I had done the previous key holder), but there was too much spreading on the first layer. The second print failed because the glass plate rotated during the print—I had to add hot glue to it again, to keep it in place.

dragon-keyholder

The final key holder is ok, but it would really look better if I had a smaller nozzle (the 0.4mm nozzle limits the horizontal resolution).

dragon-key-holder-with-keys

Here is the finished key holder with keys—I expect that it will last another 3 years (though I did use 50% fill this time, to make it a little stronger).

I’ve uploaded the design to https://www.thingiverse.com/thing:4939976.

2019 August 31

Shakespeare cookies v7

Today (2019 August 31), my son and I baked shortbread cookies using version 7 of the Shakespeare cookie cutter, which is a two-part design with a separate cutter and stamp:

Version 7 of the Shakespeare cookie cutter uses a simple outline for the cutter and a separate stamp for adding the facial features. Version 6 of the stamp failed, because I made the alignment markers too thin and they did not survive even gentle handling.

In addition to the new cutter and stamp, we also tried out the “cookie sticks” that I made for rolling the dough to a consistent 6mm thickness:

I made two different sticks: a straight one and one with a 90° corner. The OpenSCAD file also allows other angles, so I could have made 120° corners for a hexagon.  I made the sticks about as big as I could print on the Monoprice Delta Mini.

The hooks at the two end of the stick lock the sticks together.

I made enough of the sticks to make a rectangular frame almost as big as my cookie sheets. I ran out of the ugly green PLA filament after only 3 sticks, so I did the rest in the Hatchbox gold PLA filament.

I made the same shortbread dough as last time: 1 cup butter, 2 cups pastry flour, and ½ cup powdered sugar. I cleared a counter to make some workspace:

I had a cookie sheet,a rolling pin (a piece of birch dowel that I sanded and coated with mineral oil decades ago), a silicone baking mat, the cookie sticks, the cookie cutter and stamp, and a shallow bowl for flour.

The entire batch fills about 2/3 of the frame when rolled out:

For the first batch, we tried rolling the dough directly on the silicone baking mat, and removing the excess dough without moving the cookies.

The cookie sticks worked well for getting a uniform, consistent thickness to the dough, and 6mm is about the right thickness for these cookies. Having a complete frame around the dough meant that I did not have to worry about the cookie sticks shifting position, nor what the orientation of the rolling pin was.

The stamping is easily done on the cookies, but removing the excess dough from between the cookies was harder than we expected. It probably didn’t help that it was a warm afternoon and the dough got sticky quickly, even though we refrigerated it before rolling.

For the second rolling, we rolled the dough onto waxed paper, then transferred the cut-out cookies to a baking sheet lined with a silicone mat, doing the stamping only after the cookies were on the baking sheet.

We ended up with 19 cookies from the batch, and they came out pretty good:

This picture is a bit misleading as these were probably the best two of the nineteen.

The biggest problem was with dough getting stuck in the nose when stamping—it might be easier to do Tycho Brahe cookie cutters!

The second biggest problem was getting accurate alignment of the stamp with the cutter. For several of the cutters we were a millimeter off, resulting in an extraneous line at one of the alignment markers.

Despite these minor problems, the v7 cutters were much easier to use than previous versions, and I don’t have any immediate ideas for improvements (other than changing from a 3D-printed cutter to a injection-molded cutter, which would require a lot of changes and cost a few thousand dollars—something I’m not prepared for.

2019 August 19

Shakespeare cookies v5

On Saturday, my son and I baked shortbread cookies using version 5 of the Shakespeare cookie cutter:

The difference between version 4 and version 5 is mainly around the left eye (on the right in this photo). Version 4 had a lot of trouble with the dough getting stuck in the small regions there. (See prior post for cookies made with the V4 cutter.)

Despite the simplifications, Shakespeare’s head is still quite recognizable.

We used the classic recipe (2 cups flour, 1 cup butter, and ½ cup confectioner’s sugar), but this time I used pastry flour instead of a mixture of all-purpose flour and sweet rice flour.  The dough works about equally well either way.

The cookies came out good, but the cookie cutters are still having problems with dough sticking to the cutters. Chilling the dough after rolling helped a little, but stickiness was still a problem. We also had problems rolling the dough out to a uniform 6mm thickness—sometimes we had the dough too thin, and the interior lines were not clear, and sometimes we had it too thick and couldn’t get the cookie out of the cutter without destroying the cookie.

My son had two suggestions, both of which I’ll follow up on:

  • Go back to having separate cutter and stamp (as in Version 3), but don’t try to connect the two.  Make the stamp just have a few alignment marks so that it can be hand-aligned to the cookie outline.  The stamp can have a lot of open space, so that the visual alignment is relatively easy, and so that the cookie dough can be easily separated from the stamp.  The stamping can even be done after the cookie has been transferred to the baking sheet, to make distortion from moving the cookie less of a problem.
  • Make a set of 6mm thick sticks that can be put down around the dough, that the rolling pin can rest on.

Version 6 of the stamp failed, because I made the alignment markers too thin and they did not survive even gentle handling.  I’m now printing Version 7, which has more robust alignment markers.

 

2019 August 11

Star-of-stars, another large pendant

I’ve previously posted about my 3D-printed stage jewelry: the 3D slugs , the diamond, the chain of office, and large pendants printed on my Monoprice Delta Mini printer using CC3D Silk Gold PLA filament.

I designed another pendant yesterday, and printed it today—this one using stars instead of spheres as the main design element.

Once again, I had to clean up the stringing and blobbing using a riffler.

// Star of stars
// by Kevin Karplus
//  Creative Commons Attribution-ShareAlike  (CC BY-SA 3.0)
// 2019 Aug 10

use <BOSL2/std.scad>
// BOSL2 from https://github.com/revarbat/BOSL2/
// used for offset

function inner_radius(r_outer, n, k) =
    assert(k<n/2) assert(k>0)
    let(straight_ratio = cos(180/n) + sin(180/n)*tan(180*k/n))
    r_outer/ straight_ratio;
    
function star_points(r_outer=5, n=5, k=2)=
   // Points on circle centered at (0,0) with radius r_outer.
   // First point on positive x axis.
   // k determines how far out the inner points of the star are, 
   //   with k<1 making a convex polygon with 2n sides,
   //   k=1 making a regular n-gon
   //   k=2 making a star that connects alternate points
   //   k=3 making a star that connects every third point, ...
   // k need not be integer
   // You can get a nice, fat star with k=(n-2)/2
   let(r_inner = inner_radius(r_outer, n, k))
    [for (i=[0:2*n-1]) 
        (i%2==0? r_outer: r_inner)*[cos(i*180/n), sin(i*180/n)]];
    
    
module star(r_outer=5, n=5, k=2)
   // Make a polyhedral star with n points.
{   points = star_points(r_outer=r_outer,n=n,k=k);
    polygon(points=points, convexity=n);
}


module star_outline(n=5, r=50, line=2,k=undef)
{
    k_star = k==undef? (n-2)/2: k;
    points = star_points(r_outer=r,n=n,k=k_star);
    echo(points=points);
    inner = offset(points, delta=-line, closed=true);
    echo(inner=inner);
    difference()
    {   polygon(points);
        polygon(inner);
    }
    
}

module star_of_stars(n=5, r=50, line=2, k=undef)
{
    k_star = k==undef? (n-1)/2: k;
    r_sub = inner_radius(r, n, k_star);
    star_outline(n=n, r= 2*r_sub, line=line, k=k_star);
    for (i=[0:n-1])
    {
        rotate((2*i+1)*180/n)
            translate([2*cos(180/n)*r_sub,0])
                rotate(((n+1)%2)*180/n)
                    star_outline(n=n,r=r_sub+0.001, line=line, k=k_star);
    }
}



module solid_star(n=5, r=50, k=undef, height=undef)
// Make a solid star with n points and outer radius r
//    k is a skinniness parameter (0 to n/2), as defined in star
//      default value is (n-2)/2, which makes a slightly fat star
//      (try n/2 for a skinny star)
//    height is the height of the star, default is r/3
{
    k_star = k==undef? (n-2)/2: k;
    h = height==undef? r/3: height;

    linear_extrude(height=h, scale=0)
       star(n=n,k=k_star, r_outer=r);
}


module solid_star_of_stars(n=5, line=2, r=50)
{   
    small_r = 3*line;
    r_sub = inner_radius(r, n, (n-1)/2);
    outer_center= [(2*cos(180/n)+1)*r_sub-small_r,0];
    
    difference()
    {   union()
        {
            linear_extrude(line)
               star_of_stars(r=r, n=n, line=line);
            intersection()
            {   translate([0,0,0.0015]) cylinder(r=1.2*r, h=2*line, $fn=20);
                
                for (i=[0:n-1])
                {    rotate([0,0,i*360/n])
                        translate([r_sub,0,0])
                        {   linear_extrude(line) star(r_outer=3*line,n=n, k=(n-2)/2);
                            color("blue") translate([0,0,line])
                                solid_star(r=small_r, height=2*line, n=n, k=(n-2)/2);
                        }
                }
            }
            intersection()
            {   translate([0,0,0.001]) cylinder(r=1.2*r, h=2*line, $fn=20);
                
                for (i=[0:n-1])
                {   
                    rotate((2*i+1)*180/n)  translate(outer_center)
                     {  rotate(((n+1)%2)*180/n)
                        {   linear_extrude(line) star(r_outer=3*line,n=n, k=(n-2)/2);
                            color("red") translate([0,0,line])
                                solid_star(r=3*line, height=2*line, n=n, k=(n-2)/2);
                        }
                    }
                }
            }
        }
        
        for (i=[0:n-1])
        {   
            rotate((2*i+1)*180/n)  translate(outer_center)
               cylinder(d=line, h=5*line, center=true, $fn=30);
        }
    }
}

solid_star_of_stars(n=5);

Released on Thingiverse as https://www.thingiverse.com/thing:3805111

2019 August 10

More large pendants

I’ve previously posted about my 3D-printed stage jewelry: the 3D slugs , the diamond, and the chain of office, printed on my Monoprice Delta Mini printer using CC3D Silk Gold PLA filament.

I’ve done a couple more designs since then: two more large pendants that could be used with a chain of office.  These were designed for fairly fast printing, being fairly thin:

Flower pendant 1 has 12-fold symmetry (including mirror symmetries).

Flower pendant 2 has 16-fold symmetry, including mirror symmetries.

Both pendants were simple OpenSCAD code, as they consist of unions and intersections of spheres (cut to just the positive-z half-space, to get a flat back).

// Flower pendant 1
// 12-fold symmetry
// bumps in center
//
// License: Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)

// Kevin Karplus
// 2019 Aug 1

module round_facet(r=15, h=5)
{
    $fa=2; $fn=60;
    intersection()
    {   cylinder(r=1.3*r, h=h);
        union()
        {
            difference()
            {   sphere(r=r);
                carve_r=1.8*r;
                rim_h = 0.4*h;
                raise = sqrt(carve_r*carve_r + rim_h*rim_h -r*r)+rim_h;
                translate([0,0,raise]) sphere(r=carve_r); 
            }
            inner_r=0.35*r;
            translate([0,0,h-inner_r]) sphere(r=inner_r);
        }
    }
}

n=6;
r=40;
for(i=[1:n])
{   tran=0.3*r;
    color(c=[i/n,0.1,(n-i)/n])
        translate(tran*[cos(360*i/n), sin(360*i/n),0])  
            round_facet(r=r-tran,h=0.3*(r-tran));
}
// Flower pendant 2
// 16-fold symmetry
//
// License: Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)

// Kevin Karplus
// 2019 Aug 2

module round_facet(r=15, rim_h=2, carve_ratio=1.7)
{
    $fa=2; $fn=60;
    intersection()
    {   cylinder(r=1.3*r, h=rim_h*2);
        difference()
        {   sphere(r=r);
            carve_r=carve_ratio*r;
            raise = sqrt(carve_r*carve_r + rim_h*rim_h -r*r)+rim_h;
            translate([0,0,raise]) sphere(r=carve_r); 
        }
    }
}

module flower(petals=6, r=40, height_ratio=0.07, translate_ratio=0.4, carve_ratio=1.7)
{
    for(i=[1:petals])
    {   tran=translate_ratio*r;
        color(c=[i/petals,0.1,(petals-i)/petals])
            translate(tran*[cos(360*i/petals), sin(360*i/petals),0])  
                round_facet(r=r-tran,
                    rim_h=height_ratio*r, 
                    carve_ratio=carve_ratio);
    }
}

flower(petals=8, height_ratio=0.08);

I have not released these designs on Thingiverse, because the site keeps being unresponsive when I try to upload new designs. I realize that I shouldn’t complain about a free service, but I’m about ready to give up on Thingiverse. Is there a better 3d-printing sharing site?

Update 2019 Aug 10: Thingiverse finally let me upload as https://www.thingiverse.com/thing:3802142 and https://www.thingiverse.com/thing:3802138.

Next Page »

%d bloggers like this: