FreeCAD is awesome

BendyPipeFinal.PNG

I’m starting to really like FreeCAD. I’ve used it for years, but I’ve been cheating in that I’ve used internal Python engine to run programs that design things. However, over the last few days I’ve hit up against things that are a bit hard to do programatically, so I’ve been investigating the tool itself. It’s awesome. I can now draw paths and then use those to create curvy objects like the pipe above, which also has a cutout for the BME280 environmental sensor. And then I found that FreeCAD also supports spreadsheets.

freecadspreadsheet.PNG

You can bind properties in your drawing to values in a spreadsheet. So, if I want to change properties in my drawing (perhaps increase the base thickness) I just change the value in the spreadsheet and the drawing is automatically updated. Dimensions in the drawing are mapped back to the spreadsheet cells. It’s wonderful.

Making bendy pipes with FreeCAD

bendypipe.PNG

Achievement unlocked. I now know how to make “bendy” things in FreeCAD. It’s actually not that hard once you work out what FreeCAD needs to know. Essentially you use one Sketch to define the path of the template and another (which should be at right angles to the path) to define the closed shape to be created. You can even add another closed shape at the end of the path and then have the shape smoothly change from one to the other. I’ve used this to create tapered tubes.

I’m doing this to make another Air Quality sensor. I want to send the air path round a curve that is too tight for pipe. I also want to add a “u-bend” so that it is harder for water to get into the sensor. I’m quite pleased with the above. Now I just have to figure out how to mount it in the case….

Python output in FreeCAD

37560748832_9ff48a0bb9_z.jpg

This is one of those selfish blog posts I make to remind myself how to do something that I'm bound to forget. 

But, if you're using the FreeCAD designer to run Python programs to design robots (as I am) you might find it useful. If you want to be able to print messages from your program onto the report console in FreeCAD you can the following:

App.Console.PrintMessage('hello from the program\n')

For this to work you have to have the output window options in Preferences set to Redirect internal Python output to the report view, but if you do this works a treat. My design programs can now report on progress, which is nice. 

Incidentally, I've now got a lot of experience creating solid objects from Python code using FreeCAD. If anyone would like me to do a talk on this, let me know and we can sort this out.