Reverse Engineering With T-Splines And Rhino

At the outset I would like to say that T-Splines is not a reverse engineering software. It is an organic modeling product implemented as a plug-in for Rhino. In my quest to get a NURBS model of the Porsche 911 GT3 I started looking at reverse engineering software with the intention to cook up the NURBS model of an object from its mesh representation. One of  my readers suggested that I try T-Splines. I got in touch with Matt Sederberg, Founder and CEO of T-Splines, and he gave me a license, with a reminder that his product was really not designed for what I was trying to do. But that didn’t stop me.

So after playing around for a while I have arrived at the conclusion that T-Splines can indeed be used to reverse engineer a NURBS model from a mesh. But there are a couple of limitations which I will get to later. First let me explain the process. It basically consists of three steps:

  1. Convert mesh to T-Spline mesh (using the tsConvert T-Splines command)
  2. Convert T-Spline mesh to T-Spline surface (using the tsSmoothToggle T-Splines command)
  3. Convert T-Spline surface to NURBS surface/solid (using the tsConvertToRhinoSurf T-Splines command)

Here is how I converted the main body shell of the GT3 using literally four mouse clicks (one object pick and three menu picks for the three commands). You will need to click the images for larger views to see the object properties window more clearly.

The original mesh. Note that the object type in the object properties window says “mesh”

This is the resulting T-Spline mesh after running the tsConvert command. It looks just like a normal Rhino mesh.

This is the resulting T-Spline surface after running the tsSmoothToggle command. Although it looks just  like the T-Spline mesh above, the vertices of the surfaces are actually smoothened out.

And this is the final Rhino polysurface (NURBS) after running the tsConvertToRhinoSurf command.

Now for the limitations. First of all, the mesh must be a quad-dominant mesh. This means that most of the faces must be quads and not triangles. If the mesh consists of only (or mainly) triangles there  is a high probability that T-Splines will run out of memory. The reason for this is the T-Splines mesh conversion is similar to sub-division surfaces. It basically smooths the mesh vertices. This is different from a true reverse engineering system which fits a surface passing through the vertices of a mesh.

The second limitation is that since T-Splines has a sub-division surfaces kind of a mindset it cannot be used to reverse engineering objects with sharp feature edges and corners. For example take a look at what happened to this mesh when I ran it through the three T-Splines commands I mentioned above.

This is the original mesh to be reverse engineered

Notice how the resulting surface got messed up at the edges and corners

Nevertheless after hacking away at the meshes for a while using the three T-Splines commands I could convert most of the parts of the GT3. However, there were times when one of the three T-Splines commands failed and then I had to resort to Rhino’s MeshToNurb command which convert each triangle or quad in the mesh to a trimmed planar NURBS surface and stitches them up together. That bloated the Rhino model considerably.

Like I said, T-Splines is not designed to reverse engineering meshes. But frankly I was quite surprised that it was able to give me NURBS models of a number of parts of the GT3, especially the outer body shell. After I was done, I checked the Rhino file size. It was a whopping 500 MB, mainly because of all the solids created by the MeshToNurb command. I tried saving it out to IGES or STEP and Rhino ran out of memory, which was to be expected. In fact, I should be happy that it stuck with me for so long.

Here is a quick render I did in Rhino. All the objects in this model are NURBS surfaces or polysurfaces. No meshes. So I guess I was able to finally cook up my NURBS model of the Porsche 911 GT3 using T-Splines and Rhino.

T-Splines is priced at $599. If you don’t have Rhino you get a Rhino + T-Splines bundle for $1495. You can download a 25-save trial of T-Splines from here.

This is an example of what T-Splines is really used for. To see more example, you can visit the T-Splines Gallery.

  • murray

    I tried t-splines too, but I think the expectation that it take the entire .obj and spit a bunch of nurb surfaces out at the end is still one for the future. It would probably work better if it were to be attempted with fewer components, say, the meshes that compose the body skin, rather than the whole shooting match. There’s an english guy, Marcus Bole, who’s a naval architect and software writer. He releases some of his software through his site. PolyCAD is an interesting program that recognises the similarities between polylines and curves, an quad meshes and nurbs, and can flip one to the other, rebuild and subdivide. Much more manually-oriented than most CAD, although it has some scripting built in, and it doesn’t trim nurb surfaces, but it’s a great learning tool, and good for analysis. It has some “why aren’t they in every CAD program?” tools, too. Worth a look. I’ve used it to rebuild simpler meshes as nurb objects.

    • Murray, even expensive reverse engineering software does not do a good job at automatically converting a mesh to NURBS model. They may work for relatively simple meshes. But for something as complex as this car, that is simply out of the question.

      As of today, to get a respectable result from reverse engineering you need to be ready to do some manual intervention in the conversion process.

  • Michael Gibson

    Hi Deelip, it kind of looks like the mesh that you have highlighted in your first few screenshots here probably did come from a subdivision surface polygon modeler. But the problem is that it’s already been subdivided a few levels to produce a kind of static model for rendering.

    I think that to get a better and not as heavy NURBS result you would ideally want to convert the original sub-d control polygon cage using your steps instead of converting an already subdivided result which has quite a lot more polygons in it.

    • True. But the problem is I don’t have access to the original subd mesh.

  • Tspline

    For the last cases (with sharp edges) did you try the tsCrease command to remove smoothing done by TSpline ?

    • No, I didn’t. Not very familiar with your technology. I need to change that. 😉

  • D.K

    tsCrease isn’t that great. You need to have perfect poly layout in order to have any real control over it.
    Tsplines would be great if it were better at handling surfaces that combine organic and hard edges as most automobiles have.
    As it is now, you spend more time experimenting with poly flow than anything else. And even then it is not accurate at all. Standard poly modeling is more accurate and predictable! I’d just use it for super rough visualization. I might use it as a basis for manufacturable geometry if it were simple extrusions like that ring or something more organic like a toothbrush.

  • The most ingenious reverse engineering software does not guarantee succeess. In your case, it would be easy to convert a simple mesh into a NURBS model. A more intricate mesh would be a lot more tricky though.

  • Rajeev

    I read your blog quite regularly, but this is my first post. I assume that most of the CAM software converts the NURBS model to a mesh model for NC code generation .. correct me if I am wrong. Why can’t we use the mesh model ( with appropriate density) to create NC code. We could then create models in software like say blender, to create manufacturable parts, instead of converting it to NURBS. Do you think that is a possibility?

    • True. CAM software triangulates NURBS models and use the mesh to generate tool paths. The thing to keep in mind is that the triangulation needs to be of a high resolution otherwise you can end up with a horrible surface finish. Models created in Blender and similar are quite coarse. They look smooth because of smooth shading.

  • Pingback: Dezignstuff SolidWorks Blog » Orange County Choppers visit, Part 2: mesh to NURBS conversion()

  • Really wonderful work admin This post contains useful information which helps us a lot. Thanks to sharing

  • Just 4 mouse clicks to convert the shell layer is really stunning. I believe this software has a lot more stuffs in it. I believe I must try it soon.