2009-10-13 02:10 PM
2009-10-20 03:42 PM
2009-10-20 04:56 PM
2009-10-21 02:54 PM
2009-10-21 03:06 PM
Alexonus wrote:There is no explicit command for it in GDL. You have to do some coordinate geometry then:) You have to compute the actual length and the rotation angle of the cylinder based on the difference of coordinates. A nice task for returning to school memories:)
I would like to build a 3D cylinder having co-ordinates of his beginning and end co-ordinate.
2009-10-24 03:44 PM
ztaskai wrote:I thought there were predefined function for that ^_^Alexonus wrote:There is no explicit command for it in GDL. You have to do some coordinate geometry then:) You have to compute the actual length and the rotation angle of the cylinder based on the difference of coordinates. A nice task for returning to school memories:)
I would like to build a 3D cylinder having co-ordinates of his beginning and end co-ordinate.
2009-10-24 11:39 PM
2009-10-26 03:25 PM
Juha wrote:Good point. I didn't explicitly check it but I think ruled doesn't support curved edges. tube could work though. We usually don't use these commands whenever not absolutely necessary because they are less effective than the simple body generators.
Ruled?
2009-10-27 02:35 PM
ztaskai wrote:The problem with TUBE is that you need a minimum of 4 points for the path (the first and last points are not part of the model itself, but determine the angle of the start and end planes), so this is not as simple a solution as Alexonus is looking for.
tube could work though.
2009-10-27 03:25 PM
David wrote:Exactly. Another reason why we don't use tube much 🙂
The problem with TUBE is that you need a minimum of 4 points for the path (the first and last points are not part of the model itself, but determine the angle of the start and end planes), so this is not as simple a solution as Alexonus is looking for.
2009-10-29 09:06 PM
!--> file names added f1= "ARMDATA.txt" ch1 = open ("TEXT", f1, "separator = 'K'; mode = ro,LIBRARY" ) n = input (ch1, 1, 1,dummy, var1,var2,var3,var4,var5,var6) i = 1 while n > 2 do sum=var1+var2+var3+var4+var5+var6 IF sum=6 THEN i = i+1 n = input (ch1, i, 1, dummy,var7) FOR I=1 TO var7 i = i+1 n = input (ch1, i, 1, dummy,var8,var9) ADDX var9/1000 ROTZ -90 CYLIND var8,0.006 ADDX -var9/1000 ROTZ 90 NEXT I ENDIF IF sum<>6 THEN ADDX var1/1000 ADDY var2/1000 ROTZ var4 IF var4=0 and var2<>var6 THEN ROTZ 90 ROTY 90 CYLIND var3/1000,0.006 ROTY 270 IF var4=0 and var2<>var6 THEN ROTZ -90 ROTZ -var4 LINE2 var1/1000,var2/1000,var5/1000,var6/1000 IF var1>0 THEN ADDX -var1/1000 IF var1<0 THEN ADDX -var1/1000 IF var2>0 THEN ADDY -var2/1000 IF var2<0 THEN ADDY -var2/1000 ENDIF i = i+1 n = input (ch1, i, 1, dummy,var1,var2,var3,var4,var5,var6) endwhile close ch1and my file: