Parametric stand for synthesizers in OpenSCAD

When looking for a suitable stand for my beloved Vector synthesizer on Thingiverse and other repositories, none of them suited my needs. Most importantly I was not impressed by the traditional construction of stands made of two pieces connected by threaded rods – the stand had to be able to fit the limited space of my drawer when not being used.

Therefore I designed yet another parametric stand which consists of two identical parts. Because the parts are wide enough, they can stand upright on they own and do not require any supporting hardware in between. The stand also has rubber feet both on the bottom of the stand and on the hypotenuse to increase friction.

Continue reading

Converting Excel (Calc) Spreadsheet to Code

A few months ago I needed to convert quite complex (kind of black box) computation from Excel spreadsheet to C code. At first I manually copied expressions from all cells but this was not simple as I had to check cells mentioned in expressions (formulas). It took long time and energy and the code didn’t work properly - results calculated by the spreadsheet differed from my program’s result.

Therefore I decided to save the Excel spreadsheet in ODF format (OpenOffice.org Calc) and write a little helper called SpreadsheetToCode. It’s a command-line utility that does the following steps:

  1. Load OpenDocument Spreadsheet file (.ods) because it's basically XML file wrapped in ZIP and therefore super easy to handle
  2. Pick all cells which contain numerical values (inputs, parameters) or expressions with them (formulas)
  3. Print C-like source code with the spreadsheet's functionality expressed in lines of code

Continue reading