1 |
sattarpa |
439 |
#include "gestionversion.h" |
2 |
|
|
#include <stdio.h> |
3 |
|
|
#include "mg_file.h" |
4 |
|
|
#include "occ_import.h" |
5 |
|
|
#include "fct_generateur_3D.h" |
6 |
|
|
#include "fct_generateur_3D.h" |
7 |
|
|
#include "mailleur0d.h" |
8 |
|
|
#include "mailleur1d.h" |
9 |
|
|
#include "mailleur2d.h" |
10 |
|
|
#include "mailleur3d.h" |
11 |
|
|
#include "mg_geometrie_outils.h" |
12 |
|
|
#include "mailleur2d_ins_noeud.h" |
13 |
|
|
#include "magic_application.h" |
14 |
|
|
//#include "magic_application.h" |
15 |
|
|
|
16 |
|
|
int main(int argc,char** argv) |
17 |
|
|
{ |
18 |
|
|
std::vector<MAGIC_PARAMETRE_APPLICATION> lst; |
19 |
|
|
MAGIC_PARAMETRE_APPLICATION p1(3,(char*)"-nummai",MAGIC_PARAMETRE_APPLICATION::INTEGER,(char*)"Numéro de maillage - Defaut le premier"); |
20 |
|
|
MAGIC_PARAMETRE_APPLICATION p2(4,(char*)"-tailleproxi",MAGIC_PARAMETRE_APPLICATION::DOUBLE,(char*)"Taille de la zone de proximité"); |
21 |
sattarpa |
455 |
MAGIC_PARAMETRE_APPLICATION p3(5,(char*)"-fichierpoint",MAGIC_PARAMETRE_APPLICATION::STRING,(char*)"Nom du fichier de points à inserer"); |
22 |
|
|
MAGIC_PARAMETRE_APPLICATION p4(6,(char*)"-nivopt",MAGIC_PARAMETRE_APPLICATION::INTEGER,(char*)"Niveau de optimisation"); |
23 |
sattarpa |
439 |
lst.push_back(p1); |
24 |
|
|
lst.push_back(p2); |
25 |
sattarpa |
455 |
lst.push_back(p3); |
26 |
|
|
lst.push_back(p4); |
27 |
sattarpa |
439 |
MAGIC_APPLICATION app((char*)"Insertion de noeuds dans une triangulation integrée à une géométrie",argc,argv,lst,true,true); |
28 |
|
|
if (app.get_erreur()==true) return 0; |
29 |
|
|
char magicfilename[3000]; |
30 |
|
|
char inspointfilename[3000]; |
31 |
|
|
char outputfilename[3000]; |
32 |
|
|
int meshno; |
33 |
|
|
double mshsiz; |
34 |
sattarpa |
455 |
int nivopt; |
35 |
sattarpa |
439 |
app.recupere_parametre_string(1,magicfilename,(char*)"Fichier d'entrée manquant"); |
36 |
|
|
app.recupere_parametre_string_avec_defaut(2,outputfilename,magicfilename); |
37 |
|
|
app.recupere_parametre_int_avec_defaut(3,meshno,0); |
38 |
|
|
app.recupere_parametre_double(4,mshsiz,(char*)"Taille de la zone de proximité manquante"); |
39 |
|
|
app.recupere_parametre_string(5,inspointfilename,(char*)"Fichier de points manquant"); |
40 |
sattarpa |
455 |
app.recupere_parametre_int(6,nivopt,(char*)"Niveau de optimisation"); |
41 |
sattarpa |
439 |
if (app.get_erreur()==true) return 0; |
42 |
|
|
|
43 |
|
|
//MG_FILE gest("cylinder_mesh.magic"); |
44 |
|
|
//TPL_LISTE_ENTITE<MG_NOEUD*> pins; |
45 |
|
|
|
46 |
|
|
//READ_INS_POINT pin(&gest,(char*)"exercise ins point.txt",pins); |
47 |
|
|
//int code=pin.read_insertpoint(); |
48 |
|
|
//cout<<"insertion point no.: "<<pins.get_nb() <<endl; |
49 |
|
|
|
50 |
|
|
/*if (code==50) printf("file is not available\n"); |
51 |
|
|
else if (code==100) printf("Wrong file format\n"); |
52 |
|
|
else*/ |
53 |
|
|
{ |
54 |
|
|
//for (int i=0;i<pins.get_nb();i++) |
55 |
|
|
//for (int i=0;i<0;i++) |
56 |
|
|
{ |
57 |
|
|
//cout<<"Insertion point No.="<<i<<endl; |
58 |
|
|
|
59 |
sattarpa |
455 |
MAILLEUR2D_INS_NOEUD pinse(magicfilename,meshno,mshsiz,inspointfilename,outputfilename,nivopt); |
60 |
sattarpa |
439 |
pinse.active_affichage(app.affiche); |
61 |
|
|
pinse.ins_points(); |
62 |
|
|
} |
63 |
|
|
//gest.enregistrer("delaunay_pointins_output.magic"); |
64 |
|
|
//cout<<"the output file name is: delaunay_pointins_output.magic"<<endl; |
65 |
|
|
} |
66 |
|
|
app.affiche((char*)"Fin"); |
67 |
sattarpa |
455 |
|
68 |
sattarpa |
439 |
} |