0001
0002
0003
0004
0005 filename='link0_test.stl';
0006 cyl_radius=0.1;
0007 cyl_height = 0.05;
0008 precision = 20;
0009
0010
0011 [X,Y,Z] = cylinder([cyl_radius], precision);
0012
0013 Z=Z*cyl_height;
0014
0015
0016
0017 X=X+0.4;
0018 Y=Y+0.2;
0019 Z=Z+0.2
0020
0021
0022
0023 surf2stl(filename, X, Y, Z, 'ascii', 'a+');
0024
0025
0026
0027 cyl_radius=0.15;
0028 cyl_height = 0.1;
0029 precision = 4;
0030
0031 [X,Y,Z] = cylinder([cyl_radius], precision);
0032
0033 Z=Z*cyl_height;
0034
0035
0036 X=X+1.0;
0037 Y=Y+0.2;
0038 Z=Z+0.2
0039
0040
0041
0042 surf2stl(filename, X, Y, Z, 'ascii', 'a+');