ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/poly_occ/src/polycristal.cpp
(Generate patch)

Comparing poly_occ/src/polycristal.cpp (file contents):
Revision 979 by francois, Thu Oct 18 23:40:32 2018 UTC vs.
Revision 983 by francois, Wed Oct 24 17:41:40 2018 UTC

# Line 8 | Line 8
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];
# Line 31 | Line 31 | Polycristal::Polycristal(char* fichier)
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()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines