currently I'm working with the AMMR 1.6.1 version and the Standing Human template. I was trying to change the muscle type from simple to 3E_Hill when I stumbled over a strange if-statement in BodyModel.BodyPartsSetup.any of the GenericBodyModel folder, subsubfolder of AAUHuman.
To understand the code I had a looked into BodyModel.constant.any where CONST_MUSCLES_NONE is defined as 0. Therefore I'm wondering why it is multiplied by "1" and "LEFT_ARM". And why it is not done like in the rest of the file.
The purpose of this is that you should be able to change the muscle type and all the other configurations like switching of arms or legs, change the scaling law etc. via so called BM statements. BM statements are definitions that configure the human body in your model without touching any other file than the main file where these statements are defined. You can find a description of this in the getting stated tutorial, the option you can use are also written in file out-commented in the top of the template file,
// ----------------------------------------------------------
// Model configuration:
// For more info on body model configuration options please load the model and double click on:
// #include "<ANYBODY_PATH_BODY>\Documentation\BodyModel.parameters.any"
// ----------------------------------------------------------
If CONST_MUSCLES_NONE is always 0, as defined in in BodyModel.constant.any, the if-statement of the LeftArm with “1*(CONST_MUSCLES_NONE*LEFT_ARM)” is always zero. Whether you multiply it with 1 / LEFTARM or not.
you shouldn’t worry about that, it’s just another way of implementing it. Since it is handled somewhere else that if there is no arm, it doesn’t matter what kind of muscles it would have, these formulations are doing the same.
Best regards
Daniel
P.S.: I wouldn’t spend too much time on looking through these files. The combinations of the BM statements have been tested systematically so that we are pretty sure that the ones that make sense are working.