function [cmassa,manip_B,Angulos,Pe,Origem]=InversManipB(cmassa,manip_B,Angulos,Pe,RefPeE);

cmassa(1,1)=-cmassa(1,1);
cmassa(3,2)=-cmassa(3,2);
cmassa(3,3)=-cmassa(3,3);
cmassa(3,4)=-cmassa(3,4);
cmassa(2,5)=-cmassa(2,5);
cmassa(2,6)=-cmassa(2,6);
cmassa(1,8)=-cmassa(1,8);
cmassa(2,11)=-cmassa(2,11);
cmassa(3,12)=-cmassa(3,12);
cmassa(3,13)=-cmassa(3,13);
cmassa(3,14)=-cmassa(3,14);
cmassa(2,15)=-cmassa(2,15);
cmassa(2,16)=-cmassa(2,16);

manip_B(8:9,3,1)=-manip_B(8:9,3,1);

aux=Angulos(1:17,1:2);
for i=1:17;
    Angulos(i,2)=aux(18-i,2);
    Angulos(i,1)=aux(18-i,1);    
end;

Aux=Pe;
Pe(1,1)=-Aux(1,2);
Pe(1,2)=-Aux(1,1);
Pe(1,3)=-Aux(1,4);
Pe(1,4)=-Aux(1,3);

DH=[-1 0 0 0
    0 1 0 0
    0 0 -1 0
    0 0 0 1];
Origem(:,:)=RefPeE(:,:)*DH(:,:);