26 #include "g-map-generic.hh"
28 using namespace GMap3d;
31 CDart* AMesh1Corners[2])
33 assert(AEdgeDart!=NULL);
34 assert(AMesh1Corners!=NULL);
37 ! FMap->isFree0(AMesh1Corners[0]) && ! FMap->isFree0(AMesh1Corners[1]) &&
38 ! FMap->isSameOrbit(AMesh1Corners[0], AMesh1Corners[1], ORBIT_23) &&
44 CDart* AMesh1Extremities[2])
48 CDart* edges[2] = { AEdgeDart, FMap->alpha0(AEdgeDart) };
51 FMap->unsew0(AEdgeDart);
54 for (
int i=0; i<2; ++i)
56 CDart* mesh = FMap->alpha0(AMesh1Extremities[i]);
58 FMap->unsew0(AMesh1Extremities[i]);
60 for (CStaticCoverage23 cov(FMap, AMesh1Extremities[i]); cov.cont(); ++cov)
61 FMap->delMapDart(*cov);
63 FMap->topoSew0(edges[i], mesh);
71 assert(ASquareDart!=NULL);
72 assert(AMesh2Dart!=NULL);
76 bool is3Sewed = ! FMap->isFree3(ASquareDart);
89 int nbRounds = FMap->isFree3(ASquareDart) ? 1 : 2;
91 CDart * current1 = ASquareDart;
92 CDart * current2 = AMesh2Dart;
98 FMap->unlinkAlpha1(current1);
100 for (
int i=2*(ASx+ASy); i>0; --i)
102 tmp = FMap->alpha1(current2);
104 FMap->unlinkAlpha1(tmp); FMap->linkAlpha1(tmp, current1);
107 current2 = FMap->alpha01(current2);
109 FMap->unlinkAlpha1(current2);
110 FMap->delMapDart(FMap->alpha0(tmp));
111 FMap->delMapDart( tmp );
113 tmp = FMap->alpha0(current1);
114 current1 = FMap->alpha1(tmp);
116 FMap->unlinkAlpha1(tmp); FMap->linkAlpha1(tmp, current2);
118 if (! FMap->isFree2(current2))
119 current2 = FMap->alpha21(current2);
124 current1 = FMap->alpha3(ASquareDart);
125 current2 = FMap->alpha3(AMesh2Dart );
134 assert(ASquareDart!=NULL);
135 assert(AMesh3Dart!=NULL);
148 CDart** ANextMesh3Side)
152 CDart * currentX1, * currentX2, * currentY1=NULL, * currentY2=NULL;
153 CDart * nextX1 , * nextX2 , * nextY1 , * nextY2 ;
154 CDart * tmp1 , * tmp2 ;
157 currentX1 = ASquareDart;
158 currentX2 = AMesh3Dart;
161 for (
int i=0; i<ASx; ++i)
164 nextX1 = FMap->alpha0121 (currentX1);
165 nextX2 = FMap->alpha012321(currentX2);
168 currentY1 = FMap->alpha1(currentX1);
169 currentY2 = FMap->alpha1(currentX2);
172 for (
int j=0; j<ASy; ++j)
175 nextY1 = FMap->alpha0121(currentY1);
176 nextY2 = j<ASy-1 ? FMap->alpha012321(currentY2) : FMap->alpha0121(currentY2);
179 for (
int n=0; n<4; ++n)
184 currentY1 = FMap->alpha01(currentY1);
185 currentY2 = FMap->alpha01(currentY2);
187 if ((n==0 && i==0) || n==1 || n==2 || (n==3 && j==0))
189 FMap->unlinkAlpha2(tmp1);
190 FMap->unlinkAlpha2(FMap->alpha0(tmp1));
193 CDart* tmp2Bis = FMap->alpha2(tmp2);
195 FMap->unlinkAlpha2(tmp2);
196 FMap->unlinkAlpha2(FMap->alpha0(tmp2));
198 FMap->topoSew2(tmp1, tmp2Bis);
200 FMap->delMapDart(FMap->alpha0(tmp2));
201 FMap->delMapDart( tmp2 );
215 if (ANextSquare!=NULL)
216 * ANextSquare = FMap->alpha10(currentY1);
218 if (ANextMesh3Side!=NULL)
219 * ANextMesh3Side = FMap->alpha10(currentY2);
224 int ASx,
int ASy,
int ASz)
226 assert(ACubeDart!=NULL);
227 assert(AMesh3Dart!=NULL);
238 int ASx,
int ASy,
int ASz)
242 int s[3] = { ASx, ASy, ASz };
244 CDart * current1 = ACubeDart;
245 CDart * current2 = AMesh3Dart;
250 for (
int i=0; i<3; ++i)
252 next1 = FMap->alpha12(current1);
253 next2 = FMap->alpha12(current2);
260 ¤t1Bis, ¤t2Bis);