We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2013-05-13 03:30 PM
2013-05-13 03:49 PM
2013-05-13 05:46 PM
2013-05-13 07:42 PM
I have always used line numbers (arbitrarily assigned not actual counted ones) for my GOSUBSs. I am guessing that the string value is not supported. I have never seen this.
2013-05-13 08:19 PM
2013-05-13 09:58 PM
getValues = 1 put 0, 0, 0, a, b, zzyzx DashLength=.1 put DashLength gosub "Dashed Line" END "Dashed Line": !Input: ! - Line end points: (x1, y1, z1~z) and (x2, y2, z2) ! - Dash length: dashLength if getValues then x1 = get(1): y1 = get(1): z1 = get(1) x2 = get(1): y2 = get(1): z2 = get(1) dashLength = get(1) getValues = 0 endif !Return: NONE !Draw a dashed line !Calculate the line length and direction vectors ux = x2 - x1 uy = y2 - y1 uz = z2 - z1 L = sqr(ux^2 + uy^2 + uz^2) ux = ux/L uy = uy/L uz = uz/L !Calculate the length of the first and last dashes nDashes = int(1 + (L + dashLength)/(2*dashLength)) extraLength = (nDashes*(2*dashLength)-dashLength)-L startLength = dashLength - extraLength/2 !Draw the lines add x1, y1, z1 lin_ 0, 0, 0, startLength*ux, startLength*uy, startLength*uz L1 = startLength + dashLength repeat L2 = min(L1 + dashLength, L) lin_ L1*ux, L1*uy, L1*uz, L2*ux, L2*uy, L2*uz L1 = L2 + dashLength until L1 > L del 1 return
2013-05-13 10:21 PM
2013-05-13 10:45 PM
luisfmoreira wrote:I just eliminated errors, as I found them.
Cause u solved the issue really fast !