In the Modern Design World, Solid Modeling is Not Enough

MachineWorks has sponsored this post. 

With everything in the world being designed in 3D and almost all of it represented precisely with 10 degrees of precision, with everything smooth and straight, we may have missed a very important detail: the real world is anything but smooth and straight. Objects in the natural world are at best curvy, but sometimes craggy, jagged or random—no two snowflakes are alike, mountains are not cones and the Earth is not exactly asphere. Even man-made objects that are originally represented as perfect geometry exist with shapes that are not quite perfect—their imperfections a result of manufacturing fallibility.

A 69,000 polygon model (right) created for fast rendering in augmented and mixed-reality applications. Original 5.4 million polygon CAD assembly (left) was reduced using Polygonica’s shrink-wrapping and simplification algorithms. (Picture courtesy of MachineWorks.)

Think of the highly precise laser scanners that return a point cloud consisting of millions, if not billions, of points with X, Y and Z coordinates. The points form polygons, usually triangles, which are connected to make a faceted (not smooth) surface. Despite the great detail possible, the polygon mesh can be inaccurate or unrepresentative of the object or scene being scanned for a number of reasons.

For example, scanning a doorknob. The scanner will not return a smooth model representative of the molded parts that constitute a doorknob. It will not look like one because it will be faceted, and it certainly won’t behave like one (a mechanism).

What a Fine Mesh We Made

Another type of modeler is needed to handle these irregular shapes, such as those generated from 3D scanners. The creators of Polygonica thought the same thing. Most solid modelers try to represent natural shapes and manage objects with a mix of simple primitive shapes based on their geometry kernels but are unable to handle all the objects being scanned. Because the tools were insufficient, creating NURBS-based representations of objects was, if not a lost cause, at least a cause that needed lots of help.

In 2010, MachineWorks created a mesh modeling engine called Polygonica, specifically to fix, manipulate and optimise the polygon mesh models that were appearing with increasing frequency.

Metal printed cranial plate implant began as a scan, healed with Polygonica, with the implant geometry modeled directly as a mesh using Polygonica. (Picture courtesy of Renishaw.)

Generative Design

One type of computer aided design is generative design, which is widely touted by its champions, Autodesk and Altair, as being able to produce natural shapes by virtue of the bone growth algorithms on which the software is based.

When a bone fracture mends, it produces a gnarly bump during the month or two of healing. Over the course of the next year or more—depending on the age of the person—this bump is “remodeled” until the healed bone is smooth again.

This process of adding material where it is needed and removing material where it isn’t has been duplicated in shape optimization programs. Successive simulations will add material where stresses are high and remove material where stresses are low. Given enough time, generative design should converge to smooth members. But time is precious, and the generative designs we’ve seen are always lumpy. The generative design cannot be accurately and efficiently modeled with the smooth surfaces of geometry kernels so 3D polygon meshes are used.

Idealizing the World. How Did We Get Here?

How we model the world is limited by the tools we have to model it. On drafting boards, we designed with straight edges and compasses, and on rare occasions, with a French curve or a mechanical spline. In software, these mechanical drafting tools were replaced with their CAD equivalents. We were seduced by CAD’s neatness and precision, not realizing we were still bound by our tools. Our designs still turned out the same, with straight lines and arcs. Going 3D was a revolution.

Or was it? Our designs were no different; still straight and square, and our buildings were still boxy, because the 3D CAD tools had all been made with geometry kernels that were all about straight and square. Rounding something was a challenge—and still is. The simple physical act of rounding a sharp edge, which a machinist will do to a part in seconds with a hand file, can break your conventional CAD modeling engine. Filleting, or making surfaces blend together such as wings to a fuselage, often sees the same result. And you can forget about modeling anything made by nature, such as trees along the roadway.

The most popular geometric kernels are Parasolid, by Siemens Software, and ACIS by Dassault Systèmes. PTC created its own kernel, Granite, and Autodesk products were ACIS-based until they decided to veer off on their own. Dassault Systèmes now offers CGM, the modeling kernel inside CATIA. All of them are based on surface representations broadly similar to NURBS, non-uniform rational B-splines, which are good at modeling what is straight and square but have to stretch to-accommodate curvy objects, which have to be represented with B-splines.

SubD modeling, a separate class of geometry manipulation, lets the user subdivide a surface by pushing and pulling on it to deform it. Work with subD long enough and you can actually make natural-looking objects. We have seen a chair, and even a human face, being teased out of a block. But as versatile and malleable as subD modeling is, it has not entered mainstream CAD modeling, though it has been offered as an add-on to a few widely used CAD programs.

3D Laser Scanning

A modern 3D laser scanner will have no trouble generating billions of precise points. A mirror flips a laser beam up and down while its head spins to return a point cloud. It is a 3D geometry exercise for algorithms to connect the dots into triangles (or other polygons) to make a mesh surface. The triangles are created based on three points in close proximity. The scan should be discernible, a representation of whatever was scanned if the surface can remove hidden lines.

But there’s more. The triangular mesh—called a digital terrain model (DTM) when a scene is scanned—would be more useful if objects could be recognized. Imagine one of the common applications of a 3D scan: a process plant, containing a dense network of pipes, valves, pumps, instruments, supports and walkways. Billions of points can be generated and a polygon mesh created, but how are users to distinguish a pipe from its hangar? How would they know it is a pipe?

A laser scanner can also only see from its point of view. The entire side of the object not in the line of sight of the scanner is not be captured, resulting in scan shadows. To try to complete the picture, scanners are repositioned several times in a room or space. However, a 100 percent full scan in a tight, crowded space is an unattainable ideal. For outdoor scans, drone operators will plan very creative flight paths, looping around a bridge to saturate an object with points. However, areas of no scan will persist.

Structural simulation of dirty polygon-based geometry in under 30 seconds made possible by the combination of Polygonica and ANSYS Discovery Live (Picture courtesy of ANSYS.)

CAM Roots

MachineWorks was founded in 1994 and is based in Sheffield, UK. The company’s initial product and its name are one and the same. MachineWorks simulates CNC machining, allowing you to verify tool paths on the screen before you commit to cutting metal.

“What is relatively unique about the MachineWorks engine is that it based on a boundary representation (BREP),” says Dr. Fenqiang Lin, one of the original two core developers and now managing director at MachineWorks Ltd. “It is fast enough to cope with the hundreds of thousands of complex Boolean operations needed to simulate cutting CAM tool paths – because the BREP is built on polygon meshes.”

CAD/CAM vendors Vero and Dassault were early adopters. “Nine out the top twelve CAM companies integrate MachineWorks for CNC simulation,” says Lin.

Working with Okuma, the Japanese CNC machine tool manufacturer, MachineWorks helped develop the first on-machine collision avoidance system. “We’re very proud of that,” says Lin. “We did a lot of optimization work to make sure the Boolean completed in the required millisecond cycle time on the controller. A lot.”

Solid modelers SpaceClaim and CimatronE, acquired by ANSYS and 3D Systems respectively, were early adopters of Polygonica from the CAD/CAM world. ANSYS later signed an enterprise agreement allowing them to roll-out Polygonica as a mesh pre and post processor across their entire product line.

Let the healing begin. Surgical guide modeling on a dental scan using Polygonica’s healing, offsetting and Booleans A polygon mesh can be missing an element, which is impossible to detect in a wireframe mode, but apparent with a shaded model. Sending a polygon mesh with the missing element to a 3D printer would have resulted in a hollow shell—a useless 3D print. Polygonica will detect the missing element, repair it and make it into a solid. (Picture courtesy of MachineWorks.)
Another early adopter was Renishaw who licensed Polygonica for their dental business to 3D print dental parts such as crowns. Polygonica finds and fixes holes as little as the width of a laser and creates a watertight model, which left unchecked would result in a dental surface thin as an eggshell, rather than solid tooth.

Programming is Overrated

“We don’t look for coders,” says Lin. “We hire mathematicians, mostly, with the rest from physics and engineering, currently all from top UK universities. Eight of our twelve core developers are PhDs.”

“First and foremost, we are looking for problem solvers. We give our developers a problem,” Lin says, “And we give them the freedom and the time to come up with a solution. There’s time to play. To think freely. Problem solving is what we are after. Once we find the right people, we can teach them how to code.”

And it’s not easy to land a job with MachineWorks. “It often takes a year or more for us to find the right person who can get through our rigorous hiring process,” says Lin. He also emphases the long-term in software product development, rather than the ‘what’s hot now and what we can sell tomorrow’ approach.

The Business of Polygonica

Just like the major geometry kernels, Polygonica is licensed to vendors, including CAD, CAM and CAE vendors that need to process meshes. MachineWorks currently counts 38 customers for its Polygonica software development kits (SDKs), including many leading 3D-printing companies such as 3D Systems, Stratasys and Renishaw. The software libraries work namelessly inside the larger programs. Polygonica does not show off its brand, and its users have no idea they are using it.

MachineWorks saw point clouds on the horizon, as well as the triangulated mesh surfaces that resulted from them. The rapid rise of all kinds of scanning and scanner companies in the new millennium complemented existing medical MRI and CAT scans. Digital dentistry exploded.

And while polygon meshes had long been the representation of choice in games and CGI they were also the basis for most algorithms developed by the downstream consumers of CAD designs such as CAM toolpath generation and CAE simulation.

“CAD models, based on NURBS, were the exception,” says Lin. “Though widely for design, they were mathematically complex when it comes to actual manufacture.

MachineWorks identified a lack of support for a more general polygon mesh modeling and manipulation solution aimed at industrial 3D software. Using the engines and technology they had created for the CAM industry they started focusing on the Polygonica geometry kernel in 2010.

“It wasn’t easy to convince big CAD/CAM/CAE companies of the value of Polygonica at first”, says Lin. “Most CAM and CAE companies already had decades of experience working with polygon meshes while most CAD companies preferred to try to support a reverse-engineering approach to convert the meshes into their native CAD engines. The problem is that even with the best solutions reverse-engineering is complex, slow, time consuming and memory intensive. The fact the major CAD kernel vendors are now also developing their own polygon mesh modeling solutions shows that this technology is here to stay.”

“At the point we started the Polygonica product we’d been demonstrating our expertise in mesh modeling for 16 years and had captured and maintained dominant market share in the CAM market. Building on that technology in Polygonica, slowly but surely we’ve demonstrated how well these algorithms are implemented such that they’ve been adopted by major vendors like ANSYS, SpaceClaim, Cimatron and OpenMind.”

How It Works

3D prints are commonly created from stereolithography (STL) files that are faceted approximations of exact, regular and smooth geometry from solid modelers. Attempts to represent the CAD geometry with a mesh of polygons which is faceted by nature strive to provide complete, closed or watertight model approximations, but do not always achieve them. Often the 3D print will fail because the 3D mesh is not quite right.

Let the Healing Begin

Polygonica checks for watertight, self-intersection free, printable models as part of its printability check.

“There’s a general need for model healing in the industry and that isn’t restricted to polygon-meshes or additive manufacturing,” says Lin. “For example, even assuming the original design has been modeled perfectly, every time you transfer data from one system to another you might need to heal it. The core component technologies that the world relies on to build cars and planes have offered healing for their NURBS-like models for fifteen years or more, and more recently have been working on similar healing capabilities for polygon-meshes.”

“But we have a big head start,” says Lin. “We’re years ahead in most aspects. We have been healing meshes for twenty years and our healing algorithms make extensive use of the Boolean engine that is tested every day by users in the CAM industry. Throw a mesh at Polygonica and more than 99% of the time it will automatically heal it. Our customers have described it as like magic.”

Another key feature of Polygonica’s approach to healing is that it only modifies the original mesh where it needs to. It preserves the original meshing as much as it can.

“Alternative approaches chop the mesh into small parts, voxels, and then rebuild,” says Lin. “That should give a healed result but the original mesh can be very different, which can be a problem for high-end manufacturing, particularly aerospace.”

“However, the long-term focus of Polygonica is not healing but modeling,” Lin continues. “Healing is just a very useful first step. With the mesh, whatever its origin, our aim is to reduce the need for it to be reverse engineered in order to model with it.”

“Most current CAD modelers start to choke if you load in and work with even moderate sized mesh models. This is a problem as you either need to purchase expensive dedicated reverse engineering tools, or remodel the part from scratch.” says Lin “Polygonica can work natively with these larger meshes.”

“Going from polygons to CAD is really hard but going from CAD to polygons is relatively straightforward. So, if you’ve got to combine a CAD model with a polygon model, from a scan for example, then converting the CAD model to polygons and using Polygonica is likely to be a lot faster and a lot simpler.”

“And Polygonica is really fast”, says Lin. He describes production centers in the automotive sector using Polygonica to thicken sheet bodies of large complex car panels. “Polygonica does this in under a minute while mainstream CAD systems take several hours,” he says. “The results are not a CAD model but for detailed planning in the manufacturing process, they are accurate enough.”

“I’m really proud of Polygonica’s lead in polygon mesh healing, Booleans and offsetting but that shouldn’t be a surprise to anyone who has worked with MachineWorks over the years. But each year we’re adding more and more functionality to Polygonica – feature detection, simplification, smoothing, fairing, curvature-sensitive hole-filling, shrink-wrapping, anisotropic offsetting, curve offsetting along a surface, gluing, clash detection. The list goes on.”

Although Polygonica is often associated with additive manufacturing, MachineWorks’ strategy is more general.

“There’s a cross fertilization of ideas going on,” Lin says, giving examples of algorithms developed to more accurately adjust for shrinkage on additive machines that are now being used in the construction industry to check access conditions for people, machines and materials during large construction projects. Another example he gives is an algorithm developed to create levels of detail for the VR/AR/XR industry that has also been used to better create meshes from laser scans of underground tunnels.

“We focus on the math and geometry,” says Lin. “We let our customers own their domains.”

A mining we will go. Boolean operations between a topography and the open pit design. (Picture courtesy of Alastri.)
The same Boolean engine MachineWorks developed for CNC simulation is now used in mining, subtracting the DTMs of open pit mine designs from the current excavation to calculate the volume to earth that still needs to be removed.

“The real world is a rather complex place and we need all types of data and data structures to capture it, monitor it, model it and display it.” says Lin. “That means we need CAD kernels, polygon mesh modelers, voxel engines, point engines and a whole lot more. Our goal is to focus on only one bit of that – to make Polygonica the very best polygon mesh modeler you can buy.”

To learn more, visit Polygonica’s website at www.polygonica.com/.