ttk icon indicating copy to clipboard operation
ttk copied to clipboard

ExplicitTriangulation: Add ASCII writer

Open pierre-guillou opened this issue 2 years ago • 0 comments

This PR complements https://github.com/topology-tool-kit/ttk/pull/598 with an ASCII backend for the TriangulationWriter module. Be aware that there is no corresponding reader in TTK for this file particular format. The format version of this particular writer is set to 2 (the binary writer is still at version 1).

The writer basically exports the internal state of the ExplicitTriangulation into a file (one value per line). Sections are prefixed by the name of the corresponding ExplicitTriangulation class member. The non-owned data structure cellArray (which decomposes VTK cells into vertices) is also included.

To better accommodate between std::vector<std::array>> and FlatJaggedArray, some methods of the latter have been slightly modified to return size_t instead of SimplexId.

Additionally, a MSVC warning in OneSkeleton has been fixed by using templated functions instead of if statements.

Enjoy, Pierre

pierre-guillou avatar Oct 06 '22 15:10 pierre-guillou