Skip to content

Commit

Permalink
0000963: Draft polar array
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 23, 2013
1 parent d3ea50f commit d41b40e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Mod/Draft/Draft.py
Expand Up @@ -3017,10 +3017,16 @@ def rectArray(self,shape,xvector,yvector,zvector,xnum,ynum,znum):
return Part.makeCompound(base)

def polarArray(self,shape,center,angle,num,axis):
print "angle ",angle," num ",num
import Part
fraction = angle/num
if angle == 360:
fraction = angle/num
else:
if num == 0:
return shape
fraction = angle/(num-1)
base = [shape.copy()]
for i in range(num):
for i in range(num-1):
currangle = fraction + (i*fraction)
nshape = shape.copy()
nshape.rotate(DraftVecUtils.tup(center), DraftVecUtils.tup(axis), currangle)
Expand Down

0 comments on commit d41b40e

Please sign in to comment.