Author Topic: Get Delaunay triangulation information after applying "Construct surface mesh"  (Read 280 times)

hhlljx

  • Newbie
  • *
  • Posts: 3
Hello,

I have a set of atoms, and apply “Construct surface mesh modifier”.

As a result, I can get quantities, such as Surface area, Solid volume.

But I also want to get the information of the tetrahedra forming the solid region, generated by Delaunay triangulation.  How can I do that?
« Last Edit: February 28, 2019, 04:34:53 AM by hhlljx »

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Hi,

The Delaunay tetrahedra are thrown away once the surface mesh has been built (and before the triangle mesh is being smoothed in the final algorithm step). Thus, there currently is no way to access this information in the output of the modifier pipeline. You would have to hack the C++ sources of the Construct Surface Mesh modifier in order to access the Delaunay structure.

Why are you interested in getting hold of the tetrahedra forming the solid region?

-Alex

hhlljx

  • Newbie
  • *
  • Posts: 3
Thank you for your replying, I want to study the solid region deformation, so I need to interpolate on the tetrahedra, forming the solid region, to construct deformation mappings.

I wonder whether I have the right to read C++ sources of the Construct Surface Mesh modifier?

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Ah, I see. So instead of using the discrete deformation mapping computed by Ovito's Atomic Strain modifier, you would rather like to compute a continuous deformation field based on a Delaunay tessellation.

You sure do have the right to read (and modify) the source code of Ovito. There main source files related to the Construct Surface Mesh modifier are the following:

https://gitlab.com/stuko/ovito/blob/master/src/plugins/crystalanalysis/modifier/ConstructSurfaceModifier.cpp
https://gitlab.com/stuko/ovito/blob/master/src/plugins/crystalanalysis/util/DelaunayTessellation.cpp
https://gitlab.com/stuko/ovito/blob/master/src/plugins/crystalanalysis/util/ManifoldConstructionHelper.h

There is an old code of mine (no longer maintained), which supports calculating the continuous deformation mapping for a particle system based on the Delaunay tessellation:

https://gitlab.com/stuko/crystal-analysis-tool

See the user manual in doc/ subdirectory (the PDF may not display correctly in the web-browser; better download it). This standalone code could serve you as another starting point for your own developments. The code can output the calculated deformation gradient for each Delaunay element to a VTK file.

hhlljx

  • Newbie
  • *
  • Posts: 3
Thank you very much for your sharing. That will help me a lot. :)