98 lines (64 with data), 4.6 kB
AnyFolder TMJ_ReactionForces = {
#if TMJ_LIGAMENT_REFRENCE_CONFIGURATION_MODEL == 0
AnyForceMomentMeasure2 TML_R_ReacMeasure = {
#if TMJ_CONTACT_MODEL == 1
AnyForceBase &force = Main.Model.HumanModel.Jnt.TMJ_JntR_Contact;
#else
AnyForceBase &force1 = Main.Model.HumanModel.Jnt.ReactionForceTMJ_R;
#endif
AnyRefFrame &ref = Main.Model.HumanModel.Seg.Skull;
AnySeg &seg = Main.Model.HumanModel.Seg.Skull;
};
#if TMJ_CONTACT_MODEL == 0
AnyForceMomentMeasure2 TML_ML_ReacMeasure = {
AnyForceBase &force1 = Main.Model.HumanModel.Jnt.TMJ_ML_Constraint.Reaction;
AnyRefFrame &ref = Main.Model.HumanModel.Seg.Skull;
AnySeg &seg = Main.Model.HumanModel.Seg.Skull;
};
AnyVec3 MLDirForce = TML_ML_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.Axes;
AnyVec3 MLDirForce_L_TMJ = TML_ML_ReacMeasure.F*Main.Model.HumanModel.Seg.Mandible.TMJ_NodeL.Axes;
AnyVec3 MLDirForce_R_TMJ = TML_ML_ReacMeasure.F*Main.Model.HumanModel.Seg.Mandible.TMJ_NodeR.Axes;
AnyVar LeftTMJOnOff=iffun(lteqfun(MLDirForce[1],0.0),1.0,0.0);
AnyVar RightTMJOnOff=iffun(gtfun(MLDirForce[1],0.0),1.0,0.0);
#endif
#if TMJ_CONTACT_MODEL == 0
AnyVec3 TML_R_ReacMeasure_Flocal = TML_R_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.Axes+RightTMJOnOff*MLDirForce;
// AnyVec3 TML_R_ReacMeasure_Mlocal = TML_R_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.TMJ_NodeR.Axes;
AnyVec3 TML_R_ReacMeasure_Flocal_SkullCTNode = TML_R_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_R_ReacMeasure_Mlocal_SkullCTNode = TML_R_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_R_ReacMeasure_Flocal_MandibleCTNode = TML_R_ReacMeasure.F*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
AnyVec3 TML_R_ReacMeasure_Mlocal_MandibleCTNode = TML_R_ReacMeasure.M*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
#else
AnyVec3 TML_R_ReacMeasure_Flocal = TML_R_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.Axes;
AnyVec3 TML_R_ReacMeasure_Mlocal = TML_R_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.Axes;
AnyVec3 TML_R_ReacMeasure_Flocal_SkullCTNode = TML_R_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_R_ReacMeasure_Mlocal_SkullCTNode = TML_R_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_R_ReacMeasure_Flocal_MandibleCTNode = TML_R_ReacMeasure.F*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
AnyVec3 TML_R_ReacMeasure_Mlocal_MandibleCTNode = TML_R_ReacMeasure.M*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
#endif
AnyForceMomentMeasure2 TML_L_ReacMeasure = {
#if TMJ_CONTACT_MODEL == 1
AnyForceBase &force = Main.Model.HumanModel.Jnt.TMJ_JntL_Contact;
#else
AnyForceBase &force1 = Main.Model.HumanModel.Jnt.ReactionForceTMJ_L;
#endif
AnyRefFrame &ref = Main.Model.HumanModel.Seg.Skull;
AnySeg &seg = Main.Model.HumanModel.Seg.Skull;
};
#if TMJ_CONTACT_MODEL == 0
AnyVec3 TML_L_ReacMeasure_Flocal = TML_L_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.Axes+LeftTMJOnOff*MLDirForce;
// AnyVec3 TML_L_ReacMeasure_Mlocal = TML_L_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.TMJ_NodeL.Axes;
AnyVec3 TML_L_ReacMeasure_Flocal_SkullCTNode = (TML_L_ReacMeasure_Flocal*Main.Model.HumanModel.Seg.Skull.TMJ_NodeL.Axes')*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_L_ReacMeasure_Flocal_MandibleCTNode = (TML_L_ReacMeasure_Flocal*Main.Model.HumanModel.Seg.Skull.TMJ_NodeL.Axes')*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
#else
AnyVec3 TML_L_ReacMeasure_Flocal = TML_L_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.Axes;
AnyVec3 TML_L_ReacMeasure_Mlocal = TML_L_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.Axes;
AnyVec3 TML_L_ReacMeasure_Flocal_SkullCTNode = TML_L_ReacMeasure.F*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_L_ReacMeasure_Mlocal_SkullCTNode = TML_L_ReacMeasure.M*Main.Model.HumanModel.Seg.Skull.SkullSurfNode.Axes;
AnyVec3 TML_L_ReacMeasure_Flocal_MandibleCTNode = TML_L_ReacMeasure.F*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
AnyVec3 TML_L_ReacMeasure_Mlocal_MandibleCTNode = TML_L_ReacMeasure.M*Main.Model.HumanModel.Seg.Mandible.MandibleSurfNode.Axes;
#endif
#endif
AnyVar TML_R_ReacMeasure_Flocal_magnitude = vnorm(TML_R_ReacMeasure_Flocal);
AnyVar TML_L_ReacMeasure_Flocal_magnitude = vnorm(TML_L_ReacMeasure_Flocal);
};