Python in FreeCAD
/I’ve been messing around running Python programs in FreeCAD. This is my favourite result of the day…
Rob Miles on the web. Also available in Real Life (tm)
I’ve been messing around running Python programs in FreeCAD. This is my favourite result of the day…
We were up in the loft over Christmas trying to tidy up a bit and find some things. We didn’t and we didn’t. But we did come across the above. My first wireless mouse. As I remember it doesn’t work and I needed the cable for something else. Bonus points for the first person to identify the system it came from.
The boxes fit inside each other
I’ve been working on some material describing how to write Python programs that run inside FreeCAD. I’ve found this a neat way to make things. I’ve just added a bunch of new examples which you can find here.
What better way to spend New Years day than taking photos of pinball machines….
I’d like to wish all my/both my/my reader(s) a very Happy New Year for 2026. May all your photographs come out properly exposed and in focus, and every Mastermind move you make be rewarded with four red pegs.
Always fancied one of these cars, but I don’t think I’d fit into it
We spent some time yesterday developing colour film. This went surprisingly well and I really like the results. We used these chemicals which make colour development as easy as black and white. We did the first batch of prints at the end of November. It’s nice to know that the chemicals keep for a reasonable time.
I was playing with the new camera…
We went up town today and had a really nice meal at a restaurant we’d not tried before. If you’re looking for somewhere nice to grab lunch in Humber Street you should take a look in Chinese Whispers.
Original box art. I think these two became mildly famous…
Bought a copy of the Mastermind boardgame for a young member of the family today. It seemed to go down very well. Mastermind is a nice little deductive board game for two players that has been around since 1971, which was when I got my copy.
We watched F1 - the movie last night. It is hilarious. The in-car footage is amazing. The production values are fantastic. It looks great. Brad Pitt is in it. In case you are wondering how he gets on, here’s a brief summary (including spoilers):
Fixes the car
Wins the race
Saves the team
Gets the girl
Beats the baddie
Changes lives
Rides off into the sunset
When is a dishwasher not a dishwasher? In our house it’s around half past three in the afternoon when you open the thing and find lots of plates still with food still attached. Very much a first world problem, but still a bit irritating.
Today I thought I’d have a go at fixing it, just in time for Christmas next year. Or something. I took off the “spinny things that spray water” - I’m sure that’s their proper name - and had a look a them. Turned out that one had filled itself up with lemon pips. These had escaped from gin and tonic glasses and found their way into the pipework, ending up in a position to block the water flow into the jets which clean the plates.
There’s a pro-tip here. If your dishwasher isn’t a dishwasher, make sure that nothing is blocking the flow. In theory there are filters to stop this kind of thing happening but as we all know, theory and reality are not always the same thing.
Went out to Beverley today, mainly because the weather was rather nice.
What christmas is really about…
Had a wonderful Christmas. I hope you did too. I didn’t just get a new camera (yay!) but also a copy of the “Things in Rings” game that we were playing on Monday. Plus lots of other fun stuff and loads of chocolate goodies.
I’ve spotted at least two chocolate decorations..
Apparently “slow flash sync” is all the rage this year. You take a long exposure giving time for the lights in your picture to show up in the image and maybe wave the camera around a bit. Then, at the end of that you take a flash photograph, which lights up everything else in the picture and freezes it. Qute fun.
I forgot to take a picture of the board when we played this on Monday night
Venn Diagrams were invented in Hull. Sort of. If you don’t know what a Venn diagram is, then this game will teach you. If you don’t care what a Venn diagram is, then perhaps this is not for you. Things in Rings gives one person (the “knower”) knowledge of a particular word structure (perhaps “contains the letter R”), attribute (perhaps “heavier than a cat”) and context (perhaps “things you can find in my house”). The rest of the players have to discover by experimentation what the three things are. They do this by placing things from their hands (nicely drawn cards that they draw from their hands) into a Venn diagram made with three string loops. The “armchair” went in the middle (because it contains an r, is heavier than a cat, and you can find them at home). There’s also a category for “Nothing” which is where you’d put something like a museum - which doesn’t match any category.
If you place a thing right it stays there. If you place a thing wrong the “knower” puts it in the right place and you get another card. The knower takes a turn along with everyone else, and tries to pick things which will help the group work out what is going on. If everyone gets rid of all their cards everyone wins. If the knower runs out of cards before this happens, everyone loses.
Gameplay is not competitive - which some players might miss. However it is great fun and can lead to some very interesting discussions about the nature of stuff. You don’t have to guess exactly what the rules are. You just have to have a working knowledge that lets you get rid of your cards. It’s a great icebreaker and we rather enjoyed it.
Currently working on a dot counter for the scores….
Tacta is a nice little tactical card game for up to six players. We played it this evening. You place your cards so that they fit into matching areas on cards that have already been placed. The aim is to have as many of “your” spots showing as possible. The game is supposed to take 20 minutes (according to the box) but we managed to make it last a lot longer than that, which a plenty of tactical scheming and debate over whether or not a card was over the edge of the table….
Next thing to do is make a box.
Number One Son is visiting us for Christmas and, as usual, he has brought a few toys for us to play with, starting with a PlayStation 5 APU-based BC-250 crypto mining board. He picked this up for a very good price from AliExpress (although they seem to be getting a bit more expensive now). The board was built for a life in a rack of servers mining crypto coins, but now they are appearing on the second hand market. They need a bit of work to get going, you’ll need to find a power supply, an SSD and a suitable fan, but once you’ve done that you end up with a machine that will run Steam games at a fair old speed. It’s not quite PlayStation 5, more like PlayStation 4.5, but it is very useable and a great way to get into higher performance games or as something powerful to pop under the telly. You can find out more here.
Phiko even sent a diagram explaining the mistake
My C# Yellow Book has been out for a while. I still get emails every now and then with corrections to the text. Phiko got in touch last week about an error that nobody else has spotted. At the start of the book we write a program which works out the amount of wood and glass required to create a window. It contains the statements:
glass area = width of window * height of window
wood length = (width of window + height of window) * 2
Phiko explained that this is wrong, because the length of the wood required must include enough to make the corners of the frame. So, to work out the correct length you also need to factor in the width of the wood too. This all goes to show the importance of testing. If I’d actually tried to make a window using the amount of wood calculated by the code, I’d have found the problem immediately. I think Phiko has a great future as a developer. Well done. I’m going to update the example in the next version of the book.
At the last Hardware Meetup Ross was getting AI to make funky patterns using his LED panel. He’s taken it a bit further now. You can find out more here.
Update: If you liked the post from Ross you might find this interesting too: Creating a complete Basic interpreter using AI.
The latest Raspberry Pi magazine is now in the shops and available online. It’s a good read, as always, but whether this is because or in spite of my article in it about programming Python in FreeCAD I’ll leave you to decide.
You’d think I’d look more pleased
Well, I’ve got my camera capture working for the Nano Banana camera. I’m not using the same display as the original, so I’ve had to write the display driver from scratch which has been great fun.
At the moment the captured images look fine (see above) but the lcd viewfinder display is a bit of a mess. But I think I’ve done enough for this evening.
Here’s a lifestyle tip for all (both) my readers. Don’t use a key to slice through the tape on a package and then immediately try to use the same key to open the door. Slicing through tape can deposit a bunch of sticky stuff onto the key which then ends up in the lock.
I spotted the gluey residue just in time. No damage was done. Second lifestyle tip is to rub a lead pencil up and down the business end of a key a few times. This deposits a layer of graphite on the key which will find its way into the lock mechanism and make it work much more smoothly. Make sure your pencil is a lead one though, this doesn’t work with crayons.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.