toleranceofconfusion = atool.ToleranceOfConfusion();
NumberMaxOfIte = noofedges*noofedges;
- Standard_Integer* firstarea = new Standard_Integer[noofedges];
- Standard_Integer* lastarea = new Standard_Integer[noofedges];
- Standard_Integer* noofarea = new Standard_Integer[noofedges];
-
- if (noofarea == 0) {
- cout <<" Erreur d allocation "<<endl;
- return;
- }
+ TColStd_Array1OfInteger firstarea(0, noofedges);
+ TColStd_Array1OfInteger lastarea(0, noofedges);
+ TColStd_Array1OfInteger noofarea(0, noofedges);
Standard_Integer parama[2];
Standard_Integer paramb[2];
cout <<" A ELIMINER "<<endl;
#endif
if(narea < 0) {
- firstarea[++narea] = theedgelist->Index();
- lastarea[narea] = firstarea[narea];
- noofarea[narea] = 1;
+ firstarea(++narea) = theedgelist->Index();
+ lastarea(narea) = firstarea(narea);
+ noofarea(narea) = 1;
}
else {
- if(theedgelist->Index() == lastarea[narea]+1) {
- lastarea[narea]++;
- noofarea[narea]++;
+ if(theedgelist->Index() == lastarea(narea)+1) {
+ lastarea(narea)++;
+ noofarea(narea)++;
}
else {
- firstarea[++narea] = theedgelist->Index();
- lastarea[narea] = firstarea[narea];
- noofarea[narea] = 1;
+ firstarea(++narea) = theedgelist->Index();
+ lastarea(narea) = firstarea(narea);
+ noofarea(narea) = 1;
}
}
}
compact = 0;
if(narea > 0) {
- if(lastarea[narea] == theedgelist->Number() && firstarea[0] == 1) {
- firstarea[0] = firstarea[narea];
- noofarea[0] = noofarea[0]+noofarea[narea];
- compact = noofarea[narea];
+ if(lastarea(narea) == theedgelist->Number() && firstarea(0) == 1) {
+ firstarea(0) = firstarea(narea);
+ noofarea(0) = noofarea(0)+noofarea(narea);
+ compact = noofarea(narea);
narea--;
}
}
beginbisector = noofbisectors;
shift = 0;
all = 0;
- if(narea == 1 && noofarea[0] == theedgelist->Number()) all = 1;
+ if(narea == 1 && noofarea(0) == theedgelist->Number()) all = 1;
for(i=0; i<narea; i++) {
if(i == 1)shift = shift-compact;
theedgelist->First();
- edgetoremove = theedgelist->Brackets(firstarea[i]-shift);
+ edgetoremove = theedgelist->Brackets(firstarea(i)-shift);
edgetoremove->FirstBisector()->EndPoint(edgetoremove
->IntersectionPoint());
bisectormap(noofbisectors)->AddBisector(edgetoremove
->FirstBisector());
- for(j=0; j<noofarea[i]; j++) {
+ for(j=0; j<noofarea(i); j++) {
theedgelist->Unlink();
theedgelist->Next();
shift++;
cout<<" Suppression de l'arete : "<<edgetoremove->EdgeNumber()<<endl;
#endif
- if(all == 0 || j+1 != noofarea[i]) {
+ if(all == 0 || j+1 != noofarea(i)) {
bisectormap(noofbisectors)->AddBisector(edgetoremove
->SecondBisector());
}
}
}
- //-------------------------------------
- // Destruction des tableaux dynamiques.
- //-------------------------------------
- delete [] firstarea;
- delete [] lastarea ;
- delete [] noofarea ;
}
//========================================================================