The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Software

General-purpose computers doing something specific

  • Generator Air Filter Screw Knob

    Generator Air Filter Screw Knob

    Part of the Autumn festivities around here involves blowing leaves into piles, then shredding them into garden mulch. Given that I have a plug-in electric leaf blower / wind stick, I use this as an excuse to exercise the emergency generator (similar to that one) with a (relatively) short extension cord.

    As with all small gasoline engines, I fire a shot of starting fluid into the air cleaner to reduce the number of engine-start yanks, which means I must remove the generator’s side panel and unscrew the filter cover. For years I have sworn mighty oaths on the bones of my ancestors to knobify that screw, thus eliminating fiddling with a screwdriver.

    Finally:

    Generator Air Filter Screw Knob - solid model
    Generator Air Filter Screw Knob – solid model

    A dozen minutes of printing and a snippet of good double-sided tape later:

    Generator air filter knob - installed
    Generator air filter knob – installed

    The knob sticks out far enough to push into the foam “sound deadening” liner on the cover, so it won’t vibrate loose.

    The OpenSCAD source code:

    include <BOSL2/std.scad>
    
    /* [Hidden] */
    
    HoleWindage = 0.2;
    Protrusion = 0.1;
    
    // Screw head dome
    
    HeadHeight = 2.0;
    HeadOD = 14.75;
    
    DomeRadius = (HeadHeight^2 + (HeadOD^2)/4) / (2*HeadHeight);
    echo(DomeRadius=DomeRadius);
    
    KnobOD = HeadOD;
    KnobLength = 15.0;
    
    RimFudge = 0.3;   // ensures a printable edge
    
    // Build it
    
    difference() {
      cyl(h=KnobLength, r=KnobOD/2,anchor=BOTTOM,texture="trunc_pyramids",tex_size=[2.0,KnobLength/4]);
    #  up(KnobLength - HeadHeight + RimFudge)
        spheroid(r=DomeRadius,circum=true,style="icosa",anchor=BOTTOM);
    }
    

    The cover has robust plastic latches, so I haven’t ever bothered to tighten those screws.

  • Handlebar Grip Sleeve

    Handlebar Grip Sleeve

    Mary’s zero-mph crash loosened the starboard handlebar plug enough to let it eventually decamp for parts unknown. Its replacement, a somewhat fancier aluminum plug with an expanding cone retainer using an actual M3 nut, worked fine for the last year, but Mary recently noticed the socket head screw had worked loose.

    In the interim, I’d moved the Bafang thumb control from its original position on the crossbar to just above the rear shifter:

    Tour Easy - right handlebar control stack
    Tour Easy – right handlebar control stack

    Which moved the clamp on the shortened grip off the end of the handlebar tube, so I flipped the grip around, tightened the clamp, and installed the plug.

    Unfortunately, the grip ID is 4 mm larger than the tube ID, which meant the plug’s cone retainer was struggling to hold on in there. Perhaps the plastic cone has relaxed bit, but I figured giving it more traction would be a Good Idea™ before I declared victory:

    Handlebar Grip Sleeve - PrusaSlicer
    Handlebar Grip Sleeve – PrusaSlicer

    It’s a little plastic sleeve with slots to let it expand against the inside of the grip:

    Handlebar grip sleeve - installed
    Handlebar grip sleeve – installed

    Yes, it’s sticking out slightly; you can see the corresponding gap up inside next to the tube.

    A wrap of double-sided sticky tape glues it in place as the retainer presses it against the grip ID and a dot of low-strength Loctite should keep the screw from loosening again.

    The OpenSCAD source code:

    // Handlebar grip sleeve
    // Ed Nisley - KE4ZNU
    // 2025-10-25
    
    include <BOSL2/std.scad>
    
    /* [Hidden] */
    
    ID = 0;
    OD = 1;
    LENGTH = 2;
    
    HoleWindage = 0.2;
    Protrusion = 0.1;
    NumSides = 3*2*4;
    
    $fn=NumSides;
    
    Sleeve = [18.5,22.0,14.0];
    Kerf = 1.0;
    
      difference() {
        tube(Sleeve[LENGTH],id=Sleeve[ID],od=Sleeve[OD],anchor=BOTTOM);
        for (a=[0,90])
          zrot(a)
            up(Sleeve[LENGTH]/4)
              cuboid([2*Sleeve[OD],Kerf,Sleeve[LENGTH]],anchor=BOTTOM);
      }
    
    

    That was easy …

  • 3D Printed Smashed Glass Coasters: Fragment Path Offsets, Simplified Version

    3D Printed Smashed Glass Coasters: Fragment Path Offsets, Simplified Version

    Rather than use Inkscape or LightBurn to generate all the offsets required to make a solid model, it’s easier to let OpenSCAD handle it:

    Printed Coaster Layout - 100 mm Set G - solid model
    Printed Coaster Layout – 100 mm Set G – solid model

    The overall process:

    • Pick some interesting fragments
    • Scan to get an image
    • Mark the fragments in GIMP
    • Create a suitable circumcircle in LightBurn
    • Use a nesting program like Deepnest to create a nice layout of the fragments within the circle
    • Create the perimeter path as an offset around all the fragments in LightBurn

    Because the fragments have irregular shapes and spacing, creating the perimeter path may also produce small snippets of orphaned geometry which must be manually selected and deleted. I also edit the path to remove very narrow channels between adjacent fragments.

    Which is why you can’t generate that path automatically:

    Printed Coaster Layout - 100 mm Set G - LightBurn perimeter geometry
    Printed Coaster Layout – 100 mm Set G – LightBurn perimeter geometry

    Because LightBurn doesn’t have the ability to name the various paths, the next step requires Inkscape. After importing the LightBurn paths saved as an SVG, group all the fragments and name the group Fragments, then name the perimeter path Perimeter:

    Printed Coaster Layout - 100 mm Set G - Inkscape layer and IDs
    Printed Coaster Layout – 100 mm Set G – Inkscape layer and IDs

    Inkscape still crashes unpredictably while doing what seems to be a simple process, which may be due to the tremendous number of points in the hand-traced fragment outlines. Unfortunately, simplifying the curves in either LightBurn or Inkscape tends to round off the extreme points and increases the likelihood of the fragment not fitting into its recess.

    OpenSCAD generates all the other features in the solid model with paths plucked from that file:

    include <BOSL2/std.scad>
    
    fn = "Printed Fragment Coaster - 100 mm Set G - Inkscape paths.svg";
    
    FragmentThick = 3.8;
    
    BaseThick = 1.0;
    RimHeight = 1.0;
    
    union() {
    
      linear_extrude(h=BaseThick)
        import(fn,id="Perimeter");
    
       color("Green")
      up(BaseThick)
        linear_extrude(h=FragmentThick)
          difference() {
            import(fn,id="Perimeter");
            offset(delta=0.2)
              import(fn,id="Fragments");
          }
    
      color("Red")
      up(BaseThick)
        linear_extrude(h=FragmentThick + RimHeight)
          difference() {
            offset(delta=2.5)
              import(fn,id="Fragments");
            offset(delta=1.2)
              import(fn,id="Fragments");
          }
    
    
    }
    

    The Perimeter path defines the overall shape of the coaster as a 1.0 mm thick slab, visible as the white-ish line around the edge and at the bottom of all the fragment recesses.

    Atop that, the green shape is the same Perimeter shape, with the Fragment shapes removed after the offset() operation enlarges them by 0.2 mm to ensure enough clearance.

    Finally, the red walls containing the epoxy above each fragment are 1.3 mm wide, the difference of the two offset() operations applied to the Fragments.

    Because the outer edge of the wall is 2.5 mm away from the edge of its fragment:

    • The Perimeter path must be offset at least 2.5 mm from the Fragments in LightBurn. I used 4.0 mm to produce a small lip around the outside edge of the coaster.
    • The fragment shapes must be placed at least 5.0 mm apart to prevent the walls from overlapping. I set Deepnest to exactly 5.0 mm spacing, but you can see a few places where the fragments come too close together. I think this happens due to an approximation deepnest uses while rotating the paths, but it may be better to manually adjust the errant fragments than increase the average space.

    While this still requires manually tracing the glass fragments and fiddling a bit with Inkscape, the overall process isn’t nearly as burdensome as getting all the offsets correct every time.

    However, some oddities remain. OpenSCAD produced this result during the first pass through the process for this coaster:

    Printed Coaster Layout - 100 mm Set G - spurious point
    Printed Coaster Layout – 100 mm Set G – spurious point

    As far as I can tell, the spurious point came from a numeric effect, because telling Inkscape to store only five decimal places in the SVG file reduced the spike to the small bump seen in the first picture. I cannot replicate that effect using the same files and have no explanation.

  • 3D Printed Smashed Glass Coasters: Fragment Path Offsets, Complicated Version

    3D Printed Smashed Glass Coasters: Fragment Path Offsets, Complicated Version

    This should have been trivially easy and turned into a nightmare.

    The problem to be solved is generating paths around fragments for the various recesses / reflectors / lips / rims / whatever. This clutter collector was a test piece:

    Smashed Glass Clutter Collector - overview
    Smashed Glass Clutter Collector – overview

    The corresponding paths:

    Printed Clutter Collector - Inkscape layers
    Printed Clutter Collector – Inkscape layers

    Which was how I convinced myself I didn’t need all those paths to make the thing, but that’s why it’s a test piece.

    Anyhow, Inkscape has a remarkably complex and fiddly way of generating precise offsets:

    • Select a path
    • Hit Ctrl-J to create a Dynamic Offset path
    • Drag the offset path away from the original in any direction for any distance
    • Hit Ctrl-Shift-x to fire up the XML editor (!)
    • Change the offset path’s inkscape:radius property to the desired offset

    During the course of working that out, I discovered Inkscape 1.4.2 is incredibly crashy when creating and dealing with offsets, to the point that I simply gave up trying to do that.

    LightBurn has no trouble creating a path at a specific offset from another path and can export the result as an SVG file. You then use Inkscape to set the path IDs so that OpenSCAD can import them by name for a specific use. Although Inkscape isn’t entirely stable doing even that seemingly trivial task, it’s usable.

    For reasons I do not profess to understand, setting the name of a path sometimes does not set its ID property, which is required by OpenSCAD to extract it from the SVG file. Instead, you must verify / set the ID using the path’s Object Properties window:

    Printed Clutter Collector - Inkscape path properties
    Printed Clutter Collector – Inkscape path properties

    I also set the Label property, because … why not?

    A top view shows how the various paths look in real life:

    Smashed Glass Clutter Collector - top view
    Smashed Glass Clutter Collector – top view

    The OpenSCAD program generating the solid model from those paths:

    include <BOSL2/std.scad>
    
    fn = "Printed Clutter Collector - Inkscape layers.svg";
    
    FragmentThick = 5.0;
    
    BaseThick = 1.0;
    RimHeight = 7.0;
    
    union() {
      linear_extrude(h=BaseThick)
        import(fn,id="Perimeter");
        
      linear_extrude(h=BaseThick + FragmentThick + RimHeight)
        difference() {
          import(fn,id="Perimeter");
          import(fn,id="Rim");
        }
    
      up(BaseThick - 0.05)
        linear_extrude(h=FragmentThick)
          difference() {
            import(fn,id="Perimeter");
            import(fn,id="Recess");
          }
    
    }
    

    Which becomes this:

    Printed Clutter Collector - solid model
    Printed Clutter Collector – solid model

    Save that, import it into PrusaSlicer, pick the filament, and print it out.

    While the printer buzzes away, use LightBurn to cut a shiny blue metallized paper reflector and a cork base using the appropriate paths; presumably you set those paths to LightBurn layers corresponding to the various materials. The Inkscape file has those paths with their names, because … why not?

    To assemble:

    • Cover the bottom of the recess with epoxy
    • Squish the reflector in place with epoxy oozing around it on all sides
    • Cover the reflector with epoxy
    • Squish the fragment atop the reflector with epoxy oozing around it on all sides
    • Fill the recess level with the lip inside the perimeter wall
    • Pop bubbles as needed
    • When it’s cured, stick the cork sheet on the bottom

    Note that the OpenSCAD program uses the path geometry without question, so it’s your responsibility to create them with the proper offsets and names.

    While all of that to-ing and fro-ing works, in the sense that I did make a rather nice clutter collector, it’s entirely too complicated and fiddly to be useful. Instead, I can now generate a coaster from just the fragment outlines and the coaster’s outer perimeter, a straightforward process which requires a bit more explanation.

  • 3D Printed Smashed Glass Coasters: Fragment Layout

    3D Printed Smashed Glass Coasters: Fragment Layout

    I selected and laid out the smashed glass fragments for the first few coasters by hand:

    Smashed Glass - 4in - group A - tweaked
    Smashed Glass – 4in – group A – tweaked

    Which worked reasonably well for coasters with a rim around the perimeter to hold in the epoxy covering the entire top surface:

    Printed Coaster Layout - solid model
    Printed Coaster Layout – solid model

    The problem with smooth-top coasters is this:

    Printed Coasters - epoxy fill
    Printed Coasters – epoxy fill

    A slightly sweaty or wet mug can get a firm suction lock on that smooth top, lift the coaster off the table, then drop it into a plate of food.

    So I put a rim around each fragment to separate the epoxy surfaces and break the suction lock:

    Printed Coaster Layout - 5 inch Set B
    Printed Coaster Layout – 5 inch Set B

    Each recess has a narrow inner lip as a border inside the raised perimeter, which may not be strictly necessary, but IMO nicely sets off the fragments:

    Smashed Glass 3D Printed Coaster - Set B
    Smashed Glass 3D Printed Coaster – Set B

    Each fragment must be spaced far enough from its three neighbors to allow for those lips and perimeter walls, which requires more fussing than I’m willing to apply on a regular basis.

    So fetch & install Deepnest to fuss automagically. The program hasn’t been updated in years and the Linux version segfaults on my Manjaro boxen, but the Windows version runs fine on the Mini-PC I use for LightBurn:

    Deepnest Fragment Set E - in progress
    Deepnest Fragment Set E – in progress

    The Mini-PC runs maxi-hot, though, so at some point I must install Deepnest on the Token Windows Laptop for more grunt.

    Deepnest requires a large shape representing the “sheet” in which to arrange the other pieces, so:

    • Import the fragments outlines into LightBurn
    • Create a suitable circle
    • Export circle + fragments as an SVG file
    • Import into Deepnest
    • Set 5 mm spacing & other suitable parameters
    • Let it grind until a nice arrangement pops out
    • Save as Yet Another SVG file

    The output SVG has the fragment outlines arranged to fit within the circle, but does not include the circle. That’s fine, because the next step involves creating a conformal perimeter around the entire group of fragments and preparing it for input to OpenSCAD to create a solid model:

    Printed Coaster Layout - 5 inch Set C - solid model
    Printed Coaster Layout – 5 inch Set C – solid model

    So. Many. Smashed. Glass.

  • 3D Printed Smashed Glass Coasters: Optimization

    3D Printed Smashed Glass Coasters: Optimization

    A pair of 3D printed smashed glass coasters for a friend:

    Printed Coasters - in use
    Printed Coasters – in use

    The black PETG coaster under the French Press:

    Printed Coasters - black PETG finished
    Printed Coasters – black PETG finished

    The white PETG coaster under the mug:

    Printed Coasters - white PETG finished
    Printed Coasters – white PETG finished

    They’re considerably improved from the first attempt:

    Smashed glass printed coaster - front view
    Smashed glass printed coaster – front view

    More details to follow …

  • Baseboard Radiator Sleds

    Baseboard Radiator Sleds

    Cleaning the baseboard radiator fins before moving the houseplants back to their winter abode by the living room window made sense, so I took the trim covers off and vacuumed a remarkable accumulation of fuzz off the top and out from between the fins. The covers had an equally remarkable accumulation of sawdust along their bottom edge, apparently deposited when the previous owners had the floor sanded before they moved in a decade ago.

    If you happen to live in a house with baseboard radiators, I’m guessing you never looked inside, because nobody (else) does.

    Anyhow, the radiator fins should rest on plastic carriers atop the bent-metal struts also supporting the trim covers, so that they slide noiselessly when the copper pipe expands & contracts during the heating cycle. Over the last six decades, however, the plastic deteriorated and most of the carriers were either missing or broken to the point of uselessness:

    Baseboard Radiator Sled - old vs new
    Baseboard Radiator Sled – old vs new

    The shapes on the bottom are replacements made with a 3D printed base (“sled”) and a chipboard wrap around the radiator preventing the fins from contacting the strut:

    Baseboard Radiator Sled - OpenSCAD show
    Baseboard Radiator Sled – OpenSCAD show

    Although it was tempting to 3D print the whole thing, because plastic, I figured there was little point in finesse: chipboard would work just as well, was much faster to produce, and I need not orient the shapes to keep the printed threads in the right direction.

    The Prusa MK4 platform was just big enough for the number of sleds I needed:

    Baseboard Radiator Sled - printed
    Baseboard Radiator Sled – printed

    The sleds along the left and right edges lost traction as the printing progressed, but everything came out all right.

    The OpenSCAD program also produces 2D SVG shapes for the chipboard wraps and adhesive rectangles sticking them to the sleds:

    Baseboard Radiator Sled - OpenSCAD SVGs
    Baseboard Radiator Sled – OpenSCAD SVGs

    Import those into LightBurn, duplicate using the Grid Array, Fire The Laser, then assemble:

    Baseboard Radiator Sled - assembly
    Baseboard Radiator Sled – assembly

    The slits encourage the chipboard to bend in the right direction at the right place, so I didn’t need any fancy tooling to get a decent result.

    A few rather unpleasant hours crawling around on the floor got the struts bent back into shape and the sleds installed under the fins:

    Baseboard Radiator Sled - installed
    Baseboard Radiator Sled – installed

    Protip: Gloves aren’t just a good idea, they’re essential.

    The trim cover presses the angled chipboard where it should go against the fins. The covers carry shadows of the plastic carriers, suggesting the clearance was tighter than it should have been and thermal cycling put more stress on the plastic than expected. We’ll never know.

    Although I’ll make more for the other baseboards as the occasion arises, I hope to never see these again …

    The OpenSCAD source code as a GitHub Gist:

    // Baseboard radiator sled
    // Ed Nisley – KE4ZNU
    // 2025-10-11
    include <BOSL2/std.scad>
    Layout = "Sled"; // [Show,Build3D,Build2D,Sled,Wrap,Glue]
    /* [Hidden] */
    HoleWindage = 0.2;
    Protrusion = 0.1;
    Gap = 5.0;
    Radiator = [25.0,62.0,50.0]; // X = support base, YZ = radiator element
    SledBase = [Radiator.x + 10.0,Radiator.y,1.0]; // support under wrap
    Runner = [SledBase.x – 2.0,3.0,1.6]; // bars contacting radiator support
    GlueOA = [SledBase.x,SledBase.y] – [2.0,2.0]; // glue sheet
    Wrap = [SledBase.x,Radiator.y + 1.0,Radiator.z + 1.0]; // chipboard wrap around radiator
    WrapFlat = [Wrap.x,Wrap.y + 2*Wrap.z];
    WrapThick = 1.2;
    WrapSlit = 0.4;
    //—–
    // Sled base
    module Sled() {
    cuboid(SledBase,rounding=2.0,edges="Z",anchor=BOTTOM)
    position(TOP)
    for (j=[-1,1])
    fwd(j*SledBase.y/3)
    cuboid(Runner,rounding=Runner.z/2,edges="Z",anchor=BOTTOM);
    }
    //—–
    // Glue sheet
    // Export as SVG for laser cutting
    module Glue() {
    rect(GlueOA,rounding=2.0);
    }
    //—–
    // Radiator wrap
    // Export as SVG for laser cutting
    module Wrap() {
    difference() {
    rect(WrapFlat,rounding=2.0);
    for (j=[-1,1])
    fwd(j*Wrap.y/2)
    rect([Wrap.x/2,WrapSlit]);
    }
    }
    //—–
    // Build things
    if (Layout == "Sled")
    Sled();
    if (Layout == "Glue")
    Glue();
    if (Layout == "Wrap")
    Wrap();
    if (Layout == "Show") {
    xrot(180)
    Sled();
    color("Yellow",0.6)
    Glue();
    up(1)
    color("Brown") {
    cuboid([Wrap.x,Wrap.y,WrapThick],anchor=BOTTOM);
    for (j=[-1,1])
    fwd(j*Wrap.y/2)
    cuboid([Wrap.x,WrapThick,Wrap.z],anchor=BOTTOM);
    }
    }
    if (Layout == "Build3D") {
    Sled();
    }
    if (Layout == "Build2D") {
    left(GlueOA.x/2 + Gap/2)
    Glue();
    right(Wrap.x/2 + Gap/2)
    Wrap();
    }