exportVol.h 5.13 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps  *
* version 0.1                                                                  *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg           *
*                                                                              *
* This library is free software; you can redistribute it and/or modify it      *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your     *
* option) any later version.                                                   *
*                                                                              *
* This library is distributed in the hope that it will be useful, but WITHOUT  *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or        *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License  *
* for more details.                                                            *
*                                                                              *
* You should have received a copy of the GNU Lesser General Public License     *
* along with this library; if not, write to the Free Software Foundation,      *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.           *
*                                                                              *
* Web site: http://cgogn.unistra.fr/                                           *
* Contact information: cgogn@unistra.fr                                        *
*                                                                              *
*******************************************************************************/

#ifndef __EXPORT_VOL_H__
#define __EXPORT_VOL_H__

#include "Topology/generic/attributeHandler.h"
#include <stdint.h>

namespace CGoGN
{

namespace Algo
{

namespace Volume
{

namespace Export
{
42 43 44 45 46 47 48 49
/**
* Export a mesh choosing the format according to filename extension
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
 */
template <typename PFP>
50
bool exportMesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const std::string& filename) ;
51 52 53 54 55

/**
* export the map into a .nas (nastran file)
* @param the_map map to be exported
* @param position the position container
56
* @param filename filename of mesh file
57 58 59
* @return true
*/
template <typename PFP>
60
bool exportNAS(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename) ;
61 62


Sylvain Thery's avatar
Sylvain Thery committed
63 64 65 66
/**
* export the map into a vtu file (vtk unstructured grid)
* @param the_map map to be exported
* @param position the position container
67
* @param filename filename of mesh file
Sylvain Thery's avatar
Sylvain Thery committed
68 69 70
* @return true
*/
template <typename PFP>
71
bool exportVTU(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename) ;
Sylvain Thery's avatar
Sylvain Thery committed
72 73


74 75 76 77
/**
* export the map into a .msh (gmesh file)
* @param the_map map to be exported
* @param position the position container
78
* @param filename filename of mesh file
79 80 81
* @return true
*/
template <typename PFP>
82
bool exportMSH(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename) ;
83 84 85 86 87 88


/**
* export the map into a .tet file
* @param the_map map to be exported
* @param position the position container
89
* @param filename filename of mesh file
90 91 92
* @return true
*/
template <typename PFP>
93
bool exportTet(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename) ;
94 95 96 97 98 99


/**
* export the map into a .node/.ele file pair
* @param the_map map to be exported
* @param position the position container
100
* @param filename filename of mesh file
101 102 103
* @return true
*/
template <typename PFP>
104
bool exportNodeEle(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename) ;
105 106


107 108 109 110
/**
* export in binary volume file (nb_vert,nb_tetra,nb_hexa, vertices, tetra, hexa)
* @param the_map map to be exported
* @param position the position container
111
* @param filename filename of mesh file
112 113
 */
template <typename PFP>
114
bool exportVolBinGz(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename);
115

116 117 118 119 120 121 122 123 124

/**
* export tetmesh format
* @warning if macro _OPTIMIZED_FOR_TETRA_ONLY_ (before include) is define assume map contain only tetrahedrons
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
 */
template <typename PFP>
125
bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename);
126 127


128 129 130
template <typename PFP>
bool exportBoundaryOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP>& position, const char* filename);

131 132
} // namespace Export

133
} // namespace Volume
134 135 136 137 138

} // namespace Algo

} // namespace CGoGN

Sylvain Thery's avatar
Sylvain Thery committed
139
#include "Algo/Export/exportVol.hpp"
140 141

#endif