 |
MAGiC
V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
|
Aller à la documentation de ce fichier.
39 DLY_TETRA::DLY_TETRA(
class DLY_NOEUD *no1,
class DLY_NOEUD *no2,
class DLY_NOEUD *no3,
class DLY_NOEUD *no4):noeud1(no1),noeud2(no2),noeud3(no3),noeud4(no4),feuille(1),voisin1(NULL),voisin2(NULL),voisin3(NULL),voisin4(NULL),normal1(NULL),normal2(NULL),normal3(NULL),normal4(NULL),qualite(-100.)
43 DLY_TETRA::DLY_TETRA(
class DLY_NOEUD *no1,
class DLY_NOEUD *no2,
class DLY_NOEUD *no3,
class DLY_NOEUD *no4,
double qual):noeud1(no1),noeud2(no2),noeud3(no3),noeud4(no4),feuille(1),voisin1(NULL),voisin2(NULL),voisin3(NULL),voisin4(NULL),normal1(NULL),normal2(NULL),normal3(NULL),normal4(NULL),qualite(qual)
46 DLY_TETRA::DLY_TETRA(
DLY_TETRA& mdd):noeud1(mdd.noeud1),noeud2(mdd.noeud2),noeud3(mdd.noeud3),noeud4(mdd.noeud4),feuille(mdd.feuille),voisin1(mdd.voisin1),voisin2(mdd.voisin2),voisin3(mdd.voisin3),voisin4(mdd.voisin4),qualite(mdd.qualite)
226 if (liste.size()==0)
return;
228 for (
int i=0;i<liste.size();i++)
229 fils.push_back(liste[i]);
242 double xyz1[3],xyz2[3],xyz3[3],xyz4[3];
247 double xyz[3]={x,y,z};
249 return (val > 0) ? 1 : 0;
253 double xyz1[3],xyz2[3],xyz3[3],xyz4[3];
258 OT_VECTEUR_3D v1(xyz2[0]-xyz1[0],xyz2[1]-xyz1[1],xyz2[2]-xyz1[2]);
259 OT_VECTEUR_3D v2(xyz3[0]-xyz1[0],xyz3[1]-xyz1[1],xyz3[2]-xyz1[2]);
260 OT_VECTEUR_3D v3(xyz4[0]-xyz1[0],xyz4[1]-xyz1[1],xyz4[2]-xyz1[2]);
266 double det=
mat.get_determinant();
267 double xsi=
mat1.get_determinant()/det;
268 double eta=
mat2.get_determinant()/det;
271 double eps=0.0000001;
272 if (xsi<-eps) reponse1=0;
273 if (eta<-eps) reponse1=0;
274 if (dseta<-eps) reponse1=0;
275 if (xsi+eta+dseta>1.+eps) reponse1=0;
285 double xyz1[3],xyz2[3],xyz3[3],xyz4[3];
293 double facteur=(vec1&vec2)*vec3;
301 static double gaussx[15],gaussy[15],gaussz[15],wi[15];
307 double b2=0.319793627;
308 double b1=0.091971078;
309 double c1=0.724086765;
310 double c2=0.040619116;
311 double d=0.056350832;
312 double e=0.443649167;
313 double w0=0.019753086;
314 double w1=0.011989513;
315 double w2=0.011511367;
316 double w3=0.008818342;
379 for (
int i=0;i<r;i++)
382 xyz[0]=(1-gaussx[i]-gaussy[i]-gaussz[i])*xyz1[0]+gaussx[i]*xyz2[0]+gaussy[i]*xyz3[0]+gaussz[i]*xyz4[0];
383 xyz[1]=(1-gaussx[i]-gaussy[i]-gaussz[i])*xyz1[1]+gaussx[i]*xyz2[1]+gaussy[i]*xyz3[1]+gaussz[i]*xyz4[1];
384 xyz[2]=(1-gaussx[i]-gaussy[i]-gaussz[i])*xyz1[2]+gaussx[i]*xyz2[2]+gaussy[i]*xyz3[2]+gaussz[i]*xyz4[2];
386 metrique->
evaluer(xyz,tenseur);
391 vol=vol+
sqrt(
mat.get_determinant())*wi[i]*facteur;
402 double xyz1[3],xyz2[3],xyz3[3];
423 double xyz1[3],xyz2[3],xyz4[3];
444 double xyz1[3],xyz3[3],xyz4[3];
465 double xyz2[3],xyz3[3],xyz4[3];
485 double xyz1[3],xyz2[3],xyz3[3],xyz4[3];
502 double xyz1[3],xyz2[3],xyz3[3],xyz4[3],x,y,z;
513 if (l2>maxlon) maxlon=l2;
516 if (l3>maxlon) maxlon=l3;
519 if (l4>maxlon) maxlon=l4;
522 if (l5>maxlon) maxlon=l5;
525 if (l6>maxlon) maxlon=l6;
527 x=0.5*(xyz1[0]+xyz2[0]);
528 y=0.5*(xyz1[1]+xyz2[1]);
529 z=0.5*(xyz1[2]+xyz2[2]);
535 x=0.5*(xyz1[0]+xyz3[0]);
536 y=0.5*(xyz1[1]+xyz3[1]);
537 z=0.5*(xyz1[2]+xyz3[2]);
543 x=0.5*(xyz1[0]+xyz4[0]);
544 y=0.5*(xyz1[1]+xyz4[1]);
545 z=0.5*(xyz1[2]+xyz4[2]);
551 x=0.5*(xyz2[0]+xyz3[0]);
552 y=0.5*(xyz2[1]+xyz3[1]);
553 z=0.5*(xyz2[2]+xyz3[2]);
559 x=0.5*(xyz2[0]+xyz4[0]);
560 y=0.5*(xyz2[1]+xyz4[1]);
561 z=0.5*(xyz2[2]+xyz4[2]);
567 x=0.5*(xyz3[0]+xyz4[0]);
568 y=0.5*(xyz3[1]+xyz4[1]);
569 z=0.5*(xyz3[2]+xyz4[2]);
void insere_lien_tetra(class DLY_TETRA *tet)
int point_dans_la_sphere(double x, double y, double z)
class DLY_SEGMENT * get_segment1(void)
DLY_TRIANGLE * get_triangle4(void)
class DLY_TRIANGLE * get_triangle1(void)
double get_critere_subdivision(void)
void change_triangle4(DLY_TRIANGLE *tri)
void change_segment3(DLY_SEGMENT *seg)
void change_segment5(DLY_SEGMENT *seg)
void decoupe_noeud(std::vector< double > &lstpt)
void ajoute_fils(std::vector< DLY_TETRA * > &liste)
DLY_TETRA(class DLY_NOEUD *no1, class DLY_NOEUD *no2, class DLY_NOEUD *no3, class DLY_NOEUD *no4)
virtual double get_x(void) const
DLY_TETRA * get_voisin1(void)
DLY_SEGMENT * get_segment2(void)
void insere_lien_tetra(class DLY_TETRA *tet)
DLY_TRIANGLE * get_triangle2(void)
void get_normal1(double *nor)
void change_segment2(DLY_SEGMENT *seg)
class DLY_TRIANGLE * tri1
DLY_SEGMENT * get_segment3(void)
virtual void get_coord(double *xyztmp)
void get_normal4(double *nor)
void change_segment4(DLY_SEGMENT *seg)
void get_normal2(double *nor)
void get_normal3(double *nor)
REAL insphere(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
void change_voisin2(DLY_TETRA *tet)
void change_segment6(DLY_SEGMENT *seg)
class DLY_TRIANGLE * tri2
DLY_NOEUD * get_noeud3(void)
void change_triangle1(DLY_TRIANGLE *tri)
DLY_TETRA * get_voisin2(void)
void change_voisin1(DLY_TETRA *tet)
DLY_NOEUD * get_noeud4(void)
static double qualite_tetra(double *noeud1, double *noeud2, double *noeud3, double *noeud4)
class DLY_TRIANGLE * tri3
virtual double get_y(void) const
DLY_TRIANGLE * get_triangle3(void)
class DLY_TRIANGLE * tri4
void change_voisin3(DLY_TETRA *tet)
double2 sqrt(double2 &val)
DLY_SEGMENT * get_segment6(void)
DLY_NOEUD * get_noeud1(void)
void change_voisin4(DLY_TETRA *tet)
virtual double get_z(void) const
void change_feuille(int num)
virtual double get_longueur(void) const
DLY_SEGMENT * get_segment4(void)
DLY_TETRA * get_voisin3(void)
REAL orient3d(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
DLY_TETRA * get_voisin4(void)
void change_triangle2(DLY_TRIANGLE *tri)
int point_dans_le_tetra(double x, double y, double z)
std::vector< DLY_TETRA * > fils
double calcul_volume(class FCT_TAILLE *metrique=NULL, int conserve=1)
DLY_NOEUD * get_noeud2(void)
DLY_SEGMENT * get_segment5(void)
DLY_TETRA * get_fils(int i)
void change_triangle3(DLY_TRIANGLE *tri)
virtual void evaluer(double *param, double *resultat)=0
void change_segment1(DLY_SEGMENT *seg)