Kinematic and Dynamic Analysis of Spatial Six Degree of Freedom ...
Kinematic and Dynamic Analysis of Spatial Six Degree of Freedom ...
Kinematic and Dynamic Analysis of Spatial Six Degree of Freedom ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
A.1.1 CASSoM Source Code<br />
Like all visual programming languages, Delphi creates very long codes. Due to this,<br />
only the engine <strong>of</strong> CASSoM is presented here.<br />
procedure TSynInpForm.DoSynthesis;<br />
var<br />
code : integer;<br />
Cc : real;<br />
J,Jb,JbExtra,P,Lambda,B,Bv,C,Np:integer;<br />
ResultMessage : string;<br />
begin<br />
Lambda := UpDownLambda.Position;<br />
P := UpDownN.Position;<br />
Bv := UpDownW.Position;<br />
Np := UpDownTri.Position * 3 +<br />
UpDownQuad.Position * 4 +<br />
UpDownPenta.Position * 5 +<br />
UpDownHexa.Position * 6;<br />
If 3*P>Np then<br />
begin<br />
showmessage('Invalid platform specification! (Condition 1)');<br />
exit;<br />
end;<br />
If Np > Lambda*P then<br />
begin<br />
showmessage('Invalid platform specification! (Condition 1)');<br />
exit;<br />
end;<br />
Cc := 0.5*(Np - Bv);<br />
If Cc - trunc (Cc) 0 then<br />
begin<br />
showmessage('Invalid platform specification! (Condition 7)');<br />
exit;<br />
end;<br />
C := Trunc (Cc); {# <strong>of</strong> connections between basic(plat.) links}<br />
B := Np - C; {# <strong>of</strong> branches}<br />
J := Lambda * (Np - C - P); {total # <strong>of</strong> pairs}<br />
Jb := J div B; {number <strong>of</strong> pairs in a branch}<br />
JbExtra := J - Jb * B; {total additional # <strong>of</strong> pairs to be put on}<br />
ResultMessage := 'J='+strs(J)+<br />
' | B= '+strs(B)+<br />
' | Jb='+strs(Jb)+<br />
' | Jb Add.='+strs(JbExtra)+<br />
' | C='+strs(C);<br />
Label9.Caption :=ResultMessage;<br />
end;<br />
function TSynInpForm.Strs(I: Longint): string;<br />
{ Convert any integer type to a string }<br />
var<br />
S: string[11];<br />
begin<br />
Str(I, S);<br />
Result:= S;<br />
end;<br />
71