111 lines (73 with data), 3.4 kB
/*
Outcommented not used for the moment since the the angle driving of thorax and pelvis and changed
//-------------------------------------------------
// Various measures
//-------------------------------------------------
AnyFolder Measures = {
AnyFolder &Seg = Main.Model.HumanModel.Trunk.Seg;
AnyKinPLine SacrumLength = {
AnyRefFrame &Upper = .Seg.Sacrum.SacrumL5JntNode;
AnyRefFrame &Lower = .Seg.Sacrum.SacrumPelvisJntNode;
}; // PelvisLength
AnyKinPLine L4L5SegLength = {
AnyRefFrame &Upper = .Seg.L4L5Seg.L3L4JntNode;
AnyRefFrame &Lower = .Seg.L4L5Seg.L5SacrumJntNode;
}; // L4L5SegLength
AnyKinPLine L2L3SegLength = {
AnyRefFrame &Upper = .Seg.L2L3Seg.HATL2JntNode;
AnyRefFrame &Lower = .Seg.L2L3Seg.L3L4JntNode;
}; // L2L3SegLength
AnyKinLinear a = {
AnyRefFrame &Ref1 = .Seg.Thorax.ThoraxBackRestJntNode;
AnyRefFrame &Ref2 = .Seg.Thorax;
};
AnyKinLinear b = {
AnyRefFrame &Ref1 = .Seg.Thorax;
AnyRefFrame &Ref2 = .Seg.Pelvis.PelvisSeatJntNode;
};
AnyFolder LordosisMeasures = {
AnyFolder &TrunkSegs = Main.Model.HumanModel.Trunk.Seg;
TrunkSegs.Thorax = {
AnyRefNode HATL2PosteriorMeasureNode = {
sRel = {-0.056, -0.342, 0};
};
AnyRefNode HATL2AnteriorMeasureNode = {
sRel = {-0.018, -0.327, 0};
};
AnyRefNode L1LordRotMeasureNode = {
// The x-axis will go trough these two points
AnyVec3 p1 = {-0.056, -0.342, 0};
AnyVec3 p2 = {-0.018, -0.327, 0};
AnyVec3 VecX = {(p2[0]-p1[0]), (p2[1]-p1[1]), (p2[2]-p1[2])}; // New x-direction.
AnyVec3 VecY = {(VecZ[1]*VecX[2]-VecZ[2]*VecX[1]), (VecZ[2]*VecX[0]-VecZ[0]*VecX[2]), (VecZ[0]*VecX[1]-VecZ[1]*VecX[0])}; // New y-direction = VecZ*VecX
AnyVec3 VecZ = {0, 0, 1}; // We are considering the xy-plane, i.e. z-direction constant.
sRel = p1;
ARel = {{VecX[0], VecY[0], VecZ[0]},
{VecX[1], VecY[1], VecZ[1]},
{VecX[2], VecY[2], VecZ[2]}};
}; // L1LordRotMeasureNode
}; // Thorax
TrunkSegs.Sacrum = {
AnyRefNode SacrumPosteriorMeasureNode = {
// sRel = {-0.01, 0.012, 0};
sRel = {0.030, -0.014, 0};
};
AnyRefNode SacrumAnteriorMeasureNode = {
sRel = {0.030, -0.014, 0};
};
AnyRefNode SacrumLordRotMeasureNode = {
// The x-axis will go trough these two points
AnyVec3 p1 = {-0.010, 0.012, 0};
AnyVec3 p2 = {0.030, -0.014, 0};
AnyVec3 VecX = {(p2[0]-p1[0]), (p2[1]-p1[1]), (p2[2]-p1[2])}; // New x-direction.
AnyVec3 VecY = {(VecZ[1]*VecX[2]-VecZ[2]*VecX[1]), (VecZ[2]*VecX[0]-VecZ[0]*VecX[2]), (VecZ[0]*VecX[1]-VecZ[1]*VecX[0])}; // New y-direction = VecZ*VecX
AnyVec3 VecZ = {0, 0, 1}; // We are considering the xy-plane, i.e. z-direction constant.
sRel = p1;
ARel = {{VecX[0], VecY[0], VecZ[0]},
{VecX[1], VecY[1], VecZ[1]},
{VecX[2], VecY[2], VecZ[2]}};
}; // SacrumLordRotMeasureNode
}; // Sacrum
}; // LordosisMeasures
}; // Measures
*/