hi Pavel
Many thanks. i want to combine a custom scaling law into low extremity model , so i modify the file "…\Examples\MoCapModel\Model\HumanModel.any " as following :
#ifndef ANYBODY_PATH_BODY_GENERICBODYMODEL
#path ANYBODY_PATH_BODY_GENERICBODYMODEL “<ANYBODY_PATH_BODY>\BodyModels\GenericBodyModel”
#endif
AnyFolder HumanModel={
#include “<ANYBODY_PATH_BODY_GENERICBODYMODEL>\BodyModel.defaults.preprocess.any”
#include “<ANYBODY_PATH_BODY_GENERICBODYMODEL>\BodyModel.defaults.any”
// #include “<ANYBODY_PATH_BODY_GENERICBODYMODEL>\BodyModel.BodyPartsSetup.any”
#include “<ANYBODY_PATH_BODY_GENERICBODYMODEL>\BodyModel.config_info.any”
// // Select the body model:
// // ----------------------
// // This file contains a list of all body parts, select them to create
// // the body model wanted.
#if MotionAndParameterOptimizationModel
AnyFolder &Mannequin=.KinematicStudyForParameterIdentification.Mannequin;
#include “BodyPartsSetupKinematics.any”
#endif
#if InverseDynamicModel
AnyFolder &Mannequin=.InverseDynamicStudy.Mannequin;
#include “BodyPartsSetup.any”
#endif
//
// This file creates the body model from the selected list.
// #include “<ANYBODY_PATH_BODY>\BodyModels\GenericBodyModel\BodyModel.any”
AnyFolder StrengthParameters={
AnyVar SpecificMuscleTensionSpine= 90; //N/cm^2
AnyVar StrengthIndexLeg= 1;
AnyVar SpecificMuscleTensionShoulderArm= 90; //N/cm^2
};
//
// Actual scaling law
#include “CustomScaling.any”
#include “<ANYBODY_PATH_BODY_GENERICBODYMODEL>\BodyModel.NEW.any”
//
// By default there is an option to define a custom scaling law
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingCustom.any”
Scaling = {
// //This is the file which set the segments lenghts
#include “AnyMan.any”
// #include “<ANYBODY_PATH_BODY>\Scaling\AnyFamily\AnyManExternal.any”
//Base scaling laws according to the configuration file
#if BM_SCALING == CONST_SCALING_CUSTOM
// include your custom scaling law, which needs an ‘AnyMan.any’ file
#include “<BM_SCALING_MY_FILE>”
// undefine BM_SCALING_ANTHRO_FILE if an ‘AnyMan.any’ file is not used
#ifdef BM_SCALING_ANTHRO_FILE
Scaling = { //This is the file which set the segments lengths
AnyMessage anthrofile_message = {
Message = “Undefine BM_SCALING_ANTHRO_FILE in case it will not be used by your custom scaling law!”;
TriggerPreProcess = On;
Type = MSG_Message;
};
#include “<BM_SCALING_ANTHRO_FILE>”
};
#endif
#endif
//Base scaling laws according to the configuration file
#if BM_SCALING == CONST_SCALING_STANDARD
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingStandard.any”
#endif
#if BM_SCALING == CONST_SCALING_UNIFORM
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingUniform.any”
Scaling = { //This is the file which set the segments lenghts
#include “<BM_SCALING_ANTHRO_FILE>”
};
#endif
#if BM_SCALING == CONST_SCALING_LENGTHMASS
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingLengthMass.any”
Scaling = { //This is the file which set the segments lenghts
#include “<BM_SCALING_ANTHRO_FILE>”
};
#endif
#if BM_SCALING == CONST_SCALING_LENGTHMASSFAT
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingLengthMassFat.any”
Scaling = { //This is the file which set the segments lenghts
#include “<BM_SCALING_ANTHRO_FILE>”
#include"D:\GAITtest\Application\Examples\GaitLowerExtremity\AnyMan.any"
};
#endif
#if BM_SCALING == CONST_SCALING_UNIFORM_EXTMEASUREMENTS
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingUniformExt.any”
Scaling = { //This is the file which set the segments lenghts
#include “<BM_SCALING_ANTHRO_FILE>”
};
#endif
#if BM_SCALING == CONST_SCALING_LENGTHMASS_EXTMEASUREMENTS
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingLengthMassExt.any”
Scaling = { //This is the file which set the segments lenghts
#include “<BM_SCALING_ANTHRO_FILE>”
};
#endif
#if BM_SCALING == CONST_SCALING_LENGTHMASSFAT_EXTMEASUREMENTS
#include “<ANYBODY_PATH_BODY>\Scaling\ScalingLengthMassFatExt.any”
Scaling = { //This is the file which set the segments lenghts
#include “<BM_SCALING_ANTHRO_FILE>”
};
#endif
};
};
is it right to get the combination? i am not sure how to write the part " scaling { }" and the part " #if MotionAndParameterOptimizationModel …#endif ". many thanks!