exportVol.hpp 17.5 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
42
/*******************************************************************************
* 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                                        *
*                                                                              *
*******************************************************************************/

#include "Topology/generic/attributeHandler.h"
#include "Topology/generic/autoAttributeHandler.h"
#include "Topology/generic/traversorCell.h"
#include "Topology/generic/traversor2.h"
#include "Topology/generic/cellmarker.h"

namespace CGoGN
{

namespace Algo
{

namespace Volume
{

namespace Export
{

Sylvain Thery's avatar
Sylvain Thery committed
43
inline std::string truncFloatTO8(float f)
44
45
46
47
48
49
50
{
	std::stringstream ss;
	ss << f;
	std::string res = ss.str();
	return res.substr(0,8);
}

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
template <typename PFP>
bool exportNAS(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	// open file
	std::ofstream fout ;
	fout.open(filename, std::ios::out) ;

	if (!fout.good())
	{
		CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
		return false ;
	}

	VertexAutoAttribute<unsigned int> indices(map,"indices_vert");

69
70
71
72

	fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
	fout << "$$      NASTRAN MEsh File Generated by CGoGN (ICube/IGG)                        $"<< std::endl;
	fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
73
74
	fout << "CEND" << std::endl;;
	fout << "BEGIN BULK" << std::endl;
75
76
77
	fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
	fout << "$$      Vertices position                                                       $"<< std::endl;
	fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
78
79
80
81
82
83
	unsigned int count=1;
	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		const VEC3& P = position[i];
		fout << "GRID    ";
		fout << std::right;
84
		fout.width(8);
85
86
87
		fout << count;
		fout << "        ";
		fout << std::left;
88
		fout << std::setw(8)<<truncFloatTO8(P[0]) << std::setw(8)<<truncFloatTO8(P[1]) << std::setw(8)<<truncFloatTO8(P[2]) << std::endl;
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
		indices[i] = count++;
	}


	std::vector<unsigned int> hexa;
	std::vector<unsigned int> tetra;
	hexa.reserve(2048);
	tetra.reserve(2048);

	TraversorW<MAP> trav(map) ;
	for(Dart d = trav.begin(); d != trav.end(); d = trav.next())
	{
		unsigned int degree = 0 ;

		Traversor3WV<typename PFP::MAP> twv(map, d) ;
		for(Dart it = twv.begin(); it != twv.end(); it = twv.next())
		{
			degree++;
		}

		if (degree == 8)
		{
			//CAS HEXAEDRIQUE (ordre 2 quad superposes, le premier en CCW)
			Dart e = d;
			Dart f = map.template phi<21121>(d);
			hexa.push_back(indices[f]);
			e = map.phi_1(f);
			hexa.push_back(indices[f]);
			e = map.phi_1(f);
			hexa.push_back(indices[f]);
			e = map.phi_1(f);
			hexa.push_back(indices[f]);
Sylvain Thery's avatar
Sylvain Thery committed
121
122
123
124
125
126
127
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
128
129
130
131
		}

		if (degree == 4)
		{
Sylvain Thery's avatar
Sylvain Thery committed
132
			//CAS TETRAEDRIQUE (ordre 2 quad superposes, le premier en CCW)
133
134
135
136
137
138
139
140
141
142
143
144
145
			Dart e = d;
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.template phi<211>(e);
			tetra.push_back(indices[e]);
		}
	}

	unsigned int countCell=1;
	unsigned int nbhexa = hexa.size()/8;
146
147
148
149
	unsigned int nbtetra = tetra.size()/4;

	fout << std::right;
	if (nbhexa!=0)
150
	{
151
152
153
154
155
156
157
158
		fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
		fout << "$$      Hexa indices                                                            $"<< std::endl;
		fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
		for (unsigned int i=0; i<nbhexa; ++i)
		{
			fout << "CHEXA   ";
			fout << std::setw(8) << countCell++ << std::setw(8)<< 0;
			fout <<  std::setw(8) << hexa[8*i] <<  std::setw(8) << hexa[8*i+1] <<  std::setw(8) << hexa[8*i+2];
Sylvain Thery's avatar
Sylvain Thery committed
159
			fout <<  std::setw(8) << hexa[8*i+3] <<  std::setw(8) << hexa[8*i+4] <<  std::setw(8) << hexa[8*i+5] << "+"<< std::endl;
160
161
			fout << "+       " <<  std::setw(8) << hexa[8*i+6] <<  std::setw(8) << hexa[8*i+7] << std::endl;
		}
162
163
	}

164
	if (nbtetra != 0)
165
	{
166
167
168
169
170
171
172
173
174
		fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
		fout << "$$      Tetra indices                                                           $"<< std::endl;
		fout << "$$ ---------------------------------------------------------------------------- $"<< std::endl;
		for (unsigned int i=0; i<nbtetra; ++i)
		{
			fout << "CTETRA  ";
			fout << std::setw(8) << countCell++ << std::setw(8)<< 0;
			fout << std::setw(8) << tetra[4*i] << std::setw(8) << tetra[4*i+1] << std::setw(8) << tetra[4*i+2] << std::setw(8) << tetra[4*i+3] << std::endl;
		}
175
176
177
	}

	fout << "ENDDATA" << std::endl;
Sylvain Thery's avatar
Sylvain Thery committed
178
179

	fout.close();
180
	return true;
181
182
183
}


Sylvain Thery's avatar
Sylvain Thery committed
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
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

template <typename PFP>
bool exportVTU(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	// open file
	std::ofstream fout ;
	fout.open(filename, std::ios::out) ;

	if (!fout.good())
	{
		CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
		return false ;
	}

	VertexAutoAttribute<unsigned int> indices(map,"indices_vert");




	unsigned int count=0;
	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		indices[i] = count++;
	}


	std::vector<unsigned int> hexa;
	std::vector<unsigned int> tetra;
	hexa.reserve(2048);
	tetra.reserve(2048);

	TraversorW<MAP> trav(map) ;
	for(Dart d = trav.begin(); d != trav.end(); d = trav.next())
	{
		unsigned int degree = 0 ;

		Traversor3WV<typename PFP::MAP> twv(map, d) ;
		for(Dart it = twv.begin(); it != twv.end(); it = twv.next())
		{
			degree++;
		}

		if (degree == 8)
		{
			//CAS HEXAEDRIQUE (ordre 2 quad superposes, le premier en CW)
			Dart e = d;
			Dart f = map.template phi<21121>(d);
			hexa.push_back(indices[f]);
			f = map.phi_1(f);
			hexa.push_back(indices[f]);
			f = map.phi_1(f);
			hexa.push_back(indices[f]);
			f = map.phi_1(f);
			hexa.push_back(indices[f]);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
		}

		if (degree == 4)
		{
			//CAS TETRAEDRIQUE
			Dart e = d;
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.template phi<211>(e);
			tetra.push_back(indices[e]);
		}
	}

	unsigned int nbhexa = hexa.size()/8;
	unsigned int nbtetra = tetra.size()/4;


	fout << "<?xml version=\"1.0\"?>" << std::endl;
	fout << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"BigEndian\">" << std::endl;
	fout << "  <UnstructuredGrid>" <<  std::endl;
	fout << "    <Piece NumberOfPoints=\"" << position.nbElements() << "\" NumberOfCells=\""<< (nbhexa+nbtetra) << "\">" << std::endl;
	fout << "      <Points>" << std::endl;
	fout << "        <DataArray type=\"Float32\" NumberOfComponents=\"3\" format=\"ascii\">" << std::endl;

	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		const VEC3& P = position[i];
		fout << "          " << P[0]<< " " << P[1]<< " " << P[2] << std::endl;
	}

	fout << "        </DataArray>" << std::endl;
	fout << "      </Points>" << std::endl;
	fout << "      <Cells>" << std::endl;
	fout << "        <DataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\">" << std::endl;

	if (nbhexa!=0)
	{
		for (unsigned int i=0; i<nbhexa; ++i)
		{
			fout << "          ";
			fout << hexa[8*i]   << " " << hexa[8*i+1] << " " << hexa[8*i+2] << " " << hexa[8*i+3] << " " << hexa[8*i+4] << " ";
			fout << hexa[8*i+5] << " " << hexa[8*i+6] << " " << hexa[8*i+7] << std::endl;
		}
	}

	if (nbtetra != 0)
	{

		for (unsigned int i=0; i<nbtetra; ++i)
		{
			fout << "          ";
			fout << tetra[4*i] << " " << tetra[4*i+1] << " " << tetra[4*i+2] << " " << tetra[4*i+3] << std::endl;
		}
	}

	fout << "        </DataArray>" << std::endl;
	fout << "        <DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\">" << std::endl;
	fout << "         ";
	unsigned int offset = 0;
	for (unsigned int i=0; i<nbhexa; ++i)
	{
		offset += 8;
		fout << " " << offset;
	}
	for (unsigned int i=0; i<nbtetra; ++i)
	{
		offset += 4;
		fout << " "<< offset;
	}

	fout << std::endl << "        </DataArray>" << std::endl;
	fout << "        <DataArray type=\"UInt8\" Name=\"types\" format=\"ascii\">" << std::endl;
	fout << "         ";
	for (unsigned int i=0; i<nbhexa; ++i)
	{
		fout << " 12";
	}
	for (unsigned int i=0; i<nbtetra; ++i)
	{
		fout << " 10";
	}

	fout << std::endl << "        </DataArray>" << std::endl;
	fout << "      </Cells>" << std::endl;
	fout << "    </Piece>" << std::endl;
	fout << "  </UnstructuredGrid>" << std::endl;
	fout << "</VTKFile>" << std::endl;

	fout.close();
	return true;
}



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
template <typename PFP>
bool exportMSH(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	// open file
	std::ofstream fout ;
	fout.open(filename, std::ios::out) ;

	if (!fout.good())
	{
		CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
		return false ;
	}
Sylvain Thery's avatar
Sylvain Thery committed
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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457

	VertexAutoAttribute<unsigned int> indices(map,"indices_vert");

	fout << "$NOD" << std::endl;
	fout << position.nbElements()<< std::endl;
	unsigned int count=1;
	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		const VEC3& P = position[i];
		fout << count << " " << P[0]<< " " << P[1]<< " " << P[2] << std::endl;
		indices[i] = count++;
	}


	std::vector<unsigned int> hexa;
	std::vector<unsigned int> tetra;
	hexa.reserve(2048);
	tetra.reserve(2048);

	TraversorW<MAP> trav(map) ;
	for(Dart d = trav.begin(); d != trav.end(); d = trav.next())
	{
		unsigned int degree = 0 ;

		Traversor3WV<typename PFP::MAP> twv(map, d) ;
		for(Dart it = twv.begin(); it != twv.end(); it = twv.next())
		{
			degree++;
		}

		if (degree == 8)
		{
			//CAS HEXAEDRIQUE (ordre 2 quad superposes, le premier en CW)
			Dart e = d;
			Dart f = map.template phi<21121>(d);
			hexa.push_back(indices[f]);
			f = map.phi_1(f);
			hexa.push_back(indices[f]);
			f = map.phi_1(f);
			hexa.push_back(indices[f]);
			f = map.phi_1(f);
			hexa.push_back(indices[f]);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
			e = map.phi1(e);
			hexa.push_back(indices[e]);
		}

		if (degree == 4)
		{
			//CAS TETRAEDRIQUE
			Dart e = d;
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.template phi<211>(e);
			tetra.push_back(indices[e]);
		}
	}

	fout << "$ENDNOD" << std::endl;
	fout << "$ELM" << std::endl;

	unsigned int countCell=1;
	unsigned int nbhexa = hexa.size()/8;
	unsigned int nbtetra = tetra.size()/4;

	fout << (nbhexa+nbtetra) << std::endl;
	if (nbhexa!=0)
	{
		for (unsigned int i=0; i<nbhexa; ++i)
		{
			fout << countCell++ << " 5 1 1 8 ";
			fout << hexa[8*i]   << " " << hexa[8*i+1] << " " << hexa[8*i+2] << " " << hexa[8*i+3] << " " << hexa[8*i+4] << " ";
			fout << hexa[8*i+5] << " " << hexa[8*i+6] << " " << hexa[8*i+7] << std::endl;
		}
	}

	if (nbtetra != 0)
	{

		for (unsigned int i=0; i<nbtetra; ++i)
		{
			fout << countCell++ << " 4 1 1 4 ";
			fout << tetra[4*i] << " " << tetra[4*i+1] << " " << tetra[4*i+2] << " " << tetra[4*i+3] << std::endl;
		}
	}

	fout << "$ENDELM" << std::endl;

	fout.close();
	return true;

458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
}


template <typename PFP>
bool exportTet(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

	// open file
	std::ofstream fout ;
	fout.open(filename, std::ios::out) ;

	if (!fout.good())
	{
		CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
		return false ;
	}
Sylvain Thery's avatar
Sylvain Thery committed
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

	VertexAutoAttribute<unsigned int> indices(map,"indices_vert");

	fout << position.nbElements()<< " vertices" <<std::endl;

	std::vector<unsigned int> tetra;
	tetra.reserve(2048);


	unsigned int count=0;
	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		indices[i] = count++;
	}

	TraversorW<MAP> trav(map) ;
	for(Dart d = trav.begin(); d != trav.end(); d = trav.next())
	{
		unsigned int degree = 0 ;

		Traversor3WV<typename PFP::MAP> twv(map, d) ;
		for(Dart it = twv.begin(); it != twv.end(); it = twv.next())
		{
			degree++;
		}

		if (degree == 4)
		{
			Dart e = d;
			tetra.push_back(indices[e]);
			e = map.phi_1(e);
			tetra.push_back(indices[e]);
			e = map.phi_1(e);
			tetra.push_back(indices[e]);
			e = map.template phi<211>(e);
			tetra.push_back(indices[e]);
		}
	}

	unsigned int nbtetra = tetra.size()/4;
	fout << nbtetra << " tets" << std::endl;

	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		const VEC3& P = position[i];
		fout << P[0]<< " " << P[1]<< " " << P[2] << std::endl;
	}

	for (unsigned int i=0; i<nbtetra; ++i)
	{
		fout << "4 " << tetra[4*i] << " " << tetra[4*i+1] << " " << tetra[4*i+2] << " " << tetra[4*i+3] << std::endl;
	}

	fout.close();
	return true;
531
532
533
534
535
536
537
538
539
}


template <typename PFP>
bool exportNodeEle(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename)
{
	typedef typename PFP::MAP MAP;
	typedef typename PFP::VEC3 VEC3;

Sylvain Thery's avatar
Sylvain Thery committed
540
541
542
543
544
	std::string base(filename);
	std::string fnNode = base + ".node";
	std::string fnEle = base + ".ele";

	// open files
545
	std::ofstream fout ;
Sylvain Thery's avatar
Sylvain Thery committed
546
547
	fout.open(fnNode.c_str(), std::ios::out) ;

548
549
550
551
552
553
554
555

	if (!fout.good())
	{
		CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
		return false ;
	}

	std::ofstream foutEle ;
Sylvain Thery's avatar
Sylvain Thery committed
556
	foutEle.open(fnEle.c_str(), std::ios::out) ;
557

Sylvain Thery's avatar
Sylvain Thery committed
558
	if (!foutEle.good())
559
560
561
562
	{
		CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
		return false ;
	}
Sylvain Thery's avatar
Sylvain Thery committed
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645

	VertexAutoAttribute<unsigned int> indices(map,"indices_vert");

	fout << position.nbElements()<< " 3  0  0"<<std::endl;
	unsigned int count=0;
	for (unsigned int i = position.begin(); i != position.end(); position.next(i))
	{
		const VEC3& P = position[i];
		fout << count << " " << P[0]<< " " << P[1]<< " " << P[2] << std::endl;
		indices[i] = count++;
	}

	fout.close();


	std::vector<unsigned int> hexa;
	std::vector<unsigned int> tetra;
	hexa.reserve(2048);
	tetra.reserve(2048);

	TraversorW<MAP> trav(map) ;
	for(Dart d = trav.begin(); d != trav.end(); d = trav.next())
	{
		unsigned int degree = 0 ;

		Traversor3WV<typename PFP::MAP> twv(map, d) ;
		for(Dart it = twv.begin(); it != twv.end(); it = twv.next())
		{
			degree++;
		}

//		if (degree == 8)
//		{
//			//CAS HEXAEDRIQUE (ordre 2 quad superposes, le premier en CW)
//			Dart e = d;
//			Dart f = map.template phi<21121>(d);
//			hexa.push_back(indices[f]);
//			e = map.phi_1(f);
//			hexa.push_back(indices[f]);
//			e = map.phi_1(f);
//			hexa.push_back(indices[f]);
//			e = map.phi_1(f);
//			hexa.push_back(indices[f]);
//			hexa.push_back(indices[e]);
//			e = map.phi1(e);
//			hexa.push_back(indices[e]);
//			e = map.phi1(e);
//			hexa.push_back(indices[e]);
//			e = map.phi1(e);
//			hexa.push_back(indices[e]);
//		}

		if (degree == 4)
		{
			//CAS TETRAEDRIQUE
			Dart e = d;
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.phi1(e);
			tetra.push_back(indices[e]);
			e = map.template phi<211>(e);
			tetra.push_back(indices[e]);
		}
	}

	unsigned int countCell=0;
	unsigned int nbtetra = tetra.size()/4;

	foutEle << nbtetra << " 4  0" << std::endl;

	if (nbtetra != 0)
	{

		for (unsigned int i=0; i<nbtetra; ++i)
		{
			foutEle << countCell++ << "  " << tetra[4*i] << " " << tetra[4*i+1] << " " << tetra[4*i+2] << " " << tetra[4*i+3] << std::endl;
		}
	}

	foutEle.close();

	return true;
646
647
648
649
650
651
652
653
654
655
}


} // namespace Export

}

} // namespace Algo

} // namespace CGoGN