Moka libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mesh-interface.cc
Go to the documentation of this file.
1 /*
2  * lib-mesh : Opérations de maillage et lissage.
3  * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS,
6  * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/
7  *
8  * This file is part of lib-mesh
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 //******************************************************************************
25 #include "mesh-interface.hh"
26 #include "g-map-vertex.hh"
27 #include <cstdlib>
28 #include <cassert>
29 using namespace GMap3d;
30 //******************************************************************************
31 CMesh::CMesh(CGMapVertex* AMap) :
32  FMap(AMap),
33  FMesh(AMap)
34 {
35  assert(FMap != NULL);
36 }
37 //------------------------------------------------------------------------------
39 {
40 }
41 //******************************************************************************
42 int CMesh::meshMarkedEdges(int AMarkNumber, int ASx,
43  const CTransformationMatrix* AMeshMatrix,
44  bool AMeshWithMerges,
45  bool AMeshWithAdjacentSews,
46  bool AMeshAssociatedCells,
47  int ADirectInfoAlpha0, int ADirectInfoAssoc)
48 {
49  assert(ASx>0);
50 
51  CDynamicCoverageAll it(FMap);
52  int nbMeshed = 0;
53  int treated = FMap->getNewMark();
54 
55  int direct0, assoc;
56  int toMesh;
57 
58  // Initialisation:
59  if (ADirectInfoAlpha0>=0 || ADirectInfoAssoc>=0)
60  {
61  direct0 = ADirectInfoAlpha0;
62  assoc = ADirectInfoAssoc;
63  toMesh = AMarkNumber;
64  }
65  else
66  {
67  if (AMeshWithMerges)
68  {
69  direct0 = FMap->getNewDirectInfo();
70  assoc = -1;
71  }
72  else
73  {
74  direct0 = -1;
75  assoc = FMap->getNewDirectInfo();
76  }
77 
78  toMesh = FMap->getNewMark();
79 
80  // Marquage des arêtes qui peuvent être maillées:
81  for (it.reinit(); it.cont(); ++it)
82  if (!FMap->isMarked(*it, treated))
83  {
84  if (FMap->isMarked(*it, AMarkNumber))
85  {
86  if (FMesh.canMesh1(*it))
87  {
88  for (CDynamicCoverageEdge cov(FMap, *it); cov.cont(); ++cov)
89  {
90  if (FMap->isMarked( *cov , AMarkNumber) ||
91  FMap->isMarked(FMap->alpha0(*cov), AMarkNumber))
92  FMap->markOrbit(*cov, ORBIT_0, toMesh);
93 
94  FMap->markOrbit(*cov, ORBIT_0, treated);
95  }
96 
97  ++nbMeshed;
98  }
99  }
100  else
101  FMap->setMark(*it, treated);
102  }
103 
104  FMap->negateMaskMark(treated);
105 
106  if (AMeshWithMerges)
107  // Sauvegarde des 0-coutures:
108  FMap->saveAlphaInDirectInfo(0, direct0);
109  else
110  // Duplication des cellules:
111  if (AMeshWithAdjacentSews)
112  FMap->duplicateMarkedDarts(toMesh, FMap, assoc, false);
113  }
114 
115  // Maillage:
116  for (it.reinit(); it.cont(); ++it)
117  if (!FMap->isMarked(*it, treated))
118  {
119  if (FMap->isMarked(*it, toMesh))
120  {
121  FMap->markOrbit(*it, ORBIT_EDGE, treated);
122 
123  if (AMeshWithMerges)
124  {
125  FMesh.mesh1(*it, ASx, AMeshMatrix, AMeshWithMerges, AMeshWithAdjacentSews,
126  AMeshAssociatedCells, direct0, assoc);
127 
128  CDart* current = FMap->alpha0(*it);
129 
130  for (int i=1; i<ASx; ++i)
131  {
132  FMap->markOrbit(current, ORBIT_23, treated);
133  current = FMap->alpha1(current);
134  FMap->markOrbit(current, ORBIT_23, treated);
135  current = FMap->alpha0(current);
136  }
137  }
138  else
139  {
140  if (AMeshWithAdjacentSews)
141  {
142  CDynamicCoverage23 cov(FMap, *it);
143 
144  for (; cov.cont(); ++cov)
145  if (FMap->isMarked(*cov, toMesh))
146  FMap->unsetMark(FMap->getDirectInfoAsDart(*cov, assoc), treated);
147 
148  for (cov.reinit(); cov.cont(); ++cov)
149  if (FMap->isMarked(*cov, toMesh))
150  {
151  CDart* current =
152  FMap->getDirectInfoAsDart(*cov, assoc);
153 
154  if (!FMap->isMarked(current, treated))
155  {
156  FMesh.mesh1(*cov, ASx, AMeshMatrix,
157  AMeshWithMerges,
158  AMeshWithAdjacentSews,
159  AMeshAssociatedCells,
160  direct0, assoc);
161 
162  for (int i=0; i<ASx; ++i)
163  {
164  FMap->markOrbit(current, ORBIT_23, treated);
165  current = FMap->alpha0(current);
166  FMap->markOrbit(current, ORBIT_23, treated);
167  current = FMap->alpha1(current);
168  }
169  }
170  }
171  }
172  else
173  {
174  FMap->markOrbit(*it, ORBIT_EDGE, treated);
175 
176  FMesh.mesh1(*it, ASx, AMeshMatrix, AMeshWithMerges,
177  AMeshWithAdjacentSews, AMeshAssociatedCells,
178  direct0, assoc);
179 
180  CDart* current = FMap->getDirectInfoAsDart(*it, assoc);
181 
182  for (int i=0; i<ASx; ++i)
183  {
184  FMap->markOrbit(current, ORBIT_23, treated);
185  current = FMap->alpha0(current);
186  FMap->markOrbit(current, ORBIT_23, treated);
187  current = FMap->alpha1(current);
188  }
189  }
190  }
191  }
192  else
193  FMap->setMark(*it, treated);
194  }
195 
196  FMap->negateMaskMark(treated);
197  FMap->freeMark(treated);
198 
199  if (ADirectInfoAlpha0<0 && ADirectInfoAssoc<0)
200  {
201  if (direct0>=0)
202  FMap->freeDirectInfo(direct0);
203 
204  if (assoc>=0)
205  FMap->freeDirectInfo(assoc);
206 
207  FMap->unmarkAll(toMesh);
208  FMap->freeMark(toMesh);
209  }
210 
211  return nbMeshed;
212 }
213 //------------------------------------------------------------------------------
214 int CMesh::meshMarkedSquares(int AMarkNumber, int ASx, int ASy,
215  const CTransformationMatrix* AMeshMatrix,
216  bool AMeshWithMerges,
217  bool AMeshWithAdjacentSews,
218  bool AMeshAssociatedCells,
219  int AInitialMeshDim, int AFinalMeshDim,
220  int ADirectInfoAlpha0, int ADirectInfoAssoc)
221 {
222  assert(ASx>0);
223  assert(ASy>0);
224  assert(0<=AInitialMeshDim && AInitialMeshDim<=1);
225  assert(1<=AFinalMeshDim && AFinalMeshDim <=2);
226  assert(AInitialMeshDim < AFinalMeshDim);
227 
228  CDynamicCoverageAll it(FMap);
229  int nbMeshed = 0;
230  int treated = FMap->getNewMark();
231 
232  int toMesh2 = AFinalMeshDim==2 ? FMap->getNewMark() : -1;
233  int toMeshX = FMap->getNewMark();
234  int toMeshY = ASx==ASy ? toMeshX : FMap->getNewMark();
235 
236  int direct0, assoc;
237 
238  if (ADirectInfoAlpha0>=0 || ADirectInfoAssoc>=0)
239  {
240  direct0 = ADirectInfoAlpha0;
241  assoc = ADirectInfoAssoc;
242  }
243  else
244  {
245  if (AMeshWithMerges)
246  {
247  direct0 = AInitialMeshDim==0 ? FMap->getNewDirectInfo() : -1;
248  assoc = -1;
249  }
250  else
251  {
252  direct0 = -1;
253  assoc = FMap->getNewDirectInfo();
254  }
255 
256  // Marquage des faces qui peuvent être maillées:
257  for (it.reinit(); it.cont(); ++it)
258  if (!FMap->isMarked(*it, treated))
259  {
260  if (FMap->isMarked(*it, AMarkNumber))
261  {
262  CDart* current = *it;
263 
264  if (FMesh.canMesh2(current, ASx,ASy, AInitialMeshDim))
265  {
266  bool canMesh = true;
267 
268  if (AInitialMeshDim==0)
269  {
270  if (ASx!=ASy)
271  {
272  canMesh = false;
273 
274  for (CDynamicCoverage01 fac(FMap, current);
275  !canMesh && fac.cont(); ++fac)
276  if (FMap->isMarked(*fac, AMarkNumber) &&
277  FMesh.isFreeTopoSquareIMeshed(0, *fac,
278  ASx,ASy,
279  toMeshY,-1,
280  toMeshX,-1))
281  {
282  current = *fac;
283  canMesh = true;
284  }
285  }
286 
287  if (canMesh)
288  FMesh.markTopoSquareIMeshed(0, current, ASx,ASy,
289  toMeshX, toMeshY);
290  }
291 
292  if (canMesh)
293  {
294  ++nbMeshed;
295 
296  if (AFinalMeshDim==2)
297  FMap->setMark(current, toMesh2);
298  }
299  }
300 
301  FMap->markOrbit(current, ORBIT_FACE, treated);
302  }
303  else
304  FMap->setMark(*it, treated);
305  }
306 
307  FMap->negateMaskMark(treated);
308 
309  if (AMeshWithMerges)
310  {
311  if (AInitialMeshDim==0)
312  FMap->saveAlphaInDirectInfo(0, direct0);
313  }
314  else
315  {
316  int toDuplicate = FMap->getNewMark();
317 
318  if (AInitialMeshDim==0)
319  {
320  int markedEdges = FMap->getNewMark();
321 
322  FMap->markCopy(toMeshX, markedEdges);
323  FMap->markAdd (toMeshY, markedEdges);
324 
325  FMap->negateMaskMark(markedEdges);
326  FMap->markIncidentCells(ORBIT_FACE, markedEdges);
327  FMap->negateMaskMark(markedEdges);
328 
329  FMap->markCopy(AMarkNumber, toDuplicate);
330  FMap->markAnd (markedEdges, toDuplicate);
331  FMap->markIncidentCells(ORBIT_FACE, toDuplicate);
332 
333  FMap->markAnd(toDuplicate, toMeshX);
334  FMap->markAnd(toDuplicate, toMeshY);
335 
336  FMap->unmarkAll(markedEdges);
337  FMap->freeMark(markedEdges);
338  }
339  else
340  FMap->markIncidentCells(AMeshWithAdjacentSews ? ORBIT_FACE : ORBIT_01,
341  toMesh2, toDuplicate);
342 
343  if (AInitialMeshDim!=0 || AMeshWithAdjacentSews)
344  FMap->duplicateMarkedDarts(toDuplicate, FMap, assoc, false,
345  true, true, AMeshWithAdjacentSews, true);
346 
347  FMap->unmarkAll(toDuplicate);
348  FMap->freeMark(toDuplicate);
349  }
350  }
351 
352  FMap->freeMark(treated);
353 
354  // 1) Maillage 1d:
355  if (AInitialMeshDim==0)
356  {
357  if (AMeshWithMerges || AMeshWithAdjacentSews)
358  {
359  meshMarkedEdges(toMeshX, ASx, AMeshMatrix, AMeshWithMerges,
360  AMeshWithAdjacentSews, AMeshAssociatedCells,
361  direct0, assoc);
362 
363  if (ASy!=ASx)
364  meshMarkedEdges(toMeshY, ASy, AMeshMatrix, AMeshWithMerges,
365  AMeshWithAdjacentSews, AMeshAssociatedCells,
366  direct0, assoc);
367  }
368  else
369  {
370  AMeshAssociatedCells = true;
371 
372  int mark = AFinalMeshDim == 2 ? toMesh2 : toMeshX;
373 
374  for (it.reinit(); it.cont(); ++it)
375  if (FMap->isMarked(*it, mark))
376  {
377  CDart* square = FMap->duplicateDarts(*it, ORBIT_01, NULL, assoc);
378 
379  FMap->setDirectInfo(*it, assoc, square);
380 
381  FMesh.mesh2(*it, ASx, ASy, AMeshMatrix, AMeshWithMerges,
382  AMeshWithAdjacentSews, AMeshAssociatedCells, false,
383  0,1, direct0, assoc);
384 
385  FMap->unmarkOrbit(*it, ORBIT_FACE, toMeshX);
386  FMap->unmarkOrbit(*it, ORBIT_FACE, toMeshY);
387  }
388 
389  AMeshAssociatedCells = false;
390  }
391 
392  FMap->unmarkAll(toMeshX);
393  FMap->freeMark(toMeshX);
394 
395  if (toMeshY != toMeshX)
396  {
397  FMap->unmarkAll(toMeshY);
398  FMap->freeMark(toMeshY);
399  }
400  }
401 
402  // 2) Maillage 2d:
403  if (AFinalMeshDim==2)
404  {
405  AMeshAssociatedCells = ! AMeshWithMerges;
406  bool getAssociatedEmbeddings = AMeshAssociatedCells && AInitialMeshDim!=1;
407 
408  for (it.reinit(); it.cont(); ++it)
409  if (FMap->isMarked(*it, toMesh2))
410  {
411  FMesh.mesh2(*it, ASx,ASy, AMeshMatrix, AMeshWithMerges,
412  AMeshWithAdjacentSews, AMeshAssociatedCells,
413  getAssociatedEmbeddings,
414  1,2, direct0, assoc);
415  FMap->unsetMark(*it, toMesh2);
416  }
417 
418  AMeshAssociatedCells = false;
419 
420  FMap->freeMark(toMesh2);
421  }
422 
423  if (ADirectInfoAlpha0<0 && direct0>=0)
424  FMap->freeDirectInfo(direct0);
425 
426  if (ADirectInfoAssoc<0 && assoc>=0)
427  FMap->freeDirectInfo(assoc);
428 
429  return nbMeshed;
430 }
431 //------------------------------------------------------------------------------
432 int CMesh::meshMarkedCubes(int AMarkNumber, int ASx, int ASy, int ASz,
433  const CTransformationMatrix* AMeshMatrix,
434  bool AMeshWithMerges,
435  bool AMeshWithAdjacentSews,
436  bool AMeshAssociatedCells,
437  int AInitialMeshDim, int AFinalMeshDim,
438  int ADirectInfoAlpha0, int ADirectInfoAssoc)
439 {
440  assert(ASx>0);
441  assert(ASy>0);
442  assert(ASz>0);
443  assert(0<=AInitialMeshDim && AInitialMeshDim<=2);
444  assert(1<=AFinalMeshDim && AFinalMeshDim <=3);
445  assert(AInitialMeshDim < AFinalMeshDim);
446 
447  CDynamicCoverageAll it(FMap);
448  int nbMeshed = 0;
449  int treated = FMap->getNewMark();
450  int selected = FMap->getNewMark();
451 
452  int toMesh3 = AFinalMeshDim==3 ? FMap->getNewMark() : -1;
453  int toMeshX = FMap->getNewMark();
454  int toMeshY = ASy==ASx ? toMeshX : FMap->getNewMark();
455  int toMeshZ = ASz==ASx ? toMeshX : ASz==ASy ? toMeshY : FMap->getNewMark();
456 
457  int s[3] = { ASx, ASy, ASz };
458  int m[3] = { toMeshX, toMeshY, toMeshZ };
459 
460  int direct0, assoc;
461 
462  if (ADirectInfoAssoc >= 0)
463  {
464  direct0 = ADirectInfoAlpha0;
465  assoc = ADirectInfoAssoc;
466  }
467  else
468  {
469  if (AMeshWithMerges)
470  {
471  direct0 = AInitialMeshDim==0 ? FMap->getNewDirectInfo() : -1;
472  assoc = -1;
473  }
474  else
475  {
476  direct0 = -1;
477  assoc = FMap->getNewDirectInfo();
478  }
479 
480  // 0) Repérage des cubes sélectionnés qui peuvent être maillés:
481  for (it.reinit(); it.cont(); ++it)
482  if (!FMap->isMarked(*it, treated))
483  {
484  if (FMap->isMarked(*it, AMarkNumber))
485  {
486  CDart* current = *it;
487 
488  if (FMesh.canMesh3(current, ASx,ASy,ASz, AInitialMeshDim))
489  {
490  bool canMesh = true;
491 
492  if (AInitialMeshDim<=1)
493  {
494  if (ASx!=ASy || ASy!=ASz)
495  {
496  int alt[3][2];
497 
498  for (int dim=0; dim<3; ++dim)
499  if (s[(dim+1)%3]==s[dim])
500  {
501  alt[dim][0] = m[(dim+2)%3];
502  alt[dim][1] = -1;
503  }
504  else
505  {
506  alt[dim][0] = m[(dim+1)%3];
507 
508  if (s[(dim+2)%3]==s[dim] ||
509  s[(dim+2)%3]==s[(dim+1)%3])
510  alt[dim][1] = -1;
511  else
512  alt[dim][1] = m[(dim+2)%3];
513  }
514 
515  canMesh =
516  FMesh.isFreeTopoCubeIMeshed(AInitialMeshDim,
517  current,
518  ASx,ASy,ASz,
519  alt[0][0], alt[0][1],
520  alt[1][0], alt[1][1],
521  alt[2][0], alt[2][1]);
522  }
523 
524  if (canMesh)
525  {
526  FMesh.markTopoCubeIMeshed(AInitialMeshDim, current,
527  ASx,ASy,ASz,
528  toMeshX, toMeshY, toMeshZ);
529  FMap->markOrbit(current, ORBIT_VOLUME, selected);
530  }
531  }
532 
533  if (canMesh)
534  {
535  ++nbMeshed;
536 
537  if (AFinalMeshDim==3)
538  FMap->setMark(current, toMesh3);
539 
540  FMap->markOrbit(current, ORBIT_VOLUME, treated);
541  }
542  }
543  }
544  else
545  FMap->setMark(*it, treated);
546  }
547 
548  FMap->negateMaskMark(treated);
549 
550  if (AMeshWithMerges)
551  {
552  if (AInitialMeshDim==0)
553  FMap->saveAlphaInDirectInfo(0, direct0);
554  }
555  else
556  {
557  int toDuplicate = FMap->getNewMark();
558 
559  if (AInitialMeshDim<=1)
560  {
561  int markedEdges = FMap->getNewMark();
562 
563  FMap->markCopy(toMeshX, markedEdges);
564  FMap->markAdd (toMeshY, markedEdges);
565  FMap->markAdd (toMeshZ, markedEdges);
566 
567 
568  FMap->markCopy(markedEdges, 1);
569  //if (AInitialMeshDim!=0)
570  // FMap->markIncidentCells(ORBIT_EDGE, markedEdges);
571 
572  FMap->negateMaskMark(markedEdges);
573  FMap->markIncidentCells(ORBIT_VOLUME, markedEdges);
574  FMap->negateMaskMark(markedEdges);
575 
576  FMap->markCopy(AMarkNumber, toDuplicate);
577  FMap->markAnd (markedEdges, toDuplicate);
578  FMap->markIncidentCells(ORBIT_VOLUME, toDuplicate);
579 
580  FMap->markAnd(toDuplicate, toMeshX);
581  FMap->markAnd(toDuplicate, toMeshY);
582  FMap->markAnd(toDuplicate, toMeshZ);
583 
584  FMap->unmarkAll(markedEdges);
585  FMap->freeMark(markedEdges);
586  }
587  else
588  FMap->markIncidentCells(ORBIT_VOLUME, toMesh3, toDuplicate);
589 
590  if (AInitialMeshDim!=0 || AMeshWithAdjacentSews)
591  FMap->duplicateMarkedDarts(toDuplicate, FMap, assoc, false,
592  true, true, true, AMeshWithAdjacentSews);
593 
594  FMap->unmarkAll(toDuplicate);
595  FMap->freeMark(toDuplicate);
596  }
597  }
598 
599  // 1) Maillage 1d:
600  if (AInitialMeshDim==0)
601  {
602  if (AMeshWithMerges || AMeshWithAdjacentSews)
603  {
604  meshMarkedEdges(toMeshX, ASx, AMeshMatrix, AMeshWithMerges,
605  AMeshWithAdjacentSews, AMeshAssociatedCells,
606  direct0, assoc);
607 
608  if (ASy!=ASx)
609  meshMarkedEdges(toMeshY, ASy, AMeshMatrix, AMeshWithMerges,
610  AMeshWithAdjacentSews, AMeshAssociatedCells,
611  direct0, assoc);
612 
613  if (ASz!=ASx && ASz!=ASy)
614  meshMarkedEdges(toMeshZ, ASz, AMeshMatrix, AMeshWithMerges,
615  AMeshWithAdjacentSews, AMeshAssociatedCells,
616  direct0, assoc);
617  }
618  else
619  {
620  AMeshAssociatedCells = true;
621 
622  int mark = AFinalMeshDim == 3 ? toMesh3 : toMeshX;
623 
624  for (it.reinit(); it.cont(); ++it)
625  if (FMap->isMarked(*it, mark))
626  {
627  CDart* cube = FMap->duplicateDarts(*it, ORBIT_012, NULL, assoc);
628 
629  FMap->setDirectInfo(*it, assoc, cube);
630 
631  FMesh.mesh3(*it, ASx,ASy,ASz, AMeshMatrix,
632  AMeshWithMerges, AMeshWithAdjacentSews,
633  AMeshAssociatedCells, 0,1, direct0, assoc);
634 
635  FMap->unmarkOrbit(*it, ORBIT_VOLUME, toMeshX);
636  FMap->unmarkOrbit(*it, ORBIT_VOLUME, toMeshY);
637  FMap->unmarkOrbit(*it, ORBIT_VOLUME, toMeshZ);
638  }
639 
640  AMeshAssociatedCells = false;
641  }
642  }
643 
644  // 2) Maillage 2d:
645  if (AInitialMeshDim<=1 && AFinalMeshDim>=2)
646  {
647  AMeshAssociatedCells = !AMeshWithMerges;
648 
649  for (it.reinit(); it.cont(); ++it)
650  if (!FMap->isMarked(*it, treated))
651  {
652  if (FMap->isMarked(*it, toMeshX))
653  {
654  if (FMap->isMarked(FMap->alpha1(*it), toMeshY))
655  {
656  FMap->markOrbit(*it, ORBIT_FACE, treated);
657  FMesh.mesh2(*it, ASx,ASy, AMeshMatrix, AMeshWithMerges,
658  AMeshWithAdjacentSews, AMeshAssociatedCells,
659  false, 1,2, direct0, assoc);
660  }
661  else if (FMap->isMarked(FMap->alpha1(*it), toMeshZ))
662  {
663  FMap->markOrbit(*it, ORBIT_FACE, treated);
664  FMesh.mesh2(*it, ASx,ASz, AMeshMatrix, AMeshWithMerges,
665  AMeshWithAdjacentSews, AMeshAssociatedCells,
666  1,2, direct0, assoc);
667  }
668  }
669  else if (FMap->isMarked(*it, toMeshY))
670  {
671  if (FMap->isMarked(FMap->alpha1(*it), toMeshZ))
672  {
673  FMap->markOrbit(*it, ORBIT_FACE, treated);
674  FMesh.mesh2(*it, ASy,ASz, AMeshMatrix, AMeshWithMerges,
675  AMeshWithAdjacentSews, AMeshAssociatedCells,
676  false, 1,2, direct0, assoc);
677  }
678  }
679  }
680 
681  AMeshAssociatedCells = false;
682  }
683 
684  FMap->unmarkAll(treated);
685  FMap->freeMark(treated);
686 
687  // 3) Maillage 3d:
688 
689  if (AFinalMeshDim==3)
690  {
691  for (it.reinit(); it.cont(); ++it)
692  if (FMap->isMarked(*it, toMesh3))
693  {
694  FMesh.mesh3(*it, ASx,ASy,ASz, AMeshMatrix,
695  AMeshWithMerges, AMeshWithAdjacentSews,
696  AMeshAssociatedCells, 2,3, direct0, assoc);
697  FMap->unsetMark(*it, toMesh3);
698  }
699 
700  FMap->freeMark(toMesh3);
701  }
702 
703  // Libération des marques:
704  FMap->unmarkAll(toMeshX);
705  FMap->freeMark(toMeshX);
706 
707  if (ASy!=ASx)
708  {
709  FMap->unmarkAll(toMeshY);
710  FMap->freeMark(toMeshY);
711  }
712 
713  if (ASz!=ASx && ASz!=ASy)
714  {
715  FMap->unmarkAll(toMeshZ);
716  FMap->freeMark(toMeshZ);
717  }
718 
719  FMap->unmarkAll(selected);
720  FMap->freeMark(selected);
721 
722  if (ADirectInfoAlpha0<0 && direct0>=0)
723  FMap->freeDirectInfo(direct0);
724 
725  if (ADirectInfoAssoc<0 && assoc>=0)
726  FMap->freeDirectInfo(assoc);
727 
728  return nbMeshed;
729 }
730 //******************************************************************************