Saturday 18 July 2020

Horiholes

Back in 2011 I came up with polyholes to get around the problem of 3D printed vertical holes coming out too small. Horizontally printed holes also come out too small but for a different reason: the slicer creates a staircase approximation of the hole, but because it samples the model at the middle of the layer, the top or bottom corners intrude into the circle.

 This shows a 6mm truncated teardrop sliced with 0.25mm layers, with red highlighting the overlap.


A long time ago I mitigated this by adding 1/4 of the layer height to the radius, for reasons I can't remember now, but it isn't very accurate. There is some slight interference vertically and gaps at the sides.


I am currently designing a gearbox with ball bearings in 3D printed pockets, which I want positioned accurately, so I decided to revisit the problem.

The correct solution is simple: the compensated shape for the teardrop is simply the hull of itself shifted up half a layer and shifted down half a layer. That compensates the top half so that the bottom of the layer ends up on the circle and the bottom half so that the top of the layer ends up on the circle.


So now all the tips of the stairs sit exactly on the circle, except near the top where the 45 degree overhang would be exceeded.

This is what the hole looks like before it is sliced.


It does of course make the model specific to being sliced at a certain layer height, but my models tend to be designed that way anyway,

I printed this test piece with 6mm holes at different offsets from the layer boundary as well as holes from 1mm to 5mm and I tested it with plug gauges.


The gauges fit all the holes easily. Some are snug and some have a little play vertically depending on how the top edge aligns with the layer boundaries.


The bridge layers over the top come out a bit low because the filament forms a cylinder from a volume that would normally almost fill a rectangle, making it a slight interference fit when the top  lines up exactly with the layers. In other cases there is a bit of vertical play due to the 45 degree limit at the top of the teardrop. This won't be an issue with my gearbox because it will be split into top and bottom halves and the top half will be printed upside down.

I have updated teardrop_plus() in NopSCADlib to use this method and also added a plus option to all the other variants like tearslot(). See https://github.com/nophead/NopSCADlib#Teardrops and https://github.com/nophead/NopSCADlib#Horiholes where you can find the code to make the test STL. 

It should work universally as long as all slicers slice in the centre of the layer. Obviously it makes less difference with smaller layer heights.

Thursday 13 June 2019

NopSCADlib

When I used OpenSCAD to design Mendel90 I modelled complete assembly views with all the vitamins in place and a significant part of the code was actually the vitamins. Vitamins being the RepRap term for non-printed parts of a 3D printer, fasteners, motors, etc. I also automated the generation of the bill of materials, STL files, DXF files and PNG assembly views, but making the build manual was still a lot of manual work, pardon the pun.

After Mendel90 production ended I started designing other projects and found myself needing to use its vitamin library, but because it wasn't designed to be stand alone, that quickly got messy. Eventually I made a new stand alone library and a more general Python framework that would work for any project.

Over the last few years I have refactored it many times, making it much faster to preview, more general and more automated. In particular it can now catalogue all the vitamins and automatically make build manuals for any project using Markdown embedded in OpenSCAD comments. There is a simple example here. I also added reusable printed parts, such as feet, hinges and handles and some reusable enclosures.


It will never be complete because each significant project I make with it usually needs a few more types of vitamin, but it is hopefully structured so that it can grow sustainably without bringing OpenSCAD to its knees. To do that I had to fix some issues in OpenSCAD itself because it used to slow down exponentially with the number of files used. The picture above has an instance of every part in the library. The latest release of OpenSCAD can draw it in about one minute on my desktop PC. This is remarkable because at one time it took 12 minutes.

Here is an example of a typical assembly views it creates: -


I have published it open source on GitHub to enable me to publish projects that use it in the future. I use it for every project I make now, so I don't have any stand alone scad files that can be put on Thingiverse, for example. Feel free to use it in your own projects.


Wednesday 6 June 2018

Beware fake multi-meter leads

I bought these multi-meter leads on eBay for £2.99. They are advertised as "16PCS/Set Multimeter Probe Pin Test Leads Cable Multifunction Digital Clip Kit". I was attracted to them by the large number of accessories including pin type plugs that fit old analogue multi-meters.


When they arrived I discovered that the wires are steel and have a resistance of about 1 Ohm each, which makes them about as useful as a chocolate teapot. Any resistance measurement gets 2 Ohms added . Current measurements on the amps range drop large voltages, the wires get hot and would burn if left on for more that a few seconds.

Voltage measurements would be accurate enough but where the attachments screw on there is exposed metal, so not suitable for high voltages.

I got a full refund and get a set of these instead for £2.97.


They claim to be CE cat III rated for 1000V and 20A. Their resistance is only 64 milliohms. Not bad but my UNI-T UT61E came with 600V 10A rated ones that measure 44 milliohms and my EEVblog BM235 wins with 24 milliohms for 1000V 10A probes.

I got them to replace these old ones that belong to a multi-meter I inherited from my Dad. They have numerous burns from touching a soldering iron.


I dug out this old meter when I realised all my modern digital meters only go up to 1000V at most. This one goes up to 6KV!


I think it was purchased sometime in the early 1970s. It is branded Honor Model TE-12, made in Japan. I have seen identical ones on the web branded Lafayette. I don't think you would get away with connectors like that for 6KV nowadays!