Switch to unified view

a b/Application/Examples/SeatedHumanFullWithNeck/Model/Measures.any
1
2
/*
3
Outcommented not used for the moment since the the angle driving of thorax and pelvis and changed
4
//-------------------------------------------------
5
// Various measures
6
//-------------------------------------------------
7
8
AnyFolder Measures = {
9
  
10
  AnyFolder &Seg = Main.Model.HumanModel.Trunk.Seg;
11
  
12
  AnyKinPLine SacrumLength = {
13
    AnyRefFrame &Upper = .Seg.Sacrum.SacrumL5JntNode;
14
    AnyRefFrame &Lower = .Seg.Sacrum.SacrumPelvisJntNode;
15
  }; // PelvisLength 
16
  
17
  AnyKinPLine L4L5SegLength = {
18
    AnyRefFrame &Upper = .Seg.L4L5Seg.L3L4JntNode;
19
    AnyRefFrame &Lower = .Seg.L4L5Seg.L5SacrumJntNode;
20
  }; // L4L5SegLength
21
  
22
  AnyKinPLine L2L3SegLength = {
23
    AnyRefFrame &Upper = .Seg.L2L3Seg.HATL2JntNode;
24
    AnyRefFrame &Lower = .Seg.L2L3Seg.L3L4JntNode;
25
  }; // L2L3SegLength 
26
  
27
  AnyKinLinear a = {
28
    AnyRefFrame &Ref1 = .Seg.Thorax.ThoraxBackRestJntNode;
29
    AnyRefFrame &Ref2 = .Seg.Thorax;
30
  };
31
  AnyKinLinear b = {
32
    AnyRefFrame &Ref1 = .Seg.Thorax;
33
    AnyRefFrame &Ref2 = .Seg.Pelvis.PelvisSeatJntNode;
34
  };
35
  
36
  AnyFolder LordosisMeasures = {
37
    
38
    AnyFolder &TrunkSegs = Main.Model.HumanModel.Trunk.Seg;
39
    
40
    TrunkSegs.Thorax = {
41
      
42
      AnyRefNode HATL2PosteriorMeasureNode = {
43
        sRel = {-0.056, -0.342, 0}; 
44
       
45
      };
46
      
47
      AnyRefNode HATL2AnteriorMeasureNode = {
48
        sRel = {-0.018, -0.327, 0};
49
        
50
      }; 
51
      
52
      AnyRefNode L1LordRotMeasureNode = {
53
        
54
        // The x-axis will go trough these two points
55
        AnyVec3 p1 = {-0.056, -0.342, 0}; 
56
        AnyVec3 p2 = {-0.018, -0.327, 0}; 
57
        
58
        AnyVec3 VecX = {(p2[0]-p1[0]), (p2[1]-p1[1]), (p2[2]-p1[2])}; // New x-direction.
59
        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
60
        AnyVec3 VecZ = {0, 0, 1}; // We are considering the xy-plane, i.e. z-direction constant. 
61
        
62
        sRel = p1;
63
        
64
        ARel = {{VecX[0], VecY[0], VecZ[0]}, 
65
          {VecX[1], VecY[1], VecZ[1]}, 
66
          {VecX[2], VecY[2], VecZ[2]}};
67
        
68
       
69
      }; // L1LordRotMeasureNode
70
      
71
    }; // Thorax
72
    
73
    TrunkSegs.Sacrum = {
74
      
75
      AnyRefNode SacrumPosteriorMeasureNode = {
76
        // sRel = {-0.01, 0.012, 0};
77
        sRel = {0.030, -0.014, 0};
78
       
79
      };
80
      
81
      AnyRefNode SacrumAnteriorMeasureNode = {
82
        sRel = {0.030, -0.014, 0};
83
        
84
      }; 
85
      
86
      AnyRefNode SacrumLordRotMeasureNode = {
87
        
88
        // The x-axis will go trough these two points
89
        AnyVec3 p1 = {-0.010, 0.012, 0}; 
90
        AnyVec3 p2 = {0.030, -0.014, 0}; 
91
        
92
        AnyVec3 VecX = {(p2[0]-p1[0]), (p2[1]-p1[1]), (p2[2]-p1[2])}; // New x-direction.
93
        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
94
        AnyVec3 VecZ = {0, 0, 1}; // We are considering the xy-plane, i.e. z-direction constant. 
95
        
96
        sRel = p1;
97
        
98
        ARel = {{VecX[0], VecY[0], VecZ[0]}, 
99
          {VecX[1], VecY[1], VecZ[1]}, 
100
          {VecX[2], VecY[2], VecZ[2]}};
101
       
102
      }; // SacrumLordRotMeasureNode
103
      
104
    }; // Sacrum 
105
    
106
    
107
  }; // LordosisMeasures 
108
  
109
}; // Measures
110
*/