$$$$ ROTA_IMP * ROTA_IMP PROCEDUR PV090527 25/06/11 21:15:11 12279 'DEBPROC' ROTA_IMP monmail*'MAILLAGE' angle*'FLOTTANT' poin1*'POINT' poin2*'POINT'; * * impose une condition de rotation d'un angle angle autour d'un axe poin1 poin2 * * Attention la raideur fabriquee depend de l'angle * Attention ne fonctionne pas si il y a des points sur l'axe de rotation * * conf_ref = 'FORM'; 'FORM' ('VIDE' CHPOINT); 'DEPL' monmail 'TOUR' angle poin1 poin2; coorx = 'COOR' 1 monmail; coory = 'COOR' 2 monmail; coorz = 'COOR' 3 monmail; 'FORM' conf_ref; axe = poin2 'MOIN' poin1; axe = axe / ('NORM' axe); axex = 'COOR' 1 axe; axey = 'COOR' 2 axe; axez = 'COOR' 3 axe; poin1x = poin1 'COOR' 1; poin1y = poin1 'COOR' 2; poin1z = poin1 'COOR' 3; * vecteur radial apres rotation coorx = coorx - poin1x; coory = coory - poin1y; coorz = coorz - poin1z; * normale au vecteur radial et a l'axe de rotation norm1x = (axey * coorz) - (axez * coory); norm1y = (axez * coorx) - (axex * coorz); norm1z = (axex * coory) - (axey * coorx); normch = (norm1x 'NOMC' 'UX') et (norm1y 'NOMC' 'UY') et (norm1z 'NOMC' 'UZ'); * matrice de blocage dans la direction normale *rrota = 'BLOQ' monmail 'DIRE' normch; rrota = 'RELA' normch; * coordonnees initiales coorx = 'COOR' 1 monmail; coory = 'COOR' 2 monmail; coorz = 'COOR' 3 monmail; coorx = coorx - poin1x; coory = coory - poin1y; coorz = coorz - poin1z; coorch = ((coorx 'NOMC' 'UX') et (coory 'NOMC' 'UY') et (coorz 'NOMC' 'UZ')) ; * second membre lrota = rrota * (coorch * -1); 'FINP' rrota lrota;