export.hpp 17.9 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
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 42 43 44 45 46 47
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps  *
* version 0.1                                                                  *
* Copyright (C) 2009, 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: https://iggservis.u-strasbg.fr/CGoGN/                              *
* Contact information: cgogn@unistra.fr                                        *
*                                                                              *
*******************************************************************************/

#include "Topology/generic/attributeHandler.h"
#include "Topology/generic/autoAttributeHandler.h"
#include "Topology/generic/cellmarker.h"
#include "openctm.h"

namespace CGoGN
{

namespace Algo
{

namespace Export
{

template <typename PFP>
bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;
	
	std::ofstream out(filename, std::ios::out) ;
	if (!out.good())
	{
48
		CGoGNerr << "Unable to open file " << CGoGNendl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
		return false ;
	}

	unsigned int nbDarts = map.getNbDarts() ;
	std::vector<unsigned int> facesSize ;
	std::vector<std::vector<unsigned int> > facesIdx ;
	facesSize.reserve(nbDarts/3) ;
	facesIdx.reserve(nbDarts/3) ;
	std::map<unsigned int, unsigned int> vIndex ;
	unsigned int vCpt = 0 ;
	std::vector<unsigned int> vertices ;
	vertices.reserve(nbDarts/6) ;

	CellMarker markV(map, VERTEX_CELL) ;
	DartMarker markF(map) ;
	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		if(good(d) && !markF.isMarked(d))
		{
			markF.markOrbit(FACE_ORBIT, d) ;
			std::vector<unsigned int> fidx ;
			fidx.reserve(4) ;
			Dart dd = d ;
			do
			{
				unsigned int vNum = map.getEmbedding(dd, VERTEX_ORBIT) ;
				if(!markV.isMarked(dd))
				{
					markV.mark(dd) ;
					vIndex[vNum] = vCpt++ ;
					vertices.push_back(vNum) ;
				}
				fidx.push_back(vIndex[vNum]) ;
				dd = map.phi1(dd) ;
			} while(dd != d) ;
			facesSize.push_back(map.faceDegree(d)) ;
			facesIdx.push_back(fidx) ;
		}
	}

89 90 91 92 93 94 95 96 97 98
	out << "ply" << std::endl ;
	out << "format ascii 1.0" << std::endl ;
	out << "comment no comment" << std::endl ;
	out << "element vertex " << vertices.size() << std::endl ;
	out << "property float x" << std::endl ;
	out << "property float y" << std::endl ;
	out << "property float z" << std::endl ;
	out << "element face " << facesSize.size() << std::endl ;
	out << "property list uchar int vertex_indices" << std::endl ;
	out << "end_header" << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
99 100 101 102

	for(unsigned int i = 0; i < vertices.size(); ++i)
	{
		const VEC3& v = position[vertices[i]] ;
103
		out << v[0] << " " << v[1] << " " << v[2] << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
104 105 106 107 108 109
	}
	for(unsigned int i = 0; i < facesSize.size(); ++i)
	{
		out << facesSize[i] ;
		for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
			out << " " << facesIdx[i][j] ;
110
		out << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
	}

	out.close() ;
	return true ;
}

template <typename PFP>
bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;
	
	std::ofstream out(filename, std::ios::out) ;
	if (!out.good())
	{
126
		CGoGNerr << "Unable to open file " << CGoGNendl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
		return false ;
	}

	unsigned int nbDarts = map.getNbDarts() ;
	std::vector<unsigned int> facesSize ;
	std::vector<std::vector<unsigned int> > facesIdx ;
	facesSize.reserve(nbDarts/3) ;
	facesIdx.reserve(nbDarts/3) ;
	std::map<unsigned int, unsigned int> vIndex ;
	unsigned int vCpt = 0 ;
	std::vector<unsigned int> vertices ;
	vertices.reserve(nbDarts/6) ;

	CellMarker markV(map, VERTEX_CELL) ;
	DartMarker markF(map) ;
	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		if(good(d) && !markF.isMarked(d))
		{
			markF.markOrbit(FACE_ORBIT, d) ;
			std::vector<unsigned int> fidx ;
			fidx.reserve(4) ;
			Dart dd = d ;
			do
			{
				unsigned int vNum = map.getEmbedding(dd, VERTEX_ORBIT) ;
				if(!markV.isMarked(dd))
				{
					markV.mark(dd) ;
					vIndex[vNum] = vCpt++ ;
					vertices.push_back(vNum) ;
				}
				fidx.push_back(vIndex[vNum]) ;
				dd = map.phi1(dd) ;
			} while(dd != d) ;
			facesSize.push_back(map.faceDegree(d)) ;
			facesIdx.push_back(fidx) ;
		}
	}

167 168
	out << "OFF" << std::endl ;
	out << vertices.size() << " " << facesSize.size() << " " << 0 << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
169 170 171 172

	for(unsigned int i = 0; i < vertices.size(); ++i)
	{
		const VEC3& v = position[vertices[i]] ;
173
		out << v[0] << " " << v[1] << " " << v[2] << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
174 175 176 177 178 179
	}
	for(unsigned int i = 0; i < facesSize.size(); ++i)
	{
		out << facesSize[i] ;
		for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
			out << " " << facesIdx[i][j] ;
180
		out << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
	}

	out.close() ;
	return true ;
}

template <typename PFP>
bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position, const std::string& filename, const FunctorSelect& good)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	AutoAttributeHandler<unsigned int> tableVertLab(the_map, VERTEX_ORBIT);

	CellMarker markV(the_map,VERTEX_CELL);

	unsigned int nbDarts = the_map.getNbDarts() ;

	std::vector<CTMfloat> verticesBuffer;
	std::vector<CTMuint> indicesBuffer;
	verticesBuffer.reserve(nbDarts/5);	// TODO non optimal reservation
	indicesBuffer.reserve(nbDarts/3);

	DartMarker markF(the_map);
	unsigned int lab=0;
	for(Dart d = the_map.begin(); d != the_map.end(); the_map.next(d))
	{
		if(good(d) && !markF.isMarked(d))
		{
			markF.markOrbit(FACE_ORBIT, d) ;
			Dart e = d;
			do
			{
				if (!markV.isMarked(e))
				{
					tableVertLab[e] = lab++;
					markV.mark(e);
					const VEC3& vert =  position[e];
					verticesBuffer.push_back(vert[0]);
					verticesBuffer.push_back(vert[1]);
					verticesBuffer.push_back(vert[2]);
				}
				indicesBuffer.push_back(tableVertLab[e]);
				e = the_map.phi1(e);
			} while (e!=d);
		}
	}

	// Save the file using the OpenCTM API
	CTMexporter ctm;

	// Define mesh

	ctm.DefineMesh(&(verticesBuffer[0]) , verticesBuffer.size()/3,
			&(indicesBuffer[0]) , indicesBuffer.size()/3, NULL);


	ctm.VertexPrecisionRel(0.0001f);

	// Set compression method and level
	ctm.CompressionMethod(CTM_METHOD_MG2);
	ctm.CompressionLevel(9);

	// Export file
	ctm.Save(filename.c_str());

	return true ;
}

250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[15], const FunctorSelect& good)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	std::ofstream out(filename, std::ios::out) ;
	if (!out.good())
	{
		std::cerr << "Unable to open file " << std::endl ;
		return false ;
	}

	AutoAttributeHandler<unsigned int> tableVertLab(map, VERTEX_ORBIT);

	CellMarker markV(map,VERTEX_CELL);

	unsigned int nbDarts = map.getNbDarts() ;

	std::vector<unsigned int> vertices;
	std::vector<unsigned int> faces;

	vertices.reserve(nbDarts/5);	// TODO non optimal reservation
	faces.reserve(nbDarts/3);

	DartMarker markF(map);
	unsigned int lab = 0;
	unsigned int nbf = 0;
	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		if(good(d) && !markF.isMarked(d))
		{
			markF.markOrbit(FACE_ORBIT, d) ;
			Dart e = d;
			std::vector<unsigned int> face ;
			do
			{
				if (!markV.isMarked(e))
				{
					vertices.push_back(map.getEmbedding(e, VERTEX_ORBIT));
					tableVertLab[e] = lab++;

					markV.mark(e);
				}
				face.push_back(tableVertLab[e]);
				e = map.phi1(e);
			} while (e!=d) ;

			faces.push_back(face.size()) ;
			for (unsigned int i = 0 ; i < face.size() ; ++i)
				faces.push_back(face.at(i)) ;

			++nbf;
		}
	}

	out << "ply" << std::endl ;
	out << "format ascii 1.0" << std::endl ;
	out << "comment ply PTM" << std::endl ;
	out << "element vertex " << vertices.size() << std::endl ;
	out << "property float x" << std::endl ;
	out << "property float y" << std::endl ;
	out << "property float z" << std::endl ;
	out << "property float tx" << std::endl ;
	out << "property float ty" << std::endl ;
	out << "property float tz" << std::endl ;
	out << "property float bx" << std::endl ;
	out << "property float by" << std::endl ;
	out << "property float bz" << std::endl ;
	out << "property float nx" << std::endl ;
	out << "property float ny" << std::endl ;
	out << "property float nz" << std::endl ;
	out << "property float L1_a0" << std::endl ;
	out << "property float L1_a1" << std::endl ;
	out << "property float L1_a2" << std::endl ;
	out << "property float L1_a3" << std::endl ;
	out << "property float L1_a4" << std::endl ;
	out << "property float L1_a5" << std::endl ;
	out << "property float L1_a6" << std::endl ;
	out << "property float L1_a7" << std::endl ;
	out << "property float L1_a8" << std::endl ;
	out << "property float L1_a9" << std::endl ;
	out << "property float L1_a10" << std::endl ;
	out << "property float L1_a11" << std::endl ;
	out << "property float L1_a12" << std::endl ;
	out << "property float L1_a13" << std::endl ;
	out << "property float L1_a14" << std::endl ;
	out << "property float L2_a0" << std::endl ;
	out << "property float L2_a1" << std::endl ;
	out << "property float L2_a2" << std::endl ;
	out << "property float L2_a3" << std::endl ;
	out << "property float L2_a4" << std::endl ;
	out << "property float L2_a5" << std::endl ;
	out << "property float L2_a6" << std::endl ;
	out << "property float L2_a7" << std::endl ;
	out << "property float L2_a8" << std::endl ;
	out << "property float L2_a9" << std::endl ;
	out << "property float L2_a10" << std::endl ;
	out << "property float L2_a11" << std::endl ;
	out << "property float L2_a12" << std::endl ;
	out << "property float L2_a13" << std::endl ;
	out << "property float L2_a14" << std::endl ;
	out << "property float L3_a0" << std::endl ;
	out << "property float L3_a1" << std::endl ;
	out << "property float L3_a2" << std::endl ;
	out << "property float L3_a3" << std::endl ;
	out << "property float L3_a4" << std::endl ;
	out << "property float L3_a5" << std::endl ;
	out << "property float L3_a6" << std::endl ;
	out << "property float L3_a7" << std::endl ;
	out << "property float L3_a8" << std::endl ;
	out << "property float L3_a9" << std::endl ;
	out << "property float L3_a10" << std::endl ;
	out << "property float L3_a11" << std::endl ;
	out << "property float L3_a12" << std::endl ;
	out << "property float L3_a13" << std::endl ;
	out << "property float L3_a14" << std::endl ;

	out << "element face " << nbf << std::endl ;
	out << "property list uchar int vertex_indices" << std::endl ;
	out << "end_header" << std::endl ;

	for(unsigned int i = 0; i < vertices.size(); ++i)
	{
		unsigned int vi = vertices[i];
		out << position[vi][0] << " " << position[vi][1] << " " << position[vi][2] << " " ;
		out << frame[0][vi][0] << " " << frame[0][vi][1] << " " << frame[0][vi][2] << " " ;
		out << frame[1][vi][0] << " " << frame[1][vi][1] << " " << frame[1][vi][2] << " " ;
		out << frame[2][vi][0] << " " << frame[2][vi][1] << " " << frame[2][vi][2] << " " ;
		out << colorPTM[0][vi][0] << " " << colorPTM[1][vi][0] << " " << colorPTM[2][vi][0] << " " << colorPTM[3][vi][0] << " " << colorPTM[4][vi][0] << " " << colorPTM[5][vi][0] << " " << colorPTM[6][vi][0] << " " << colorPTM[7][vi][0] << " " << colorPTM[8][vi][0] << " " << colorPTM[9][vi][0] << " " << colorPTM[10][vi][0] << " " << colorPTM[11][vi][0] << " " << colorPTM[12][vi][0] << " " << colorPTM[13][vi][0] << " " << colorPTM[14][vi][0] << " " ;
		out << colorPTM[0][vi][1] << " " << colorPTM[1][vi][1] << " " << colorPTM[2][vi][1] << " " << colorPTM[3][vi][1] << " " << colorPTM[4][vi][1] << " " << colorPTM[5][vi][1] << " " << colorPTM[6][vi][1] << " " << colorPTM[7][vi][1] << " " << colorPTM[8][vi][1] << " " << colorPTM[9][vi][1] << " " << colorPTM[10][vi][1] << " " << colorPTM[11][vi][1] << " " << colorPTM[12][vi][1] << " " << colorPTM[13][vi][1] << " " << colorPTM[14][vi][1] << " " ;
		out << colorPTM[0][vi][2] << " " << colorPTM[1][vi][2] << " " << colorPTM[2][vi][2] << " " << colorPTM[3][vi][2] << " " << colorPTM[4][vi][2] << " " << colorPTM[5][vi][2] << " " << colorPTM[6][vi][2] << " " << colorPTM[7][vi][2] << " " << colorPTM[8][vi][2] << " " << colorPTM[9][vi][2] << " " << colorPTM[10][vi][2] << " " << colorPTM[11][vi][2] << " " << colorPTM[12][vi][2] << " " << colorPTM[13][vi][2] << " " << colorPTM[14][vi][2] << std::endl ;
	}

	std::vector<unsigned int>::iterator it = faces.begin();
	while (it != faces.end())
	{
		unsigned int nbe = *it++;
		out << nbe ;
		for(unsigned int j = 0; j < nbe; ++j)
			out << " " << *it++;
		out << std::endl ;
	}

	out.close() ;
	return true ;
}
/*
Pierre Kraemer's avatar
Pierre Kraemer committed
398
template <typename PFP>
399
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good)
Pierre Kraemer's avatar
Pierre Kraemer committed
400 401 402 403 404 405 406
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	std::ofstream out(filename, std::ios::out) ;
	if (!out.good())
	{
407
		CGoGNerr << "Unable to open file " << CGoGNendl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
		return false ;
	}

	AutoAttributeHandler<unsigned int> tableVertLab(map, VERTEX_ORBIT);

	CellMarker markV(map,VERTEX_CELL);

	unsigned int nbDarts = map.getNbDarts() ;

	std::vector<unsigned int> vertices;
	std::vector<unsigned int> faces;

	vertices.reserve(nbDarts/5);	// TODO non optimal reservation
	faces.reserve(nbDarts/3);

	DartMarker markF(map);
	unsigned int lab = 0;
	unsigned int nbf = 0;
	for(Dart d = map.begin(); d != map.end(); map.next(d))
	{
		if(good(d) && !markF.isMarked(d))
		{
			markF.markOrbit(FACE_ORBIT, d) ;
			Dart e = d;
432
			std::vector<unsigned int> face ;
Pierre Kraemer's avatar
Pierre Kraemer committed
433 434 435 436
			do
			{
				if (!markV.isMarked(e))
				{
Sylvain Thery's avatar
Sylvain Thery committed
437
					vertices.push_back(map.getEmbedding(e, VERTEX_ORBIT));
Pierre Kraemer's avatar
Pierre Kraemer committed
438 439 440 441
					tableVertLab[e] = lab++;

					markV.mark(e);
				}
442
				face.push_back(tableVertLab[e]);
Pierre Kraemer's avatar
Pierre Kraemer committed
443
				e = map.phi1(e);
444 445 446 447 448 449 450
			} while (e!=d) ;

			faces.push_back(face.size()) ;
			for (unsigned int i = 0 ; i < face.size() ; ++i)
				faces.push_back(face.at(i)) ;

			++nbf;
Pierre Kraemer's avatar
Pierre Kraemer committed
451 452 453
		}
	}

454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
	out << "ply" << std::endl ;
	out << "format ascii 1.0" << std::endl ;
	out << "comment ply PTM (F. Larue format)" << std::endl ;
	out << "element vertex " << vertices.size() << std::endl ;
	out << "property float x" << std::endl ;
	out << "property float y" << std::endl ;
	out << "property float z" << std::endl ;
	out << "property float tx" << std::endl ;
	out << "property float ty" << std::endl ;
	out << "property float tz" << std::endl ;
	out << "property float bx" << std::endl ;
	out << "property float by" << std::endl ;
	out << "property float bz" << std::endl ;
	out << "property float nx" << std::endl ;
	out << "property float ny" << std::endl ;
	out << "property float nz" << std::endl ;
	out << "property float L1_a" << std::endl ;
	out << "property float L1_b" << std::endl ;
	out << "property float L1_c" << std::endl ;
	out << "property float L1_d" << std::endl ;
	out << "property float L1_e" << std::endl ;
	out << "property float L1_f" << std::endl ;
	out << "property float L2_a" << std::endl ;
	out << "property float L2_b" << std::endl ;
	out << "property float L2_c" << std::endl ;
	out << "property float L2_d" << std::endl ;
	out << "property float L2_e" << std::endl ;
	out << "property float L2_f" << std::endl ;
	out << "property float L3_a" << std::endl ;
	out << "property float L3_b" << std::endl ;
	out << "property float L3_c" << std::endl ;
	out << "property float L3_d" << std::endl ;
	out << "property float L3_e" << std::endl ;
	out << "property float L3_f" << std::endl ;
	out << "element face " << nbf << std::endl ;
	out << "property list uchar int vertex_indices" << std::endl ;
	out << "end_header" << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
491 492 493 494

	for(unsigned int i = 0; i < vertices.size(); ++i)
	{
		unsigned int vi = vertices[i];
495 496 497 498 499 500
		out << position[vi][0] << " " << position[vi][1] << " " << position[vi][2] << " " ;
		out << frame[0][vi][0] << " " << frame[0][vi][1] << " " << frame[0][vi][2] << " " ;
		out << frame[1][vi][0] << " " << frame[1][vi][1] << " " << frame[1][vi][2] << " " ;
		out << frame[2][vi][0] << " " << frame[2][vi][1] << " " << frame[2][vi][2] << " " ;
		out << colorPTM[0][vi][0] << " " << colorPTM[1][vi][0] << " " << colorPTM[2][vi][0] << " " << colorPTM[3][vi][0] << " " << colorPTM[4][vi][0] << " " << colorPTM[5][vi][0] <<" " ;
		out << colorPTM[0][vi][1] << " " << colorPTM[1][vi][1] << " " << colorPTM[2][vi][1] << " " << colorPTM[3][vi][1] << " " << colorPTM[4][vi][1] << " " << colorPTM[5][vi][1] <<" " ;
501
		out << colorPTM[0][vi][2] << " " << colorPTM[1][vi][2] << " " << colorPTM[2][vi][2] << " " << colorPTM[3][vi][2] << " " << colorPTM[4][vi][2] << " " << colorPTM[5][vi][2] << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
502 503
	}

504
	std::vector<unsigned int>::iterator it = faces.begin();
Pierre Kraemer's avatar
Pierre Kraemer committed
505 506 507 508 509 510
	while (it != faces.end())
	{
		unsigned int nbe = *it++;
		out << nbe ;
		for(unsigned int j = 0; j < nbe; ++j)
			out << " " << *it++;
511
		out << std::endl ;
Pierre Kraemer's avatar
Pierre Kraemer committed
512 513 514 515
	}

	out.close() ;
	return true ;
516
}*/
Pierre Kraemer's avatar
Pierre Kraemer committed
517 518 519 520 521 522

} // namespace Export

} // namespace Algo

} // namespace CGoGN