Hello again,
So I have mutiple questions :
1. To exclude a muscle I have done that :
MechObjectExclude =
arrcat(
ObjSearch("Main.HumanModel.BodyModel.Right.ShoulderArm.Mus.deltoideus_lateral_part_1","AnyMechObject")
,ObjSearchRecursive("Main.HumanModel.BodyModel.Right.ShoulderArm.Mus.deltoideus_lateral_part_1","*","AnyMechObject"));
I don't know if there is a better way to exclude a muscle in only one line of code.
Also, is there a way to exclude every part of a muscle in only one line of code ? For example, the deltoideus lateral has 4 parts and it would be useful to exclude all of them in one line of code.
2. Now I have redefined the muscles and excluded the old ones and I want to create new wrapping cylinder, only for deltoideus lateral for now
I've copy the original code and changed the name but I have an error in the line that declares the MultiWrapSurfs function :
'1' : Unexpected character.
Do I need to change something else than the name of the wrapping surface ?
My code for the wrapping surfaces :
Main.HumanModel.BodyModel.Right.ShoulderArm.Mus = {
MultiWrapSurfs My_DeltoidWrappingLateral (
BASE_FRAME = WrappingSegment.RotNode,
NUMBER_OF_CYLINDERS= 4,
TYPE=BM_ARM_DELTOID_WRAPPING,
DEBUG=0
) =
{
RadiusX = 1.45* vnorm(..Seg.Scapula.GHReactionCenterNode.sRel - ..Seg.Scapula.gh.sRel);
Radius = vnorm(..Seg.Scapula.acj.sRel - ..Seg.Scapula.gh.sRel)0.8613933;
RadiusHeight = 0.86 vnorm(..Seg.Scapula.GHReactionCenterNode.sRel - ..Seg.Scapula.acj.sRel);
WrapSurfLength = 2 * vnorm(..Seg.Humerus.I_deltoideus_lateral_part_1.sRel - ..Seg.Humerus.gh.sRel);
Angles = ..Sign*{68, 85, 100, 120};
AnySeg WrappingSegment ={
//^ Segment on which the wrapping cylinders are placed.
//^ The ssegment follows scapula kinematically, but is dynamically
//^ attached to both scapula and humerus to ensure that forces on
//^ the wrapping cylinders are distributed correctly between humerus
//^ scapula
Mass=0;
Jii={0.0,0.0,0.0};
r0= ...Seg.Scapula.gh.sRel*...Seg.Scapula.Axes0'+...Seg.Scapula.r0;
Axes0=...Seg.Scapula.Axes0
#if _LEFT_RIGHT_ == "LEFT"
* RotMat(pi,y)
#endif;
AnyRefNode RotNode =
{
AnyVar PosteriorTilt = 7;
//AnyDrawRefFrame drwf ={ScaleXYZ=0.1*{1,1,1};RGB={0,1,1};};
#if _LEFT_RIGHT_ == "LEFT"
ARel = RotMat(-0.1,y)*RotMat(pi,x)*RotMat(PosteriorTilt*pi/180,x);
#else
ARel = RotMat(-0.1,y)*RotMat(PosteriorTilt*pi/180,x);
#endif
};
};
AnySphericalJoint WrapSegmentHumerusJnt ={
AnyRefNode &ref1=...Seg.Humerus.gh ;
AnySeg &ref2=.WrappingSegment;
};
AnyFolder &ScapulaRef=..Seg.Scapula;
ScapulaRef={
AnyRefNode gh_rotated1={
sRel=.gh.sRel;
ARel={{....Sign1,0,0},{0,1,0},{0,0,....Sign1}};
};
};
AnyFolder &HumerusRef =..Seg.Humerus;
HumerusRef={
AnyRefNode gh_rotated1={
sRel=.gh.sRel;
ARel={{1,0,0},{0,....Sign1,0},{0,0,....Sign1}};
};
};
AnyKinMotion WrappingSegmentDriver={
AnyKinMeasureLinComb LinComb = {
AnyKinRotational HumerusScapulaRot={
AnyRefNode &ref2=...ScapulaRef.gh_rotated1;
AnyRefNode &ref1=...HumerusRef.gh_rotated1;
Type = RotVector;
};
AnyKinRotational HumerusWrapSegmentRot={
AnyRefFrame &ref1=...ScapulaRef.gh_rotated1;
AnyRefFrame &ref2=...WrappingSegment;
Type =RotVector;
};
OutDim = 3;
Coef={
{0.25,0,0,-1,0,0},
{ 0,0.05,0,0,-1,0}, //this one controls the rotaion around the long axis og humerus
{0,0,0.32,0,0,-1}
};
}; // Measure
};
AnyReacForce MomentsToScapula =
{
AnyKinRotational rot ={
AnyRefFrame &ref1=..WrappingSegment;
AnyRefFrame &ref2=....Seg.Scapula;
Type=RotVector;
};
};
};
//Deltoideus Lateral Wrapping
};//Mus
[EDIT]
For 2. I found the solution,
I had to changed TYPE to 2 instead of BM_ARM_DELTOID_WRAPPING and rename some nodes that already existed (gh_rotated) and delete the #if statements on _LEFT_RIGHT.
Best Regards,
Dan