<!DOCTYPE OMNotebook>
<Notebook>
 <GroupCell closed="false" >
  <GroupCell closed="false" >
   <TextCell style="Title" >
    <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Arial; font-size:38pt; font-weight:600; color:#000000;">Kinematic Loops&lt;/p>&lt;/body>&lt;/html></Text>
   </TextCell>
   <TextCell style="Text" >
    <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Times New Roman; font-size:12pt; color:#000000;">&lt;br />The chain consisting of joints and coordinate transforms may form a loop, also called closed &lt;span style=" font-style:italic;">kinematic loop&lt;/span>. In order to handle such loops correctly, special joints from &lt;span style=" font-family:Courier New;">CutJoints&lt;/span> library are used. In order to make possible for the user to specify valid initial state for such mechanical system, a hint can be given to the translator, and a joint with state variable is selected. The parameter &lt;span style=" font-family:Courier New;">startValueFixed&lt;/span> is set to &lt;span style=" font-family:Courier New;">true&lt;/span> for this purpose. The example below shows a system with a single closed kinematic loop. The upper bar (a cylinder with small radius) is fixed; three other bars are connected by revolute joints. The whole system behaves like a pendulum.&lt;br />&lt;br />&lt;/p>&lt;/body>&lt;/html></Text>
   </TextCell>
   <TextCell style="Text" >
    <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Times New Roman; font-size:12pt; color:#000000;">&lt;img src="file:///C:/OpenModelica132/bin/OMNoteboook_tempfiles/1.png" width="304" height="209" />&lt;/p>&lt;/body>&lt;/html></Text>
    <Image name="file:///C:/OpenModelica132/bin/OMNoteboook_tempfiles/1.png" >[encoded data, 16520 characters]</Image>
   </TextCell>
   <InputCell style="Input" closed="true" >
    <Input>class RevoluteLoop2D
  import ModelicaAdditions.MultiBody.Parts;
  import ModelicaAdditions.MultiBody.Joints;
  import ModelicaAdditions.MultiBody.CutJoints;
  Parts.InertialSystem InertialSystem1;
  Parts.CylinderBody   cylinderBody1(r = {1, 0, 0}, Radius = 0.02,
                                   Material = {0.5, 0.5, 0, 0});
  Joints.Revolute      revolute1(startValueFixed = true, q(start = -1.0));
  Parts.CylinderBody   cylinderBody2(r = {0, -1, 0});
  Joints.Revolute      revolute2;
  Parts.CylinderBody   cylinderBody3(r = {-1, 0, 0}, Material = {0,1, 0, 0.5});
  Joints.Revolute      revolute3;
  Parts.CylinderBody   cylinderBody4(r = {0, 1, 0});
  CutJoints.Revolute2Dloop revolute2Dloop1;
equation 
  connect(InertialSystem1.frame_b, cylinderBody1.frame_a);
  connect(cylinderBody1.frame_b,   revolute1.frame_a);
  connect(revolute1.frame_b,       cylinderBody2.frame_a);
  connect(InertialSystem1.frame_b, revolute3.frame_a);
  connect(revolute3.frame_b,       cylinderBody4.frame_a);
  connect(cylinderBody2.frame_b,   revolute2.frame_a);
  connect(cylinderBody3.frame_a,   revolute2.frame_b);
  connect(revolute2Dloop1.frame_b, cylinderBody3.frame_b);
  connect(cylinderBody4.frame_b,   revolute2Dloop1.frame_a);
end RevoluteLoop2D;
</Input>
    <Output></Output>
   </InputCell>
   <GroupCell closed="false" >
    <TextCell style="Section" >
     <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Times; font-size:18pt; font-weight:600; color:#000000;">Simulation of RevoluteLoop2D&lt;/p>&lt;/body>&lt;/html></Text>
    </TextCell>
    <InputCell style="Input" closed="true" >
     <Input>simulate( RevoluteLoop2D, stopTime=10 );</Input>
     <Output></Output>
    </InputCell>
    <TextCell style="Output" >
     <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:11pt; color:#000000;">&lt;/p>&lt;/body>&lt;/html></Text>
    </TextCell>
    <InputCell style="Input" closed="true" >
     <Input>plot( cylinderBody3.body.frame_a.r0[2] );</Input>
     <Output>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:11pt; color:#000000;">&lt;/p>&lt;/body>&lt;/html></Output>
    </InputCell>
    <TextCell style="Output" >
     <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:11pt; color:#000000;">&lt;img src="file:///C:/OpenModelica132/bin/OMNoteboook_tempfiles/2.png" width="288" height="214" />&lt;/p>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6zlQYgRb048oMqphlALVUywD1IuiIVDytZhqCuoVxEABnpvPdAbiopgKxNX0VCCu9kiArvNxtUcA5C8htMnQNMkKWoNNzjAgXjY5k4EYMOUoAurFJkc9UD2bnA5nMd5NW0H5m7k+LwDCR5uYlYCePl+L0QlUf+paBqgtRR+gQWexERRKVtA8iolAbE13A7r/7I7fCIZGGIBSV3dcZmRrbxRQ5OqO20d/RoHWYBOTsYK80xgG0sYmpu4QW4NNjHR1x9NDTBubmNzT/FigsWxiNAH1YhOjH6ieTUzuazGGpnuxiVl1BYFqts/6QHeKlwDlNP0SoNYUioHGUHQBan0Wm0lBtoL4KKYB8TU9DYivPRKg75x87VEDrcEmJfssVgKkjU1KlxWkjU3KdCAGNimkQGPZpKgC6sUmZQGgB2z5PiPPYlOqPkW8KmSdFZRH8QqgGopqoOgns1wnVU5RC5R+61ld062BIp/MUgvESNFyBX0Psfs/KSqnaAq0Xy9eoGhkPlD8k1kuczO2NxRIGBEFWoNNSB8gbWxCRgLxYgrJfy02FmgsmxDWFTSWTcgKQPWYQhYHCiXi1XSWAcqlWAqorulhQCPOYuMoiFbQ7KanAM1uxIAmVdMxIBADAik8i81uhBKo984xVNMxIJACoM+8sxtRCFRSZaCgBuLFTKfgLDYWaCxmOrQrqLAa67mkmgwzUG3T5EAj26MBmt9Id6DgrWZpsD9ii059rbpoNTHD7zVMRiOuYOzuCsbeCZxzziVv9eO8bJtfmVCNFRtUXQKkaAW9Ic5fUjn3eFXuR5gBoRgQyMvbx2kL5IqmKxntygaXjZTGNwXyzwBodNHgPrvh0PjGh1hZy/mjixZQydIcDFTWRUHXZZq0K6h0sj49MwOVHgkFT6ZdDrFjFQ97kl4xBgRiQCAGBGJAIAYEYkAgBgRiQCAGBGJAIAYEYkAgBgTyD9VS0A6V2ywDAAAAAElFTkSuQmCC</Image>
    </TextCell>
    <InputCell style="Input" closed="true" >
     <Input>plot( cylinderBody3.body.frame_a.r0[1] );</Input>
     <Output>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:11pt; color:#000000;">&lt;/p>&lt;/body>&lt;/html></Output>
    </InputCell>
    <TextCell style="Output" >
     <Text>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:11pt; color:#000000;">&lt;img src="file:///C:/OpenModelica132/bin/OMNoteboook_tempfiles/3.png" width="288" height="214" />&lt;/p>&lt;/body>&lt;/html></Text>
     <Image name="file:///C:/OpenModelica132/bin/OMNoteboook_tempfiles/3.png" >AAAAAYlQTkcNChoKAAAADUlIRFIAAAEgAAAA1ggDAAAARuGvAgAAAwBQTFRFAAAAAAD/2dnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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