Hi Pavel. Thanks for your reply.
Since yesterday, I have been trying to follow the THA-KneeBendDemo which is supplied by Anybody upon downloading. It is located in the examples folder. In this demo, the right thigh bone and the right thigh joint are removed. The bone is then replaced with another thigh bone that contains an implant. I decided to try use a few of the codes here and remove the thigh in the MoCapModel. I imagine that if that works, then the same method can be used to remove the foot and talus.
Upon inspecting the file, I am having a hard time seeing where the original thigh bone is removed. The only command input that seems to hint that the original thigh has been removed is the following line located in BoneExchange.any:
Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.Drw3 ={
Visible = Off;
};
But, it seems to me that this does not remove the thigh, but rather make it invisible.
Instead, there is this code directly below that has been commented out:
MechObjectExclude =
arrcat(
arrcat(
ObjSearch(“Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.Drw3”,“AnyMechObject”),
ObjSearchRecursive(“Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.Drw3”,"",“AnyMechObject”)
)
,
ObjSearchRecursive(“Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.Drw3”,"Femur",“AnyMechObject”)
);
I copied this piece of code and pasted in three studies:
-
In the AnyBodyStudy KinematicStudyForParameterIdentification and AnyBodyStudy MotionOptimization located in Kinematics.any
-
In the AnyBodyStudy InverseDynamicStudy located in InverseDynamics.any
Question 1:
However, I am not really sure how I am supposed to confirm that I have successfully removed the thigh. I imagined that I would get an error upon running the motion optimization since I have no bone to connect the pelvis with the right shank, but everything seems to run just fine … Do you know how I can confirm that what I am doing is correct?
Regarding the force plates, I simply changed (for each of the three force plates)
ForcePlateType4AutoDetection Plate1 (
PlateName = Plate1,
Folder =Main.ModelSetup.C3DFileData,
Limb1= .BodyModelRef.Right.Leg.Seg.Foot,
Limb2= .BodyModelRef.Left.Leg.Seg.Foot,
No=0,
VerticalDirection =“Y”,
HeightTolerance=0.07,
VelThreshold=2.2,
Fx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fx1,
Fy=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fy1,
Fz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fz1,
Mx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mx1,
My=Main.ModelSetup.C3DFileData.Analog.DataFiltered.My1,
Mz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mz1,
FootPresent=HumanModelPresent)
={
Cal=Main.ModelSetup.C3DFileData.Groups.FORCE_PLATFORM.CAL_MATRIX.Data[0];
Switch_DrawForceVectorFromCOP = On;
};
Into
ForcePlateType4 Plate1 (
PlateName = Plate1,
Folder =Main.ModelSetup.C3DFileData,
Limb= .BodyModelRef.Right.Leg.Seg.Shank,
No=0,
Fx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fx1,
Fy=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fy1,
Fz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fz1,
Mx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mx1,
My=Main.ModelSetup.C3DFileData.Analog.DataFiltered.My1,
Mz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mz1)
={
Cal=Main.ModelSetup.C3DFileData.Groups.FORCE_PLATFORM.CAL_MATRIX.Data[0];
Switch_DrawForceVectorFromCOP = On;
};
Question 2:
The kinematics ran smoothly, but when looking at the model in model view during the inverse dynamics, the forces originate from the center of pressure and seem to be applying to the foot. Is this ok? I can imagine that the code draws the force vectors for visual purposes, but actually applies them to the shank. I just want to make sure that I am correct. Also, do you know where the force is being applied to the shank? At the bottom or at its center of mass?
I’ve attached the model if you want to look at it.
P.S. In the forums, how do you write lines of code in a window like I see some do? It looks neat.
Thanks in advance,
Háski