Hi Chen,
Sorry for the long reply - tried to make your model work first, it did not come out of the box. Once implemented I could see your problem.
Good news is that your implementation seems to be correct. Now the bad news - I tried to visualize the used landmarks for the tibia against the source bone, it does not match. It seems that the bone geometry was exported either from a model with scaling or somehow shifted when the landmarks were selected. That seems to cause inaccuracies - i will let you check this problem. Please export the bone from an unscaled model in the local ref. frame or check the filepath to the drawing file and use this one for tests.
An excellent test is to make a simple model, where you load your bone and visualize landmarks, like this:
Main = {
AnyFixedRefFrame testDrawing = {
AnyDrawSurf tibia = {FileName="../../tibia";RGB={0,1,1};};
AnyDrawPointCloud ptcl = {
Points = {{0.0122141,-0.442217,-0.0377735},
{0.0141793,-0.426277,-0.0386263},
{0.0416551,-0.451245,0.0220238},
{0.0359463,-0.432359,0.0223423},
{0.0584999,-0.432983,0.033011},
{0.0540509,-0.413879,9.22658e-05},
{0.0435347,-0.415063,-0.0126945},
{0.0601262,-0.421991,-0.0434251},
{0.0853385,-0.423686,-0.0217134},
{0.0846106,-0.451423,-0.0396747},
{0.0757759,-0.490944,-0.0416145},
//{0.0526548,-0.602698,-0.00484032},
//{0.0831415,-0.608437,-0.0315587},
{0.101591,-0.78933,-0.0038602},
{0.0518697,-0.791053,-0.0306033},
{0.0439387,-0.790758,-0.00976694}};
Points3D=On;PointStyle.Size=0.0025;PointStyle.Style=PointStyleSphere;RGB={1,0,0};
};
};
};
Typically having consistent input helps.
Kind regards,
Pavel