00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "mesh-interface.hh"
00026 #include "g-map-vertex.hh"
00027 #include <cstdlib>
00028 #include <cassert>
00029 using namespace GMap3d;
00030
00031 CMesh::CMesh(CGMapVertex* AMap) :
00032 FMap(AMap),
00033 FMesh(AMap)
00034 {
00035 assert(FMap != NULL);
00036 }
00037
00038 CMesh::~CMesh()
00039 {
00040 }
00041
00042 int CMesh::meshMarkedEdges(int AMarkNumber, int ASx,
00043 const CTransformationMatrix* AMeshMatrix,
00044 bool AMeshWithMerges,
00045 bool AMeshWithAdjacentSews,
00046 bool AMeshAssociatedCells,
00047 int ADirectInfoAlpha0, int ADirectInfoAssoc)
00048 {
00049 assert(ASx>0);
00050
00051 CDynamicCoverageAll it(FMap);
00052 int nbMeshed = 0;
00053 int treated = FMap->getNewMark();
00054
00055 int direct0, assoc;
00056 int toMesh;
00057
00058
00059 if (ADirectInfoAlpha0>=0 || ADirectInfoAssoc>=0)
00060 {
00061 direct0 = ADirectInfoAlpha0;
00062 assoc = ADirectInfoAssoc;
00063 toMesh = AMarkNumber;
00064 }
00065 else
00066 {
00067 if (AMeshWithMerges)
00068 {
00069 direct0 = FMap->getNewDirectInfo();
00070 assoc = -1;
00071 }
00072 else
00073 {
00074 direct0 = -1;
00075 assoc = FMap->getNewDirectInfo();
00076 }
00077
00078 toMesh = FMap->getNewMark();
00079
00080
00081 for (it.reinit(); it.cont(); ++it)
00082 if (!FMap->isMarked(*it, treated))
00083 {
00084 if (FMap->isMarked(*it, AMarkNumber))
00085 {
00086 if (FMesh.canMesh1(*it))
00087 {
00088 for (CDynamicCoverageEdge cov(FMap, *it); cov.cont(); ++cov)
00089 {
00090 if (FMap->isMarked( *cov , AMarkNumber) ||
00091 FMap->isMarked(FMap->alpha0(*cov), AMarkNumber))
00092 FMap->markOrbit(*cov, ORBIT_0, toMesh);
00093
00094 FMap->markOrbit(*cov, ORBIT_0, treated);
00095 }
00096
00097 ++nbMeshed;
00098 }
00099 }
00100 else
00101 FMap->setMark(*it, treated);
00102 }
00103
00104 FMap->negateMaskMark(treated);
00105
00106 if (AMeshWithMerges)
00107
00108 FMap->saveAlphaInDirectInfo(0, direct0);
00109 else
00110
00111 if (AMeshWithAdjacentSews)
00112 FMap->duplicateMarkedDarts(toMesh, assoc, false);
00113 }
00114
00115
00116 for (it.reinit(); it.cont(); ++it)
00117 if (!FMap->isMarked(*it, treated))
00118 {
00119 if (FMap->isMarked(*it, toMesh))
00120 {
00121 FMap->markOrbit(*it, ORBIT_EDGE, treated);
00122
00123 if (AMeshWithMerges)
00124 {
00125 FMesh.mesh1(*it, ASx, AMeshMatrix, AMeshWithMerges, AMeshWithAdjacentSews,
00126 AMeshAssociatedCells, direct0, assoc);
00127
00128 CDart* current = FMap->alpha0(*it);
00129
00130 for (int i=1; i<ASx; ++i)
00131 {
00132 FMap->markOrbit(current, ORBIT_23, treated);
00133 current = FMap->alpha1(current);
00134 FMap->markOrbit(current, ORBIT_23, treated);
00135 current = FMap->alpha0(current);
00136 }
00137 }
00138 else
00139 {
00140 if (AMeshWithAdjacentSews)
00141 {
00142 CDynamicCoverage23 cov(FMap, *it);
00143
00144 for (; cov.cont(); ++cov)
00145 if (FMap->isMarked(*cov, toMesh))
00146 FMap->unsetMark(FMap->getDirectInfoAsDart(*cov, assoc), treated);
00147
00148 for (cov.reinit(); cov.cont(); ++cov)
00149 if (FMap->isMarked(*cov, toMesh))
00150 {
00151 CDart* current =
00152 FMap->getDirectInfoAsDart(*cov, assoc);
00153
00154 if (!FMap->isMarked(current, treated))
00155 {
00156 FMesh.mesh1(*cov, ASx, AMeshMatrix,
00157 AMeshWithMerges,
00158 AMeshWithAdjacentSews,
00159 AMeshAssociatedCells,
00160 direct0, assoc);
00161
00162 for (int i=0; i<ASx; ++i)
00163 {
00164 FMap->markOrbit(current, ORBIT_23, treated);
00165 current = FMap->alpha0(current);
00166 FMap->markOrbit(current, ORBIT_23, treated);
00167 current = FMap->alpha1(current);
00168 }
00169 }
00170 }
00171 }
00172 else
00173 {
00174 FMap->markOrbit(*it, ORBIT_EDGE, treated);
00175
00176 FMesh.mesh1(*it, ASx, AMeshMatrix, AMeshWithMerges,
00177 AMeshWithAdjacentSews, AMeshAssociatedCells,
00178 direct0, assoc);
00179
00180 CDart* current = FMap->getDirectInfoAsDart(*it, assoc);
00181
00182 for (int i=0; i<ASx; ++i)
00183 {
00184 FMap->markOrbit(current, ORBIT_23, treated);
00185 current = FMap->alpha0(current);
00186 FMap->markOrbit(current, ORBIT_23, treated);
00187 current = FMap->alpha1(current);
00188 }
00189 }
00190 }
00191 }
00192 else
00193 FMap->setMark(*it, treated);
00194 }
00195
00196 FMap->negateMaskMark(treated);
00197 FMap->freeMark(treated);
00198
00199 if (ADirectInfoAlpha0<0 && ADirectInfoAssoc<0)
00200 {
00201 if (direct0>=0)
00202 FMap->freeDirectInfo(direct0);
00203
00204 if (assoc>=0)
00205 FMap->freeDirectInfo(assoc);
00206
00207 FMap->unmarkAll(toMesh);
00208 FMap->freeMark(toMesh);
00209 }
00210
00211 return nbMeshed;
00212 }
00213
00214 int CMesh::meshMarkedSquares(int AMarkNumber, int ASx, int ASy,
00215 const CTransformationMatrix* AMeshMatrix,
00216 bool AMeshWithMerges,
00217 bool AMeshWithAdjacentSews,
00218 bool AMeshAssociatedCells,
00219 int AInitialMeshDim, int AFinalMeshDim,
00220 int ADirectInfoAlpha0, int ADirectInfoAssoc)
00221 {
00222 assert(ASx>0);
00223 assert(ASy>0);
00224 assert(0<=AInitialMeshDim && AInitialMeshDim<=1);
00225 assert(1<=AFinalMeshDim && AFinalMeshDim <=2);
00226 assert(AInitialMeshDim < AFinalMeshDim);
00227
00228 CDynamicCoverageAll it(FMap);
00229 int nbMeshed = 0;
00230 int treated = FMap->getNewMark();
00231
00232 int toMesh2 = AFinalMeshDim==2 ? FMap->getNewMark() : -1;
00233 int toMeshX = FMap->getNewMark();
00234 int toMeshY = ASx==ASy ? toMeshX : FMap->getNewMark();
00235
00236 int direct0, assoc;
00237
00238 if (ADirectInfoAlpha0>=0 || ADirectInfoAssoc>=0)
00239 {
00240 direct0 = ADirectInfoAlpha0;
00241 assoc = ADirectInfoAssoc;
00242 }
00243 else
00244 {
00245 if (AMeshWithMerges)
00246 {
00247 direct0 = AInitialMeshDim==0 ? FMap->getNewDirectInfo() : -1;
00248 assoc = -1;
00249 }
00250 else
00251 {
00252 direct0 = -1;
00253 assoc = FMap->getNewDirectInfo();
00254 }
00255
00256
00257 for (it.reinit(); it.cont(); ++it)
00258 if (!FMap->isMarked(*it, treated))
00259 {
00260 if (FMap->isMarked(*it, AMarkNumber))
00261 {
00262 CDart* current = *it;
00263
00264 if (FMesh.canMesh2(current, ASx,ASy, AInitialMeshDim))
00265 {
00266 bool canMesh = true;
00267
00268 if (AInitialMeshDim==0)
00269 {
00270 if (ASx!=ASy)
00271 {
00272 canMesh = false;
00273
00274 for (CDynamicCoverage01 fac(FMap, current);
00275 !canMesh && fac.cont(); ++fac)
00276 if (FMap->isMarked(*fac, AMarkNumber) &&
00277 FMesh.isFreeTopoSquareIMeshed(0, *fac,
00278 ASx,ASy,
00279 toMeshY,-1,
00280 toMeshX,-1))
00281 {
00282 current = *fac;
00283 canMesh = true;
00284 }
00285 }
00286
00287 if (canMesh)
00288 FMesh.markTopoSquareIMeshed(0, current, ASx,ASy,
00289 toMeshX, toMeshY);
00290 }
00291
00292 if (canMesh)
00293 {
00294 ++nbMeshed;
00295
00296 if (AFinalMeshDim==2)
00297 FMap->setMark(current, toMesh2);
00298 }
00299 }
00300
00301 FMap->markOrbit(current, ORBIT_FACE, treated);
00302 }
00303 else
00304 FMap->setMark(*it, treated);
00305 }
00306
00307 FMap->negateMaskMark(treated);
00308
00309 if (AMeshWithMerges)
00310 {
00311 if (AInitialMeshDim==0)
00312 FMap->saveAlphaInDirectInfo(0, direct0);
00313 }
00314 else
00315 {
00316 int toDuplicate = FMap->getNewMark();
00317
00318 if (AInitialMeshDim==0)
00319 {
00320 int markedEdges = FMap->getNewMark();
00321
00322 FMap->markCopy(toMeshX, markedEdges);
00323 FMap->markAdd (toMeshY, markedEdges);
00324
00325 FMap->negateMaskMark(markedEdges);
00326 FMap->markIncidentCells(ORBIT_FACE, markedEdges);
00327 FMap->negateMaskMark(markedEdges);
00328
00329 FMap->markCopy(AMarkNumber, toDuplicate);
00330 FMap->markAnd (markedEdges, toDuplicate);
00331 FMap->markIncidentCells(ORBIT_FACE, toDuplicate);
00332
00333 FMap->markAnd(toDuplicate, toMeshX);
00334 FMap->markAnd(toDuplicate, toMeshY);
00335
00336 FMap->unmarkAll(markedEdges);
00337 FMap->freeMark(markedEdges);
00338 }
00339 else
00340 FMap->markIncidentCells(AMeshWithAdjacentSews ? ORBIT_FACE : ORBIT_01,
00341 toMesh2, toDuplicate);
00342
00343 if (AInitialMeshDim!=0 || AMeshWithAdjacentSews)
00344 FMap->duplicateMarkedDarts(toDuplicate, assoc, false,
00345 true, true, AMeshWithAdjacentSews, true);
00346
00347 FMap->unmarkAll(toDuplicate);
00348 FMap->freeMark(toDuplicate);
00349 }
00350 }
00351
00352 FMap->freeMark(treated);
00353
00354
00355 if (AInitialMeshDim==0)
00356 {
00357 if (AMeshWithMerges || AMeshWithAdjacentSews)
00358 {
00359 meshMarkedEdges(toMeshX, ASx, AMeshMatrix, AMeshWithMerges,
00360 AMeshWithAdjacentSews, AMeshAssociatedCells,
00361 direct0, assoc);
00362
00363 if (ASy!=ASx)
00364 meshMarkedEdges(toMeshY, ASy, AMeshMatrix, AMeshWithMerges,
00365 AMeshWithAdjacentSews, AMeshAssociatedCells,
00366 direct0, assoc);
00367 }
00368 else
00369 {
00370 AMeshAssociatedCells = true;
00371
00372 int mark = AFinalMeshDim == 2 ? toMesh2 : toMeshX;
00373
00374 for (it.reinit(); it.cont(); ++it)
00375 if (FMap->isMarked(*it, mark))
00376 {
00377 CDart* square = FMap->duplicateDarts(*it, ORBIT_01, assoc);
00378
00379 FMap->setDirectInfo(*it, assoc, square);
00380
00381 FMesh.mesh2(*it, ASx, ASy, AMeshMatrix, AMeshWithMerges,
00382 AMeshWithAdjacentSews, AMeshAssociatedCells, false,
00383 0,1, direct0, assoc);
00384
00385 FMap->unmarkOrbit(*it, ORBIT_FACE, toMeshX);
00386 FMap->unmarkOrbit(*it, ORBIT_FACE, toMeshY);
00387 }
00388
00389 AMeshAssociatedCells = false;
00390 }
00391
00392 FMap->unmarkAll(toMeshX);
00393 FMap->freeMark(toMeshX);
00394
00395 if (toMeshY != toMeshX)
00396 {
00397 FMap->unmarkAll(toMeshY);
00398 FMap->freeMark(toMeshY);
00399 }
00400 }
00401
00402
00403 if (AFinalMeshDim==2)
00404 {
00405 AMeshAssociatedCells = ! AMeshWithMerges;
00406 bool getAssociatedEmbeddings = AMeshAssociatedCells && AInitialMeshDim!=1;
00407
00408 for (it.reinit(); it.cont(); ++it)
00409 if (FMap->isMarked(*it, toMesh2))
00410 {
00411 FMesh.mesh2(*it, ASx,ASy, AMeshMatrix, AMeshWithMerges,
00412 AMeshWithAdjacentSews, AMeshAssociatedCells,
00413 getAssociatedEmbeddings,
00414 1,2, direct0, assoc);
00415 FMap->unsetMark(*it, toMesh2);
00416 }
00417
00418 AMeshAssociatedCells = false;
00419
00420 FMap->freeMark(toMesh2);
00421 }
00422
00423 if (ADirectInfoAlpha0<0 && direct0>=0)
00424 FMap->freeDirectInfo(direct0);
00425
00426 if (ADirectInfoAssoc<0 && assoc>=0)
00427 FMap->freeDirectInfo(assoc);
00428
00429 return nbMeshed;
00430 }
00431
00432 int CMesh::meshMarkedCubes(int AMarkNumber, int ASx, int ASy, int ASz,
00433 const CTransformationMatrix* AMeshMatrix,
00434 bool AMeshWithMerges,
00435 bool AMeshWithAdjacentSews,
00436 bool AMeshAssociatedCells,
00437 int AInitialMeshDim, int AFinalMeshDim,
00438 int ADirectInfoAlpha0, int ADirectInfoAssoc)
00439 {
00440 assert(ASx>0);
00441 assert(ASy>0);
00442 assert(ASz>0);
00443 assert(0<=AInitialMeshDim && AInitialMeshDim<=2);
00444 assert(1<=AFinalMeshDim && AFinalMeshDim <=3);
00445 assert(AInitialMeshDim < AFinalMeshDim);
00446
00447 CDynamicCoverageAll it(FMap);
00448 int nbMeshed = 0;
00449 int treated = FMap->getNewMark();
00450 int selected = FMap->getNewMark();
00451
00452 int toMesh3 = AFinalMeshDim==3 ? FMap->getNewMark() : -1;
00453 int toMeshX = FMap->getNewMark();
00454 int toMeshY = ASy==ASx ? toMeshX : FMap->getNewMark();
00455 int toMeshZ = ASz==ASx ? toMeshX : ASz==ASy ? toMeshY : FMap->getNewMark();
00456
00457 int s[3] = { ASx, ASy, ASz };
00458 int m[3] = { toMeshX, toMeshY, toMeshZ };
00459
00460 int direct0, assoc;
00461
00462 if (ADirectInfoAssoc >= 0)
00463 {
00464 direct0 = ADirectInfoAlpha0;
00465 assoc = ADirectInfoAssoc;
00466 }
00467 else
00468 {
00469 if (AMeshWithMerges)
00470 {
00471 direct0 = AInitialMeshDim==0 ? FMap->getNewDirectInfo() : -1;
00472 assoc = -1;
00473 }
00474 else
00475 {
00476 direct0 = -1;
00477 assoc = FMap->getNewDirectInfo();
00478 }
00479
00480
00481 for (it.reinit(); it.cont(); ++it)
00482 if (!FMap->isMarked(*it, treated))
00483 {
00484 if (FMap->isMarked(*it, AMarkNumber))
00485 {
00486 CDart* current = *it;
00487
00488 if (FMesh.canMesh3(current, ASx,ASy,ASz, AInitialMeshDim))
00489 {
00490 bool canMesh = true;
00491
00492 if (AInitialMeshDim<=1)
00493 {
00494 if (ASx!=ASy || ASy!=ASz)
00495 {
00496 int alt[3][2];
00497
00498 for (int dim=0; dim<3; ++dim)
00499 if (s[(dim+1)%3]==s[dim])
00500 {
00501 alt[dim][0] = m[(dim+2)%3];
00502 alt[dim][1] = -1;
00503 }
00504 else
00505 {
00506 alt[dim][0] = m[(dim+1)%3];
00507
00508 if (s[(dim+2)%3]==s[dim] ||
00509 s[(dim+2)%3]==s[(dim+1)%3])
00510 alt[dim][1] = -1;
00511 else
00512 alt[dim][1] = m[(dim+2)%3];
00513 }
00514
00515 canMesh =
00516 FMesh.isFreeTopoCubeIMeshed(AInitialMeshDim,
00517 current,
00518 ASx,ASy,ASz,
00519 alt[0][0], alt[0][1],
00520 alt[1][0], alt[1][1],
00521 alt[2][0], alt[2][1]);
00522 }
00523
00524 if (canMesh)
00525 {
00526 FMesh.markTopoCubeIMeshed(AInitialMeshDim, current,
00527 ASx,ASy,ASz,
00528 toMeshX, toMeshY, toMeshZ);
00529 FMap->markOrbit(current, ORBIT_VOLUME, selected);
00530 }
00531 }
00532
00533 if (canMesh)
00534 {
00535 ++nbMeshed;
00536
00537 if (AFinalMeshDim==3)
00538 FMap->setMark(current, toMesh3);
00539
00540 FMap->markOrbit(current, ORBIT_VOLUME, treated);
00541 }
00542 }
00543 }
00544 else
00545 FMap->setMark(*it, treated);
00546 }
00547
00548 FMap->negateMaskMark(treated);
00549
00550 if (AMeshWithMerges)
00551 {
00552 if (AInitialMeshDim==0)
00553 FMap->saveAlphaInDirectInfo(0, direct0);
00554 }
00555 else
00556 {
00557 int toDuplicate = FMap->getNewMark();
00558
00559 if (AInitialMeshDim<=1)
00560 {
00561 int markedEdges = FMap->getNewMark();
00562
00563 FMap->markCopy(toMeshX, markedEdges);
00564 FMap->markAdd (toMeshY, markedEdges);
00565 FMap->markAdd (toMeshZ, markedEdges);
00566
00567
00568 FMap->markCopy(markedEdges, 1);
00569
00570
00571
00572 FMap->negateMaskMark(markedEdges);
00573 FMap->markIncidentCells(ORBIT_VOLUME, markedEdges);
00574 FMap->negateMaskMark(markedEdges);
00575
00576 FMap->markCopy(AMarkNumber, toDuplicate);
00577 FMap->markAnd (markedEdges, toDuplicate);
00578 FMap->markIncidentCells(ORBIT_VOLUME, toDuplicate);
00579
00580 FMap->markAnd(toDuplicate, toMeshX);
00581 FMap->markAnd(toDuplicate, toMeshY);
00582 FMap->markAnd(toDuplicate, toMeshZ);
00583
00584 FMap->unmarkAll(markedEdges);
00585 FMap->freeMark(markedEdges);
00586 }
00587 else
00588 FMap->markIncidentCells(ORBIT_VOLUME, toMesh3, toDuplicate);
00589
00590 if (AInitialMeshDim!=0 || AMeshWithAdjacentSews)
00591 FMap->duplicateMarkedDarts(toDuplicate, assoc, false,
00592 true, true, true, AMeshWithAdjacentSews);
00593
00594 FMap->unmarkAll(toDuplicate);
00595 FMap->freeMark(toDuplicate);
00596 }
00597 }
00598
00599
00600 if (AInitialMeshDim==0)
00601 {
00602 if (AMeshWithMerges || AMeshWithAdjacentSews)
00603 {
00604 meshMarkedEdges(toMeshX, ASx, AMeshMatrix, AMeshWithMerges,
00605 AMeshWithAdjacentSews, AMeshAssociatedCells,
00606 direct0, assoc);
00607
00608 if (ASy!=ASx)
00609 meshMarkedEdges(toMeshY, ASy, AMeshMatrix, AMeshWithMerges,
00610 AMeshWithAdjacentSews, AMeshAssociatedCells,
00611 direct0, assoc);
00612
00613 if (ASz!=ASx && ASz!=ASy)
00614 meshMarkedEdges(toMeshZ, ASz, AMeshMatrix, AMeshWithMerges,
00615 AMeshWithAdjacentSews, AMeshAssociatedCells,
00616 direct0, assoc);
00617 }
00618 else
00619 {
00620 AMeshAssociatedCells = true;
00621
00622 int mark = AFinalMeshDim == 3 ? toMesh3 : toMeshX;
00623
00624 for (it.reinit(); it.cont(); ++it)
00625 if (FMap->isMarked(*it, mark))
00626 {
00627 CDart* cube = FMap->duplicateDarts(*it, ORBIT_012, assoc);
00628
00629 FMap->setDirectInfo(*it, assoc, cube);
00630
00631 FMesh.mesh3(*it, ASx,ASy,ASz, AMeshMatrix,
00632 AMeshWithMerges, AMeshWithAdjacentSews,
00633 AMeshAssociatedCells, 0,1, direct0, assoc);
00634
00635 FMap->unmarkOrbit(*it, ORBIT_VOLUME, toMeshX);
00636 FMap->unmarkOrbit(*it, ORBIT_VOLUME, toMeshY);
00637 FMap->unmarkOrbit(*it, ORBIT_VOLUME, toMeshZ);
00638 }
00639
00640 AMeshAssociatedCells = false;
00641 }
00642 }
00643
00644
00645 if (AInitialMeshDim<=1 && AFinalMeshDim>=2)
00646 {
00647 AMeshAssociatedCells = !AMeshWithMerges;
00648
00649 for (it.reinit(); it.cont(); ++it)
00650 if (!FMap->isMarked(*it, treated))
00651 {
00652 if (FMap->isMarked(*it, toMeshX))
00653 {
00654 if (FMap->isMarked(FMap->alpha1(*it), toMeshY))
00655 {
00656 FMap->markOrbit(*it, ORBIT_FACE, treated);
00657 FMesh.mesh2(*it, ASx,ASy, AMeshMatrix, AMeshWithMerges,
00658 AMeshWithAdjacentSews, AMeshAssociatedCells,
00659 false, 1,2, direct0, assoc);
00660 }
00661 else if (FMap->isMarked(FMap->alpha1(*it), toMeshZ))
00662 {
00663 FMap->markOrbit(*it, ORBIT_FACE, treated);
00664 FMesh.mesh2(*it, ASx,ASz, AMeshMatrix, AMeshWithMerges,
00665 AMeshWithAdjacentSews, AMeshAssociatedCells,
00666 1,2, direct0, assoc);
00667 }
00668 }
00669 else if (FMap->isMarked(*it, toMeshY))
00670 {
00671 if (FMap->isMarked(FMap->alpha1(*it), toMeshZ))
00672 {
00673 FMap->markOrbit(*it, ORBIT_FACE, treated);
00674 FMesh.mesh2(*it, ASy,ASz, AMeshMatrix, AMeshWithMerges,
00675 AMeshWithAdjacentSews, AMeshAssociatedCells,
00676 false, 1,2, direct0, assoc);
00677 }
00678 }
00679 }
00680
00681 AMeshAssociatedCells = false;
00682 }
00683
00684 FMap->unmarkAll(treated);
00685 FMap->freeMark(treated);
00686
00687
00688
00689 if (AFinalMeshDim==3)
00690 {
00691 for (it.reinit(); it.cont(); ++it)
00692 if (FMap->isMarked(*it, toMesh3))
00693 {
00694 FMesh.mesh3(*it, ASx,ASy,ASz, AMeshMatrix,
00695 AMeshWithMerges, AMeshWithAdjacentSews,
00696 AMeshAssociatedCells, 2,3, direct0, assoc);
00697 FMap->unsetMark(*it, toMesh3);
00698 }
00699
00700 FMap->freeMark(toMesh3);
00701 }
00702
00703
00704 FMap->unmarkAll(toMeshX);
00705 FMap->freeMark(toMeshX);
00706
00707 if (ASy!=ASx)
00708 {
00709 FMap->unmarkAll(toMeshY);
00710 FMap->freeMark(toMeshY);
00711 }
00712
00713 if (ASz!=ASx && ASz!=ASy)
00714 {
00715 FMap->unmarkAll(toMeshZ);
00716 FMap->freeMark(toMeshZ);
00717 }
00718
00719 FMap->unmarkAll(selected);
00720 FMap->freeMark(selected);
00721
00722 if (ADirectInfoAlpha0<0 && direct0>=0)
00723 FMap->freeDirectInfo(direct0);
00724
00725 if (ADirectInfoAssoc<0 && assoc>=0)
00726 FMap->freeDirectInfo(assoc);
00727
00728 return nbMeshed;
00729 }
00730