2013-01-22 03:15 PM
gosub 1 ! Einstellungen usw. gosub 100 ! Hotspots Gosub "Drehungen" !!inkl Art des Stabes end ! ------------------------------------------------------ 1: uid = 1 return 100 : !!! ========== Hotspots ein Segment ========== !!! ----- x ----- hotspot 0 , y, z, uid, x, 1+128 : uid = uid+1 ! base hotspot -1 , y, z, uid, x, 3 : uid = uid+1 ! ref hotspot x , y, z, uid, x, 2 : uid = uid+1 ! move !!! ----- y ----- hotspot x , 0, z, uid, y, 1+128 : uid = uid+1 hotspot x , -1, z, uid, y, 3 : uid = uid+1 hotspot x , y, z, uid, y, 2 : uid = uid+1 !!! ----- z ----- hotspot x , y, 0, uid, z, 1+128 : uid = uid+1 hotspot x , y, -1, uid, z, 3 : uid = uid+1 hotspot x , y, z, uid, z, 2 : uid = uid+1 return "Drehungen": h = SQR(x^2+y^2+z^2) roty 90 rotx -atn(y/x) roty -atn(z/SQR(x^2+y^2)) material Mat if ArtDesStabes = "Zylinder mit Endkugeln" gosub "Zylinder mit Endkugeln" if ArtDesStabes = "Endkugel+Endkegel+Zylinder" gosub "Endkugel+Endkegel+Zylinder" if ArtDesStabes = "quadratischer Stab mit Endkugeln" gosub "quadratischer Stab mit Endkugeln" del 3 if Endkugeln = 1 then sphere Kugeldurchmesser addx x addy y addz z sphere Kugeldurchmesser del 3 else endif return !!!!Ende Drehungen "Zylinder mit Endkugeln": Cylind h, QRadius return "Endkugel+Endkegel+Zylinder": CONE h/3, Verjuengung, QRadius, 90, 90 addz h/3 Cylind h/3, QRadius addz h/3 CONE h/3, QRadius, Verjuengung, 90, 90 del 2 return "quadratischer Stab mit Endkugeln": addx -QRadius/2 addy -QRadius/2 Block QRadius, QRadius, h del 2 return
2013-01-22 04:21 PM
2013-01-22 04:45 PM
2013-01-24 06:51 PM
2013-01-25 10:58 AM
hotspot x*0.5, y*0.5, z*0.5, uid : uid = uid+1 ! halfIs this just Your programming - standard to get a halfpoint - or does it have to do with the XYZ-Interface?
2013-01-25 12:34 PM
2013-01-26 12:25 PM
x2 = (x[k1+1] - x[k1]) !!calculates distances in 3D y2 = (y[k1+1] - y[k1]) z2 = (z[k1+1] - z[k1])Here the Archicad- compiler thinks - the code is i ok.. ?? !! ??
h = SQR(x2^2+y2^2+z2^2)This was the 3D-Diameter..
len2 = sqr(x2^2+y2^2) ! 2D Axis Length len3 = sqr(len2^2+z2^2) ! 3D Axis LengthAnd here too:
if abs(len2) > EPS then zAng = atn(z/len2) endifIt told me (translated by me from German):
2013-01-26 05:21 PM
2013-01-26 07:28 PM
2013-01-26 08:19 PM