Opinions

The PolyFace Mesh

Two years ago I posted an article on this blog (“The long and short of AutoCAD’s PolyFace Mesh“) reporting a problem in the way AutoCAD stores a PolyFace Mesh object in a DWG file. I ended the article with:

“The irony of all this is that over the years Autodesk has revised the DWG file format a number of times, more recently to make it more difficult for people like ODA to reverse engineer it. I only wish they had changed the short to a long and added real value to it. There are supposedly billions of DWG files out there. Too bad not a single one can store a mesh with more than 32,767 vertices.”

Two years ago I registered a formal service request with Autodesk regarding this issue and at that time I was told that this situation would be remedied only when they next change the DWG format, which was in AutoCAD 2010.

Today, with great disappointment, I have to report that AutoCAD 2010 will not be able to store a PolyFace Mesh containing more than 32,767 vertices. Why? Because they still did not change the blessed short to a long. Why? There were not enough votes for my service request.

I am trying to understand how these big companies work. From this experience I have to assume that they receive so many service requests and bug reports that they simply cannot fix all of them. I can understand that. So things get prioritized based on how many “votes” each request gets. This line of thought leads me to believe that there is nobody in Autodesk who is entrusted with the job of using a little common sense to figure out for himself whether a service request is worth attending to, without looking at the number of votes it has received.

All other CAD systems I know can deal with large meshes. All mesh formats I know use long’s instead of short’s when storing mesh data. Any high resolution terrain mesh will exceed this limit. Almost all dental scans with exceed the limit a few times over. And considering that Autodesk is laying special focus on 3D in AutoCAD 2010, a little common sense should have been enough to conclude that AutoCAD 2010 should support large meshes as well.

Now lets consider how AutoCAD behaves with large meshes. I open a DWG file containing a single large PolyFace Mesh in AutoCAD 2010. The drawing window comes up empty, but if I run the “list” command type “all” at the “Select objects” prompt, AutoCAD reports that it found one object and proceeds to list it as a PolyFace Mesh. So I know that the mesh is there somewhere. Now let’s try and view its properties. Since I cannot select an object that I cannot see, I run the “properties” command and do an “Edit->Select All”. This is what I get.

As you can see the PolyFace Mesh has -1218 vertices (yes, that’s a negative number) and no faces. Let me explain. In programming parlance when a variable goes out of range, it loops around and goes negative. So you can imagine that this is no small problem. Firstly the mesh is not visible and secondly it has an invalid definition. OK, now lets try and fix it. I run the “audit” command and choose to fix errors. Audit did mention a problem with the mesh (vertex count less than zero) but then reported no errors and fixed nothing. It could not fix it because the PolyFace Mesh data structure is not capable of holding that kind of data. I guess it could have exploded the mesh into individual 3D Face objects, but with the mesh definition in the DWG file corrupted, that does not seem like a possibility either.

And so I still have a DWG file that does not show the PolyFace Mesh and which still has invalid geometry. Why? Because someone at Autodesk didn’t find my service request had enough votes. So why didn’t customers complain about this? I guess because they probably don’t know that the problem exists. You cannot find fault in something that you cannot see or don’t know about. The sad thing is that this very serious problem has a very simple no-brainer solution which I provided two years ago to Autodesk. But since they use this weird fire fighting approach of putting out only the largest fires and ignoring the small ones, without employing common sense to think for themselves, the problem still remains.

So for all these years AutoCAD users have been unknowingly working with invisible and invalid PolyFace Meshes, and if Autodesk keeps up with their three year cycle, this problem may be solved only in AutoCAD 2013, that too only if enough customers make a noise about it.

I find it very hard to believe that someone at Autodesk analysed my service request and decided not to fix the problem. I get the feeling that my service request lost on votes and just did not come up for hearing.