Freesteel Blog » 2006 » June
Just wasted two solid days editing a few new entries onto wikipedia. It’s really addictive, and better than blog posting because there’s a good chance it will be read by people in a long time to come.
This session got sparked off by the headline news on the radio in Denmark which Peter translated during the drive into Cimco one morning. It was about a seven man terror cell that had just been arrested in Miami with plans to blow up the tallest building in America.
It sounded to me like sham, and I got criticised for saying so and not taking these frightening events seriously. I got a reputation for being like a wacko peacenick who always thinks the government is lying. (Funny how no one gets a reputation for being a gullible fool on these matters.) Such is the distinction between perception and reality. Perception is the headline news that embeds certain notions in your mind, and reality is forgotten when there is as usual no follow-up to correct such notions.
Anyways, the result after a great deal of editing is: Wikipedia Sears Tower bomb plot. I’m insanely proud of this article. I think I’m the first one to dig up the fact that the incident occurred just in time for the FBI Director to mention it in his threat of homegrown terrorism speech that afternoon. In his speech he mentioned two other terrorist “incidents” that I also followed up and made pages for. You can find them all at the bottom of the List of terrorist incidents in the U.S. page in the arrests section. Both of them are pitifully weak. They include four armed robbers who founded a terror cell while in a jail cell, and a group of three who were going to use a car dealership business as cover for flights to Iraq.
My mind boggles. I don’t know how they can make these accusations with a straight face. Back in the old days you could be burned at the stake for committing witchcraft, which at least meant you were supposed to have had done something dodgy at midnight with a goat. But what exactly do you do to found a terrorist organization? Are there forms to fill in? I think we should be told. There may actually be some credible terrorist threats out there, but this clowning around and posing as the only al-Qaeda agent in town has nothing to do with finding them. People will believe anything in the land of the UFO abduction.
Same garbage happens here in the UK, where I started the List of terrorist incidents in the UK, which is gradually filling up. It’s pretty full of IRA stunts, but the most important sections relating to politics today are at the bottom, where there are several fake incidents as well as the case of the London nail-bomber, which was exactly like terrorism, but didn’t get designated as terrorism, because — I presume — it didn’t fit into the narrative that our politicians are spinning.
This narrative requires the report of a certain level of violence — or promised violence — directed towards us by people associated with the middle-east in order to justify the awesome level of violence we are dishing out on them. I’m not making this up. When politicians are forced to tell us something about the massacres they are presiding over in Iraq, they usually change the subject to the war on terror, and run through the same embarrassingly short list of incidents to balance it out, often feeling the need to pad it with false accusations such as these. And whenever one of these accusations can no longer be supported, like Iraq’s WMD, it simply disappears from the list. No further mention is voluntarily made. No acknowledgement that they got something wrong. No reconsideration of the policy that it was supposed to have justified. Nothing. They’re like salesmen, puffing up their product for sale rather than working out what’s actually needed.
I am so looking forward to a day when politicians start to Get Real, and are willing to observe reality, and deal with it. I posted up another page on related stuff I know about New Labour Terrorism Laws, which gathered all the warning wikipedia flags within minutes. The first version deserved it, but now I think it’s good, and stands as a good complement to the list of actual terrorist incidents, of which you would have hoped it was a reflection.
Oh well. I have actually done a bit of programming between these distractions. I’m going to wiki-ize the machining parameters in the camkernel, me. No one else seems to be doing it. The problem is exactly as we had with Machining Strategist, where you make up the necessary parameters to control the algorithm you are writing in the hope that you are going to come back and sort them out at a later date when they’re all done and you know what they are. (Of course, you never do.) The naming convention gets a little screwed, but the names are pretty bad anyway, so what?
One of the Danes decided to improve it yesterday by changing the capitalization of some of the letters. So, “stockzhi” became “stockZHigh”. I am not sure this was enough of an improvement in the names to warrant the inconvenience of breaking the code. I tried to argue about it, but have just given up again. As was stated in the Python style guide:
A Foolish Consistency is the Hobgoblin of Little Minds
I couldn’t have put it any better. However, this doesn’t really help, because it doesn’t advise what to do when you encounter a little hobgoblins going around and screwing up your code. “Oh, but it’s got to be consistent,” I get told. Well, it doesn’t ever seem to need to be consistent with anything I write ever, does it! He puts two line functions in the middle of thousand line “.cpp” files, and insists on using this crappy curly-bracket layout that’s different from everything else that’s there, including this pointless “throw()” statement at the end of every single function declaration that’s said to gain half a percent in speed from the idiotic compiler that’s apparently too stupid to work out that a function consisting of the single statement “return bFlag”, isn’t going to throw an IOException. I tolerate this crap with great patience. But I won’t tolerate any lectures about “consistency” from people who do this kind of thing!
After ranting for one final meeting in the Cimco’s basement, promising that this time we will all stick to a schedule of at least one skype conference call a week to keep in sync, Martin and I caught the 2:30 train from Copenhagen (on the east coast of Denmark). It was delayed for one hour and left the platform very slowly at 3:30. Trains aren’t usually late in Europe, except in England where it’s so predictably crap that you take account for it, so we were in trouble.
Our ferry back to England was due to leave Esbjerg (on the west coast of Denmark) at 7:00. Last boarding was at 6:30. At 5:30 the ticket collector understood our problem and said there was another couple from England in the same difficulty. She said we should all get off at the next station and arrange for a taxi to take us the rest of the way.
We got off among a crowd, found no other couple, went to the information desk, and they wrote us out a ticket for a taxi. Time was short, and we hopped into the first empty taxi we could find as it drove into the taxi rank, which was a single lane driveway between a the pavement and a bus shelter that was completely blocked in by a taxi in front with all its doors open and passengers totally faffing around with luggage and seeming to take forever. Our driver managed to get all the taxis and himself reversed back all the way out of the driveway.
After a swift 110mph ride down the highway, while trying unsuccessfully to phone the ferry (all the numbers on the ticket got to a recorded message in Danish about their christmas opening times), we arrived in the centre of Esbjerg among a maze of roads taped off by the police. After driving over somebody’s front lawn, we got onto the dock road. The taxi meter hit the 1000 krona mark. Apparently the train company had given us a blank cheque. When I joked that maybe he could drive us all the way to Cambridge through Channel Tunnel if we missed this, the driver seemed to take the suggestion seriously.
We reached the checkin office at 6:47. The door was locked. After trying all the other doors, returning and banging on this one until the people inside let us in, they told us we were too late, they’d already sent the policemen who check the passports home. Why didn’t we called earlier to tell them we were late?
We promised them some abuse, and they let us through and said we were very lucky to get on. The other English couple had got through earlier. I met them on the boat. They were so doddery they hadn’t understood what they had been told to do, and the lady had found them still on board when the train pulled away from the station we got off at. So she phoned ahead to the ferry company to warn them and called a taxi, and they were whisked away immediately from the next station straight to the port.
The whole experience: Culture shocking.
You forget that in some places they don’t call train passengers customers, and take account of the fact that a travel product is not the same as an ice cream, which you can throw away or return if you don’t like.
Maybe it would have been cool to have been stuck in Esbjerg over the weekend when the whole country was having its midsummer party. I guess I’ll never know. I’m glad to be home.
Saturday, June 24th, 2006 at 5:58 pm - Machining
In Cimco everyone was doing their own thing. Someone would spend a couple months writing the parallel (raster) passes routine and its associated linking routine, and then someone else would move on and write a countour (z-profile) toolpath routine and linker for the special case when the paths were closed, and then someone else was going to do the same for scallop (constant stepover), and so on. This appeared to be breaking the project down into manageable pieces to be distributed among the programmers. But it wasn’t. I could point to massive areas of duplicated effort, combined with the failure to reuse code because it had not been written with the general application in mind.
Let’s say there are five strategies for finish machining: parallel, countour, pencil, scallop, and offset scallop. We don’t have accurate terminology, and I am still looking for volunteers to help me enter definitions for these into the wikipedia.
These strategies all produce sets of toolpaths — piecewise linear curves for guiding a pre-specified tool through space while in contact with the CAD defined model. This is an important stage of development, but it’s not enough to drive the machine.
Between each cutting toolpath and the next there has to be a non-cutting toolpath to guide the cutter from the end of one and the beginning of the next. The tool can’t be teleported like, say, the tool that is the spot of a cutting laser which can be turned off and on. It’s a physical motion capable of collision and which is seen as being wholly unproductive. You can construct all kinds of elaborate arcs and over-curls into these linking paths to take account of the machine’s momentum and drive it faster, although the journey may become longer. No one knows what is the most efficient, so such motions are artistically designed to look smooth and fast to the experienced user or software purchaser.
It’s also possible to improve the ordering of the toolpaths, which itself is an art, since no one has conducted any rigourous tests or guidelines for this either. It’s all done by theory, and since the theory says it’s equivalent to the travelling salesman problem, there is no theoretically perfect answer.
A specific example. Suppose you have a whole series of contour passes — Z-slices — through a model that has the shape of two round pillars. Each slice will be made of two disconnected circular toolpaths. It is considered bad form to hop between one and the other as you go down the levels, even though this was the order they were calculated in. It is better to re-order them so you go down first one pillar, and then the next, although not beyond the level of the base of the pillars where the contours become joined. For a model with many holes and pillars, the combinatorial structure can get quite complex.
The point I was making was that it’s no good one person being put on the job of re-ordering and linking parallel passes for two months, and then the next person re-ordering and linking the contour passes later on in the summer. You have start by treating all toolpath strategies as one kind, and then consider the special cases only when necessary. Once you fragment the operations you make it very difficult to spot similarities and reuse the code.
So my plan says that every toolpath strategy goes through one huge re-orderer and linker module. It takes about ten minutes to write the first version — version zero of reorderer leaves it as it is, and the linker inserts what is known as retract paths between every two toolpaths. A retract path is made up of three segments: the cutter lifts to a safe Z height, moves to the XY point above the start of the next toolpath, and drops down vertically to the start of that toolpath.
This is not the best result for the CAM system to send out, but it is valid and works.
Now you can begin transforming it and incrementally developing it into something better, while all the time your prototype system remains functional and able to make valid and working toolpaths.
An easy way to organize the code for linking between toolpaths is to make up several styles (in addition to the retract style, which always works), call each one in turn, and then pick the one that gives the best result. If someone invents a new style, say, one that is able to connect from one position to another within the same Z-contour and manouver around islands, it is easy to add it in with the full knowledge that it won’t make anything worse, since it will only be used if it makes a result that is better than something that is already there.
There’s more to it than this, but this is the underlying pattern to look for.
Software development should not be like building a car, where on the last day you can finally put on the wheels and drive it around. It’s should be like building a road system where, once you build one bridge across each river it’s possible to drive everywhere — just not very fast. Now you carefully observe what is happening to the traffic and plan carefully: where do you put a new stretch of motorway to make the most difference? You can consider radically different alternative configurations before you commit to them. But all the time you still have something that works and is predictable. So long as a bridge doesn’t fall down.
Wednesday, June 21st, 2006 at 6:14 pm - Machining
We’ve been going to lots of fine meals here in Copenhagen, and sometimes remembering to work. On the first night we went for a long walk in the Deer Park to the fun-fair at the far corner. After staying for an extra beer to hear www.defynsketyroler.dk we got lost in the dark and ran into a crowd of thousands coming the other way from the end of an outdoor production about Thor, the god in norse mythology, which involved horses.
Martin and I have been staying in Peter’s spare flat, which is knocked through and joined to his main one on the 4th floor somewhere in Copenhagen. I don’t know how to find it myself, and have marked it with a GPS. Normally I borrow a bike and cycle through Copenhagen between where I stay and Cimco’s office, which is easy because Danish cycle paths are like a separate road system between the pavement and the cars, but I’m being too disorganized. The company bike has been standing in the hall for a year since I last used it, and they’ve lost the key. I’ve brought rollerblades over from England, but refrained from using them for fear that the skating motion would take up too much of the track to let the bikes past.
Thanks to Wikipedia for a link to The IGES Preservations Society, which merits attention. I can’t see an STL preservation society. Just a rant my me on wikipedia about it. I think my words could be edited down considerably, while preserving the meaning. As I said, all CAD/CAM integrations I know about go through the STL file, by accident of history.
Tuesday, June 20th, 2006 at 6:40 am - Whipping
A method, using a computer system, for manufacturing a part, said method comprising: receiving a model of said part; retrieving a predetermined rule from a plurality of predetermined rules stored in a computer readable medium; selecting a feature of said model by evaluating said predetermined rule, wherein said feature is assigned a feature type by evaluating a second predetermined rule, wherein said feature type comprises a plurality of keys, each key comprising a value from a plurality of values, said value selected from said plurality of values by evaluating a third predetermined rule; determining a process associated with said feature; and based on at least said process, generating computer code to manufacture said feature on a computer controlled machine, wherein said process is further associated with said feature type based on a feature case and a fourth predetermined rule, said feature case comprising said feature type and a combination of one or more of said selected values.
The last stanza probably needs a bit of work. I think the meaning can be explained in ten words or less.
Spent ages looking for a suitable plug-in for this blog for uploading pictures, before I realized that the reason I couldn’t find it was that the feature was already there in the basic wordpress install. Ho hum. Still can’t upload pictures straight out the the camera since the file sizes have grown faster than the internet. And while it makes thumbnails for you, it doesn’t tell you what you need to cut and past into the blog to make it work.
Here are a couple of pics from the weekend in North Wales. A stingray with a starfish which is running on its legs.
I’ll make a report from Denmark shortly. Still don’t know what’s happening. I’ve just installed a new Microsoft V8 compiler, which is free if you don’t want any of their nasty MFC stuff, which I don’t, since I use Python for the development user interface.
Wednesday, June 14th, 2006 at 7:15 am - Whipping
Slightly more agitating with UK government data. All I did was send another rant in an email to someone who forwarded it to a reporter they knew.
Just to put this into the international context, there’s no copyright held on any “Intellectual Property” produced by the US government. This includes maps, manuals, the law, software. This is because it has already been paid for, and the result is that everyone benefits because they can build stuff on the data freely without compromise or hinderance.
In the UK the public sector has been polluted with the policy that they must raise revenue from any information they hold. They can’t just give it out; they have to charge for it. This even applies to statistical data that companies have a statutory obligation to supply to them. So, for example, every local authority has to notify the Ordinance Survey (the mapping body) whenever they change stuff like road layouts, or build a new housing estate. And then they have to buy the maps back. These maps come with licensing agreements (because they are being charged for) so you can’t just put them online conveniently.
The same applies to the law, which is not free either. OPSI is the Office of Public Sector Information. What we did was republish the Parliamentary data, but in a form that could be searched and browsed effectively. Unfortunately, the director got the wrong end of the stick and called us “entrepreneurs” and a good “private sector organization”.
Julian Todd, an IT developer and co-creator of the site, adds: “As far as I know, we have had zero cooperation from the Opsi. It’s also bonkers … to call us ‘private sector’. We’re activists, without a business plan, and without respect for things like ‘parliamentary copyright’ if it can be perceived as an obstruction to democracy.”
I keep a simple logbook of IPs using the web interface and roughly what people are doing. So far we had users from all continents but Africa. Somebody in Brazil used it a few times, we have users in India, Australia, Canada, USA, all over Europe. Most people only spend a short amount of time, never change to another STL file and don’t seem to use the interactive rotation/zoom/pan. (Could these be bots? I don’t think so, because their IP are often pointing to broadband service providers, and a bot would have to pretend it is a mozilla firefox browser to come as far as seeing a STL file). Others come back regularly, uploading STL files and calcluating toolpaths on them. I think we should invite our users to fill out a survey of how they found out about us, what they use the web interface for, what they don’t like about it … that kind of stuff. Given that people from virtually all corners of the world find us, I find it a little disappointing that we get so few comments in this blog.