Skip to content

Commit

Permalink
Fix: Update offset applied to contour
Browse files Browse the repository at this point in the history
  • Loading branch information
drlukeparry committed Jan 22, 2022
1 parent 18625f4 commit 40fb789
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pyslm/hatching/hatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,10 @@ def hatch(self, boundaryFeature) -> Union[Layer, None]:
hatchLayerGeometries = []

for i in range(self._numOuterContours):
offsetDelta -= self._contourOffset

if i > 0:
offsetDelta -= self._contourOffset

offsetBoundary = self.offsetBoundary(boundaryFeature, offsetDelta)

for poly in offsetBoundary:
Expand All @@ -885,9 +888,14 @@ def hatch(self, boundaryFeature) -> Union[Layer, None]:
contourGeometry.subType = "outer"
contourLayerGeometries.append(contourGeometry) # Append to the layer



# Repeat for inner contours
for i in range(self._numInnerContours):
offsetDelta -= self._contourOffset

if i > 0:
offsetDelta -= self._contourOffset

offsetBoundary = self.offsetBoundary(boundaryFeature, offsetDelta)

for poly in offsetBoundary:
Expand Down

0 comments on commit 40fb789

Please sign in to comment.