ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mtu/src/vct_arete.cpp
Revision: 1158
Committed: Thu Jun 13 22:18:49 2024 UTC (11 months, 1 week ago) by francois
File size: 2936 byte(s)
Log Message:
compatibilité Ubuntu 22.04
Suppression des refeences à Windows
Ajout d'une banière

File Contents

# User Rev Content
1 francois 1158 //####//------------------------------------------------------------
2     //####//------------------------------------------------------------
3     //####// MAGiC
4     //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5     //####// Departement de Genie Mecanique - UQTR
6     //####//------------------------------------------------------------
7     //####// MAGIC est un projet de recherche de l equipe ERICCA
8     //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9     //####// http://www.uqtr.ca/ericca
10     //####// http://www.uqtr.ca/
11     //####//------------------------------------------------------------
12     //####//------------------------------------------------------------
13     //####//
14     //####// vct_arete.cpp
15     //####//
16     //####//------------------------------------------------------------
17     //####//------------------------------------------------------------
18     //####// COPYRIGHT 2000-2024
19     //####// jeu 13 jun 2024 11:58:55 EDT
20     //####//------------------------------------------------------------
21     //####//------------------------------------------------------------
22 francois 283 #include "gestionversion.h"
23    
24    
25     #pragma hdrstop
26     #include "vct_arete.h"
27     #include "vct_courbe.h"
28     #include "mg_courbe.h"
29     #include "mg_arete.h"
30     #include <iomanip>
31     #include<math.h>
32     #include "ot_mathematique.h"
33    
34     #pragma package(smart_init)
35    
36    
37    
38     VCT_ARETE::VCT_ARETE(MG_ARETE* arete):VCT_ELEMENT_TOPOLOGIQUE(arete)
39     {
40     double2 ZERO=0.;
41     int indx_premier_ptctr;
42     OT_VECTEUR_4DD V1,V2,V;
43    
44     TPL_LISTE_ENTITE<double> nurbs_params;
45     arete->get_param_NURBS(indx_premier_ptctr,nurbs_params);
46     int nb_points=1/4.*(nurbs_params.get_nb()-indx_premier_ptctr);
47    
48     OT_VECTEUR_4DD VCT_NUL(0.,0.,0.,0.);
49    
50     for (int s=0;s<nb_points-1;s++)
51     {
52     V1[0]=nurbs_params.get(indx_premier_ptctr+ 4 * s);
53     V1[1]=nurbs_params.get(indx_premier_ptctr+ 4 * s + 1);
54     V1[2]=nurbs_params.get(indx_premier_ptctr+ 4 * s + 2);
55     V1[3]=nurbs_params.get(indx_premier_ptctr+ 4 * s + 3);
56    
57     if (s==0)
58     lst_points.insert(lst_points.end(),V1);
59    
60     V2[0]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1));
61     V2[1]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1) + 1);
62     V2[2]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1) + 2);
63     V2[3]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1) + 3);
64    
65     lst_points.insert(lst_points.end(),V2);
66    
67     V=V2-V1;
68 francois 363 /*
69 francois 283 double2 norm_au_carre=(V[0]*V[0])+(V[1]*V[1])+(V[2]*V[2])+(V[3]*V[3]);
70     double2 norm=norm_au_carre^0.5;
71 francois 363 */
72 francois 743 if (V.est_nul_3d()) continue;
73     V.vecteur_norme_3d();
74 francois 283 if (V==VCT_NUL)
75     lst_vecteurs.insert(lst_vecteurs.end(),VCT_NUL);
76    
77 francois 363 //if (norm!=ZERO) {
78     // V=1./norm*V;
79     else lst_vecteurs.insert(lst_vecteurs.end(),V);
80    
81     // }
82 francois 283
83     }
84    
85     construire_forme_tensorielle();
86     }
87    
88     VCT_ARETE::VCT_ARETE(VCT_ARETE& mdd):VCT_ELEMENT_TOPOLOGIQUE(mdd.elem_topo)
89     {
90     }
91    
92    
93     VCT_ARETE::~ VCT_ARETE()
94     {
95    
96     }
97    
98