Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Fixed a bug with polygon where forConstruction couldn't be passed, wh…
Browse files Browse the repository at this point in the history
…ich caused constructions problems.
  • Loading branch information
jmwright committed Oct 12, 2015
1 parent 552cc31 commit afd186e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cadquery/CQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ def makeCircleWire(obj):

return self.eachpoint(makeCircleWire, useLocalCoordinates=True)

def polygon(self, nSides, diameter):
def polygon(self, nSides, diameter, forConstruction=False):
"""
Creates a polygon inscribed in a circle of the specified diameter for each point on
the stack
Expand All @@ -1641,7 +1641,7 @@ def _makePolygon(center):
for i in range(nSides+1):
pnts.append(center + Vector((diameter / 2.0 * math.cos(angle*i)),
(diameter / 2.0 * math.sin(angle*i)), 0))
return Wire.makePolygon(pnts)
return Wire.makePolygon(pnts, forConstruction)

return self.eachpoint(_makePolygon, True)

Expand Down

0 comments on commit afd186e

Please sign in to comment.