hexex2geogram

.hexex to .geogram mesh file conversion

https://github.com/lihpc-computational-geometry/hexex2geogram

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.3%) to scientific vocabulary

Keywords

file-conversion file-converter geometry-processing mesh mesh-processing
Last synced: 4 months ago · JSON representation ·

Repository

.hexex to .geogram mesh file conversion

Basic Info
  • Host: GitHub
  • Owner: LIHPC-Computational-Geometry
  • License: agpl-3.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 29.3 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
file-conversion file-converter geometry-processing mesh mesh-processing
Created over 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

hexex2geogram : .hexex to .geogram mesh file conversion

A .hexex file stores a tetrahedral mesh with an $u,v,w$ parametrization. The syntax is explained in the additional material of HexEx[^HexEx] and also below.

.geogram is a file format used by the Geogram library, which supports embedded attributes.

This simple program converts a .hexex file to a .geogram one, using per-cell-corner attributes to store the parametrization.

Requirements

Build

bash mkdir build cd build cmake .. make

Tutorial

The sphere.hexex file comes from the additional material of HexEx[^HexEx].

bash ./hexex2geogram ../data/sphere.hexex ../data/sphere.geogram

Then: - open sphere.geogram with Graphite - in the Properties panel, choose "ATTRIBUTE" for "painting" - choose "cellcorners.u", "cellcorners.v" or "cell_corners.w" for "attribute" - click on "autorange" - use a perceptually correct colormap

The output files of MC3D[^MC3D] also use the .hexex format, with additional information at the end (the walls of the block decomposition). These walls could be saved in the output .geogram file with cell facets attributes, but as of today (October 2023), Graphite/Vorpaview cannot display them. Instead, tetrahedra are grouped by block, and a cell attribute "cells.block_id" is exported. The computation is quite slow.

.hexex format

It is an ASCII-based format.

The fist line is $n$, the number of vertices. It is followed by $n$ lines defining the $n$ vertices. A vertex definition has 3 floating-point numbers for the $x$, $y$ and $z$ coordinates, separated by spaces.

Then there is $m$, the number of cells, followed by $m$ lines for the tetrahedra definitions. A tetrahedron defintion has 4 integers $i0,i1,i2,i3$ (vertex index for each corner) then $4 \times 3$ floating-point numbers ( $u,v,w$ for corner 0, then for corner 1, corner 2 and corner 3), separated by spaces.

The vertices indices $i0,i1,i2,i3$ must be ordered such that $$\det(i1-i0,i2-i0,i3-i0)>0$$ This condition is not checked in hexex2geogram.

In case of an output of MC3D[^MC3D], the file ends with the number of wall triangles $w$, followed by $w$ lines for wall triangle definitions. A wall triangle definition has 3 integers and a floating-point number (separated by spaces): the 3 vertex indices and the distance from the brush fire's origin.

[^HexEx]: Max Lyon, David Bommes, Leif Kobbelt, HexEx: Robust Hexahedral Mesh Extraction, SIGGRAPH 2016, url [^MC3D]: Hendrik Brückler, Ojaswi Gupta, Manish Mandad, Marcel Campen, The 3D Motorcycle Complex for Structured Volume Decomposition, Eurographics 2022, url

License

AGPL-3.0

Cite this repository

See CITATION.cff or the dedicated button on GitHub

Owner

  • Name: LIHPC-Computational-Geometry
  • Login: LIHPC-Computational-Geometry
  • Kind: organization
  • Location: France

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: hexex2geogram
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Sébastien
    family-names: Mestrallet
    orcid: 'https://orcid.org/0000-0002-4519-2814'
repository-code: >-
  https://github.com/LIHPC-Computational-Geometry/hexex2geogram
abstract: '.hexex to .geogram mesh file conversion'
keywords:
  - mesh
  - file-converter
  - file-conversion
  - mesh-processing
  - geometry-processing
license: AGPL-3.0

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1