Parametric 3D printer designs with OpenSCAD

xyzprintingdavinci1.0I bought an entry-level 3D Printer from PrintME3D recently – an XYZprinting DaVinci 1.0 and I’m impressed. I’ve printed nothing fancy – mostly brackets, clips, motor couplings and a few replacement parts for toys and tools.

I’ve been using OpenSCAD and wanted to¬† put my simple designs online. Some of my OpenSCAD designs might be useful for other people but with different dimensions, so I made a simple parameter form for each design with a preview image to show the effect of changes.

The preview image is linked to a simple 3D viewer powered by JSC3D, which uses STL produced on the server using the modified parameters from the form. The images are of an adjustable, flexible clip-on bracket to hold a rear mudguard in place with an M5 bolt on a Giant MTX bicycle belonging to my daughter.


OpenSCAD rendering of one half of symmetrical adjustable rear mudguard bracket


JSC3D interactive rendering of STL file

The XYZPrinting DaVinci 1.0 is great for an entry model 3D printer, once Repetier (so it can be used with a Linux PC) has been installed and trial-and-error has established good temperatures for the bed and extruder and levelled the bed. After producing many satisfactory-to-good prints, I find it occasionally goes through bad patches of the first layer not adhering to the bed. If poor adhesion happens in only one small patch, it’s not always fatal for the print. I suspect occasional poor adhesion is due to the bed going out of level, possibly due to the vigour with which I remove the previous print’s baked-on glue.

Validating host names – top level domains (TLDs)

For a recent project I needed to update a hard-coded list of TLDs. Keeping it fresh seemed like a good idea, so I took IANA’s list of TLDs (IANA TLDs also available as text here) and made a little API service to provide the data in different formats:

ICANN provides the TLDs in upper case, but the Firtl API lower-cases them for convenience.

Generating coloured-in election map images with SVG

The Election Boundary Map generator in Firtl’s sandpit will attempt to match a text data file with an SVG image of the UK (actually only Great Britain since Northern Ireland is not on the Ordnance Survey map) showing political constituencies. Simply upload a text file with two fields on each line. The first field should be the name of the constituency, the second a numeric value such as a percentage. Separate the two fields with a space.

A coloured map will be generated to reflect the value in each constituency. The colours are drawn from a red-green-blue spectrum from 0 to 100%, or 0 to the maximum value found in the file if the “Stretch values” checkbox is set. Constituencies for which no matching name is found in the uploaded file will be left uncoloured.


The map images are available in PNG, JPEG and SVG. Here are PNG examples of the percentages of votes cast for some of the better-known options at the 2010 General Election, in alphabetical order:











Liberal Democrat


Plaid Cymru





The SVG maps were generated from data from the Ordnance Survey’s OpenData Boundary-Line product (sorry, can’t give a direct in-page link as OS’s HTML is broken). I used the free QGIS mapping application to export SVG from the OS data, but had to edit QGIS’ SimpleSvg plugin to embed constituency names from the ‘Attribute Table’ to allow more straightforward colouring of the map.

The data I used to colour the maps I found by visiting and following the link to the Electoral Commission’s General Election 2010 Results Data (sorry, no direct in-page link as the Electoral Commission’s HTML is insufficiently marked-up).

The electoral data is in one great Excel file (why not an open format?), which I transformed into individual files for upload to my map generator. Here are the files:

election2010bnp election2010conservative election2010green election2010independent election2010labour election2010libdem election2010plaidcymru election2010snp election2010ukip

Goodwill GW Instek GDS-2062 oscilloscope firmware

I found some files relating to the now-discontinued GDS-2062 oscilloscope. For the sake of posterity and anyone else interested in upgrading the firmware on their ‘scope, here they are:


Firmware v1.11

User manual

I found the firmware, manuals and more on the Hungarian ‘PROCONTROL’ website. I can’t vouch for the authenticity or otherwise of the firmware, but it installed a treat on my GDS-2062 and cured a peculiarity with the controls.

Ebay Finding Service API for Java / Maven

I’ve just finished a project which regularly queries the ebay finding API and does something good with the results. It’s in Java, so I downloaded the “Finding Kit for Java” zip file from the ebay Developer’s Program Finding API page. I struggled at first to integrate it with my Java / Maven / One-JAR project. A look through the code included in the zip revealed stuff that didn’t inspire me with confidence (for example the hard-coded Windows path (“C:/william_dev/eBaySDK/715/findingkit/FindingService.wsdl” in so I decided to make my own Maven findingkit project.

I’m allergic to XML so no expert on SOAP but it seems that the zip-included package should be automatically generated by some WSDL. I deleted that directory first. The Developer’s Program zip includes the WSDL to generate the deleted source, but my expectation from a public API is that the WSDL should be publicly hosted by the API-owner, so I deleted that too.

It remained only to specify an URL for the Finding Service WSDL which describes the generated source and a maven plugin (I used JAX-WS) to generate the sources (with the maven goal jaxws:wsimport) and I was good to go to generate the Finding java sources. The first time you do this, there’s a package naming issue in the zip-included Replace the import lines with ones including package names that match the generated code. In NetBeans IDE, I just delete the imports and choose the default suggestions in the ‘Cannot find symbol’ tooltips. The generated package I have to import from is “”.

One last clean and build should give you a com.ebay.findingkit artefact in your local maven repository.

Here’s a zip file of the maven project I use in my ebay Finding Service projects. The usual caveats regarding gifts from strangers should apply. At least it has no Windows file path string literals in it.

My one remaining concern is the ‘v1′ in the package names. I’d be happier if I had a ‘v1′ URL for the WSDL. A ‘latest’ URL that generates ‘v1′ names seems wrong.