visualization of dumbbell

Dear all,

i managed to visualize a dumbbell in the hands of the StandingModel. Unfortunately there are two dumbbells now, one in the right, and one in the left hand, although i added only one (and i did not drink to much this morning ;)). I would like to have only one in the right hand.
Here is what i inserted into Body\AAUHuman\Arm\Seg.any, in the AnySeg Hand section.


AnyRefNode Node = {

sRel = {-0.1,0,0};
ARel = RotMat(90.0/180.0*pi,z);

AnyDrawSurf Surf = {
  FileName = "dumbbell";
  ScaleXYZ = {0.001,0.001,0.001};
  RGB = {0,0,1.0};
};

};


(Of course i added the dumbbell.anysurf3 in the corresponding folder.)

How can i avoid that the dumbbell is placed on both sides?

Thanks,

Thomaz

Hi Thomaz,

First, I’d recommend you not to modify the files in ‘Body’ folder of the AnyBody repository.

Instead, you can modify your model file.

For instance, we may be able to modify the ‘StandingModel.Main.any’ file like this:

    AnyFolder ModelEnvironmentConnection = 
    {
      AnyFolder &HumanModel=.HumanModel;
      #include "JointsAndDrivers.any"
      
      AnySeg& RightHand = Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Hand;
      RightHand = 
      {
          AnyRefNode Node = 
          {

             sRel = {-0.1,0,0};
             ARel = RotMat(90.0/180.0*pi,z);
             
             AnyDrawSurf Surf = 
             {
               FileName = "dumbbell";
               ScaleXYZ = {0.001,0.001,0.001};
               RGB = {0,0,1.0};
             };
          };
      };
    };

Then you can see that this dumbbell STL file is now attached only on the right hand.

But as we know, this is just STL file.
If you want to see the effect of dumbbell weight,
then you have to define an AnySeg with proper mass properties.
And make a connection(kinematically and kinetically) between the right hand and this new AnySeg.

I hope this may help you.

Best regards,
Moonki

thanks a lot. perfect!

(I apply the mass via a force, the speed is low.)