200 lines (158 with data), 5.9 kB
// SubTalar and PatellaFemur joint added. November 2007, Karin Gorter
// Definitions of joints in the right lower extremity.
//
// // Mark de Zee
//
#if BM_FOOT_MODEL == _FOOT_MODEL_DEFAULT_
#if (TLEM_JOINT_TYPE_ANKLE != _JOINT_TYPE_USERDEFINED_)
AnyRevoluteJoint Ankle = {
Axis = z; //flexion extension
//Axis2 = x; //abduction adduction
AnyRefNode &ShankNode = ..Seg.Shank.AnkleJoint;
AnyRefNode &FootNode = ..Seg.Talus.AnkleJoint;
//ShankNode ={AnyDrawRefFrame drw={RGB={0,1,0};};};
//AnyDrawStdJoint Ankle = { };
viewJoint = {
D ??= 0.005; L ??= 0.04; L1 ??= 0.03; L2 ??= 0.03;
};
};
#endif
#if (TLEM_JOINT_TYPE_SUBTALAR != _JOINT_TYPE_USERDEFINED_)
AnyRevoluteJoint SubTalar = {
//Axis1 = z; //flexion extension
Axis = z; //inversion eversion
AnyRefNode &TalusNode = ..Seg.Talus.SubTalarJoint;
AnyRefNode &FootNode = ..Seg.Foot.SubTalarJoint;
//TalusNode ={AnyDrawRefFrame drw={RGB={1,0,0};};};
//AnyDrawStdJoint SubTalar = { };
viewJoint = {
D ??= 0.005; L ??= 0.04; L1 ??= 0.03; L2 ??= 0.03;
};
};
#endif
#endif
#if (TLEM_JOINT_TYPE_KNEE != _JOINT_TYPE_USERDEFINED_)
AnyRevoluteJoint Knee = {
Axis = z;
AnyRefNode &ThighNode = ..Seg.Thigh.KneeJoint;
AnyRefNode &ShankNode = ..Seg.Shank.KneeJoint;
viewJoint = {
D ??= 0.01; L1 ??= 0.03; L2 ??= 0.03;
};
};
#endif
#if (TLEM_JOINT_TYPE_PATELLOFEMORAL != _JOINT_TYPE_USERDEFINED_)
AnyRevoluteJoint PatellaFemur = {
Axis = z;
AnyRefNode &ThighNode = ..Seg.Thigh.PatellaFemurJoint;
AnyRefNode &PatellaNode = ..Seg.Patella.PatellaFemurJoint;
}; // End of patellafemur
#endif
//AnyUniversalJoint PatellaFemur = {
// Axis1 = z;
// Axis2 = x;
// AnyRefNode &ThighNode = ..Seg.Thigh.PatellaFemurJoint;
// // ThighNode ={AnyDrawRefFrame drw={RGB={0,1,0};};};
// AnyRefNode &PatellaNode = ..Seg.Patella.PatellaFemurJoint;
//
//};
#if (TLEM_JOINT_TYPE_PATELLATENDON != _JOINT_TYPE_USERDEFINED_)
AnyFolder KinematicMeasures = {
AnyKinPLine Patella = {
// These are the nodes that the measure refers to. The connection is regarded
// as being stiff.
AnyRefNode &Origin_patella_tendon = ...Seg.Patella.Origin_patella_tendon;
AnyRefNode &Insertion_patella_tendon = ...Seg.Shank.Insertion_patella_tendon;
//AnyRefNode &Insertion_patella_tendon = ...Seg.Shank.Insertion_patella_tendon;
AnyDrawPLine Patella_tendon =
{
Thickness = 0.001;
RGB = {1,0,0};
Opacity = ....BonesOpacity.Patella;
};
};
// AnyKinRotational PatellaRot =
// {
// Type = RotAxesAngles;
// Axis1 = z;
// Axis2 = y;
// Axis3 = x;
// //Ref = 0;
// //AngVelOnOff = Off;
// //AngVelGlobal = Off;
// AnyRefFrame &Femur_pjoint = ...Seg.Thigh.PatellaFemurJoint;
// AnyRefFrame &Patella_joint = ...Seg.Patella.PatellaFemurJoint;
// //Ref =1;
// };
//
// AnyKinRotational PatellaTendonRot =
// {
// Type = RotAxesAngles;
// Axis1 = z;
// Axis2 = x;
// Axis3 = y;
// //Ref = 0;
// //AngVelOnOff = Off;
// //AngVelGlobal = Off;
// AnyRefNode &PatellaInsertionNode = ...Seg.Patella.Insertion_patella_tendon;
// AnyRefNode &PatellaNode = ...Seg.Shank.Insertion_patella_tendon;
// //Ref =1;
// };
};
// KinematicMeasures
// AnyKinEqSimpleDriver PFFlexion =
// {
// // AnyVar Angle = .JntDOF.Knee.Pos[0];
//// MeasureOrganizer = {};
// // CType = ;
// // WeightFun = {};
// DriverPos = {.JntDOF.Knee.Pos};
// DriverVel = 0;
// AnyKinMeasure& PFFlexion = Main.Studies.HumanModel.BodyModel.Interface.Right.PatellaFlexion;
// Reaction.Type = {On};
// };
// AnyKinEqSimpleDriver PatellaMovement = {
// AnyKinPLine &Jnt = .KinematicMeasures.Patella;
//
// // Scale patella tendon length based on the over all leg length
// AnyVar lengthScale = (vnorm(..Seg.Thigh.HipJoint.sRel-..Seg.Thigh.KneeJoint.sRel) + vnorm(..Seg.Shank.KneeJoint.sRel - ..Seg.Shank.AnkleJoint.sRel))
// / vnorm((..Seg.Thigh.StdPar.HipJoint-..Seg.Thigh.StdPar.KneeJoint) + vnorm(..Seg.Shank.StdPar.AnkleJoint-..Seg.Shank.StdPar.KneeJoint));
// AnyVar TendonLength = lengthScale *0.097;
// DriverPos = {TendonLength};
// DriverVel = {0.0};
// Reaction.Type = {On}; // The muscles must do the work
// };
// AnyKinEqSimpleDriver PatellaMovement = {
// AnyKinPLine &Jnt = .KinematicMeasures.Patella;
//
// AnyFloat gscale = vnorm(..GeoScaling.Shank.ScaleFunction.ScaleMat);
//
// DriverPos = gscale[1]*{0.0605};
// DriverVel = {0.0};
// Reaction.Type = {On}; // The muscles must do the work
// };
AnyKinEqSimpleDriver PatellaMovement = {
AnyKinPLine &Jnt = .KinematicMeasures.Patella;
// Scale patella tendon length based on the over all leg length
AnyVar lengthScale = vnorm(..Seg.Shank.KneeJoint.sRel - ..Seg.Shank.Insertion_patella_tendon.sRel)
/ vnorm(..Seg.Shank.StdPar.Insertion_patella_tendon-..Seg.Shank.StdPar.KneeJoint);
AnyVar TendonLength = lengthScale *..ModelParameters.PatellarLigamentLength;
DriverPos = {TendonLength};
DriverVel = {0.0};
Reaction.Type = {On}; // The muscles must do the work
};
// AnyKinEq PatellaMRotation=
// {
// MeasureOrganizer = {2};
// AnyKinMeasure& PatellaJnt = .KinematicMeasures.PatellaRot;
// Reaction.Type = {On};
// };
//
#endif
#if (TLEM_JOINT_TYPE_HIP != _JOINT_TYPE_USERDEFINED_)
// Defined with the femoral node first so reactions are reported in femur based reference frame.
AnySphericalJoint Hip = {
AnyRefNode &ThighNode = ..Seg.Thigh.HipJoint;
AnyRefNode &PelvisNode = ..Seg.Pelvis.HipJoint;
}; // End of Hip
#endif