Commit d41b40ee authored by Yorik van Havre's avatar Yorik van Havre
Browse files

0000963: Draft polar array

parent d3ea50fd
......@@ -3017,10 +3017,16 @@ class _Array(_DraftObject):
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
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment