Those that know me know I love a little math and logic challenge – the more moving parts the better! This is something I coded as a proof of concept / talent showcase. It is a Bore Pit Calculator – designed to allow field surveyors and engineers the ability to do instant calculations in the field to produce;
- Floor surface(s) of Entry and Exit pits
- Width of Entry pit given separation of bores (oh yeah this sucka can handle multiple parallel bores)
- Total footprint of pit and benches
- Set-out points of each corner of each level.
It takes less than a minute for the user to input the bore parameters and have a CSV and 3d Model of the pit exported. This can be completed in the field on a Survey Controller (or laptop) and evaluated immediately on site. If after running through the process it is found the footprint does not fit within the Right Of Way (or breaches some other parameter). The Bore can be moved quickly and easily with minimal effort.
Bonus prize, the 3D model can be loaded to Machine Guidance software for immediate construction.
I guess this must be in use everywhere then? Well no, the process is simply too fast and in the wrong hands it could be dangerous. Think of this scenario, a Surveyor completes a quick site detail in under half an hour, determines the surface elevation datum to input, inputs the parameters to the software and less than a minute later can mark out the footprint and load the model to a machine. Construction starts – but there’s no Engineer sign off, geo-reports, service identification etc. So whilst this is a great little program in theory – it would take some balls to actually use to get the full benefit of it.
Why code it then? Why the effort?
Like I said; this is a proof of concept and talent showcase. I write lots of little code like this and flash it about in an attempt to draw other peoples more practical innovative solutions into the open – and help to work on them. If people won’t know what you can do, they don’t know that you can help them and you might miss out on a very cool idea.
Where’s the code!
Some of the code I won’t discuss here because it’s heavily documented in the soon to be released coordinate mathematics library I’ve been building for a few years now. But, at a high level – I can certainly discuss how it works.
The code is written in Python3, and runs in a terminal window. If I were to build on this I’d definitely stick it under a GUI. As always, the user has to sit through some pretty detailed parameter inputs – there’s no complaints though as this does reduce a very hefty workload! Top, width, separation is determined as well as the benching information.
Two of the parameters the user is required to input is the start coordinates, and the bearing of the bore (direction). Using this, along with the length of the bore and other given parameters – a series of points are calculated – in 3D, and their points added to an array of points. To enable these to draw, a “feature code” is attributed to each point. Those with a survey background will understand this as a simple code attached to a point that describes what the point is; more often than not these days a feature code will have a predetermined list of attributes to store more information about the point.
Still with me?

I attached multiple feature codes to each point, to allow points with common feature codes to be joined together – aka they were strung. This is what gives the user that full 3d view, rather than just a bunch of dots sitting in space. This was a little difficult as I had to implement a number of counters and they all had to be bang on so that each level could be properly interconnected.
Is it useful?
As I said earlier – it’s probably more dangerous than useful if it was implemented in it’s current format without any checks and balances, and, once you implement the checks and balances you’re really doing away with the efficiencies it provides. That said, it’s not a complete waste of time, it is a showcase of my skills (from a year or two ago I’d like to think my code is always improving!) and it is a showcase of just one of the many functions my coordinate mathematic library can be used for. I have a few other examples of this – which were detailed on my old blog and I’ll put up again here over the coming week (with full code reviews!)
If you have any ideas for custom scripts or programs to make your work life easier, reach out to discuss!