Skip to content

GCodeTools > Tool Library fails if Orientation Points are in scientific format

Original description: hola abro programa ,verifico que este todo en mm,,inserto imagen ,paso a mapa de bits ,,voy a trayecto ,,objeto trayecto,,desvio dinamico ,,todo bien hasta ahi ,creo puntos de referencia ,,bien ,cuando voy a herramientas ,,ahi se muere todo ,y me sale lo ya adjuntado

Steps to reproduce:

  • Open Inkscape
  • Create a rect and convert Object to path
  • Extensions > GcodeTools > Orientation points
  • Default orientation type (2 points mode)
  • make Z-depth -0 by using the + button
    • One of the orientation points is in scientific form (100.0; 0.0; -1.3877787807814457e-16)
    • If not, just edit the text is it is (for the sake of the example)
  • Extensions > GcodeTools > Tools Library
  • Default or cylinder

What happened?

  • Error, nothing is generated
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import fnmatch, glob, traceback, errno, sys, atexit, locale, imp
Traceback (most recent call last):
  File "gcodetools.py", line 5921, in <module>
    Gcodetools().run()
  File "/home/nal/all/inkscape/share/inkscape/extensions/inkex/base.py", line 141, in run
    self.save_raw(self.effect())
  File "gcodetools.py", line 5872, in effect
    self.options.active_tab()
  File "gcodetools.py", line 5087, in tab_tools_library
    self.get_info()
  File "gcodetools.py", line 3625, in get_info
    recursive_search(self.document.getroot(), self.document.getroot())
  File "gcodetools.py", line 3578, in recursive_search
    recursive_search(i, i)
  File "gcodetools.py", line 3581, in recursive_search
    points = self.get_orientation_points(i)
  File "gcodetools.py", line 3675, in get_orientation_points
    point[1] = [float(r.group(1)), float(r.group(2)), float(r.group(3))]
AttributeError: 'NoneType' object has no attribute 'group'

What should have happened?

  1. When orientation point is invalid, there is a friendlier error message
    • e.g. if I delete one of the orientation points and then run the tools library on it, I get this warning message: Warning! Found bad orientation points in 'Layer 1' layer. Resulting Gcode could be corrupt!
  2. This error doesn't occur following the above instructions.

Version Info:

Inkscape 1.1-dev (582f6d99fe, 2020-10-18) Linux Mint 20

Edited by Nathan Lee
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information