32 #pragma package(smart_init)
62 if (
x<mdd.
x)
return true;
63 else if ((
x==mdd.
x) && (
y<mdd.
y))
return true;
64 else if ((
x==mdd.
x) && (
y==mdd.
y) && (
z<mdd.
z))
return true;
77 FILE* in=fopen(path,
"rt");
78 if (in==NULL)
return 0;
85 char *
res=fgets(mess,500,in);
86 if (feof(in))
return 1;
87 res=fgets(mess,500,in);
88 if (feof(in))
return 1;
89 res=fgets(mess,500,in);
90 if (feof(in))
return 1;
96 char *
res=fgets(mess,500,in);
97 sscanf(mess,
"%s %lf %lf %lf",nom,&x,&y,&z);
98 if (feof(in))
return 1;
101 res=fgets(mess,500,in);
102 sscanf(mess,
"%s %lf %lf %lf",nom,&x,&y,&z);
103 if (feof(in))
return 1;
104 res=fgets(mess,500,in);
107 sscanf(mess,
"%s %lf %lf %lf",nom,&x,&y,&z);
108 if (feof(in))
return 1;
112 res=fgets(mess,500,in);
114 res=fgets(mess,500,in);
116 res=fgets(mess,500,in);
118 res=fgets(mess,500,in);
122 std::map<NOEUDCLASSE,MG_NOEUD* > listenoeudunique;
123 LISTE_MG_NOEUD::iterator it;
125 std::vector<MG_NOEUD*> lst_noeud;
128 lst_noeud.insert(lst_noeud.end(),noeud);
129 noeud->change_nouveau_numero(i);
130 NOEUDCLASSE nclasse(noeud->get_x(),noeud->get_y(),noeud->get_z());
131 std::pair<NOEUDCLASSE,MG_NOEUD*> pairtmp(nclasse,noeud);
132 std::pair<std::map<NOEUDCLASSE,MG_NOEUD*>::iterator,
bool> tmp=listenoeudunique.insert(pairtmp);
135 lst_noeud[noeud->get_nouveau_numero()]=tmp.first->second;
155 for (
int i=0;i<nb_noeud;i++)
161 lst_noeud[i]=nvnoeud;
163 LISTE_MG_TRIANGLE::iterator ittri;
181 LISTE_MG_TRIANGLE::iterator ittri;
182 std::vector<TPL_LISTE_ENTITE<MG_TRIANGLE*> > liste_surface(1);
188 int nbavant=liste_unique_surface.
get_nb();
189 liste_unique_surface.
ajouter(tri);
190 int nbapres=liste_unique_surface.
get_nb();
191 if (nbavant==nbapres)
continue;
193 liste_surface.resize(num+1);
194 liste_surface[num].ajouter(tri);
195 for (
int itri=0;itri<liste_surface[num].get_nb();itri++)
198 for (
int i=0;i<tri2->
get_noeud1()->get_lien_triangle()->get_nb();i++)
200 int nbavant=liste_unique_surface.
get_nb();
202 int nbapres=liste_unique_surface.
get_nb();
205 for (
int i=0;i<tri2->
get_noeud2()->get_lien_triangle()->get_nb();i++)
207 int nbavant=liste_unique_surface.
get_nb();
209 int nbapres=liste_unique_surface.
get_nb();
212 for (
int i=0;i<tri2->
get_noeud3()->get_lien_triangle()->get_nb();i++)
214 int nbavant=liste_unique_surface.
get_nb();
216 int nbapres=liste_unique_surface.
get_nb();
225 for (
int i=0;i<liste_surface.size();i++)
227 if (liste_surface[i].get_nb()<0.1*liste_unique_surface.
get_nb())
228 for (
int itri=0;itri<liste_surface[i].get_nb();itri++)