Skip to content

Commit

Permalink
fix for proper origin in _run, which produced en evil error in meshin…
Browse files Browse the repository at this point in the history
…g on boundaries
  • Loading branch information
marcinofulus committed Aug 5, 2021
1 parent 95b3b98 commit 2ccd87a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chunky3d/chunky.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ def _run(self, *args, **kwargs):
),
)
s_to_pad = s.copy()
s_orig = s.copy()
s_to_pad[s_to_pad > 0] = 0
s_to_pad = np.abs(s_to_pad)
s[s < 0] = 0
Expand All @@ -673,7 +674,7 @@ def _run(self, *args, **kwargs):

chunk = data.view(Chunk)
chunk.spacing = self.spacing
chunk.origin = self.origin + s[::-1] * self.spacing
chunk.origin = self.origin + s_orig[::-1] * self.spacing

ret, prev = func(chunk, prev, *args)
if ret is None:
Expand Down

0 comments on commit 2ccd87a

Please sign in to comment.