Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hatch fill fail on viewbox issue #168

Open
oskay opened this issue Nov 18, 2021 · 0 comments
Open

Hatch fill fail on viewbox issue #168

oskay opened this issue Nov 18, 2021 · 0 comments

Comments

@oskay
Copy link
Contributor

oskay commented Nov 18, 2021

Traceback (most recent call last):
  File "eggbot_hatch.py", line 32, in <module>
    exit_status.run(e.affect)
  File "/Users/student/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/axidraw_deps/ink_extensions_utils/exit_status.py", line 26, in run
    return func(*args, **kwargs)
  File "/Users/student/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/axidraw_deps/ink_extensions/inkex.py", line 291, in affect
    self.effect()
  File "/Users/student/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/axidraw_deps/axidrawinternal/eggbot_hatch.py", line 1214, in effect
    self.handleViewBox()
  File "/Users/student/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/axidraw_deps/axidrawinternal/eggbot_hatch.py", line 686, in handleViewBox
    sx = self.docWidth / float(vinfo[2])
ZeroDivisionError: float division by zero

The offending code:

            viewbox = self.document.getroot().get('viewBox')
            if viewbox:
                vinfo = viewbox.strip().replace(',', ' ').split(' ')
                if vinfo[2] != 0 and vinfo[3] != 0:
                    sx = self.docWidth / float(vinfo[2])
                    sy = self.docHeight / float(vinfo[3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant