1 |
souaissa |
66 |
//---------------------------------------------------------------------------
|
2 |
|
|
#include "gestionversion.h"
|
3 |
|
|
//---------------------------------------------------------------------------
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
#pragma hdrstop
|
7 |
|
|
#include "vct_arete.h"
|
8 |
|
|
#include "vct_courbe.h"
|
9 |
|
|
#include "mg_courbe.h"
|
10 |
|
|
#include "mg_arete.h"
|
11 |
|
|
#include <iomanip.h>
|
12 |
|
|
#include "ot_mathematique.h"
|
13 |
|
|
//---------------------------------------------------------------------------
|
14 |
|
|
|
15 |
|
|
#pragma package(smart_init)
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
VCT_ARETE::VCT_ARETE(MG_ARETE* arete):VCT_ELEMENT_TOPOLOGIQUE(arete)
|
20 |
|
|
{
|
21 |
|
|
double2 ZERO=0.;
|
22 |
souaissa |
69 |
int indx_premier_ptctr;
|
23 |
|
|
OT_VECTEUR_4DD V1,V2,V;
|
24 |
souaissa |
66 |
|
25 |
souaissa |
69 |
TPL_LISTE_ENTITE<double> nurbs_params;
|
26 |
souaissa |
66 |
arete->get_param_NURBS(indx_premier_ptctr,nurbs_params);
|
27 |
souaissa |
69 |
nb_points=1/4.*(nurbs_params.get_nb()-indx_premier_ptctr);
|
28 |
souaissa |
66 |
|
29 |
souaissa |
69 |
OT_VECTEUR_4DD VCT_NUL(0.,0.,0.,0.);
|
30 |
souaissa |
67 |
|
31 |
souaissa |
69 |
for(int s=0;s<nb_points-1;s++)
|
32 |
souaissa |
66 |
{
|
33 |
souaissa |
69 |
V1[0]=nurbs_params.get(indx_premier_ptctr+ 4 * s);
|
34 |
|
|
V1[1]=nurbs_params.get(indx_premier_ptctr+ 4 * s + 1);
|
35 |
|
|
V1[2]=nurbs_params.get(indx_premier_ptctr+ 4 * s + 2);
|
36 |
|
|
V1[3]=nurbs_params.get(indx_premier_ptctr+ 4 * s + 3);
|
37 |
souaissa |
71 |
|
38 |
souaissa |
69 |
lst_points.insert(lst_points.end(),V1);
|
39 |
souaissa |
71 |
|
40 |
souaissa |
69 |
V2[0]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1));
|
41 |
|
|
V2[1]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1) + 1);
|
42 |
|
|
V2[2]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1) + 2);
|
43 |
|
|
V2[3]=nurbs_params.get(indx_premier_ptctr+ 4 * (s + 1) + 3);
|
44 |
souaissa |
71 |
|
45 |
souaissa |
69 |
lst_points.insert(lst_points.end(),V2);
|
46 |
souaissa |
71 |
|
47 |
souaissa |
69 |
V=V2-V1;
|
48 |
souaissa |
66 |
|
49 |
souaissa |
69 |
double2 norm_au_carre=(V[0]*V[0])+(V[1]*V[1])+(V[2]*V[2])+(V[3]*V[3]);
|
50 |
souaissa |
66 |
double2 norm=norm_au_carre^0.5;
|
51 |
|
|
|
52 |
souaissa |
69 |
if(V==VCT_NUL)
|
53 |
|
|
lst_vecteurs.insert(lst_vecteurs.end(),VCT_NUL);
|
54 |
souaissa |
67 |
|
55 |
souaissa |
66 |
if(norm!=ZERO){
|
56 |
souaissa |
69 |
V=1./norm*V;
|
57 |
|
|
lst_vecteurs.insert(lst_vecteurs.end(),V);
|
58 |
souaissa |
66 |
}
|
59 |
|
|
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
}
|
64 |
|
|
|
65 |
|
|
VCT_ARETE::VCT_ARETE(VCT_ARETE& mdd):VCT_ELEMENT_TOPOLOGIQUE(mdd.elem_topo)
|
66 |
|
|
{
|
67 |
souaissa |
69 |
|
68 |
|
|
lst_vecteurs=mdd.lst_vecteurs;
|
69 |
|
|
lst_points=mdd.lst_points;
|
70 |
|
|
nb_points=mdd.nb_points ;
|
71 |
|
|
|
72 |
souaissa |
66 |
}
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
VCT_ARETE::~ VCT_ARETE()
|
76 |
|
|
{
|
77 |
souaissa |
67 |
|
78 |
souaissa |
66 |
}
|
79 |
|
|
|
80 |
francois |
72 |
std::vector<OT_VECTEUR_4DD>& VCT_ARETE::get_points_controle(void)
|
81 |
souaissa |
66 |
{
|
82 |
souaissa |
71 |
return lst_points;
|
83 |
|
|
}
|
84 |
|
|
|
85 |
|
|
std::vector<OT_VECTEUR_4DD> & VCT_ARETE::get_vecteurs()
|
86 |
|
|
{
|
87 |
souaissa |
69 |
return lst_vecteurs;
|
88 |
souaissa |
66 |
}
|
89 |
|
|
|
90 |
|
|
|
91 |
souaissa |
69 |
OT_TENSEUR VCT_ARETE:: calcule_tenseur_metrique()
|
92 |
souaissa |
66 |
{
|
93 |
souaissa |
69 |
OT_TENSEUR tns(lst_vecteurs);
|
94 |
|
|
return tns;
|
95 |
souaissa |
66 |
}
|
96 |
|
|
|
97 |
souaissa |
69 |
OT_VECTEUR_4DD VCT_ARETE::calcule_barycentre()
|
98 |
souaissa |
66 |
{
|
99 |
|
|
|
100 |
souaissa |
69 |
OT_VECTEUR_4DD barycentre(0,0,0,0);
|
101 |
souaissa |
66 |
|
102 |
souaissa |
69 |
for(int i=0;i<nb_points;i++)
|
103 |
souaissa |
66 |
{
|
104 |
souaissa |
71 |
barycentre+=lst_points[i];
|
105 |
souaissa |
66 |
}
|
106 |
|
|
|
107 |
souaissa |
69 |
barycentre*=1./nb_points;
|
108 |
|
|
return barycentre;
|
109 |
souaissa |
66 |
}
|
110 |
|
|
|
111 |
|
|
|
112 |
souaissa |
69 |
|
113 |
|
|
int VCT_ARETE::get_nb_points()
|
114 |
|
|
{
|
115 |
|
|
return nb_points ;
|
116 |
|
|
}
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
OT_TENSEUR VCT_ARETE::calcule_covariance(void)
|
120 |
souaissa |
66 |
{
|
121 |
souaissa |
71 |
OT_TENSEUR COVARIANCE(4);
|
122 |
souaissa |
69 |
std::vector<OT_VECTEUR_4DD> Points_Centre_au_barycentre(nb_points);
|
123 |
|
|
OT_VECTEUR_4DD barycentre=calcule_barycentre();
|
124 |
souaissa |
66 |
|
125 |
souaissa |
69 |
for( int i=0;i<nb_points;i++)
|
126 |
|
|
{
|
127 |
|
|
Points_Centre_au_barycentre[i]=lst_points[i]-barycentre;
|
128 |
|
|
}
|
129 |
souaissa |
66 |
|
130 |
souaissa |
71 |
OT_TENSEUR PT_CENTRE(nb_points,4),PT_CENTRE_TRANSPOSE;
|
131 |
souaissa |
69 |
|
132 |
souaissa |
71 |
for( int i=0;i<nb_points;i++)
|
133 |
|
|
{
|
134 |
|
|
OT_VECTEUR_4DD pt=Points_Centre_au_barycentre[i];
|
135 |
|
|
PT_CENTRE(i,0)= pt[0] ;
|
136 |
|
|
PT_CENTRE(i,1)= pt[1] ;
|
137 |
|
|
PT_CENTRE(i,2)= pt[2] ;
|
138 |
|
|
PT_CENTRE(i,3)= pt[3] ;
|
139 |
|
|
}
|
140 |
|
|
PT_CENTRE_TRANSPOSE =PT_CENTRE.transpose();
|
141 |
|
|
|
142 |
|
|
COVARIANCE=PT_CENTRE_TRANSPOSE*PT_CENTRE;
|
143 |
|
|
double2 COEF= 1./nb_points;
|
144 |
|
|
COVARIANCE=COVARIANCE*COEF;
|
145 |
|
|
|
146 |
souaissa |
69 |
return COVARIANCE;
|
147 |
souaissa |
66 |
}
|
148 |
|
|
|
149 |
|
|
|
150 |
souaissa |
71 |
void VCT_ARETE::calcule_axes_dinertie(OT_VECTEUR_4DD& D,OT_TENSEUR& V)
|
151 |
souaissa |
69 |
{
|
152 |
|
|
int n=4;
|
153 |
|
|
int nrot;
|
154 |
souaissa |
66 |
|
155 |
souaissa |
71 |
OT_TENSEUR COV=calcule_covariance();
|
156 |
|
|
|
157 |
|
|
|
158 |
souaissa |
69 |
double2 zro=0.0;
|
159 |
souaissa |
66 |
|
160 |
souaissa |
71 |
if(COV(0,0)==zro&&COV(1,0)==zro&&COV(2,0)==zro&&COV(3,0)==zro)
|
161 |
souaissa |
69 |
{
|
162 |
souaissa |
71 |
COV(0,0)=1.0;
|
163 |
|
|
COV(1,0)=zro;
|
164 |
|
|
COV(2,0)=zro;
|
165 |
|
|
COV(3,0)=zro;
|
166 |
souaissa |
69 |
}
|
167 |
souaissa |
71 |
if(COV(0,1)==zro&&COV(1,1)==zro&&COV(2,1)==zro&&COV(3,1)==zro)
|
168 |
souaissa |
69 |
{
|
169 |
souaissa |
71 |
COV(0,1)=zro;
|
170 |
|
|
COV(1,1)=1.0;
|
171 |
|
|
COV(2,1)=zro;
|
172 |
|
|
COV(3,1)=zro;
|
173 |
souaissa |
69 |
}
|
174 |
souaissa |
71 |
if(COV(0,2)==zro&&COV(1,2)==zro&&COV(2,2)==zro&&COV(3,2)==zro)
|
175 |
souaissa |
69 |
{
|
176 |
souaissa |
71 |
COV(0,2)=zro;
|
177 |
|
|
COV(1,2)=zro;
|
178 |
|
|
COV(2,2)=1.0;
|
179 |
|
|
COV(3,2)=zro;
|
180 |
souaissa |
69 |
}
|
181 |
souaissa |
71 |
if(COV(0,3)==zro&&COV(1,3)==zro&&COV(2,3)==zro&&COV(3,3)==zro)
|
182 |
souaissa |
69 |
{
|
183 |
souaissa |
71 |
COV(0,3)=zro;
|
184 |
|
|
COV(1,3)=zro;
|
185 |
|
|
COV(2,3)=zro;
|
186 |
|
|
COV(3,3)=1.0;
|
187 |
souaissa |
69 |
}
|
188 |
souaissa |
66 |
|
189 |
|
|
|
190 |
souaissa |
71 |
COV.get_orthogonalisation(COV,D,V,n,nrot);
|
191 |
souaissa |
66 |
|
192 |
souaissa |
69 |
}
|
193 |
souaissa |
66 |
|
194 |
|
|
|
195 |
souaissa |
69 |
OT_TENSEUR VCT_ARETE:: calcule_tenseur_inertie_au_barycentre() //repere globale
|
196 |
|
|
{
|
197 |
souaissa |
71 |
OT_TENSEUR INERTIE(4);
|
198 |
souaissa |
69 |
OT_TENSEUR cov=calcule_covariance();
|
199 |
|
|
double2 nb_pts=nb_points;
|
200 |
|
|
double2 MOINS_UN=-1.0;
|
201 |
souaissa |
71 |
INERTIE=cov*MOINS_UN;
|
202 |
|
|
INERTIE=INERTIE*nb_pts;
|
203 |
souaissa |
66 |
|
204 |
souaissa |
71 |
INERTIE(0,0)=(cov(1,1)+cov(2,2)+cov(3,3))*nb_pts;
|
205 |
|
|
INERTIE(1,1)=(cov(0,0)+cov(2,2)+cov(3,3))*nb_pts;
|
206 |
|
|
INERTIE(2,2)=(cov(1,1)+cov(0,0)+cov(3,3))*nb_pts;
|
207 |
|
|
INERTIE(3,3)=(cov(1,1)+cov(2,2)+cov(0,0))*nb_pts;
|
208 |
|
|
|
209 |
|
|
return INERTIE;
|
210 |
souaissa |
69 |
}
|
211 |
souaissa |
66 |
|
212 |
|
|
|
213 |
souaissa |
69 |
OT_TENSEUR VCT_ARETE:: calcule_tenseur_inertie_au_pt(OT_VECTEUR_4DD& POINT)
|
214 |
souaissa |
66 |
{
|
215 |
|
|
|
216 |
souaissa |
71 |
OT_VECTEUR_4DD BARYCENTRE=calcule_barycentre();
|
217 |
|
|
OT_TENSEUR TENS=calcule_tenseur_inertie_au_barycentre();
|
218 |
souaissa |
66 |
|
219 |
souaissa |
69 |
OT_VECTEUR_4DD ABC=POINT-BARYCENTRE;
|
220 |
souaissa |
66 |
|
221 |
souaissa |
69 |
double2 a=ABC[0] ;
|
222 |
|
|
double2 b=ABC[1] ;
|
223 |
|
|
double2 c=ABC[2] ;
|
224 |
|
|
double2 d=ABC[3] ;
|
225 |
souaissa |
66 |
|
226 |
souaissa |
69 |
TENS(0,0)=TENS(0,0)+b*b+c*c+d*d;
|
227 |
|
|
TENS(1,1)=TENS(1,1)+a*a+c*c+d*d;
|
228 |
|
|
TENS(2,2)=TENS(2,2)+a*a+b*b+d*d;
|
229 |
souaissa |
71 |
TENS(3,3)=TENS(3,3)+a*a+b*b+c*c;
|
230 |
souaissa |
66 |
|
231 |
souaissa |
69 |
TENS(0,1)=TENS(0,1)-nb_points*a*b;
|
232 |
|
|
TENS(0,2)=TENS(0,2)-nb_points*a*c;
|
233 |
|
|
TENS(0,3)=TENS(0,3)-nb_points*a*d;
|
234 |
souaissa |
66 |
|
235 |
souaissa |
69 |
TENS(1,0)=TENS(1,0)-nb_points*b*a;
|
236 |
|
|
TENS(1,2)=TENS(1,2)-nb_points*b*c;
|
237 |
|
|
TENS(1,3)=TENS(1,3)-nb_points*b*d;
|
238 |
souaissa |
66 |
|
239 |
souaissa |
69 |
TENS(2,0)=TENS(2,0)-nb_points*c*a;
|
240 |
|
|
TENS(2,1)=TENS(2,1)-nb_points*c*b;
|
241 |
|
|
TENS(2,3)=TENS(2,3)-nb_points*c*d;
|
242 |
souaissa |
66 |
|
243 |
souaissa |
69 |
TENS(3,0)=TENS(3,0)-nb_points*d*a;
|
244 |
|
|
TENS(3,1)=TENS(3,1)-nb_points*d*b;
|
245 |
|
|
TENS(3,2)=TENS(3,2)-nb_points*d*c;
|
246 |
souaissa |
66 |
|
247 |
souaissa |
69 |
return TENS;
|
248 |
|
|
}
|
249 |
souaissa |
66 |
|
250 |
souaissa |
69 |
|
251 |
|
|
OT_TENSEUR VCT_ARETE::calcule_tenseur_inertie_base_locale()
|
252 |
souaissa |
66 |
{
|
253 |
souaissa |
71 |
|
254 |
souaissa |
69 |
OT_VECTEUR_4DD v1,v2,v3,v4;
|
255 |
|
|
OT_TENSEUR INERTIE;
|
256 |
|
|
OT_TENSEUR I_GLOBALE;
|
257 |
souaissa |
71 |
OT_VECTEUR_4DD D;
|
258 |
|
|
OT_TENSEUR V(4);
|
259 |
|
|
this->calcule_axes_dinertie(D,V);
|
260 |
souaissa |
69 |
INERTIE=this->calcule_tenseur_inertie_au_barycentre();
|
261 |
souaissa |
66 |
|
262 |
souaissa |
69 |
I_GLOBALE= INERTIE;
|
263 |
souaissa |
66 |
|
264 |
souaissa |
69 |
OT_TENSEUR P(4);
|
265 |
|
|
OT_TENSEUR I=I_GLOBALE;
|
266 |
|
|
OT_TENSEUR P_TRSPOSE;
|
267 |
|
|
OT_TENSEUR I_LOCALE;
|
268 |
souaissa |
71 |
P=V;
|
269 |
souaissa |
69 |
P_TRSPOSE=P.transpose();
|
270 |
souaissa |
66 |
|
271 |
souaissa |
69 |
I_LOCALE=P_TRSPOSE*I;
|
272 |
|
|
I_LOCALE=I_LOCALE*P;
|
273 |
souaissa |
66 |
|
274 |
souaissa |
71 |
return I_LOCALE;
|
275 |
|
|
|
276 |
souaissa |
66 |
}
|
277 |
|
|
|
278 |
|
|
|
279 |
|
|
|
280 |
|
|
|
281 |
souaissa |
69 |
void VCT_ARETE::calcule_tenseur_inertie_base_entite( OT_VECTEUR_4DD& g1g2,OT_TENSEUR& tens2, VCT& vct_f)
|
282 |
souaissa |
66 |
{
|
283 |
souaissa |
71 |
OT_VECTEUR_4DD Dv,Dw,G1,G2,G1G2;
|
284 |
souaissa |
69 |
OT_TENSEUR P(4);
|
285 |
|
|
OT_TENSEUR pt;
|
286 |
|
|
OT_TENSEUR IV;
|
287 |
souaissa |
71 |
OT_TENSEUR Q(4);
|
288 |
souaissa |
69 |
OT_TENSEUR qt;
|
289 |
|
|
OT_TENSEUR R;
|
290 |
|
|
OT_TENSEUR Rt;
|
291 |
|
|
OT_TENSEUR IW;
|
292 |
souaissa |
71 |
OT_TENSEUR MASSE_CONCENTRE(4);
|
293 |
|
|
OT_TENSEUR V(4),W(4);
|
294 |
|
|
this->calcule_axes_dinertie(Dv,V);
|
295 |
|
|
vct_f.calcule_axes_dinertie(Dw,W);
|
296 |
souaissa |
66 |
|
297 |
souaissa |
71 |
P=V;
|
298 |
|
|
Q=W;
|
299 |
souaissa |
66 |
|
300 |
souaissa |
71 |
IW=vct_f.calcule_tenseur_inertie_base_locale();
|
301 |
souaissa |
66 |
|
302 |
souaissa |
69 |
pt=P.transpose();
|
303 |
|
|
qt=Q.transpose();
|
304 |
|
|
R=pt*Q;
|
305 |
|
|
Rt=qt*P;
|
306 |
|
|
IV=R*IW;
|
307 |
|
|
IV=IV*Rt;
|
308 |
souaissa |
66 |
|
309 |
|
|
|
310 |
souaissa |
69 |
G1=this->calcule_barycentre();
|
311 |
|
|
G2=vct_f.calcule_barycentre();
|
312 |
souaissa |
66 |
|
313 |
souaissa |
69 |
G1G2=G2-G1;
|
314 |
souaissa |
66 |
|
315 |
souaissa |
69 |
OT_VECTEUR_4DD G1G2_LOC; //Calcul du vecteur G1G2 dans la base locale;
|
316 |
|
|
for(int i=0;i<4;i++)
|
317 |
|
|
{
|
318 |
|
|
for(int j=0;j<4;j++)
|
319 |
souaissa |
66 |
{
|
320 |
souaissa |
69 |
G1G2_LOC[i]= G1G2_LOC[i]+pt(i,j)*G1G2[j];
|
321 |
souaissa |
66 |
}
|
322 |
souaissa |
69 |
}
|
323 |
souaissa |
66 |
|
324 |
souaissa |
69 |
MASSE_CONCENTRE(0,0)=nb_points*(G1G2_LOC[1]*G1G2_LOC[1]+G1G2_LOC[2]*G1G2_LOC[2]+G1G2_LOC[3]*G1G2_LOC[3]);
|
325 |
|
|
MASSE_CONCENTRE(0,1)=-1*nb_points*(G1G2_LOC[0]*G1G2_LOC[1]);
|
326 |
|
|
MASSE_CONCENTRE(0,2)=-1*nb_points*(G1G2_LOC[0]*G1G2_LOC[2]);
|
327 |
|
|
MASSE_CONCENTRE(0,3)=-1*nb_points*(G1G2_LOC[0]*G1G2_LOC[3]);
|
328 |
souaissa |
66 |
|
329 |
souaissa |
69 |
MASSE_CONCENTRE(1,0)=-1*nb_points*(G1G2_LOC[1]*G1G2_LOC[0]);
|
330 |
|
|
MASSE_CONCENTRE(1,1)= nb_points*(G1G2_LOC[0]*G1G2_LOC[0]+G1G2_LOC[2]*G1G2_LOC[2]+G1G2_LOC[3]*G1G2_LOC[3]);
|
331 |
|
|
MASSE_CONCENTRE(1,2)=-1*nb_points*(G1G2_LOC[1]*G1G2_LOC[2]);
|
332 |
|
|
MASSE_CONCENTRE(1,3)=-1*nb_points*(G1G2_LOC[1]*G1G2_LOC[3]);
|
333 |
souaissa |
66 |
|
334 |
souaissa |
69 |
MASSE_CONCENTRE(2,0)=-1*nb_points*(G1G2_LOC[2]*G1G2_LOC[0]);
|
335 |
|
|
MASSE_CONCENTRE(2,1)=-1*nb_points*(G1G2_LOC[2]*G1G2_LOC[1]);
|
336 |
|
|
MASSE_CONCENTRE(2,2)=nb_points*(G1G2_LOC[0]*G1G2_LOC[0]+G1G2_LOC[1]*G1G2_LOC[1]+G1G2_LOC[3]*G1G2_LOC[3]);
|
337 |
|
|
MASSE_CONCENTRE(2,3)=-1*nb_points*(G1G2_LOC[0]*G1G2_LOC[2]);
|
338 |
souaissa |
66 |
|
339 |
souaissa |
69 |
MASSE_CONCENTRE(3,0)=-1*nb_points*(G1G2_LOC[0]*G1G2_LOC[3]);
|
340 |
|
|
MASSE_CONCENTRE(3,1)=-1*nb_points*(G1G2_LOC[1]*G1G2_LOC[3]);
|
341 |
|
|
MASSE_CONCENTRE(3,2)=-1*nb_points*(G1G2_LOC[2]*G1G2_LOC[3]);
|
342 |
|
|
MASSE_CONCENTRE(3,3)=nb_points*(G1G2_LOC[0]*G1G2_LOC[0]+G1G2_LOC[1]*G1G2_LOC[1]+G1G2_LOC[2]*G1G2_LOC[2]);
|
343 |
souaissa |
66 |
|
344 |
souaissa |
69 |
IV=IV+MASSE_CONCENTRE;
|
345 |
souaissa |
71 |
|
346 |
souaissa |
69 |
}
|
347 |
souaissa |
66 |
|
348 |
|
|
|
349 |
souaissa |
71 |
ostream& operator <<(ostream& os, VCT_ARETE& vct_f)
|
350 |
souaissa |
66 |
{
|
351 |
|
|
|
352 |
souaissa |
71 |
vct_f.enregistrer(os) ;
|
353 |
|
|
return os;
|
354 |
souaissa |
66 |
}
|
355 |
souaissa |
71 |
|
356 |
|
|
//==========================================================================
|
357 |
|
|
//Visualisation
|
358 |
|
|
//==========================================================================
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
|
362 |
|
|
|
363 |
|
|
void VCT_ARETE::enregistrer(std::ostream& ost)
|
364 |
|
|
{
|
365 |
|
|
|
366 |
|
|
ost<<"========================================"<<endl;
|
367 |
|
|
ost<<"% FACE: "<<endl;
|
368 |
|
|
ost<<"========================================"<<endl;
|
369 |
|
|
ost<<"POINTS_DE_CONTROLS: "<<endl;
|
370 |
|
|
ost<<"========================================"<<endl;
|
371 |
|
|
|
372 |
|
|
for (unsigned int i=0;i< lst_points.size();i++)
|
373 |
|
|
{
|
374 |
|
|
OT_VECTEUR_4DD v= lst_points[i]; // Rmq: la precision nèest pas affocher, il faut rajouter l'affichage
|
375 |
|
|
ost<< v<<endl; // de la precision dans la classe doubleprecision
|
376 |
|
|
}
|
377 |
|
|
|
378 |
|
|
ost<<endl;
|
379 |
|
|
ost<<"VECTORISATION: "<<endl;
|
380 |
|
|
ost<<"========================================"<<endl;
|
381 |
|
|
for (unsigned int i=0;i< lst_vecteurs.size();i++)
|
382 |
|
|
{
|
383 |
|
|
OT_VECTEUR_4DD v= lst_vecteurs[i];
|
384 |
|
|
ost<< v<<endl;
|
385 |
|
|
}
|
386 |
|
|
|
387 |
|
|
ost<<endl<<endl;
|
388 |
|
|
ost<<"BARYCENTRE: "<<endl;
|
389 |
|
|
ost<<"========================================"<<endl;
|
390 |
|
|
OT_VECTEUR_4DD BARY= calcule_barycentre();
|
391 |
|
|
ost<<BARY<<endl;
|
392 |
|
|
ost<<endl<<endl;
|
393 |
|
|
ost<<"TENSEUR_METRIQUE: "<<endl;
|
394 |
|
|
ost<<"========================================"<<endl;
|
395 |
|
|
OT_TENSEUR TNS_MT= calcule_tenseur_metrique() ;
|
396 |
|
|
ost<< TNS_MT<<endl;
|
397 |
|
|
ost<<endl<<endl;
|
398 |
|
|
ost<<"TENSEUR_DE_COVARIANCE: "<<endl;
|
399 |
|
|
ost<<"========================================"<<endl;
|
400 |
|
|
OT_TENSEUR TNS_CV= calcule_covariance();
|
401 |
|
|
ost<< TNS_CV<<endl;
|
402 |
|
|
ost<<endl<<endl;
|
403 |
|
|
ost<<"AXES_D'INERTIE: "<<endl;
|
404 |
|
|
ost<<"========================================"<<endl;
|
405 |
|
|
OT_VECTEUR_4DD D;
|
406 |
|
|
OT_TENSEUR V(4);
|
407 |
|
|
calcule_axes_dinertie(D,V);
|
408 |
|
|
ost<< V<<endl;
|
409 |
|
|
ost<<endl<<endl;
|
410 |
|
|
ost<<"INERTIE_CALCULÉE_AU_BARYCENTRE: "<<endl;
|
411 |
|
|
ost<<"========================================"<<endl;
|
412 |
|
|
OT_TENSEUR I_BARY=calcule_tenseur_inertie_au_barycentre();
|
413 |
|
|
ost<<I_BARY<<endl;
|
414 |
|
|
|
415 |
|
|
ost<<endl<<endl;
|
416 |
|
|
ost<<"INERTIE_TRANSPORTÉE_EN_UN_POINT: "<<endl;
|
417 |
|
|
ost<<"========================================"<<endl;
|
418 |
|
|
OT_TENSEUR I_TRANSP=calcule_tenseur_inertie_au_pt(BARY);
|
419 |
|
|
ost<<I_TRANSP<<endl;
|
420 |
|
|
ost<<endl<<endl;
|
421 |
|
|
|
422 |
|
|
ost<<"INERTIE_CALCULÉ_DANS_LA_BASE_LOCALE: "<<endl;
|
423 |
|
|
ost<<"========================================"<<endl;
|
424 |
|
|
OT_TENSEUR I_BASE=calcule_tenseur_inertie_base_locale();
|
425 |
|
|
ost<<I_BASE<<endl;
|
426 |
|
|
ost<<endl<<endl;
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
// void calcule_tenseur_inertie_base_entite(OT_VECTEUR_4DD& G1G2, OT_TENSEUR& tens,VCT& vct_f) ;
|
430 |
|
|
|
431 |
|
|
|
432 |
|
|
|
433 |
|
|
|
434 |
|
|
}
|