Switch to unified view

a b/Body/AAUHuman/Trunk/SegmentsLumbar.any
1
/**
2
Definitions of Segments in the Lumbar Part of the Spine + the pelvis
3
Abbrevitations:
4
ALL = Anterior Longitudinal Ligament
5
PLL = Posterior Longitudinal Ligament
6
LS = Ligamentum Supraspinale
7
LI = Ligamentum Interspinalia
8
9
MF = Multifidi
10
ILpl = Iliocostalis Lumborum pars lumborum (part of Erector Spinae)
11
LTpl = Longissimus Thoracis pars lumborum (part of Erector Spinae)
12
ILpt = Iliocostalis Lumborum pars thoracis (part of Erector Spinae)
13
LTpt = Longissimus Thoracis pars thoracis (part of Erector Spinae)
14
PM = Psoas Major
15
QL = Quadratus Lumborum
16
RA = Rectus Abdominis
17
OE = Obliquus Externus
18
OI = Obliquus Internus
19
20
C = Costae
21
CI = Crista Iliaca
22
CP = Crista Pubica
23
SIPS = Spina iliaca posterior superior
24
SIPI = Spina iliaca Posterior inferior
25
T = Thoracal hvirvel
26
L = Lumbal hvirvel
27
S = Sacral segment
28
*/
29
AnyFolder SegmentsLumbar = {
30
  
31
  #include "PelvisSeg.any"
32
  
33
  PelvisSeg={
34
    AnyFolder &StdPar=..ModelParameters.Pelvis;    
35
    #include "PelvisMuscleAttachementNodes.any"
36
  };
37
 
38
  AnySeg SacrumSeg = {
39
40
    AnyFolder &StdPar=..ModelParameters.Sacrum;    
41
    
42
    //initial position found as a function of pelvis pos and orientation
43
    r0=.PelvisSeg.PelvisSacrumJntNode.sRel*.PelvisSeg.Axes0'+.PelvisSeg.r0-SacrumPelvisJntNode.sRel*Axes0';    
44
    Axes0=.PelvisSeg.Axes0;
45
    Mass = 1e-5; // Pelvis contains the mass of Sacrum
46
    Jii = {0.001,0.001,0.001};
47
    
48
    AnyRefNode MoCapMarkerFrameAMMR24 = {}; ///< For backwards Compatibility with AMMR 2.4 MoCap Marker protocols
49
    
50
    // Sacrum is part of the pelvis so they scales together
51
    AnyFunTransform3D &GeomScale = ..Scaling.GeometricalScaling.PelvisSeg.ScaleFunction;
52
    AnyRefNode& ScalingNode = AnatomicalFrameTrunk;
53
    AnyRefNode AnatomicalFrameTrunk = {
54
      sRel = ..PelvisSeg.AnatomicalFrameTrunk.sRel;
55
      ARel = ..PelvisSeg.AnatomicalFrameTrunk.ARel;
56
    };
57
    AnyFunTransform3D& Scale = .PelvisSeg.Scale;
58
59
    
60
    // Joint nodes
61
    AnyRefNode SacrumL5JntNode = {
62
      sRel = .Scale(.StdPar.SacrumL5JntNode_pos);
63
      // Rotated node with x axis parallel to the sacrum base surface
64
      AnyRefNode RotNode = {
65
        ARel = RotMat(0.5*(..SacrumBaseAnteriorNode.sRel + ..SacrumBasePosteriorNode.sRel),
66
                      ..SacrumBaseAnteriorNode.sRel,
67
                      0.5*(..SacrumBaseAnteriorNode.sRel + ..SacrumBasePosteriorNode.sRel) + (..SacrumBaseNodeL.sRel - ..SacrumBaseNodeR.sRel))*RotMat(pi/2,x);
68
      };
69
    };    
70
    AnyRefNode SacrumPelvisJntNode = {sRel = .Scale(.StdPar.SacrumPelvisJntNode_pos);};   
71
    
72
    // Nodes at the anterior and posterior points on the sacrum base that articulates with L5
73
    AnyRefNode SacrumBaseAnteriorNode = {sRel = .Scale(.StdPar.SacrumBaseAnteriorNode_pos);};
74
    AnyRefNode SacrumBasePosteriorNode = {sRel = .Scale(.StdPar.SacrumBasePosteriorNode_pos);};
75
    
76
    // Nodes at the right and left points on the sacrum base that articulates with L5
77
    AnyRefNode SacrumBaseNodeR = {sRel = .Scale(.StdPar.Right.SacrumBaseNode_pos);};
78
    AnyRefNode SacrumBaseNodeL = {sRel = .Scale(.StdPar.Left.SacrumBaseNode_pos);};
79
    
80
  /// The Right node is used by different body part for adding mirrored nodes
81
  /// (muscle origins/insertions etc) to the sacrum segment
82
  AnyRefNode Right= {
83
    AnyInt Sign = 1;
84
      AnyFunTransform3D& Scale = .Scale;
85
  };
86
87
  /// The Left node is used by different body part for adding mirrored nodes
88
  /// (muscle origins/insertions etc) to the sacrum segment
89
  AnyRefNode Left=  {
90
    AnyInt Sign = -1;
91
      AnyFunTransform3D& Scale = .Scale;
92
  };    
93
}; // SacrumSeg   
94
   
95
   
96
   // -------- Drawing object section (pelvis&sacrum)-------- 
97
   #if (! BM_LEG_MODEL_IS_TLEM) | (BM_PELVIS_DISPLAY == _PELVIS_DISPLAY_LEGANDTRUNKPELVIS_)
98
   SacrumSeg = {
99
     #if (BM_PELVIS_DISPLAY == _PELVIS_DISPLAY_LEGANDTRUNKPELVIS_)
100
     DrwSacrumForTrunk.Opacity = Main.DrawSettings.BonesOpacity.Sacrum*0.5;
101
     AnyDrawSurf DrwSacrumForTrunk = 
102
     #else
103
     DrwSacrum.Opacity = Main.DrawSettings.BonesOpacity.Sacrum;
104
     AnyDrawSurf DrwSacrum =         
105
     #endif
106
     {
107
       FileName = ...STL.FilenameSacrumSeg;
108
       RGB = ...ColorRef.Segments;
109
       AnyFunTransform3D &Scale =.Scale;   
110
     };
111
     
112
   }; // SacrumSeg
113
   #endif
114
   // -------- End of drawing section (pelvis&sacrum)-------- 
115
116
  
117
  AnySeg L5Seg = {
118
   
119
    AnyFolder &StdPar=..ModelParameters.L5;    
120
    
121
    //initial position found as a function of pelvis pos and orientation
122
    r0=.SacrumSeg.SacrumL5JntNode.sRel*.SacrumSeg.Axes0'+.SacrumSeg.r0-L5SacrumJntNode.sRel*Axes0'; 
123
    
124
    // This file includes the trunk specifc scaling function
125
    // and anatomical reference system
126
    AnyFunTransform3D &GeomScale = ..Scaling.GeometricalScaling.L5Seg.ScaleFunction;
127
    #include "TrunkScalingAndAnatomicalFrame.any"
128
129
    AnyRefNode MoCapMarkerFrameAMMR24 = {}; ///< For backwards Compatibility with AMMR 2.4 MoCap Marker protocols
130
    AnyFunTransform3D &ScaleAbdominal =..Scaling.GeometricalScaling.Lumbar.ScaleFunction;
131
    AnyVar MassS = ..Scaling.MassScaling.Lumbar.MassScale;
132
  
133
    AnyVar MassStandard = ..StandardParameters.Lumbar.Mass/5;
134
    Mass = MassS*MassStandard;       
135
    
136
    Jii = {0.001,0.001,0.001};
137
    
138
    sCoM = Scale(StdPar.sCoM_pos);
139
    JaboutCoMOnOff = On;
140
    
141
    AnyRefNode L5SacrumJntNode = {sRel = .Scale(.StdPar.L5SacrumJntNode_pos);};        
142
    AnyRefNode L4L5JntNode = {
143
      sRel = .Scale(.StdPar.L4L5JntNode_pos); 
144
      AnyDrawNodes DrwNode = {Visible ??=..DrwSTL.Visible; ScaleXYZ = 0.003*{1,1,1};RGB = {1,0,0};};
145
      // Rotated node with x axis parallel to the superior endplate surface
146
      AnyRefNode RotNode = {
147
        ARel = RotMat(0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel),
148
                      ..SuperiorEndplateAnteriorNode.sRel,
149
                      0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel) + (..SuperiorEndplateNodeL.sRel - ..SuperiorEndplateNodeR.sRel))*RotMat(pi/2,x);
150
      };
151
    };
152
    
153
    // Nodes at the anterior and posterior points on the superior endplate
154
    AnyRefNode SuperiorEndplateAnteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplateAnteriorNode_pos);};
155
    AnyRefNode SuperiorEndplatePosteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplatePosteriorNode_pos);};
156
    
157
    // Nodes at the right and left points on the superior endplate
158
    AnyRefNode SuperiorEndplateNodeR = {sRel = .Scale(.StdPar.Right.SuperiorEndplateNode_pos);};
159
    AnyRefNode SuperiorEndplateNodeL = {sRel = .Scale(.StdPar.Left.SuperiorEndplateNode_pos);};
160
    
161
    //These nodes are used for adding extra used by other body parts to the right 
162
    //and left side of the segment
163
    AnyRefNode Right = {AnyFunTransform3D&Scale=.Scale;};
164
    AnyRefNode Left = {AnyFunTransform3D&Scale=.Scale;};
165
    
166
    
167
    // Ligament Nodes        
168
    AnyRefNode LINodeSuperior = {sRel = .Scale(.StdPar.LINodeSuperior_pos);};
169
    // End of ligament Nodes
170
    
171
    // Multifidi Nodes
172
    AnyRefNode MFdL3L5NodeR = {sRel = .Scale(.StdPar.Right.MFdL3L5Node_pos);};
173
    AnyRefNode MFdL3L5NodeL = {sRel = .Scale(.StdPar.Left.MFdL3L5Node_pos);};
174
    
175
    AnyRefNode MFdL5S1NodeR = {sRel = .Scale(.StdPar.Right.MFdL5S1Node_pos);};
176
    AnyRefNode MFdL5S1NodeL = {sRel = .Scale(.StdPar.Left.MFdL5S1Node_pos);};
177
    
178
    AnyRefNode MFmL2L5NodeR = {sRel = .Scale(.StdPar.Right.MFmL2L5Node_pos);};
179
    AnyRefNode MFmL2L5NodeL = {sRel = .Scale(.StdPar.Left.MFmL2L5Node_pos);};
180
    
181
    AnyRefNode MFmL5SacrumNodeR = {sRel = .Scale(.StdPar.Right.MFmL5SacrumNode_pos);};
182
    AnyRefNode MFmL5SacrumNodeL = {sRel = .Scale(.StdPar.Left.MFmL5SacrumNode_pos);};
183
    
184
    AnyRefNode MFtsL1L5NodeR = {sRel = .Scale(.StdPar.Right.MFtsL1L5Node_pos);};
185
    AnyRefNode MFtsL1L5NodeL = {sRel = .Scale(.StdPar.Left.MFtsL1L5Node_pos);};
186
    
187
    AnyRefNode MFtsL2L5NodeR = {sRel = .Scale(.StdPar.Right.MFtsL2L5Node_pos);};
188
    AnyRefNode MFtsL2L5NodeL = {sRel = .Scale(.StdPar.Left.MFtsL2L5Node_pos);};
189
    
190
    AnyRefNode MFtsL5SacrumNodeR = {sRel = .Scale(.StdPar.Right.MFtsL5SacrumNode_pos);};
191
    AnyRefNode MFtsL5SacrumNodeL = {sRel = .Scale(.StdPar.Left.MFtsL5SacrumNode_pos);};
192
    // End of Multifidi Nodes
193
    
194
    // Erector Spinae Nodes
195
    AnyRefNode LTplL5IliumNodeR = {sRel = .Scale(.StdPar.Right.LTplL5IliumNode_pos);};
196
    AnyRefNode LTplL5IliumNodeL = {sRel = .Scale(.StdPar.Left.LTplL5IliumNode_pos);};
197
198
    AnyRefNode LTptT5L5NodeR = {sRel = .Scale(.StdPar.Right.LTptT5L5Node_pos);};
199
    AnyRefNode LTptT5L5NodeL = {sRel = .Scale(.StdPar.Left.LTptT5L5Node_pos);};
200
    
201
    AnyRefNode LTptT6S1Via11NodeR = {sRel = .Scale(.StdPar.Right.LTptT6S1Via11Node_pos);};
202
    AnyRefNode LTptT6S1Via11NodeL = {sRel = .Scale(.StdPar.Left.LTptT6S1Via11Node_pos);};
203
    
204
    AnyRefNode LTptT7S2Via10NodeR = {sRel = .Scale(.StdPar.Right.LTptT7S2Via10Node_pos);};
205
    AnyRefNode LTptT7S2Via10NodeL = {sRel = .Scale(.StdPar.Left.LTptT7S2Via10Node_pos);};
206
    
207
    AnyRefNode LTptT8S3Via9NodeR = {sRel = .Scale(.StdPar.Right.LTptT8S3Via9Node_pos);};
208
    AnyRefNode LTptT8S3Via9NodeL = {sRel = .Scale(.StdPar.Left.LTptT8S3Via9Node_pos);};
209
    
210
    AnyRefNode LTptT9S4Via8NodeR = {sRel = .Scale(.StdPar.Right.LTptT9S4Via8Node_pos);};
211
    AnyRefNode LTptT9S4Via8NodeL = {sRel = .Scale(.StdPar.Left.LTptT9S4Via8Node_pos);};
212
    
213
    AnyRefNode LTptT10SacrumVia7NodeR = {sRel = .Scale(.StdPar.Right.LTptT10SacrumVia7Node_pos);};
214
    AnyRefNode LTptT10SacrumVia7NodeL = {sRel = .Scale(.StdPar.Left.LTptT10SacrumVia7Node_pos);};
215
    
216
    AnyRefNode LTptT11SacrumVia6NodeR = {sRel = .Scale(.StdPar.Right.LTptT11SacrumVia6Node_pos);};
217
    AnyRefNode LTptT11SacrumVia6NodeL = {sRel = .Scale(.StdPar.Left.LTptT11SacrumVia6Node_pos);};
218
    
219
    AnyRefNode LTptT12SacrumVia5NodeR = {sRel = .Scale(.StdPar.Right.LTptT12SacrumVia5Node_pos);};
220
    AnyRefNode LTptT12SacrumVia5NodeL = {sRel = .Scale(.StdPar.Left.LTptT12SacrumVia5Node_pos);};
221
    // End of Erector Spinae Nodes
222
    
223
    // Psoas Major Nodes
224
    AnyRefNode PML5_TMNodeR = {sRel = .Scale(.StdPar.Right.PML5_TMNode_pos);};
225
    AnyRefNode PML5_TMNodeL = {sRel = .Scale(.StdPar.Left.PML5_TMNode_pos);};
226
    
227
    AnyRefNode PML5T_TMNodeR = {sRel = .Scale(.StdPar.Right.PML5T_TMNode_pos);};
228
    AnyRefNode PML5T_TMNodeL = {sRel = .Scale(.StdPar.Left.PML5T_TMNode_pos);};
229
    
230
    AnyRefNode PMT12I_TMVia4NodeR = {sRel = .Scale(.StdPar.Right.PMT12I_TMVia4Node_pos);};
231
    AnyRefNode PMT12I_TMVia4NodeL = {sRel = .Scale(.StdPar.Left.PMT12I_TMVia4Node_pos);};
232
    
233
    AnyRefNode PML1I_TMVia3NodeR = {sRel = .Scale(.StdPar.Right.PML1I_TMVia3Node_pos);};
234
    AnyRefNode PML1I_TMVia3NodeL = {sRel = .Scale(.StdPar.Left.PML1I_TMVia3Node_pos);};
235
    
236
    AnyRefNode PML2I_TMVia2NodeR = {sRel = .Scale(.StdPar.Right.PML2I_TMVia2Node_pos);};
237
    AnyRefNode PML2I_TMVia2NodeL = {sRel = .Scale(.StdPar.Left.PML2I_TMVia2Node_pos);};
238
    
239
    AnyRefNode PML3I_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML3I_TMVia1Node_pos);};
240
    AnyRefNode PML3I_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML3I_TMVia1Node_pos);};
241
    
242
    AnyRefNode PML1T_TMVia4NodeR = {sRel = .Scale(.StdPar.Right.PML1T_TMVia4Node_pos);};
243
    AnyRefNode PML1T_TMVia4NodeL = {sRel = .Scale(.StdPar.Left.PML1T_TMVia4Node_pos);};
244
    
245
    AnyRefNode PML2T_TMVia3NodeR = {sRel = .Scale(.StdPar.Right.PML2T_TMVia3Node_pos);};
246
    AnyRefNode PML2T_TMVia3NodeL = {sRel = .Scale(.StdPar.Left.PML2T_TMVia3Node_pos);};
247
    
248
    AnyRefNode PML3T_TMVia2NodeR = {sRel = .Scale(.StdPar.Right.PML3T_TMVia2Node_pos);};
249
    AnyRefNode PML3T_TMVia2NodeL = {sRel = .Scale(.StdPar.Left.PML3T_TMVia2Node_pos);};
250
    
251
    AnyRefNode PML4T_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML4T_TMVia1Node_pos);};
252
    AnyRefNode PML4T_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML4T_TMVia1Node_pos);};
253
    // End of Psoas Major Nodes
254
    
255
    // Obliquus Externus Nodes
256
    AnyRefNode OEC10_RSNodeR = {sRel = .Scale(.StdPar.Right.OEC10_RSNode_pos);};
257
    AnyRefNode OEC10_RSNodeL = {sRel = .Scale(.StdPar.Left.OEC10_RSNode_pos);};
258
    // End of Obliquus Externus Nodes
259
        
260
    AnyDrawSurf DrwSTL = {
261
      FileName = ...STL.FilenameL5Seg;
262
      RGB = ...ColorRef.Segments;
263
      Opacity = Main.DrawSettings.BonesOpacity.L5;
264
      AnyFunTransform3D &Scale =.Scale;
265
    };
266
    
267
    AnyRefNode MidPoint={sRel=(.L4L5JntNode.sRel+.L5SacrumJntNode.sRel)*0.5;};    
268
    AnyRefNode &SupportNode= MidPoint;
269
    
270
    AnyRefNode BuckleContactNode={sRel= .ScaleAbdominal(.StdPar.BuckleContactNode_pos);};
271
272
    
273
  }; // End of L5Seg
274
  
275
  AnySeg L4Seg = {
276
  
277
    AnyFolder &StdPar=..ModelParameters.L4;    
278
    
279
      //initial position found as a function of pelvis pos and orientation
280
    r0=.L5Seg.L4L5JntNode.sRel*.L5Seg.Axes0'+.L5Seg.r0-L4L5JntNode.sRel*Axes0'; 
281
    
282
    // This file includes the trunk specifc scaling function
283
    // and anatomical reference system
284
    AnyFunTransform3D &GeomScale = ..Scaling.GeometricalScaling.L4Seg.ScaleFunction;
285
    #include "TrunkScalingAndAnatomicalFrame.any"
286
287
    AnyRefNode MoCapMarkerFrameAMMR24 = {}; ///< For backwards Compatibility with AMMR 2.4 MoCap Marker protocols
288
    AnyFunTransform3D &ScaleAbdominal =..ScalingTrunk.Lumbar.ScaleFunction;
289
    
290
    AnyVar MassS = ..Scaling.MassScaling.Lumbar.MassScale;
291
  
292
    AnyVar MassStandard = ..StandardParameters.Lumbar.Mass/5;
293
    Mass = MassS*MassStandard;           
294
    
295
    Jii = {0.001,0.001,0.001};
296
    
297
    sCoM = Scale(StdPar.sCoM_pos);
298
    JaboutCoMOnOff = On;
299
    
300
    AnyRefNode L4L5JntNode = {sRel = .Scale(.StdPar.L4L5JntNode_pos);};
301
    AnyRefNode L3L4JntNode = {
302
      sRel = .Scale(.StdPar.L3L4JntNode_pos); 
303
       AnyDrawNodes DrwNode = {Visible ??=..DrwSTL.Visible; ScaleXYZ = 0.003*{1,1,1};RGB = {1, 0, 0};};
304
      // Rotated node with x axis parallel to the superior endplate surface
305
      AnyRefNode RotNode = {
306
        ARel = RotMat(0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel),
307
                      ..SuperiorEndplateAnteriorNode.sRel,
308
                      0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel) + (..SuperiorEndplateNodeL.sRel - ..SuperiorEndplateNodeR.sRel))*RotMat(pi/2,x);
309
      };
310
    };
311
    
312
    // Nodes at the anterior and posterior points on the superior endplate
313
    AnyRefNode SuperiorEndplateAnteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplateAnteriorNode_pos);};
314
    AnyRefNode SuperiorEndplatePosteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplatePosteriorNode_pos);};
315
    
316
    // Nodes at the right and left points on the superior endplate
317
    AnyRefNode SuperiorEndplateNodeR = {sRel = .Scale(.StdPar.Right.SuperiorEndplateNode_pos);};
318
    AnyRefNode SuperiorEndplateNodeL = {sRel = .Scale(.StdPar.Left.SuperiorEndplateNode_pos);};
319
    
320
    //These nodes are used for adding extra used by other body parts to the right 
321
    //and left side of the segment
322
    AnyRefNode Right = {AnyFunTransform3D&Scale=.Scale;};
323
    AnyRefNode Left = {AnyFunTransform3D&Scale=.Scale;};
324
    
325
    // Ligament Nodes        
326
    AnyRefNode LSNode = {sRel = .Scale(.StdPar.LSNode_pos);};
327
    
328
    AnyRefNode LINodeInferior = {sRel = .Scale(.StdPar.LINodeInferior_pos);};
329
    AnyRefNode LINodeSuperior = {sRel = .Scale(.StdPar.LINodeSuperior_pos);};
330
    // End of ligament Nodes
331
    
332
    // Multifidi Nodes
333
    AnyRefNode MFdL2L4NodeR = {sRel = .Scale(.StdPar.Right.MFdL2L4Node_pos);};
334
    AnyRefNode MFdL2L4NodeL = {sRel = .Scale(.StdPar.Left.MFdL2L4Node_pos);};
335
    
336
    AnyRefNode MFdL4S1NodeR = {sRel = .Scale(.StdPar.Right.MFdL4S1Node_pos);};
337
    AnyRefNode MFdL4S1NodeL = {sRel = .Scale(.StdPar.Left.MFdL4S1Node_pos);};
338
    
339
    AnyRefNode MFmL1L4NodeR = {sRel = .Scale(.StdPar.Right.MFmL1L4Node_pos);};
340
    AnyRefNode MFmL1L4NodeL = {sRel = .Scale(.StdPar.Left.MFmL1L4Node_pos);};
341
    
342
    AnyRefNode MFmL4SacrumNodeR = {sRel = .Scale(.StdPar.Right.MFmL4SacrumNode_pos);};
343
    AnyRefNode MFmL4SacrumNodeL = {sRel = .Scale(.StdPar.Left.MFmL4SacrumNode_pos);};
344
    
345
    AnyRefNode MFtsL4SacrumNodeR = {sRel = .Scale(.StdPar.Right.MFtsL4SacrumNode_pos);};
346
    AnyRefNode MFtsL4SacrumNodeL = {sRel = .Scale(.StdPar.Left.MFtsL4SacrumNode_pos);};
347
    // End of Multifidi Nodes
348
    
349
    // Erector Spinae Nodes
350
    AnyRefNode ILplL4CINodeR = {sRel = .Scale(.StdPar.Right.ILplL4CINode_pos);};
351
    AnyRefNode ILplL4CINodeL = {sRel = .Scale(.StdPar.Left.ILplL4CINode_pos);};
352
    
353
    AnyRefNode LTplL4SIPSNodeR = {sRel = .Scale(.StdPar.Right.LTplL4SIPSNode_pos);};
354
    AnyRefNode LTplL4SIPSNodeL = {sRel = .Scale(.StdPar.Left.LTplL4SIPSNode_pos);};
355
    
356
    AnyRefNode LTptT4L4NodeR = {sRel = .Scale(.StdPar.Right.LTptT4L4Node_pos);};
357
    AnyRefNode LTptT4L4NodeL = {sRel = .Scale(.StdPar.Left.LTptT4L4Node_pos);};
358
    
359
    AnyRefNode ILplL1CIViaNodeR = {sRel = .Scale(.StdPar.Right.ILplL1CIViaNode_pos);};
360
    AnyRefNode ILplL1CIViaNodeL = {sRel = .Scale(.StdPar.Left.ILplL1CIViaNode_pos);};
361
362
    AnyRefNode ILplL2CIViaNodeR = {sRel = .Scale(.StdPar.Right.ILplL2CIViaNode_pos);};
363
    AnyRefNode ILplL2CIViaNodeL = {sRel = .Scale(.StdPar.Left.ILplL2CIViaNode_pos);};
364
    
365
    AnyRefNode LTptT5L5Via11NodeR = {sRel = .Scale(.StdPar.Right.LTptT5L5Via11Node_pos);};
366
    AnyRefNode LTptT5L5Via11NodeL = {sRel = .Scale(.StdPar.Left.LTptT5L5Via11Node_pos);};
367
    
368
    AnyRefNode LTptT6S1Via10NodeR = {sRel = .Scale(.StdPar.Right.LTptT6S1Via10Node_pos);};
369
    AnyRefNode LTptT6S1Via10NodeL = {sRel = .Scale(.StdPar.Left.LTptT6S1Via10Node_pos);};
370
    
371
    AnyRefNode LTptT7S2Via9NodeR = {sRel = .Scale(.StdPar.Right.LTptT7S2Via9Node_pos);};
372
    AnyRefNode LTptT7S2Via9NodeL = {sRel = .Scale(.StdPar.Left.LTptT7S2Via9Node_pos);};
373
    
374
    AnyRefNode LTptT8S3Via8NodeR = {sRel = .Scale(.StdPar.Right.LTptT8S3Via8Node_pos);};
375
    AnyRefNode LTptT8S3Via8NodeL = {sRel = .Scale(.StdPar.Left.LTptT8S3Via8Node_pos);};
376
    
377
    AnyRefNode LTptT9S4Via7NodeR = {sRel = .Scale(.StdPar.Right.LTptT9S4Via7Node_pos);};
378
    AnyRefNode LTptT9S4Via7NodeL = {sRel = .Scale(.StdPar.Left.LTptT9S4Via7Node_pos);};
379
    
380
    AnyRefNode LTptT10SacrumVia6NodeR = {sRel = .Scale(.StdPar.Right.LTptT10SacrumVia6Node_pos);};
381
    AnyRefNode LTptT10SacrumVia6NodeL = {sRel = .Scale(.StdPar.Left.LTptT10SacrumVia6Node_pos);};
382
    
383
    AnyRefNode LTptT11SacrumVia5NodeR = {sRel = .Scale(.StdPar.Right.LTptT11SacrumVia5Node_pos);};
384
    AnyRefNode LTptT11SacrumVia5NodeL = {sRel = .Scale(.StdPar.Left.LTptT11SacrumVia5Node_pos);};
385
    
386
    AnyRefNode LTptT12SacrumVia4NodeR = {sRel = .Scale(.StdPar.Right.LTptT12SacrumVia4Node_pos);};
387
    AnyRefNode LTptT12SacrumVia4NodeL = {sRel = .Scale(.StdPar.Left.LTptT12SacrumVia4Node_pos);};
388
    // End of Erector Spinae Nodes
389
    
390
    // Psoas Major Nodes
391
    AnyRefNode PML4I_TMNodeR = {sRel = .Scale(.StdPar.Right.PML4I_TMNode_pos);};
392
    AnyRefNode PML4I_TMNodeL = {sRel = .Scale(.StdPar.Left.PML4I_TMNode_pos);};
393
    
394
    AnyRefNode PML4T_TMNodeR = {sRel = .Scale(.StdPar.Right.PML4T_TMNode_pos);};
395
    AnyRefNode PML4T_TMNodeL = {sRel = .Scale(.StdPar.Left.PML4T_TMNode_pos);};
396
    
397
    AnyRefNode PMT12I_TMVia3NodeR = {sRel = .Scale(.StdPar.Right.PMT12I_TMVia3Node_pos);};
398
    AnyRefNode PMT12I_TMVia3NodeL = {sRel = .Scale(.StdPar.Left.PMT12I_TMVia3Node_pos);};
399
400
    AnyRefNode PML1I_TMVia2NodeR = {sRel = .Scale(.StdPar.Right.PML1I_TMVia2Node_pos);};
401
    AnyRefNode PML1I_TMVia2NodeL = {sRel = .Scale(.StdPar.Left.PML1I_TMVia2Node_pos);};
402
    
403
    AnyRefNode PML2I_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML2I_TMVia1Node_pos);};
404
    AnyRefNode PML2I_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML2I_TMVia1Node_pos);};
405
    
406
    AnyRefNode PML1T_TMVia3NodeR = {sRel = .Scale(.StdPar.Right.PML1T_TMVia3Node_pos);};
407
    AnyRefNode PML1T_TMVia3NodeL = {sRel = .Scale(.StdPar.Left.PML1T_TMVia3Node_pos);};
408
    
409
    AnyRefNode PML2T_TMVia2NodeR = {sRel = .Scale(.StdPar.Right.PML2T_TMVia2Node_pos);};
410
    AnyRefNode PML2T_TMVia2NodeL = {sRel = .Scale(.StdPar.Left.PML2T_TMVia2Node_pos);};
411
    
412
    AnyRefNode PML3T_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML3T_TMVia1Node_pos);};
413
    AnyRefNode PML3T_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML3T_TMVia1Node_pos);};
414
    // End of Psoas Major Nodes
415
    
416
    // Quadratus Lumborum Nodes
417
    AnyRefNode QLL4_CINodeR = {sRel = .Scale(.StdPar.Right.QLL4_CINode_pos);};
418
    AnyRefNode QLL4_CINodeL = {sRel = .Scale(.StdPar.Left.QLL4_CINode_pos);};
419
    // End of Quadratus Lumborum Nodes
420
    
421
    // Obliquus Externus Nodes
422
    AnyRefNode OEC9_RSNodeR = {sRel = .Scale(.StdPar.Right.OEC9_RSNode_pos);};
423
    AnyRefNode OEC9_RSNodeL = {sRel = .Scale(.StdPar.Left.OEC9_RSNode_pos);};
424
    // End of Obliquus Externus Nodes
425
    
426
    // Obliquus Internus Nodes
427
    AnyRefNode OICI_RS3NodeR = {sRel = .Scale(.StdPar.Right.OICI_RS3Node_pos);};
428
    AnyRefNode OICI_RS3NodeL = {sRel = .Scale(.StdPar.Left.OICI_RS3Node_pos);};   
429
    // End of Obliquus Internus Nodes
430
    
431
    AnyDrawSurf DrwSTL = {
432
      FileName = ...STL.FilenameL4Seg;
433
      RGB = ...ColorRef.Segments;
434
      Opacity = Main.DrawSettings.BonesOpacity.L4;
435
      AnyFunTransform3D &Scale =.Scale;
436
    };
437
     
438
    AnyRefNode MidPoint={sRel=(.L3L4JntNode.sRel+.L4L5JntNode.sRel)*0.5;};
439
    AnyRefNode SupportNode={sRel = .Scale(.StdPar.SupportNode_pos);};      
440
    AnyRefNode BuckleContactNode={sRel= .ScaleAbdominal(.StdPar.BuckleContactNode_pos);};
441
    
442
443
  }; // End of L4Seg
444
  
445
  AnySeg L3Seg = {
446
    AnyFolder &StdPar = ..ModelParameters.L3;
447
    //initial position found as a function of pelvis pos and orientation
448
    r0=.L4Seg.L3L4JntNode.sRel*.L4Seg.Axes0'+.L4Seg.r0-L3L4JntNode.sRel*Axes0'; 
449
    
450
    // This file includes the trunk specifc scaling function
451
    // and anatomical reference system
452
    AnyFunTransform3D &GeomScale = ..Scaling.GeometricalScaling.L3Seg.ScaleFunction;
453
    #include "TrunkScalingAndAnatomicalFrame.any"
454
455
    AnyRefNode MoCapMarkerFrameAMMR24 = {}; ///< For backwards Compatibility with AMMR 2.4 MoCap Marker protocols
456
    AnyFunTransform3D &ScaleAbdominal =..ScalingTrunk.Lumbar.ScaleFunction;
457
        
458
    AnyVar MassS = ..Scaling.MassScaling.Lumbar.MassScale;
459
  
460
    AnyVar MassStandard = ..StandardParameters.Lumbar.Mass/5;
461
    Mass = MassS*MassStandard;
462
    
463
    Jii = {0.001,0.001,0.001};
464
    
465
    sCoM = Scale(StdPar.sCoM_pos);
466
    JaboutCoMOnOff = On;
467
468
    AnyRefNode L3L4JntNode = {sRel = .Scale(.StdPar.L3L4JntNode_pos);};    
469
    AnyRefNode L2L3JntNode = {
470
      sRel = .Scale(.StdPar.L2L3JntNode_pos); 
471
       AnyDrawNodes DrwNode = {Visible ??=..DrwSTL.Visible; ScaleXYZ = 0.003*{1,1,1};RGB = {1,0,0};};
472
      // Rotated node with x axis parallel to the superior endplate surface
473
      AnyRefNode RotNode = {
474
        ARel = RotMat(0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel),
475
                      ..SuperiorEndplateAnteriorNode.sRel,
476
                      0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel) + (..SuperiorEndplateNodeL.sRel - ..SuperiorEndplateNodeR.sRel))*RotMat(pi/2,x);
477
      };
478
    };
479
    
480
    // Nodes at the anterior and posterior points on the superior endplate
481
    AnyRefNode SuperiorEndplateAnteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplateAnteriorNode_pos);};
482
    AnyRefNode SuperiorEndplatePosteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplatePosteriorNode_pos);};
483
    
484
    // Nodes at the right and left points on the superior endplate
485
    AnyRefNode SuperiorEndplateNodeR = {sRel = .Scale(.StdPar.Right.SuperiorEndplateNode_pos);};
486
    AnyRefNode SuperiorEndplateNodeL = {sRel = .Scale(.StdPar.Left.SuperiorEndplateNode_pos);};
487
    
488
    //These nodes are used for adding extra used by other body parts to the right 
489
    //and left side of the segment
490
    AnyRefNode Right= {AnyFunTransform3D&Scale=.Scale;};
491
    AnyRefNode Left = {AnyFunTransform3D&Scale=.Scale;};
492
    
493
    
494
    // Ligament Nodes        
495
    AnyRefNode LSNode = {sRel = .Scale(.StdPar.LSNode_pos);};
496
    
497
    AnyRefNode LINodeInferior = {sRel = .Scale(.StdPar.LINodeInferior_pos);};
498
    AnyRefNode LINodeSuperior = {sRel = .Scale(.StdPar.LINodeSuperior_pos);};
499
    // End of ligament Nodes
500
    
501
    // Multifidi Nodes
502
    AnyRefNode MFdL1L3NodeR = {sRel = .Scale(.StdPar.Right.MFdL1L3Node_pos);};
503
    AnyRefNode MFdL1L3NodeL = {sRel = .Scale(.StdPar.Left.MFdL1L3Node_pos);};
504
    
505
    AnyRefNode MFdL3L5NodeR = {sRel = .Scale(.StdPar.Right.MFdL3L5Node_pos);};
506
    AnyRefNode MFdL3L5NodeL = {sRel = .Scale(.StdPar.Left.MFdL3L5Node_pos);};
507
    
508
    AnyRefNode MFmL3S1NodeR = {sRel = .Scale(.StdPar.Right.MFmL3S1Node_pos);};
509
    AnyRefNode MFmL3S1NodeL = {sRel = .Scale(.StdPar.Left.MFmL3S1Node_pos);};
510
    
511
    AnyRefNode MFtsL3LigamentNodeR = {sRel = .Scale(.StdPar.Right.MFtsL3LigamentNode_pos);};
512
    AnyRefNode MFtsL3LigamentNodeL = {sRel = .Scale(.StdPar.Left.MFtsL3LigamentNode_pos);};
513
    // End of Multifidi Nodes
514
    
515
    // Erector Spinae Nodes
516
    AnyRefNode ILplL3CINodeR = {sRel = .Scale(.StdPar.Right.ILplL3CINode_pos);};
517
    AnyRefNode ILplL3CINodeL = {sRel = .Scale(.StdPar.Left.ILplL3CINode_pos);};
518
    
519
    AnyRefNode LTplL3SIPSNodeR = {sRel = .Scale(.StdPar.Right.LTplL3SIPSNode_pos);};
520
    AnyRefNode LTplL3SIPSNodeL = {sRel = .Scale(.StdPar.Left.LTplL3SIPSNode_pos);};
521
    
522
    AnyRefNode LTptT3L3NodeR = {sRel = .Scale(.StdPar.Right.LTptT3L3Node_pos);};
523
    AnyRefNode LTptT3L3NodeL = {sRel = .Scale(.StdPar.Left.LTptT3L3Node_pos);};
524
    
525
    AnyRefNode ILplL1CIViaNodeR = {sRel = .Scale(.StdPar.Right.ILplL1CIViaNode_pos);};
526
    AnyRefNode ILplL1CIViaNodeL = {sRel = .Scale(.StdPar.Left.ILplL1CIViaNode_pos);};
527
    
528
    AnyRefNode ILplL2CIViaNodeR = {sRel = .Scale(.StdPar.Right.ILplL2CIViaNode_pos);};
529
    AnyRefNode ILplL2CIViaNodeL = {sRel = .Scale(.StdPar.Left.ILplL2CIViaNode_pos);};
530
    
531
    AnyRefNode LTplL1SIPSViaNodeR = {sRel = .Scale(.StdPar.Right.LTplL1SIPSViaNode_pos);};
532
    AnyRefNode LTplL1SIPSViaNodeL = {sRel = .Scale(.StdPar.Left.LTplL1SIPSViaNode_pos);};
533
    
534
    AnyRefNode LTplL2SIPSViaNodeR = {sRel = .Scale(.StdPar.Right.LTplL2SIPSViaNode_pos);};
535
    AnyRefNode LTplL2SIPSViaNodeL = {sRel = .Scale(.StdPar.Left.LTplL2SIPSViaNode_pos);};
536
    
537
    AnyRefNode ILptC5SIPSVia9NodeR = {sRel = .Scale(.StdPar.Right.ILptC5SIPSVia9Node_pos);};
538
    AnyRefNode ILptC5SIPSVia9NodeL = {sRel = .Scale(.StdPar.Left.ILptC5SIPSVia9Node_pos);};
539
    
540
    AnyRefNode ILptC6SIPSVia8NodeR = {sRel = .Scale(.StdPar.Right.ILptC6SIPSVia8Node_pos);};
541
    AnyRefNode ILptC6SIPSVia8NodeL = {sRel = .Scale(.StdPar.Left.ILptC6SIPSVia8Node_pos);};
542
    
543
    AnyRefNode ILptC7CIVia7NodeR = {sRel = .Scale(.StdPar.Right.ILptC7CIVia7Node_pos);};
544
    AnyRefNode ILptC7CIVia7NodeL = {sRel = .Scale(.StdPar.Left.ILptC7CIVia7Node_pos);};
545
    
546
    AnyRefNode ILptC8CIVia6NodeR = {sRel = .Scale(.StdPar.Right.ILptC8CIVia6Node_pos);};
547
    AnyRefNode ILptC8CIVia6NodeL = {sRel = .Scale(.StdPar.Left.ILptC8CIVia6Node_pos);};
548
    
549
    AnyRefNode ILptC9CIVia5NodeR = {sRel = .Scale(.StdPar.Right.ILptC9CIVia5Node_pos);};
550
    AnyRefNode ILptC9CIVia5NodeL = {sRel = .Scale(.StdPar.Left.ILptC9CIVia5Node_pos);};
551
    
552
    AnyRefNode ILptC10CIVia4NodeR = {sRel = .Scale(.StdPar.Right.ILptC10CIVia4Node_pos);};
553
    AnyRefNode ILptC10CIVia4NodeL = {sRel = .Scale(.StdPar.Left.ILptC10CIVia4Node_pos);};
554
    
555
    AnyRefNode ILptC11CIVia3NodeR = {sRel = .Scale(.StdPar.Right.ILptC11CIVia3Node_pos);};
556
    AnyRefNode ILptC11CIVia3NodeL = {sRel = .Scale(.StdPar.Left.ILptC11CIVia3Node_pos);};
557
    
558
    AnyRefNode ILptC12CIVia3NodeR = {sRel = .Scale(.StdPar.Right.ILptC12CIVia3Node_pos);};
559
    AnyRefNode ILptC12CIVia3NodeL = {sRel = .Scale(.StdPar.Left.ILptC12CIVia3Node_pos);};
560
    
561
    AnyRefNode LTptT4L4Via11NodeR = {sRel = .Scale(.StdPar.Right.LTptT4L4Via11Node_pos);};
562
    AnyRefNode LTptT4L4Via11NodeL = {sRel = .Scale(.StdPar.Left.LTptT4L4Via11Node_pos);};
563
    
564
    AnyRefNode LTptT5L5Via10NodeR = {sRel = .Scale(.StdPar.Right.LTptT5L5Via10Node_pos);};
565
    AnyRefNode LTptT5L5Via10NodeL = {sRel = .Scale(.StdPar.Left.LTptT5L5Via10Node_pos);};
566
    
567
    AnyRefNode LTptT6S1Via9NodeR = {sRel = .Scale(.StdPar.Right.LTptT6S1Via9Node_pos);};
568
    AnyRefNode LTptT6S1Via9NodeL = {sRel = .Scale(.StdPar.Left.LTptT6S1Via9Node_pos);};
569
    
570
    AnyRefNode LTptT7S2Via8NodeR = {sRel = .Scale(.StdPar.Right.LTptT7S2Via8Node_pos);};
571
    AnyRefNode LTptT7S2Via8NodeL = {sRel = .Scale(.StdPar.Left.LTptT7S2Via8Node_pos);};
572
    
573
    AnyRefNode LTptT8S3Via7NodeR = {sRel = .Scale(.StdPar.Right.LTptT8S3Via7Node_pos);};
574
    AnyRefNode LTptT8S3Via7NodeL = {sRel = .Scale(.StdPar.Left.LTptT8S3Via7Node_pos);};
575
    
576
    AnyRefNode LTptT9S4Via6NodeR = {sRel = .Scale(.StdPar.Right.LTptT9S4Via6Node_pos);};
577
    AnyRefNode LTptT9S4Via6NodeL = {sRel = .Scale(.StdPar.Left.LTptT9S4Via6Node_pos);};
578
    
579
    AnyRefNode LTptT10SacrumVia5NodeR = {sRel = .Scale(.StdPar.Right.LTptT10SacrumVia5Node_pos);};
580
    AnyRefNode LTptT10SacrumVia5NodeL = {sRel = .Scale(.StdPar.Left.LTptT10SacrumVia5Node_pos);};
581
    
582
    AnyRefNode LTptT11SacrumVia4NodeR = {sRel = .Scale(.StdPar.Right.LTptT11SacrumVia4Node_pos);};
583
    AnyRefNode LTptT11SacrumVia4NodeL = {sRel = .Scale(.StdPar.Left.LTptT11SacrumVia4Node_pos);};
584
    
585
    AnyRefNode LTptT12SacrumVia3NodeR = {sRel = .Scale(.StdPar.Right.LTptT12SacrumVia3Node_pos);};
586
    AnyRefNode LTptT12SacrumVia3NodeL = {sRel = .Scale(.StdPar.Left.LTptT12SacrumVia3Node_pos);};
587
    // End of Erector Spinae Nodes
588
    
589
    // Psoas Major Nodes
590
    AnyRefNode PML3I_TMNodeR = {sRel = .Scale(.StdPar.Right.PML3I_TMNode_pos);};
591
    AnyRefNode PML3I_TMNodeL = {sRel = .Scale(.StdPar.Left.PML3I_TMNode_pos);};
592
    
593
    AnyRefNode PML3T_TMNodeR = {sRel = .Scale(.StdPar.Right.PML3T_TMNode_pos);};
594
    AnyRefNode PML3T_TMNodeL = {sRel = .Scale(.StdPar.Left.PML3T_TMNode_pos);};
595
    
596
    AnyRefNode PMT12I_TMVia2NodeR = {sRel = .Scale(.StdPar.Right.PMT12I_TMVia2Node_pos);};
597
    AnyRefNode PMT12I_TMVia2NodeL = {sRel = .Scale(.StdPar.Left.PMT12I_TMVia2Node_pos);};
598
        
599
    AnyRefNode PML1I_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML1I_TMVia1Node_pos);};
600
    AnyRefNode PML1I_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML1I_TMVia1Node_pos);};
601
    
602
    AnyRefNode PML1T_TMVia2NodeR = {sRel = .Scale(.StdPar.Right.PML1T_TMVia2Node_pos);};
603
    AnyRefNode PML1T_TMVia2NodeL = {sRel = .Scale(.StdPar.Left.PML1T_TMVia2Node_pos);};
604
    
605
    AnyRefNode PML2T_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML2T_TMVia1Node_pos);};
606
    AnyRefNode PML2T_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML2T_TMVia1Node_pos);};
607
    // End of Psoas Major Nodes
608
    
609
    // Quadratus Lumborum Nodes
610
    AnyRefNode QLL3_CINodeR = {sRel = .Scale(.StdPar.Right.QLL3_CINode_pos);};
611
    AnyRefNode QLL3_CINodeL = {sRel = .Scale(.StdPar.Left.QLL3_CINode_pos);};
612
    // End of Quadratus Lumborum Nodes
613
    
614
    // Obliquus Externus Nodes
615
    AnyRefNode OEC8_RSNodeR = {sRel = .Scale(.StdPar.Right.OEC8_RSNode_pos);};
616
    AnyRefNode OEC8_RSNodeL = {sRel = .Scale(.StdPar.Left.OEC8_RSNode_pos);};
617
    // End of Obliquus Externus Nodes
618
    
619
    // Obliquus Internus Nodes
620
    AnyRefNode OICI_RS2NodeR = {sRel = .Scale(.StdPar.Right.OICI_RS2Node_pos);};
621
    AnyRefNode OICI_RS2NodeL = {sRel = .Scale(.StdPar.Left.OICI_RS2Node_pos);};
622
    // End of Obliquus Internus Nodes
623
    
624
    //AnyDrawSeg DrwSeg = {};
625
    
626
    AnyDrawSurf DrwSTL = {
627
      FileName = ...STL.FilenameL3Seg;
628
      RGB = ...ColorRef.Segments;
629
      Opacity = Main.DrawSettings.BonesOpacity.L3;
630
      AnyFunTransform3D &Scale =.Scale;
631
    };
632
    
633
    AnyRefNode MidPoint={sRel=(.L2L3JntNode.sRel+.L3L4JntNode.sRel)*0.5; };     
634
635
    AnyRefNode SupportNode={sRel = .Scale(.StdPar.SupportNode_pos);};
636
    AnyRefNode BuckleContactNode={sRel = .ScaleAbdominal(.StdPar.BuckleContactNode_pos);};
637
    
638
  }; // End of L3Seg
639
  
640
  AnySeg L2Seg = {
641
    AnyFolder &StdPar=..ModelParameters.L2;
642
    
643
    //initial position found as a function of pelvis pos and orientation
644
    r0=.L3Seg.L2L3JntNode.sRel*.L3Seg.Axes0'+.L3Seg.r0-L2L3JntNode.sRel*Axes0'; 
645
    
646
    // This file includes the trunk specifc scaling function
647
    // and anatomical reference system
648
    AnyFunTransform3D &GeomScale = ..Scaling.GeometricalScaling.L2Seg.ScaleFunction;
649
    #include "TrunkScalingAndAnatomicalFrame.any"
650
    AnyRefNode MoCapMarkerFrameAMMR24 = {}; ///< For backwards Compatibility with AMMR 2.4 MoCap Marker protocols
651
652
    AnyFunTransform3D &ScaleAbdominal =..ScalingTrunk.Lumbar.ScaleFunction;
653
    
654
    AnyVar MassS = ..Scaling.MassScaling.Lumbar.MassScale;
655
  
656
    AnyVar MassStandard = ..StandardParameters.Lumbar.Mass/5;
657
    Mass = MassS*MassStandard;
658
    
659
     Jii = {0.001,0.001,0.001};
660
    
661
    sCoM = Scale(StdPar.sCoM_pos);
662
    JaboutCoMOnOff = On;
663
664
    AnyRefNode L2L3JntNode = {sRel = .Scale(.StdPar.L2L3JntNode_pos);};    
665
    AnyRefNode L1L2JntNode = {
666
      sRel = .Scale(.StdPar.L1L2JntNode_pos); 
667
       AnyDrawNodes DrwNode = {Visible ??=..DrwSTL.Visible; ScaleXYZ = 0.003*{1,1,1};RGB = {1,0,0};};
668
      // Rotated node with x axis parallel to the superior endplate surface
669
      AnyRefNode RotNode = {
670
        ARel = RotMat(0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel),
671
                      ..SuperiorEndplateAnteriorNode.sRel,
672
                      0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel) + (..SuperiorEndplateNodeL.sRel - ..SuperiorEndplateNodeR.sRel))*RotMat(pi/2,x);
673
      };
674
    };
675
    
676
    // Nodes at the anterior and posterior points on the superior endplate
677
    AnyRefNode SuperiorEndplateAnteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplateAnteriorNode_pos);};
678
    AnyRefNode SuperiorEndplatePosteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplatePosteriorNode_pos);};
679
    
680
    // Nodes at the right and left points on the superior endplate
681
    AnyRefNode SuperiorEndplateNodeR = {sRel = .Scale(.StdPar.Right.SuperiorEndplateNode_pos);};
682
    AnyRefNode SuperiorEndplateNodeL = {sRel = .Scale(.StdPar.Left.SuperiorEndplateNode_pos);};
683
    
684
    //These nodes are used for adding extra used by other body parts to the right 
685
    //and left side of the segment
686
    AnyRefNode Right = {AnyFunTransform3D&Scale=.Scale;};
687
    AnyRefNode Left = {AnyFunTransform3D&Scale=.Scale;};
688
    
689
    
690
    // Ligament Nodes    
691
    AnyRefNode LSNode = {sRel = .Scale(.StdPar.LSNode_pos);};
692
    AnyRefNode LSNode2 = {sRel = .Scale(.StdPar.LSNode2_pos);};
693
    
694
    AnyRefNode LINodeInferior = {sRel = .Scale(.StdPar.LINodeInferior_pos);};
695
    AnyRefNode LINodeSuperior = {sRel = .Scale(.StdPar.LINodeSuperior_pos);};
696
    // End of ligament Nodes
697
    
698
    // Multifidi Nodes
699
    AnyRefNode MFdL2L4NodeR = {sRel = .Scale(.StdPar.Right.MFdL2L4Node_pos);};
700
    AnyRefNode MFdL2L4NodeL = {sRel = .Scale(.StdPar.Left.MFdL2L4Node_pos);};
701
                                                   
702
    AnyRefNode MFmL2L5NodeR = {sRel = .Scale(.StdPar.Right.MFmL2L5Node_pos);};
703
    AnyRefNode MFmL2L5NodeL = {sRel = .Scale(.StdPar.Left.MFmL2L5Node_pos);};
704
    
705
    AnyRefNode MFtsL2L5NodeR = {sRel = .Scale(.StdPar.Right.MFtsL2L5Node_pos);};
706
    AnyRefNode MFtsL2L5NodeL = {sRel = .Scale(.StdPar.Left.MFtsL2L5Node_pos);};
707
                                                    
708
    AnyRefNode MFtsL2S1NodeR = {sRel = .Scale(.StdPar.Right.MFtsL2S1Node_pos);};
709
    AnyRefNode MFtsL2S1NodeL = {sRel = .Scale(.StdPar.Left.MFtsL2S1Node_pos);};
710
    
711
    AnyRefNode MFtstL2SIPSNodeR = {sRel = .Scale(.StdPar.Right.MFtstL2SIPSNode_pos);};
712
    AnyRefNode MFtstL2SIPSNodeL = {sRel = .Scale(.StdPar.Left.MFtstL2SIPSNode_pos);};
713
    // End of Multifidi Nodes
714
    
715
    // Erector Spinae Nodes
716
    AnyRefNode ILplL2CINodeR = {sRel = .Scale(.StdPar.Right.ILplL2CINode_pos);};
717
    AnyRefNode ILplL2CINodeL = {sRel = .Scale(.StdPar.Left.ILplL2CINode_pos);};
718
    
719
    AnyRefNode LTplL2SIPSNodeR = {sRel = .Scale(.StdPar.Right.LTplL2SIPSNode_pos);};
720
    AnyRefNode LTplL2SIPSNodeL = {sRel = .Scale(.StdPar.Left.LTplL2SIPSNode_pos);};
721
    
722
    AnyRefNode LTptT2L2NodeR = {sRel = .Scale(.StdPar.Right.LTptT2L2Node_pos);};
723
    AnyRefNode LTptT2L2NodeL = {sRel = .Scale(.StdPar.Left.LTptT2L2Node_pos);};
724
    
725
    AnyRefNode ILplL1CIViaNodeR = {sRel = .Scale(.StdPar.Right.ILplL1CIViaNode_pos);};
726
    AnyRefNode ILplL1CIViaNodeL = {sRel = .Scale(.StdPar.Left.ILplL1CIViaNode_pos);}; 
727
    
728
    AnyRefNode LTplL1SIPSViaNodeR = {sRel = .Scale(.StdPar.Right.LTplL1SIPSViaNode_pos);};
729
    AnyRefNode LTplL1SIPSViaNodeL = {sRel = .Scale(.StdPar.Left.LTplL1SIPSViaNode_pos);};
730
    
731
    AnyRefNode ILptC5SIPSVia8NodeR = {sRel = .Scale(.StdPar.Right.ILptC5SIPSVia8Node_pos);};
732
    AnyRefNode ILptC5SIPSVia8NodeL = {sRel = .Scale(.StdPar.Left.ILptC5SIPSVia8Node_pos);};
733
                                                          
734
    AnyRefNode ILptC6SIPSVia7NodeR = {sRel = .Scale(.StdPar.Right.ILptC6SIPSVia7Node_pos);};
735
    AnyRefNode ILptC6SIPSVia7NodeL = {sRel = .Scale(.StdPar.Left.ILptC6SIPSVia7Node_pos);};
736
    
737
    AnyRefNode ILptC7CIVia6NodeR = {sRel = .Scale(.StdPar.Right.ILptC7CIVia6Node_pos);};
738
    AnyRefNode ILptC7CIVia6NodeL = {sRel = .Scale(.StdPar.Left.ILptC7CIVia6Node_pos);};
739
                                                        
740
    AnyRefNode ILptC8CIVia5NodeR = {sRel = .Scale(.StdPar.Right.ILptC8CIVia5Node_pos);};
741
    AnyRefNode ILptC8CIVia5NodeL = {sRel = .Scale(.StdPar.Left.ILptC8CIVia5Node_pos);};
742
                                                        
743
    AnyRefNode ILptC9CIVia4NodeR = {sRel = .Scale(.StdPar.Right.ILptC9CIVia4Node_pos);};
744
    AnyRefNode ILptC9CIVia4NodeL = {sRel = .Scale(.StdPar.Left.ILptC9CIVia4Node_pos);};
745
    
746
    AnyRefNode ILptC10CIVia3NodeR = {sRel = .Scale(.StdPar.Right.ILptC10CIVia3Node_pos);};
747
    AnyRefNode ILptC10CIVia3NodeL = {sRel = .Scale(.StdPar.Left.ILptC10CIVia3Node_pos);};
748
                                                         
749
    AnyRefNode ILptC11CIVia2NodeR = {sRel = .Scale(.StdPar.Right.ILptC11CIVia2Node_pos);};
750
    AnyRefNode ILptC11CIVia2NodeL = {sRel = .Scale(.StdPar.Left.ILptC11CIVia2Node_pos);};
751
                                                         
752
    AnyRefNode ILptC12CIVia2NodeR = {sRel = .Scale(.StdPar.Right.ILptC12CIVia2Node_pos);};
753
    AnyRefNode ILptC12CIVia2NodeL = {sRel = .Scale(.StdPar.Left.ILptC12CIVia2Node_pos);};
754
                                                         
755
    AnyRefNode LTptT3L3Via11NodeR = {sRel = .Scale(.StdPar.Right.LTptT3L3Via11Node_pos);};
756
    AnyRefNode LTptT3L3Via11NodeL = {sRel = .Scale(.StdPar.Left.LTptT3L3Via11Node_pos);};
757
                                                         
758
    AnyRefNode LTptT4L4Via10NodeR = {sRel = .Scale(.StdPar.Right.LTptT4L4Via10Node_pos);};
759
    AnyRefNode LTptT4L4Via10NodeL = {sRel = .Scale(.StdPar.Left.LTptT4L4Via10Node_pos);};
760
    
761
    AnyRefNode LTptT5L5Via9NodeR = {sRel = .Scale(.StdPar.Right.LTptT5L5Via9Node_pos);};
762
    AnyRefNode LTptT5L5Via9NodeL = {sRel = .Scale(.StdPar.Left.LTptT5L5Via9Node_pos);};
763
                                                        
764
    AnyRefNode LTptT6S1Via8NodeR = {sRel = .Scale(.StdPar.Right.LTptT6S1Via8Node_pos);};
765
    AnyRefNode LTptT6S1Via8NodeL = {sRel = .Scale(.StdPar.Left.LTptT6S1Via8Node_pos);};
766
                                                        
767
    AnyRefNode LTptT7S2Via7NodeR = {sRel = .Scale(.StdPar.Right.LTptT7S2Via7Node_pos);};
768
    AnyRefNode LTptT7S2Via7NodeL = {sRel = .Scale(.StdPar.Left.LTptT7S2Via7Node_pos);};
769
                                                        
770
    AnyRefNode LTptT8S3Via6NodeR = {sRel = .Scale(.StdPar.Right.LTptT8S3Via6Node_pos);};
771
    AnyRefNode LTptT8S3Via6NodeL = {sRel = .Scale(.StdPar.Left.LTptT8S3Via6Node_pos);};
772
                                                        
773
    AnyRefNode LTptT9S4Via5NodeR = {sRel = .Scale(.StdPar.Right.LTptT9S4Via5Node_pos);};
774
    AnyRefNode LTptT9S4Via5NodeL = {sRel = .Scale(.StdPar.Left.LTptT9S4Via5Node_pos);};
775
    
776
    AnyRefNode LTptT10SacrumVia4NodeR = {sRel = .Scale(.StdPar.Right.LTptT10SacrumVia4Node_pos);};
777
    AnyRefNode LTptT10SacrumVia4NodeL = {sRel = .Scale(.StdPar.Left.LTptT10SacrumVia4Node_pos);};
778
                                                             
779
    AnyRefNode LTptT11SacrumVia3NodeR = {sRel = .Scale(.StdPar.Right.LTptT11SacrumVia3Node_pos);};
780
    AnyRefNode LTptT11SacrumVia3NodeL = {sRel = .Scale(.StdPar.Left.LTptT11SacrumVia3Node_pos);};
781
                                                             
782
    AnyRefNode LTptT12SacrumVia2NodeR = {sRel = .Scale(.StdPar.Right.LTptT12SacrumVia2Node_pos);};
783
    AnyRefNode LTptT12SacrumVia2NodeL = {sRel = .Scale(.StdPar.Left.LTptT12SacrumVia2Node_pos);};
784
    // End of Erector Spinae Nodes
785
    
786
    // Psoas Major Nodes
787
    AnyRefNode PML2I_TMNodeR = {sRel = .Scale(.StdPar.Right.PML2I_TMNode_pos);};
788
    AnyRefNode PML2I_TMNodeL = {sRel = .Scale(.StdPar.Left.PML2I_TMNode_pos);};
789
    
790
    AnyRefNode PML2T_TMNodeR = {sRel = .Scale(.StdPar.Right.PML2T_TMNode_pos);};
791
    AnyRefNode PML2T_TMNodeL = {sRel = .Scale(.StdPar.Left.PML2T_TMNode_pos);};
792
    
793
    AnyRefNode PMT12I_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PMT12I_TMVia1Node_pos);};
794
    AnyRefNode PMT12I_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PMT12I_TMVia1Node_pos);}; 
795
    
796
    AnyRefNode PML1T_TMVia1NodeR = {sRel = .Scale(.StdPar.Right.PML1T_TMVia1Node_pos);};
797
    AnyRefNode PML1T_TMVia1NodeL = {sRel = .Scale(.StdPar.Left.PML1T_TMVia1Node_pos);}; 
798
    // End of Psoas Major Nodes
799
    
800
    // Quadratus Lumborum Nodes
801
    AnyRefNode QLL2_CINodeR = {sRel = .Scale(.StdPar.Right.QLL2_CINode_pos);};
802
    AnyRefNode QLL2_CINodeL = {sRel = .Scale(.StdPar.Left.QLL2_CINode_pos);}; 
803
    // End of Quadratus Lumborum Nodes
804
    
805
    // Obliquus Externus Nodes
806
    AnyRefNode OEC7_RSNodeR = {sRel = .Scale(.StdPar.Right.OEC7_RSNode_pos);};
807
    AnyRefNode OEC7_RSNodeL = {sRel = .Scale(.StdPar.Left.OEC7_RSNode_pos);};    
808
    // End of Obliquus Externus Nodes
809
    
810
    // Obliquus Internus Nodes
811
    AnyRefNode OICI_RS1NodeR = {sRel = .Scale(.StdPar.Right.OICI_RS1Node_pos);};
812
    AnyRefNode OICI_RS1NodeL = {sRel = .Scale(.StdPar.Left.OICI_RS1Node_pos);};  
813
    // End of Obliquus Internus Nodes
814
    
815
    AnyDrawSurf DrwSTL = {
816
      FileName = ...STL.FilenameL2Seg;
817
      RGB = ...ColorRef.Segments;
818
      Opacity = Main.DrawSettings.BonesOpacity.L2;
819
      AnyFunTransform3D &Scale =.Scale;
820
    };
821
    
822
    AnyRefNode MidPoint={sRel=(.L1L2JntNode.sRel+.L2L3JntNode.sRel)*0.5;}; 
823
    AnyRefNode SupportNode={sRel = .Scale(.StdPar.SupportNode_pos);};
824
    AnyRefNode BuckleContactNode={sRel = .ScaleAbdominal(.StdPar.BuckleContactNode_pos);};
825
826
  }; // End of L2Seg
827
828
  AnySeg L1Seg = {
829
    
830
    // Reference to generic data
831
    AnyFolder &StdPar = ..ModelParameters.L1;
832
833
    //initial position found as a function of pelvis pos and orientation
834
    r0=.L2Seg.L1L2JntNode.sRel*.L2Seg.Axes0'+.L2Seg.r0-L1L2JntNode.sRel*Axes0';
835
         
836
    // This file includes the trunk specifc scaling function
837
    // and anatomical reference system
838
    AnyFunTransform3D &GeomScale = ..Scaling.GeometricalScaling.L1Seg.ScaleFunction;
839
    #include "TrunkScalingAndAnatomicalFrame.any"
840
    AnyRefNode MoCapMarkerFrameAMMR24 = {}; ///< For backwards Compatibility with AMMR 2.4 MoCap Marker protocols
841
    
842
    AnyFunTransform3D &ScaleAbdominal =..ScalingTrunk.Lumbar.ScaleFunction;   
843
    
844
    AnyVar MassS = ..Scaling.MassScaling.Lumbar.MassScale;
845
  
846
    AnyVar MassStandard = ..StandardParameters.Lumbar.Mass/5;
847
    Mass = MassS*MassStandard;
848
    
849
    Jii = {0.001,0.001,0.001};
850
    
851
    sCoM = Scale(StdPar.sCoM_pos);
852
    JaboutCoMOnOff = On;
853
    
854
    AnyRefNode L1L2JntNode = {sRel = .Scale(.StdPar.L1L2JntNode_pos);};    
855
    AnyRefNode T12L1JntNode = {
856
      sRel = .Scale(.StdPar.T12L1JntNode_pos); 
857
       AnyDrawNodes DrwNode = {Visible ??=..DrwSTL.Visible; ScaleXYZ = 0.003*{1,1,1};RGB = {1, 0, 0};};
858
      // Rotated node with x axis parallel to the superior endplate surface
859
      AnyRefNode RotNode = {
860
        ARel = RotMat(0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel),
861
                      ..SuperiorEndplateAnteriorNode.sRel,
862
                      0.5*(..SuperiorEndplateAnteriorNode.sRel + ..SuperiorEndplatePosteriorNode.sRel) + (..SuperiorEndplateNodeL.sRel - ..SuperiorEndplateNodeR.sRel))*RotMat(pi/2,x);
863
      };
864
    };
865
    
866
    // Nodes at the anterior and posterior points on the superior endplate
867
    AnyRefNode SuperiorEndplateAnteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplateAnteriorNode_pos);};
868
    AnyRefNode SuperiorEndplatePosteriorNode = {sRel = .Scale(.StdPar.SuperiorEndplatePosteriorNode_pos);};
869
    
870
    // Nodes at the right and left points on the superior endplate
871
    AnyRefNode SuperiorEndplateNodeR = {sRel = .Scale(.StdPar.Right.SuperiorEndplateNode_pos);};
872
    AnyRefNode SuperiorEndplateNodeL = {sRel = .Scale(.StdPar.Left.SuperiorEndplateNode_pos);};
873
    
874
    //These nodes are used for adding extra used by other body parts to the right 
875
    //and left side of the segment
876
    AnyRefNode Right= {AnyFunTransform3D&Scale=.Scale;};
877
    AnyRefNode Left = {AnyFunTransform3D&Scale=.Scale;};
878
        
879
    
880
    // Ligament Nodes    
881
    AnyRefNode LSNode = {sRel = .Scale(.StdPar.LSNode_pos);};
882
    
883
    AnyRefNode LINodeInferior = {sRel = .Scale(.StdPar.LINodeInferior_pos);};
884
    AnyRefNode LINodeSuperior = {sRel = .Scale(.StdPar.LINodeSuperior_pos);};
885
    // End of ligament Nodes
886
    
887
    // Multifidi Nodes
888
    AnyRefNode MFdL1L3NodeR = {sRel = .Scale(.StdPar.Right.MFdL1L3Node_pos);};
889
    AnyRefNode MFdL1L3NodeL = {sRel = .Scale(.StdPar.Left.MFdL1L3Node_pos);};
890
    
891
    AnyRefNode MFmL1L4NodeR = {sRel = .Scale(.StdPar.Right.MFmL1L4Node_pos);};
892
    AnyRefNode MFmL1L4NodeL = {sRel = .Scale(.StdPar.Left.MFmL1L4Node_pos);};
893
    
894
    AnyRefNode MFtsL1L5NodeR = {sRel = .Scale(.StdPar.Right.MFtsL1L5Node_pos);};
895
    AnyRefNode MFtsL1L5NodeL = {sRel = .Scale(.StdPar.Left.MFtsL1L5Node_pos);};
896
    
897
    AnyRefNode MFtsL1S1NodeR = {sRel = .Scale(.StdPar.Right.MFtsL1S1Node_pos);};
898
    AnyRefNode MFtsL1S1NodeL = {sRel = .Scale(.StdPar.Left.MFtsL1S1Node_pos);};
899
    
900
    AnyRefNode MFtstL1SIPSNodeR = {sRel = .Scale(.StdPar.Right.MFtstL1SIPSNode_pos);};
901
    AnyRefNode MFtstL1SIPSNodeL = {sRel = .Scale(.StdPar.Left.MFtstL1SIPSNode_pos);};
902
    // End of Multifidi Nodes
903
    
904
    // Erector Spinae Nodes
905
    AnyRefNode ILplL1CINodeR = {sRel = .Scale(.StdPar.Right.ILplL1CINode_pos);};
906
    AnyRefNode ILplL1CINodeL = {sRel = .Scale(.StdPar.Left.ILplL1CINode_pos);};
907
908
    AnyRefNode LTplL1SIPSNodeR = {sRel = .Scale(.StdPar.Right.LTplL1SIPSNode_pos);};
909
    AnyRefNode LTplL1SIPSNodeL = {sRel = .Scale(.StdPar.Left.LTplL1SIPSNode_pos);};
910
911
    AnyRefNode LTptT1L1NodeR = {sRel = .Scale(.StdPar.Right.LTptT1L1Node_pos);};
912
    AnyRefNode LTptT1L1NodeL = {sRel = .Scale(.StdPar.Left.LTptT1L1Node_pos);};
913
    
914
    AnyRefNode ILptC5SIPSVia7NodeR = {sRel = .Scale(.StdPar.Right.ILptC5SIPSVia7Node_pos);};
915
    AnyRefNode ILptC5SIPSVia7NodeL = {sRel = .Scale(.StdPar.Left.ILptC5SIPSVia7Node_pos);};
916
    
917
    AnyRefNode ILptC6SIPSVia6NodeR = {sRel = .Scale(.StdPar.Right.ILptC6SIPSVia6Node_pos);};
918
    AnyRefNode ILptC6SIPSVia6NodeL = {sRel = .Scale(.StdPar.Left.ILptC6SIPSVia6Node_pos);};
919
    
920
    AnyRefNode ILptC7CIVia5NodeR = {sRel = .Scale(.StdPar.Right.ILptC7CIVia5Node_pos);};
921
    AnyRefNode ILptC7CIVia5NodeL = {sRel = .Scale(.StdPar.Left.ILptC7CIVia5Node_pos);};
922
    
923
    AnyRefNode ILptC8CIVia4NodeR = {sRel = .Scale(.StdPar.Right.ILptC8CIVia4Node_pos);};
924
    AnyRefNode ILptC8CIVia4NodeL = {sRel = .Scale(.StdPar.Left.ILptC8CIVia4Node_pos);};
925
    
926
    AnyRefNode ILptC9CIVia3NodeR = {sRel = .Scale(.StdPar.Right.ILptC9CIVia3Node_pos);};
927
    AnyRefNode ILptC9CIVia3NodeL = {sRel = .Scale(.StdPar.Left.ILptC9CIVia3Node_pos);};
928
    
929
    AnyRefNode ILptC10CIVia2NodeR = {sRel= .Scale(.StdPar.Right.ILptC10CIVia2Node_pos);};
930
    AnyRefNode ILptC10CIVia2NodeL = {sRel= .Scale(.StdPar.Left.ILptC10CIVia2Node_pos);};
931
932
    AnyRefNode ILptC11CIVia1NodeR = {sRel= .Scale(.StdPar.Right.ILptC11CIVia1Node_pos);};
933
    AnyRefNode ILptC11CIVia1NodeL = {sRel= .Scale(.StdPar.Left.ILptC11CIVia1Node_pos);};
934
935
    AnyRefNode ILptC12CIVia1NodeR = {sRel= .Scale(.StdPar.Right.ILptC12CIVia1Node_pos);};
936
    AnyRefNode ILptC12CIVia1NodeL = {sRel= .Scale(.StdPar.Left.ILptC12CIVia1Node_pos);};
937
938
    AnyRefNode LTptT2L2Via11NodeR = {sRel= .Scale(.StdPar.Right.LTptT2L2Via11Node_pos);};
939
    AnyRefNode LTptT2L2Via11NodeL = {sRel= .Scale(.StdPar.Left.LTptT2L2Via11Node_pos);};
940
941
    AnyRefNode LTptT3L3Via10NodeR = {sRel= .Scale(.StdPar.Right.LTptT3L3Via10Node_pos);};
942
    AnyRefNode LTptT3L3Via10NodeL = {sRel= .Scale(.StdPar.Left.LTptT3L3Via10Node_pos);};
943
944
    AnyRefNode LTptT4L4Via9NodeR = {sRel = .Scale(.StdPar.Right.LTptT4L4Via9Node_pos);};
945
    AnyRefNode LTptT4L4Via9NodeL = {sRel = .Scale(.StdPar.Left.LTptT4L4Via9Node_pos);};
946
                                   
947
    AnyRefNode LTptT5L5Via8NodeR = {sRel = .Scale(.StdPar.Right.LTptT5L5Via8Node_pos);};
948
    AnyRefNode LTptT5L5Via8NodeL = {sRel = .Scale(.StdPar.Left.LTptT5L5Via8Node_pos);};
949
                                   
950
    AnyRefNode LTptT6S1Via7NodeR = {sRel = .Scale(.StdPar.Right.LTptT6S1Via7Node_pos);};
951
    AnyRefNode LTptT6S1Via7NodeL = {sRel = .Scale(.StdPar.Left.LTptT6S1Via7Node_pos);};
952
                                   
953
    AnyRefNode LTptT7S2Via6NodeR = {sRel = .Scale(.StdPar.Right.LTptT7S2Via6Node_pos);};
954
    AnyRefNode LTptT7S2Via6NodeL = {sRel = .Scale(.StdPar.Left.LTptT7S2Via6Node_pos);};
955
                                   
956
    AnyRefNode LTptT8S3Via5NodeR = {sRel = .Scale(.StdPar.Right.LTptT8S3Via5Node_pos);};
957
    AnyRefNode LTptT8S3Via5NodeL = {sRel = .Scale(.StdPar.Left.LTptT8S3Via5Node_pos);};
958
                                   
959
    AnyRefNode LTptT9S4Via4NodeR = {sRel = .Scale(.StdPar.Right.LTptT9S4Via4Node_pos);};
960
    AnyRefNode LTptT9S4Via4NodeL = {sRel = .Scale(.StdPar.Left.LTptT9S4Via4Node_pos);};
961
    
962
    AnyRefNode LTptT10SacrumVia3NodeR = {sRel = .Scale(.StdPar.Right.LTptT10SacrumVia3Node_pos);};
963
    AnyRefNode LTptT10SacrumVia3NodeL = {sRel = .Scale(.StdPar.Left.LTptT10SacrumVia3Node_pos);};
964
                                        
965
    AnyRefNode LTptT11SacrumVia2NodeR = {sRel = .Scale(.StdPar.Right.LTptT11SacrumVia2Node_pos);};
966
    AnyRefNode LTptT11SacrumVia2NodeL = {sRel = .Scale(.StdPar.Left.LTptT11SacrumVia2Node_pos);};
967
                                        
968
    AnyRefNode LTptT12SacrumVia1NodeR = {sRel = .Scale(.StdPar.Right.LTptT12SacrumVia1Node_pos);};
969
    AnyRefNode LTptT12SacrumVia1NodeL = {sRel = .Scale(.StdPar.Left.LTptT12SacrumVia1Node_pos);};
970
    // End of Erector Spinae Nodes
971
    
972
    // Psoas Major Nodes
973
    AnyRefNode PML1I_TMNodeR = {sRel = .Scale(.StdPar.Right.PML1I_TMNode_pos);};
974
    AnyRefNode PML1I_TMNodeL = {sRel = .Scale(.StdPar.Left.PML1I_TMNode_pos);};
975
    
976
    AnyRefNode PML1T_TMNodeR = {sRel = .Scale(.StdPar.Right.PML1T_TMNode_pos);};
977
    AnyRefNode PML1T_TMNodeL = {sRel = .Scale(.StdPar.Left.PML1T_TMNode_pos);};
978
    // End of Psoas Major Nodes
979
    
980
    // Quadratus Lumborum Nodes
981
    AnyRefNode QLL1_CINodeR = {sRel = .Scale(.StdPar.Right.QLL1_CINode_pos);};
982
    AnyRefNode QLL1_CINodeL = {sRel = .Scale(.StdPar.Left.QLL1_CINode_pos);};
983
    // End of Quadratus Lumborum Nodes
984
    
985
    AnyDrawSurf DrwSTL = {
986
      FileName = ...STL.FilenameL1Seg;
987
      RGB = ...ColorRef.Segments;
988
      Opacity = Main.DrawSettings.BonesOpacity.L1;
989
      AnyFunTransform3D &Scale =.Scale;
990
    };
991
    
992
    AnyRefNode MidPoint={sRel=(.L1L2JntNode.sRel+.T12L1JntNode.sRel)*0.5;}; 
993
    AnyRefNode SupportNode={sRel = .Scale(.StdPar.SupportNode_pos);};      
994
    AnyRefNode BuckleContactNode={sRel = .ScaleAbdominal(.StdPar.BuckleContactNode_pos);};
995
  }; // End of L1Seg
996
}; // End of SegmentsLumbar