Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
Tag: Improvements
Making the world a better place, one piece at a time
A longstanding Xubuntu / XFCE UI problem has been single-pixel window borders that make click-and-drag resizing essentially impossible. The reason it’s a longstanding problem has been the developers’ unflinching response to any and all issues raised on the bug tracker:
I had never looked for the XFCE theme-building documentation (and, thus, never found any), because building a whole new theme would be a lot of work just to resize the damn borders. It should be feasible to tweak only the borders of an existing theme, but … I stalled.
Repeatedly. On every single version of Xubuntu that’s come along.
Fortunately, someone recently did the legwork and summarized the method, which I slightly adapted:
cd /usr/share/themes/
sudo cp -a Greybird-compact/ Greybird-wide
cd Greybird-wide/xfwm4
for f in bottom left right ; do sudo cp ../../Daloa/xfwm4/${f}* . ; done
sudo sed -i -e 's/C0C0C0/CECECE/' *xpm
sudo sed -i -e 's/A0A0FF/7C7C7C/' *xpm
sudo sed -i -e 's/E0E0FF/E0E0E0/' *xpm
The exact color mapping depends on which two themes you’re using. You can also specify GTK element colors, which seems like a better way to do it. Maybe next time.
Apparently, the corresponding PNG files contain transparency information for the XPM files, but I haven’t bothered to investigate how that works or what might happen if I tweaked them.
Then you select the new Graybird-wide theme and It Just Works.
My trusty 1050×1680 portrait monitor began resetting itself, which probably indicates failing capacitors in the power supply or logic board; eBay has capacitor kits, but it may not be worthwhile fixing the poor thing. I snagged a new 2560×1440 Dell U2713HM monitor, added a dual-Displayport PNY NVS310 video card, told Xubuntu 14.04LTS to use nVidia’s binary driver, and, somewhat to my astonishment, It Just Worked.
The xrandr report:
Screen 0: minimum 8 x 8, current 4000 x 2560, maximum 16384 x 16384
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 60.0*+
1920x1200 59.9
1920x1080 60.0 59.9 50.0 24.0 60.1 60.0 50.0
1680x1050 60.0
1600x1200 60.0
1280x1024 75.0 60.0
1280x800 59.8
1280x720 60.0 59.9 50.0
1152x864 75.0
1024x768 75.0 60.0
800x600 75.0 60.3
720x576 50.0 50.1
720x480 59.9 60.1
640x480 75.0 59.9 59.9
DP-3 connected 1440x2560+2560+0 left (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 60.0*+
1920x1200 59.9
1920x1080 60.0 59.9 50.0 24.0 60.1 60.0 50.0
1680x1050 60.0
1600x1200 60.0
1280x1024 75.0 60.0
1280x800 59.8
1280x720 60.0 59.9 50.0
1152x864 75.0
1024x768 75.0 60.0
800x600 75.0 60.3
720x576 50.0 50.1
720x480 59.9 60.1
640x480 75.0 59.9 59.9
Reducing the link bars to 4×4 threads produced a diminutive patch:
Square Armor – small links – platform
Most of the dark smudges come from optical effects in the natural PLA filament, but the second-from-upper-left armor button contains a dollop of black PLA left in the nozzle from the end of that spool; running meters and meters of filament through the extruder isn’t enough to clean the interior. I now have some filament intended to clean the extruder, but it arrived after the black ran out.
Comparing the patch with the original buttons shows the size difference:
Square Armor – large vs small links
A trial fit suggested a 5×5 patch would fit better, so …
Square Armor – small links – mounted
The whip stitching accentuates the jacket’s style. We I think a glittery piping cord square around the armor links would spiff it up enormously and hide the open links, but that’s in the nature of fine tuning.
I’ll eventually see what happens with 3×3 thread = 1.2×0.6 mm links, which may be too small for reliable bridging and too delicate for anything other the finest evening wear.
Even though the current has the usual exponential relationship to the terminal voltage, the slope at 200 mA (100 mA each, assuming they share & share alike) remains low enough that I (think I) can get away with just dialing in a voltage and leaving it at that; changes due to small temperature variations won’t cause meaningful differences in the current.
That’s easier than building an adjustable current regulator, anyway.
The heap disgorged two cheap DC-to-DC boost converters from halfway around the planet, with about the right specs:
So I wired one up to the bench supply, set it for 12 V, turned it on, and wham it maxed out the supply at 3 A with no load on the converter’s output.
Huh.
Adding a suitable load resistor brought the input current down, but the voltage adjustment trimpot didn’t have much effect and the bench supply would still wham hit 3 A with no provocation, so the load resistor didn’t actually make any difference. Eventually, I figured out that simply pressing my finger on the trimpot caused the output to vary wildly.
Given that fairly broad hint, this became obvious:
Boost Converter – trimpot pins
Evidently, I had used the other converter for the previous tests. Huh.
With that trimpot pin soldered in place, the converter worked fine. Eyeballometrically speaking, the LEDs seem bright enough at 100 mA total (50 mA each) for my purposes, which happens at 18-ish V. Dissipating only 2 W won’t require nearly as much heatsink as they’re presently mounted on, although I should wait for warmer weather before concluding that they’re doing OK while crammed inside the end cap.
Before declaring victory, I took a closer look at the board and found this mmm oversight:
Boost Converter – masked 78L09 tab
Notice the big pad under the 78L09 regulator, with six thermal vias to an expansive copper pour on the other side of the board, completely covered with red solder mask.
Removing the regulator show the regulator’s footprint didn’t include the tab:
Boost Converter – 78L09 footprint
Maybe they decided, after a careful analysis, that the regulator couldn’t possibly dissipate enough power to warrant the additional solder required for the entire thermal pad. Heck, pocket a fraction of a yuan on ten million boards and you’re livin’ large.
Scraping the mask off, fluxing everything in sight, and soldering the regulator down probably won’t make any difference:
Boost Converter – scraped and soldered
Yes, The Bigger The Blob, The Better The Job strikes again. It does make me feel better and that’s all that counts.
Back when I started fiddling with 3D printed chain mail, the whole process from model to plastic worked wonderfully well. That continued with the larger sheets, but now, occasionally, the OpenSCAD model would produce weirdly sliced links. Depending on nothing repeatable, some links wouldn’t bridge correctly: the thread paths in the bottom layer across the gap would mysteriously stop just short of one pillar, return to the start, and leave an unsupported shelf that would, of course, fall into the gap.
Shortly before Christmas, I managed to get a consistent failure that manifested differently: upon loading the STL file, Slic3r would quietly perform dozens of automatic corrections that (sometimes!) produced bizarrely distorted results. Feeding a failing model into Meshlab showed an irregular assortment of “self intersecting faces”, highlighted in red:
Chain Mail Square Armor – open – 2×2 – Meshlab self-intersecting faces
Although all four outer links in that image come from the same OpenSCAD module with identical sizes, they don’t all exhibit the same problem in the (nominally identical) faces on each of their four corners. In fact, those faces come from the intersection of two square slabs, carefully sized and positioned to avoid creating coincident planes:
Chain Mail Link – Outer shape
The central opening comes from a similar, slightly smaller, intersected-squares shape, but all four interior corner faces in each link show that they’re self-intersecting.
The STL looked fine in Meshlab, except for the highlit self-intersecting faces, so the geometry seemed OK.
When Slic3r autocorrected the “problems”, it apparently removed one vertex on the bottom surface of each bar, deleted the triangles connected to that vertex, then repaired the mesh to produce a delightfully symmetric pattern:
Chain Mail Square Armor – open – 2×2 – Slic3r corrections
Although the links are resolutely symmetric, Slic3r seemed happy with the identical vertices at the other end of the bar.
Unfortunately, the resulting G-Code won’t produce good links:
Chain Mail Square Armor – open – 2×2 – first layer G-code visualization
So, shortly before Christmas, I filed an issue on OpenSCAD’s Github repository.
The ensuing discussion showed that Meshlab flags faces as “self intersecting” when they have different vertices, even if their values are numerically equal, as well as vertices that differ by teeny amounts. Slic3r applies slightly different criteria to vertices & faces when it automagically corrects “problems” in the STL file, so that Meshlab may:
Highlight faces that don’t bother Slic3r
Apply the same highlight to faces that cause horrible problems
I don’t profess to understand much of that and may have the details wrong, but, apparently, OpenSCAD formerly used quantized coordinates that ensured all vertices within a tiny volume would have the same numeric value. In particular, all three faces that meet at a common point would, in fact, have numerically equal coordinate values for that point. The STL file format consists of a list of separate triangles, each with three coordinates for each of the three axes, and (without quantization) it was entirely possible for each of the three triangles with a common point to have three very slightly different positions for that point.
In theoretic terms, quantized coordinates cause horrible problems during geometric manipulation, because numeric values that aren’t exact can make repeated transformations come out wrong; running an object through a transformation and it’s inverse might not yield an object identical to the original one.
In practical terms, it seems that slicers and STL repair algorithms can reach incorrect conclusions based on minute differences produced by floating-point operations and numeric-to-text conversions. Those differences depend on slight changes in position, rotation, and size, so doing anything to the model produces completely different results.
That notwithstanding, the day after Christmas brought a new OpenSCAD version that uses quantized coordinates. A bit of rummaging in the source shows that the 3D grid (defined in src/grid.h) isn’t all that coarse:
const double GRID_FINE = 0.00000095367431640625;
STL files don’t carry units, so that could be in either millimeters (the Slic3r / RepRap convention) or inches (Sketchup, but we won’t go there). It’s exactly 1/10242, in case you were wondering, which produces a 5% speedup in the geometry engine compared to the more human-readable 1/10002.
With that commit in hand, all the chain mail links slice perfectly again.