Skip to content

Commit

Permalink
feat: Fix latissimus ellipsoid scaling bug (#24)
Browse files Browse the repository at this point in the history
* Fix latissimus ellipsoid scaling bug

* Fix GluteusMaximusInferior penetration
Wrong surface segment

---------

Co-authored-by: hs <[email protected]>
Co-authored-by: Morten Enemark Lund <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent 1b487a9 commit 35347ad
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
19 changes: 15 additions & 4 deletions Body/AAUHuman/Arm/ThoraxWrappingSurfaces.any
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,23 @@ ThoraxWrappingSufaceSegRef = {
AnyRefNode EllipsoidLatissimusOrigin = {
ARel = RotMat(20*pi/180,z)*RotMat(20*pi/180*.Sign,y);
sRel = .Scale({0.080, 0.27, .Sign*0.056});

AnyRefNode node_anterior = {sRel=..Scale({0.115,0,0});};
AnyRefNode node_posterior = {sRel=..Scale({-0.115,0,0});};
AnyRefNode node_superior = {sRel=..Scale({0,0.18,0});};
AnyRefNode node_inferior = {sRel=..Scale({0,-0.18,0});};
AnyRefNode node_lateral = {sRel=..Scale({0,0,..Sign*0.090});};
AnyRefNode node_medial = {sRel=..Scale({0,0,..Sign*-0.090});};

AnySurfEllipsoid EllipsoidSurf = {
Radius = ..Scale({0.115,0.18,0.090});
Radius = {
abs(vnorm((.node_anterior.sRel-.node_posterior.sRel)/2)),
abs(vnorm((.node_superior.sRel-.node_inferior.sRel)/2)),
abs(vnorm((.node_lateral.sRel-.node_medial.sRel)/2)),
};
};
};


};

AnyRefNode O_latissimus_dorsi_1_via = {sRel = .Scale({-0.04598001-0.012, 0.20092+0.083, 0.08076-0.031})*..TrunkNodeAttachement.Mirror;};
AnyRefNode O_latissimus_dorsi_2_via = {sRel = .Scale({-0.04598001-0.011, 0.20092+0.071, 0.08076-0.027})*..TrunkNodeAttachement.Mirror;};
AnyRefNode O_latissimus_dorsi_3_via = {sRel = .Scale({-0.04598001-0.009, 0.20092+0.053, 0.08076-0.021})*..TrunkNodeAttachement.Mirror;};
Expand Down
12 changes: 6 additions & 6 deletions Body/AAUHuman/LegTLEM/Mus.any
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ AnyMuscleShortestPath GluteusMaximusSuperior6 = {
AnyMuscleShortestPath GluteusMaximusInferior1 = {
AnyMuscleModel &MusMdl = ..MuscleModels.GluteusMaximusInferior1Par;
AnyRefNode &Org = ..Seg.Sacrum.LegAttachmentNodes.GluteusMaximusInferior1Node;
AnySurface &srf = ..Seg.Pelvis.Muscles.GlueteusMaximusWrapSurfaces.Inferior1.cyl;
AnySurface &srf = ..Seg.Sacrum.LegAttachmentNodes.GlueteusMaximusWrapSurfaces.Inferior1.cyl;
AnyRefNode &Ins = ..Seg.Thigh.GluteusMaximusInferior1Node;
SPLine = {
StringMesh = 15;
Expand All @@ -1376,7 +1376,7 @@ AnyMuscleShortestPath GluteusMaximusInferior1 = {
AnyMuscleShortestPath GluteusMaximusInferior2 = {
AnyMuscleModel &MusMdl = ..MuscleModels.GluteusMaximusInferior2Par;
AnyRefNode &Org = ..Seg.Sacrum.LegAttachmentNodes.GluteusMaximusInferior2Node;
AnySurface &srf = ..Seg.Pelvis.Muscles.GlueteusMaximusWrapSurfaces.Inferior2.cyl;
AnySurface &srf = ..Seg.Sacrum.LegAttachmentNodes.GlueteusMaximusWrapSurfaces.Inferior2.cyl;
AnyRefNode &Ins = ..Seg.Thigh.GluteusMaximusInferior2Node;
SPLine = {
StringMesh = 25;
Expand All @@ -1397,7 +1397,7 @@ AnyMuscleShortestPath GluteusMaximusInferior2 = {
AnyMuscleShortestPath GluteusMaximusInferior3 = {
AnyMuscleModel &MusMdl = ..MuscleModels.GluteusMaximusInferior3Par;
AnyRefNode &Org = ..Seg.Sacrum.LegAttachmentNodes.GluteusMaximusInferior3Node;
AnySurface &srf = ..Seg.Pelvis.Muscles.GlueteusMaximusWrapSurfaces.Inferior3.cyl;
AnySurface &srf = ..Seg.Sacrum.LegAttachmentNodes.GlueteusMaximusWrapSurfaces.Inferior3.cyl;
AnyRefNode &Ins = ..Seg.Thigh.GluteusMaximusInferior3Node;
SPLine = {
StringMesh = 25;
Expand All @@ -1418,7 +1418,7 @@ AnyMuscleShortestPath GluteusMaximusInferior3 = {
AnyMuscleShortestPath GluteusMaximusInferior4 = {
AnyMuscleModel &MusMdl = ..MuscleModels.GluteusMaximusInferior4Par;
AnyRefNode &Org = ..Seg.Sacrum.LegAttachmentNodes.GluteusMaximusInferior4Node;
AnySurface &srf = ..Seg.Pelvis.Muscles.GlueteusMaximusWrapSurfaces.Inferior4.cyl;
AnySurface &srf = ..Seg.Sacrum.LegAttachmentNodes.GlueteusMaximusWrapSurfaces.Inferior4.cyl;
AnyRefNode &Ins = ..Seg.Thigh.GluteusMaximusInferior4Node;
SPLine = {
StringMesh = 30;
Expand All @@ -1439,7 +1439,7 @@ AnyMuscleShortestPath GluteusMaximusInferior4 = {
AnyMuscleShortestPath GluteusMaximusInferior5 = {
AnyMuscleModel &MusMdl = ..MuscleModels.GluteusMaximusInferior5Par;
AnyRefNode &Org = ..Seg.Sacrum.LegAttachmentNodes.GluteusMaximusInferior5Node;
AnySurface &srf = ..Seg.Pelvis.Muscles.GlueteusMaximusWrapSurfaces.Inferior5.cyl;
AnySurface &srf = ..Seg.Sacrum.LegAttachmentNodes.GlueteusMaximusWrapSurfaces.Inferior5.cyl;
AnyRefNode &Ins = ..Seg.Thigh.GluteusMaximusInferior5Node;
SPLine = {
StringMesh = 30;
Expand All @@ -1460,7 +1460,7 @@ AnyMuscleShortestPath GluteusMaximusInferior5 = {
AnyMuscleShortestPath GluteusMaximusInferior6 = {
AnyMuscleModel &MusMdl = ..MuscleModels.GluteusMaximusInferior6Par;
AnyRefNode &Org = ..Seg.Sacrum.LegAttachmentNodes.GluteusMaximusInferior6Node;
AnySurface &srf = ..Seg.Pelvis.Muscles.GlueteusMaximusWrapSurfaces.Inferior6.cyl;
AnySurface &srf = ..Seg.Sacrum.LegAttachmentNodes.GlueteusMaximusWrapSurfaces.Inferior6.cyl;
AnyRefNode &Ins = ..Seg.Thigh.GluteusMaximusInferior6Node;
SPLine = {
StringMesh = 30;
Expand Down
6 changes: 6 additions & 0 deletions Body/AAUHuman/LegTLEM/Seg.any
Original file line number Diff line number Diff line change
Expand Up @@ -1609,13 +1609,19 @@ SacrumSeg =
/// Folder with cadaver parameters for pelvis in the LegTLEM model
AnyFolder &Data = ....ModelParameters.Pelvis;
AnyFunTransform3D &Scale = ...PelvisSeg.AnatomicalFrameTrunk.Scale_Leg_Pelvis;
#include "GluteusMaximumsWrappingSurfaces.any"

AnyRefNode GluteusMaximusInferior1Node = {sRel = .Scale( .Data.GluteusMaximusInferior1Node );};
AnyRefNode GluteusMaximusInferior2Node = {sRel = .Scale( .Data.GluteusMaximusInferior2Node );};
AnyRefNode GluteusMaximusInferior3Node = {sRel = .Scale( .Data.GluteusMaximusInferior3Node );};
AnyRefNode GluteusMaximusInferior4Node = {sRel = .Scale( .Data.GluteusMaximusInferior4Node );};
AnyRefNode GluteusMaximusInferior5Node = {sRel = .Scale( .Data.GluteusMaximusInferior5Node );};
AnyRefNode GluteusMaximusInferior6Node = {sRel = .Scale( .Data.GluteusMaximusInferior6Node );};
AnyRefNode Piriformis1Node = {sRel = .Scale( .Data.Piriformis1Node );};

AnyRefNode GluteusMaximusSuperior1Node = {sRel = .Scale( .Data.GluteusMaximusSuperior1Node );};
AnyRefNode AdductorMagnusDistal1Node = {sRel = .Scale( .Data.AdductorMagnusDistal1Node );};
AnyRefNode AdductorMagnusMid1Node = {sRel = .Scale( .Data.AdductorMagnusMid1Node );};
};
};// Sacrum.Left/Right

Expand Down

0 comments on commit 35347ad

Please sign in to comment.