Can I convert polygonal models to CAD models?One question we get regularly at TransMagic is “Can I convert polygonal models to CAD models?”. Well now the answer is yes; as of release 12, TransMagic Expert has the capability to convert polygonal formats to geometric CAD formats.
I asked TransMagic’s head of development, Craig Dennis, about this process, as well as some of the benefits and challenges of the Poly to CAD process:

Polygonal formats are comprised of triangular polygons vs. the true geometry in CAD files such as spheres, planes, torus, cones, free form surfaces (NURBs), etc.  The conversion from true CAD geometry to triangles is very easy (CAD to *.stl); however, the inverse, *.stl to true geometry can be difficult.  In fact, no software actually does this automatically as there is simply not a straight conversion.

There are some reverse engineering solutions that will take a point cloud (which is essentially what an *.stl file is) and with significant user intervention, map NURBS surfaces to these points; however, in most cases the user has to define the boundary curves manually.  This process is extremely tedious and difficult as there are many ways to introduce errors into the reverse engineering process.

TransMagic R12 can convert a polygonal format (such as STL) to a geometric CAD file using a technique known as a Polygon Point Mesh Body (PPMBody).  A PPMBody is the conversion of lightweight planar polygons (always found in STL and other visualization formats) to true geometric planar faces in a solid body.

How to use Poly To CAD

Poly to CAD toolbar
To convert a polygonal model to a CAD model, you will need TransMagic Expert. From the Operations toolbar, click on Poly To CAD.

Poly To CAD will be grayed-out unless you have a polygonal model open in TransMagic.

Benefits of converting to CAD formats

Access to CAD tools and data, possible downstream applications

The benefit of converting polygonal formats to geometric formats include having access to CAD tools such as adding features, being able to dimension parts, the ability to interrogate solids (mass, volume and centroid calculations), surface area and bounding box calculations, and more. Other benefits could include being able to machine or perform FEA on the model.

Poly to CAD ResultDrawbacks of converting to CAD formats: size explosion

We took one of our sample CAD assemblies and converted it first to STL, then took the STL file to STEP and TMR. Here’s what we found:

Original Inventor assembly: 2400KB
As converted to STEP: 914KB
As converted to STL: 13,502KB (276,506 polygons)
As converted from STL to TMR: 99,597KB
As converted from STL to STEP: 416,497KB

The conversion took approximately 10 minutes of  processing time for the conversion and to write the STEP file on an i7-based, 24GB RAM laptop. The TMR format (TransMagic’s native CAD format) is significantly smaller and opens much faster than the STEP format.

1 million polygons appears to be the 32GB limit

In a separate test, we were able to convert a model with 1 million polygons to the Parasolid format using a 32GB RAM machine, but it took a few hours, and used up 30GB of the RAM. How much RAM was used is key because once you use all system RAM, your computer will try to complete the task by swapping to the hard disk, which will be much slower; what this means is that a bigger file would require more RAM.

Polygon Reduction can be a factor

Obviously going from Poly to CAD is not an ideal scenario – however, if all you have is the polygonal file to begin with, it may at times be a consideration in order to gain the above-mentioned benefits. To minimize size explosion, use the Polygon Reduction tool before converting to CAD. The Polygon Reduction tool and process is detailed in this article.

Why the files get so big

The file size increase is because instead of just a “bag of triangles” like an STL file, you now have solid topology (the glue that holds a solid model together).  For every triangle in the STL file, which originally consisted of 4 pieces of information: 3 vertices and a normal, you’ll now have:
– 1 body
– Under which is:
———- 1 Lump
———- Under which is:
—————– 1 Shell
—————– Under which is:
————————- 1 Face
————————- Under which is:
——————————- 1 surface
——————————- 1 loop
——————————- Under which is:
————————————– 3 edges
————————————– Under which is:
——————————————— 3 coedges
——————————————— 3 curves
——————————————— 6 vertices
——————————————— 6 geometric points
So one can imagine how a file would grow from 4 pieces of information for each triangular face to 27 (and this leaves some information out!).

If you already own TransMagic Expert, you have the capability to do Poly to CAD conversions right now. If you don’t have TransMagic yet, you can learn more about it here.

We hope this article has been of interest to you; if you have any questions or comments, as always, please contact us at social@transmagic.com.