8 |
|
#include <random> |
9 |
|
#include <vector> |
10 |
|
|
11 |
< |
Polycristal::Polycristal(char* fichier) |
11 |
> |
Polycristal::Polycristal(char* fichier):nomfichier("resultat.brep") |
12 |
|
{ |
13 |
|
FILE *input = fopen(fichier, "rt"); |
14 |
|
char chaine[500]; |
31 |
|
|
32 |
|
Poly_Voro* voro = new Poly_Voro(list_points); |
33 |
|
voro->fusion_noeuds(); |
34 |
< |
Poly_Build_OCC build_occ(voro); |
34 |
> |
Poly_Build_OCC build_occ(voro,nomfichier); |
35 |
|
} |
36 |
|
|
37 |
|
|
38 |
< |
Polycristal::Polycristal(int nbParticules) |
38 |
> |
Polycristal::Polycristal(std::vector<double> &listepoint,std::string nom):nomfichier(nom) |
39 |
> |
{ |
40 |
> |
std::vector<Poly_Point*> list_points; |
41 |
> |
int nb_point=listepoint.size()/3.; |
42 |
> |
for (int i=0; i<nb_point; i++) |
43 |
> |
{ |
44 |
> |
Poly_Point* pnt_xyz = new Poly_Point(listepoint[3*i],listepoint[3*i+1],listepoint[3*i+2]); |
45 |
> |
list_points.push_back(pnt_xyz); |
46 |
> |
} |
47 |
> |
|
48 |
> |
|
49 |
> |
Poly_Voro* voro = new Poly_Voro(list_points); |
50 |
> |
voro->fusion_noeuds(); |
51 |
> |
Poly_Build_OCC build_occ(voro,nomfichier); |
52 |
> |
} |
53 |
> |
|
54 |
> |
Polycristal::Polycristal(int nbParticules):nomfichier("resultat.brep") |
55 |
|
{ |
56 |
|
std::vector<Poly_Point*> list_points = random_particules(nbParticules); |
57 |
|
Poly_Voro* voro = new Poly_Voro(list_points); |
58 |
|
voro->fusion_noeuds(); |
59 |
< |
Poly_Build_OCC build_occ(voro); |
59 |
> |
Poly_Build_OCC build_occ(voro,nomfichier); |
60 |
|
} |
61 |
|
|
62 |
|
Polycristal::~Polycristal() |