import ghpythonlib.components as ghcomp import rhinoscriptsyntax as rs point=ghcomp.ConstructPoint(0,0,0) count=0 m=0 geo=[] def xpoint(point): x=ghcomp.Deconstruct(point)[0] return x def ypoint(point): y=ghcomp.Deconstruct(point)[1] return y for i in range(64): bit=0^i print point if bit&1!=0: point1=ghcomp.ConstructPoint(xpoint(point)+1,ypoint(point),0) geo.append(ghcomp.Line(point,point1)) if bit&2!=0: point2=ghcomp.ConstructPoint(xpoint(point)+1,ypoint(point)+1,0) geo.append(ghcomp.Line(point,point2)) if bit&4!=0: point3=ghcomp.ConstructPoint(xpoint(point)-1,ypoint(point)+1,0) geo.append(ghcomp.Line(point,point3)) if bit&8!=0: point4=ghcomp.ConstructPoint(xpoint(point)-1,ypoint(point),0) geo.append(ghcomp.Line(point,point4)) if bit&16!=0: point5=ghcomp.ConstructPoint(xpoint(point)-1,ypoint(point)-1,0) geo.append(ghcomp.Line(point,point5)) if bit&32!=0: point6=ghcomp.ConstructPoint(xpoint(point)+1,ypoint(point)-1,0) geo.append(ghcomp.Line(point,point6)) count+=1 point=ghcomp.Move(point,-3*ghcomp.UnitY())[0] print count if count>6: count=0 m+=1 point=ghcomp.ConstructPoint(4*m,0,0) a=geo