Asymmetrical bone exchange

I'm using Plug-in-Gait_Simple model to import squat motion capture c3d file.

I'm trying to change right femur and tibia by replacing stl files in Seg.any.

I intended to change only right bones, but left bones are also changed to the same shape, without being flipped left and right.

So I'm looking for function that changes the left and right sides to the same shape and I want to turn it off.

Can I know the location of this function?
Or can I replace bones only on the right side?

Thanks for your help.

Best regards

Hi JunSeo,

Welcome to the AnyScript forum!

I would suggest you to go through the scaling tutorial to make personalized models for your subject. Just changing the stl file will not scale the model, so you will end up visualizing the bone drawing that doesn't match the segment length or the nodes on the segment.

If you only want to visualize the bone, you can make a new AnyDrawSurf object in the leg to see the new stl file. To do that, you can open the scope to the leg in your model. You don't need to make changes to the body model files (Seg.any). So, you can go to your SubjectSpecificData.any file and type:

Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh = {
  AnyDrawSurf NewFemur = {
    FileName = "__.stl"; // please type your stl file name here with the relative path to the stl file from the folder containing SubjectSpecificData.any

Seg.any is made in such a way that it is reused for right and left side, so if you change something over there, it will be implemented on both right and left side. However, if you are using AMS v7.4.1 or later, you can use the "??=" operator instead of "=". This operator allows you to set some default value when you create an object with option of overwriting the value somewhere else in the model. So, in your Seg.any for the leg model, you can replace FileName = with FileName ??= for the bone drawing. This will take the default value as those specified in Seg.any. And then, you can overwrite the filename for the right side somewhere else in your model by typing:

Main.HumanModel.BodyModel.Left.Leg.Seg.Thigh.Drw3.FileName = ".stl" // complete path to your stl file

Likewise, you can do for other objects in AnyDrawSurf, like ScaleXYZ, RGB, etc.

Hope this helps!

Best regards,