Freesteel Blog » Machining

Tuesday, October 21st, 2014 at 1:36 pm - - Machining

To make up for my disorganization with the data collected at my house (in that it got lost, was not frequently sampled enough and didn’t happen over the winter), I got this lovely temperature sequence from megni to analyze for my exponential decay theory which took a reading inside their cottage every 60 seconds.

tempseqraw

My theory is that by fitting exponential decay curves to the data I would get some invariant values relating to the fabric of the building that would change when you improved its insulation characteristics (eg draught-proofing a window).

The first step is to chop of this data into the sections where the temperature is dropping down. It took a while to get some working code, but it came like this:

gw = 30   # half an hour
sampleseqs, sampleseq = [ ], None
for i in range(gw, len(samples):
    vd = samples[i-gw][1] - samples[i][1]  # positive if past temp higher
    if vd >= 0:
        if not sampleseq or vd >= mvd:     # restart seq at bigger difference
            sampleseq = samples[i-gw:i]
            mvd = vd
        sampleseq.append(samples[i])
    elif sampleseq:
        sampleseqs.append(sampleseq)
        sampleseq = None

tempseqrawdeclines
(more…)

Tuesday, October 14th, 2014 at 12:37 pm - - Machining 1 Comment »

Suppose we have a temperature sequence like this one gathered from last September in our kitchen when we started to put the fire on in the late evenings. The central heating wasn’t on yet, so there’s no second temperature “bump” in the mornings. (The three bumps in the first peak are the three logs we put on the fire.)
expdetects3

You get an appreciably square looking graph by plotting the data as units of an hour in X, and units of a degree centigrade in Y, so a 45degree slope would represent a 1 degree difference per hour, which is the right scale of change in our environment.

My immediate observation from the first moment I saw such a temperature sequence (roughly in the middle of last summer when we visited megni in North Wales) was that these are exponential decay curves.

The trick is to find them and fit them.
(more…)

Tuesday, October 14th, 2014 at 10:42 am - - Machining

Friday evening I made a visit to the Berlin Fab-Lab open day. They’ve got a heck of a lot of 3D printers in a small space. All kinds colours and materials, from brittle and hard to rubbery plastic. I think they also build their own kits. (I asked them if they’d heard of the Autodesk Spark, and they hadn’t. It’s great to be out in the big wide world!)
OLYMPUS DIGITAL CAMERA
But just as they find in DoESLiverpool, the 2D laser cutter gets the most use, because we can design things in 2D for a fraction of the effort.

The weekend was blighted by a desperately bad headache which was entirely unlike a hang-over that confined me to a dark room. (Hang-overs tend to release at around 8pm the following day for me.)

On Sunday afternoon I started to do some work.

Firstly, I discovered that all my laser scanning data was lost on the Autodesk computer which I gave back last week for disposal, so I can’t work on that software till I get some more, probably by going to Bristol and making the device work again.

Then I discovered that almost all my temperature sequence data was also lost on that same computer — although I do have 6 days of records from some time last September before the cold weather properly set in and we got some actual useful data. Whether I can find it anywhere on an SD card, or I have to collect some data all over again with a new Arduino set-up of my own making will have to wait till I get home.

For convenience, I’m putting the maths of exponential decay curves into a separate blogpost.

Here’s a picture of some not very spooky pumpkins in the local supermarket.
OLYMPUS DIGITAL CAMERA

Also, I spied a poster for the newly opened Happylab Salsburg. Might be one for a drop-in next expo.

Maybe these are like computer clubs were back in the 1970s. It’ll all make sense in hindsight one day.

Thursday, October 9th, 2014 at 3:43 pm - - Machining

I’m casting around for some little long term geometric projects which I could be good at. I’m very bad at the sysops stuff and compilers (which seems to be a breeze for every other hacker in the world). Plotting the geometry which you have calculated is also a drag.

For me, twistcodewiki does it all.

I followed the instructions to compile OpenVoronoi on this very small under-powered linux netbook I have kicking around, and got twistcodewiki to work. Here is me entering a polygon and plotting a voronoi structure from it:

ovdscreenshot

The code is as follows:
(more…)

Wednesday, October 8th, 2014 at 5:13 pm - - Machining 1 Comment »

I seem to have teleported into the Berlin Startup Bootcamp 2014 to see my friends at Housahedron. No doubt the prospect has evolved somewhat in the weeks that they have been on their own.

stbcwnn
Doesn’t matter in the long term. I am still absolutely certain that this will be a consumer product, like a TV or a microwave oven. Every house will have one.

I think I am coming down with my winter cold. Lethargy and crawly skin. The train journey from London was a lot tougher than it should have been. I am now back on my old pre-Autodesk laptop. There was a bit of panick getting the Webgl drivers to work so I could run my essential twistcodewiki system. Then I chatted with Mr. Heeks of HeeksCNC and made an inspection of the state of the art in the Open Source CNC world. It’s waiting for the time when geeks own their own machine tools so they are not only in the hands of professional engineers who don’t like to program.

The whole HeeksCAD UI is in C++ wxWidgets and too complicated for me to compile (especially as I’ve uninstalled the compilers), but it works by writing out a short Python program that it runs in a separate executable which links against area_funcs, libarea and nc (for the post-processor) in ways that rely on the global namespace (ahem).

webglheeks
Anyways, I’ve just managed to get it to operate in my WebGL system, so the point is proven. Don’t know where it leads, but one of the intentions is to get a computer system that drives a machine tool directly in a tight feedback loop in a similar manner that it would drive a car — ie not by generating all the motions of the steering wheel off-line and simply replaying them from a file. That would be some innovation that I cannot ever see happening in the real world, because the idea is not an incremental change strictly limited to one of the hardened silos in which this field of engineering is strictly divided.

Other projects not touched on yet are my laser scanning software (I’ve lost my sample files), the undemocracy scraper, tunnelx cave surveyor, triangle machine tool kickstarter, and some android phone apps.

Monday, October 6th, 2014 at 4:07 pm - - Machining 4 Comments »

This CEO of Autodesk has taken everything I’ve made in the field of machine tool software in return for some stock options that I cannot cash and a crushing of my spirit. Nevermind the price; I need to get out before I lose my mind.

This is the time to create negative publicity for myself. The teflon was scraped off years ago. Burning your bridges is alive in the hackspace.

Is it inevitable that any large hierarchical organization will deteriorate into a pool of grease and bureaucracy around one exquisite bubble containing the CEO?

Since he possesses the sole discretionary power of patronage and the gift of money, the sapiens do gather round and stare as if at camp fire. No one is permitted to spit.

Well, it depends on the man, on whether he is paranoid about complacency, or dives fully in on the power trip and goes mental:

The first thing that happened when I became CEO was I got much funnier and smarter… I would say there’s a part of it that you can resist and resist and resist, but there is a part of it where there’s a whole organization or a world around you that looks out for you in a weird way.

Still, it must be tough at the top of a creaking ten billion dollar thirty year old software corporation, raking in the multi-millions of dollars that awarded during this post-financial crisis corporate CEO pay bubble era.

Meanwhile, paradigm-shifting software products are popping up left and right out of nowhere within miles of your downtown San Francisco offices, and nothing happens on your patch. The magic has gone. You can pay over the odds for any tech start-up you like, but you’re not fooling anyone. It’s simply retail therapy.
(more…)

Friday, September 26th, 2014 at 11:02 am - - Machining 2 Comments »

I have a US passport because my dad is American. I’ve never lived or worked there in my adult life, because I am British, so I didn’t know you had to pay tax on everything, because the Internal Revenue Service does not believe there is such a thing as not belonging to America. They’re an empire. Everywhere else in the world is foreign, so you have to send your money back to the homeland — even if it’s not your home.

If you are a U.S. citizen or resident alien, the rules for filing income, estate, and gift tax returns and paying estimated tax are generally the same whether you are in the United States or abroad. Your worldwide income is subject to U.S. income tax, regardless of where you reside. [source]

(more…)

Sunday, September 21st, 2014 at 3:51 pm - - Adaptive 2 Comments »

Lot’s of stay-down linking work going on. Sometimes I worry it’ll never work. While Becka has been caving, I’ve been working through the weekends in the empty bedrooms of Bull Pot Farm, (occasionally interrupted by horrible hangovers).

Here’s the checkin changes of a beast of a file.
shedcode
It’s like building a dry stone wall: I can’t remember any of what I’ve done; I only know what move is next. It’s an incremental procedure. New problem cases crop up, and you go away, have a cup of tea and come up with a solution, and keep repeating in the hope you don’t run out of ideas before it gets fixed.

The basic steps of the algorithm are as follows:
(more…)

Saturday, August 16th, 2014 at 7:25 am - - Adaptive, Cave, Hang-glide

It rains and rains and just won’t stop. It’s also gotten pretty cold and I’m having to wear all my clothes that aren’t damp from lying in the tent. The last day of warm sunshine was six days ago where I stood on takeoff for 2 hours as paragliders wafted past and went down in the totally dead air of that day.
OLYMPUS DIGITAL CAMERA
See the smile? I want more flying. Some canyoning would be good too, but it ain’t going to happen on this trip.

When I finally took off I flew in a direct straight line across the valley beyond the highway and golf course, and then had to walk 5 miles back via an ice cream stand to Base Camp for a lift back up the hill, after which I drove down, fetched my glider, and drove back up again for the walk up to Top Camp (the Stone Bridge).
glideland
Here’s the outside view of Top Camp:
topcampsite
And this is the inside:
OLYMPUS DIGITAL CAMERA
It’s both a rock and a hard place with nothing in between, but it is still better than tents because it is larger, cavernous, and not like a box of damp fabric that progressively rots things as each day passes.

I dropped into the far end of Tunnockshacht down to the new connection to Arctic Angle. Becka was away with the Austrians on a different expedition and couldn’t warn me that it was going to be an unutterably deep one. That wasn’t the problem. The problem was getting terrifyingly stuck in a U-bend crawl while weaseling around the C-leads waiting for the guy with the drill to rig a rope traverse along a ledge of an undescended shaft to access the phreatic continuation. Then we surveyed about 100m until it crapped out, and hauled ourselves back out by 2am.

I forgot to take any pics, so here’s a photo of a nosy horse’s nose:
horsenose
On Tuesday I went to the newly discovered Balconyhohle. (The horizontal entrance is from a ledge within the side of a hole.) I was cold and had to keep eating. We killed a couple of going leads there too, but there’s enough unexplored ways on to keep this one spreading further underground. This has been the big find of the expedition. It’s a lot of work to keep up with the mapping.

Here’s a picture from the walk back to the carpark from Top Camp in the morning:
braungap

Since then I’ve been working on the Adaptive Clearing stay-down linking killing the bugs one at a time while all my HSMWorks buddies have been at a big planning meeting in Copenhagen this week. It seems like an endless grind. Anyway, I don’t plan to go there again, and the ferry between the UK and Denmark is being terminated this September.

One of the things that crashes the system is when the A-star linking can’t find a way to connect from point A to point B, and spreads out through every single cell in the dense weave until it runs out of memory.

One obvious solution is to generate a weave that has a wider cell spacing and solve the routing issue in it, but this is too complicated. I worked out another way, which is to deny it access to most of the interior cells of the fine weave that are nowhere near the boundary or on the theoretical direct line route. The A-star algorithm is so powerful that it will find a way round, even though the domain would look so much more complicated. This initial result becomes the starting solution for the linking path, on which the PullChainTight() function is called. This is actually a bad name for it. It should be called RepeatedlySpliceStraighterSectionsIn(), but this discription wouldn’t remotely be so compelling to the imagination.

This will get implemented only if absolutely necessary. The thing about the linking routine is that it does not need to work 100% of the time, because it can always fall back to the old way of retract linking, which is what everybody puts up with right now, so it might not be worth expending too much effort for the last 2% of awkward cases where the reliability is going to be questionable anyway. In software development the trick is to know when to stop.

Time to work on some cave surveying software today. Maybe I’ll get a flight in tomorrow. Hope so.

Thursday, July 31st, 2014 at 10:05 am - - Adaptive

We’re having some classic Austrian weather right now. It’s been rodding it down since 5am. I’ve been eating Egg And Chips enough times for it to lose its special status.
OLYMPUS DIGITAL CAMERA

Most everyone else is caving at the minute. I haven’t seen Becka in 5 days. I’m waiting for better flying weather.

This is a great time to get some work done on these pesky stay-down linking in the Adaptive algorithm.

Here is an example of the A-star linking path calculated in its setting of the rest of the cutting toolpaths, so you can see how it fits in. The path must traverse through the area without colliding with material that hasn’t been cut yet. This image is of the first iteration. There’s a secondary process which pulls the path of light blue dots tight within its structural matrix once it is connecting in the right direction.
linkingends3

What I mean by the right direction is the way that the path rolls off the preceding path and rolls on to the next cutting path. I can calculate the shortest path reliably now, but it would sometimes result in going 180 degrees back on itself if it’s shorter to go round the circle, so the trick is to artificially insert a circle of exclusion that it has to avoid as it finds its shortest trajectory.

This worked well most of the time, except that the path would sometimes go the wrong way round the circle. It doesn’t know any better. It just finds the shortest path which it can. So I inserted this radial blocking line to block off paths that started off the wrong direction.
blockedlinkround1

And of course sometimes the radial line becomes a liability and the stupid shortest path thing has to go all the way around it when it should be coming in to the path nice and smoothly. I just worked this one out this morning.
blockedlinkround2

It takes ages to discover these errors in the data, looking at unusual tool motions in real examples, and trying to separate them out into the debug development environment so they can be analysed and plotted.

In computational geometry, if you can’t see it, you can’t debug it. In the real world you’d hope that a corporation that depended on vast quantities of computational geometry would have a dedicated team helping programmers visualize their messed up algorithms, so they don’t have to hack up crazy things like my “webgl canvas”.

I’ll spend the rest of the day getting to the root of this one, I guess, and then be one insignificant step closer to finally getting this out of the way.

I don’t deserve to enjoy any flying until I do. Nor do I deserve another egg and chips.