Building Block Software
The Boundary Offset Experts
Click here to tell a colleague about Building Block Software
products | services | documentation | recommend | blog | contact |  

What is Boundary Offset?

(continued from left)

Why, then, even ask a computer to compute a boundary offset?

Well, imagine constructing -- with hand calculation -- the offset of the centerline of a 1,000 mile highway with thousands of little turns. Sure, you could do it, but you'd be bored stiff, and it would take you hours. A good computer algorithm will compute this offset in a matter of a fraction of a second, and you won't hear a word of complaint (unless the algorithm doesn't work very well).

As you may have guessed, Building Block Software offers a library of functions for computing boundary offsets. Why trust this library to work reliably? The answer is in the origins of the software.

The boundary offset algorithm was initially developed by John Keklak, who has spent more than 25 years working on this problem. He even has a patent (4,809,201) related to this area of computer graphics algorithms.

John, however, is not the main reason the Building Block Software boundary offset algorithm is so reliable. The main reason is that the boundary offset was first developed for cutter compensation for computer-numerically-controlled milling and turning machines, or more simply: "What path does the center of a milling tool have to travel to cut out a particular shape?"

This particular field requires a huge number of offset calculations, making it a great way to thoroughly test an offset algorithm. On any given day, a programming system for a computer-numerically-controlled milling or turning machine will compute thousands of offsets, and will most likely come across any and all bugs lurking in the software.

When the bugs start rolling in, software developers will usually "patch" the code until it becomes a fragile, unmaintainable mess. Building Block Software has taken another approach -- to refactor the software regularly to keep it clear and maintainable.

What's so hard about boundary offset algorithms? First it is essential to have a general algorithm that works for all cases. A lot of algorithms are not fully general, so they don't work in certain situations.

Then there's the bedeviling problem caused by small inaccuracies in most CAD geometry which can trigger a complete and catastrophic failure in even the best offset algorithm. All it takes is for two endpoints which look coincident to be separated by just a little more than the "computational tolerance". From the computer's point of view, the boundary may as well have a gaping hole. In such cases, most algorithms will proceed to blindly offset themselves off the computational cliff.

To make things worse, some applications need to compute offsets of offsets, so any little inaccuracy is magnified with each offset.

You can spend a lot of time dealing with these issues -- we know because we have.

This is not to say that today's CAD and CAM systems don't have sound offset algorithms. Many of them do -- on account of all the testing and patching. But if you were to try to get a copy of the offsetting part of their code, they wouldn't be able to give it to you. Extracting their offset code from their application would be an ugly and probably impractical thing for them or you.

On the other hand, the Building Block Software offset functions were designed to be integrated. The only things you need to be concerned about is the input (i.e. the curve geometry of the original boundary and offset distance) and the output (i.e. the curve geometry of the offset boundary).

So if you are working on a software application that needs to compute boundary offsets, you will most likely come out way ahead with a library of functions. If you want a library that many users call the most reliable offset functions they have ever seen, then you'll want to get a copy of the Building Block Software NC Engine CAD/CAM Developer's Kit.