From: FX (fxcoudert_at_gmail.com)
Date: Sat Jul 02 2011 - 05:08:08 CDT

Hi all,

** Patch for OFF import

I attach to this email a patch for importing surface meshes in OFF format. I developped it for my own use, but in the end it is generic enough that other could use it. Some modern meshing code, including all CGAL-derived libraries, use OFF as a default export format, which means it is nice to be able to read it. Some remarks:

  -- the format is rather simple, and so is the plugin code
  -- the OFF format supports arbitrary polygon faces, while VMD deals only with triangles. In all molecular applications I know, surface meshes only use triangles and quadrangles, so I restricted the code to this and did not include a generic polygon triangulation routine. I might provide an update in the future, if the need arise (for me or for someone else).

I also attach to this email a sample OFF file (not molecular, but has both triangle and quadrangle faces).

** Question about surfaces

When STL (and, with my patch, OFF) surfaces are imported into VMD, they appear blue and of default opaque material. I have not found a way in "Graphical representations" to change that. Have I missed it? If not, is it a planned addition for the future? As it currently is, it is not of much use to produce nice graphics of a surface.

Cheers,
FX (François-Xavier Coudert)


  • application/octet-stream attachment: off.diff