Developers Perspective: The new lofting tool

As we know, many of our customers use the point cloud viewer to measure excavations and building pits. With the 3D area tool, taking measurements and reconstructing the shape of a building pit is made easy. In addition, exporting these reconstructions to open it in your favorite CAD software does not pose any problems.

Having said this, it is not always necessary to manually draw in the walls because they are straight. Theoretically drawing in the ground and lid area should be sufficient, because the only thing missing is a connection between those two layers.

That's where our new lofting tool comes into place. You can now create walls between two 3D area surfaces automatically. The only thing you need to do is draw in the bottom and lid area of your measurement object.

Then the lofting algorithm creates walls.

That such a tool is handy is obvious, but how does the algorithm work?

By selecting the upper and lower area, you give the algorithm these areas as input in the form of points. This is represented as two points arrays.

The first step is to find the closest point for each point in the other point array and vice versa.

The next step is to form triangles. There are two possible cases. *In the first case (green), the only missing part is one line to form a triangle. *In the second case (pink), there is no connection from the closest point. In that case, the two points in the same array have to form a triangle together with the starting point from the upper array.

This algorithm has to be repeated until the circle is closed. The result is a perfectly fitting loft.

But the outline of the two areas has been drawn in the same direction. We use an algorithm to detect such a case to handle cases where the user draws both in different directions. Otherwise, the lofting algorithm produces modern art instead of an appropriate loft.

You see that this tool does not perform some sort of black magic. Instead, it just uses a simple but clever algorithm.

**The lofting tool is an essential part of our 3D Volume calculation tool, which we will present in our next developer's perspective blog.


Head of Development
Matthias Keim, dott.