1 |
|
1 |
/*****************************************************************
|
2 |
|
|
|
3 |
|
|
m3d.c Type:Func
|
4 |
|
|
|
5 |
|
|
Maillage volumique
|
6 |
|
|
|
7 |
|
|
Date de creation : Tue Jun 17 10:35:03 1997
|
8 |
|
|
|
9 |
|
|
Derniere version : Tue Jul 29 11:26:58 1997
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
Vincent FRANCOIS
|
17 |
|
|
|
18 |
|
|
*****************************************************************/
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
/**************************/
|
25 |
|
|
/* include */
|
26 |
|
|
#include <stdio.h>
|
27 |
|
|
#include <string.h>
|
28 |
|
|
#include <stdlib.h>
|
29 |
|
|
#include "const.h"
|
30 |
|
|
#include "memoire.h"
|
31 |
|
|
#include "struct.h"
|
32 |
|
|
#include "struct3d.h"
|
33 |
|
|
#include "prototype.h"
|
34 |
|
|
|
35 |
|
|
/**************************/
|
36 |
|
|
/* variables globales */
|
37 |
|
|
extern struct s_acis *acis;
|
38 |
|
|
extern struct environnement env;
|
39 |
|
|
extern struct s_mesh *mesh;
|
40 |
|
|
extern struct s_param *para;
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
/**************************/
|
45 |
|
|
/* programme principal */
|
46 |
|
|
|
47 |
|
|
void m3d(void)
|
48 |
|
|
{
|
49 |
|
|
int i;
|
50 |
|
|
struct s_octree *octree;
|
51 |
|
|
char message[255];
|
52 |
|
|
struct s_noeud *no;
|
53 |
|
|
|
54 |
|
|
NEW_ALLOC(octree,mesh->);
|
55 |
|
|
NEW_ALLOC(frontiere3d,mesh->);
|
56 |
|
|
NEW_ALLOC(front3d,mesh->);
|
57 |
|
|
aff_text(M3D_PREP);
|
58 |
|
|
aff_text(M3D_OC);
|
59 |
|
|
m3d_c_octree();
|
60 |
|
|
sprintf(message,M3D_OC_CR,mesh->nb_octree);
|
61 |
|
|
aff_text(message);
|
62 |
|
|
sprintf(message,M3D_FE_CR,mesh->nb_feuille);
|
63 |
|
|
aff_text(message);
|
64 |
|
|
aff_text(M3D_FRONT);
|
65 |
|
|
/* reini pour le 3D */
|
66 |
|
|
mesh->critmoy=0.;
|
67 |
|
|
mesh->critmin=1.;
|
68 |
|
|
mesh->critmax=0.;
|
69 |
|
|
mesh->tabcrit[0]=0;
|
70 |
|
|
mesh->tabcrit[1]=0;
|
71 |
|
|
mesh->tabcrit[2]=0;
|
72 |
|
|
mesh->tabcrit[3]=0;
|
73 |
|
|
for (i=0;i<mesh->nb_noeud;i++)
|
74 |
|
|
{
|
75 |
|
|
no=ADRESSE(i,noeud,mesh->);
|
76 |
|
|
no->etat=ACTIF;
|
77 |
|
|
}
|
78 |
|
|
m3d_frontiere();
|
79 |
|
|
m3d_ini_front();
|
80 |
|
|
aff_text(M3D_BODY);
|
81 |
|
|
m3d_gest_front();
|
82 |
|
|
aff_text(M3D_OPTI);
|
83 |
|
|
o3d();
|
84 |
|
|
if (env.analyse==1)
|
85 |
|
|
{
|
86 |
|
|
aff_text(M2D_AC3);
|
87 |
|
|
m3d_analyse();
|
88 |
|
|
}
|
89 |
|
|
m3d_fin();
|
90 |
|
|
m3d_enreg(0);
|
91 |
|
|
m2d_resultat(5);
|
92 |
|
|
aff_text(M3D_PREP1);
|
93 |
|
|
aff_text(M3D_PREP2);
|
94 |
|
|
oc_enreg();
|
95 |
|
|
LIBERE(front3d,mesh->);
|
96 |
|
|
LIBERE(frontiere3d,mesh->);
|
97 |
|
|
LIBERE_LIEN(noeud,octree,mesh->);
|
98 |
|
|
LIBERE_LIEN(segment,octree,mesh->);
|
99 |
|
|
LIBERE_LIEN(triangle,octree,mesh->);
|
100 |
|
|
LIBERE_LIEN(tetra,octree,mesh->);
|
101 |
|
|
LIBERE_LIEN(vertex,octree,mesh->);
|
102 |
|
|
LIBERE_LIEN(face,octree,mesh->);
|
103 |
|
|
LIBERE_LIEN(edge,octree,mesh->);
|
104 |
|
|
LIBERE_LIEN(frontiere3d,octree,mesh->);
|
105 |
|
|
LIBERE_LIEN(front3d,octree,mesh->);
|
106 |
|
|
LIBERE(octree,mesh->);
|
107 |
|
|
}
|