1. jpcgt
  2. FlatCAM
  3. Issues


Issue #183 resolved

Labcenter Ares Gerber file parse error

Jean-Sebastien Leroy
created an issue


I've been trying to load a gerber file generated by Labcenter Ares. The file parsing crash with the following python traceback:

[DEBUG] Line 4379: Aperture change to (10)
[DEBUG] {'macro': <camlib.ApertureMacro instance at 0x7f1afcf3cea8>, 'modifiers': None, 'type': 'AM'}
[DEBUG] Flashing @POINT (0.9500000000000001 0.3), Aperture: {'macro': <camlib.ApertureMacro instance at 0x7f1afcf3cea8>, 'modifiers': None, 'type': 'AM'}
[WARNING] Unknown syntax of aperture macro part: %AMDIL000
[WARNING] Unknown syntax of aperture macro part: %AMDIL000
  File "/home/jean-sebastien/work/flatcam/camlib.py", line 1736, in parse_lines
  File "/home/jean-sebastien/work/flatcam/camlib.py", line 2163, in create_flash_geometry
    return affinity.translate(flash_geo, xoff=loc[0], yoff=loc[1])
  File "/usr/lib/python2.7/dist-packages/shapely/affinity.py", line 255, in translate
    return affine_transform(geom, matrix)
  File "/usr/lib/python2.7/dist-packages/shapely/affinity.py", line 46, in affine_transform
    if geom.is_empty:
[ERROR] PARSING FAILED. Line 4380: X+9500Y+3000D03*
[ERROR][Dummy-2] ('Line 4380: X+9500Y+3000D03*', 'AttributeError("\'NoneType\' object has no attribute \'is_empty\'",)')
[ERROR][Dummy-2] Abnormal termination of process!
[ERROR][Dummy-2] <class 'camlib.ParseError'>
[ERROR][Dummy-2] ('Line 4380: X+9500Y+3000D03*', 'AttributeError("\'NoneType\' object has no attribute \'is_empty\'",)')
[ERROR][Dummy-2] <traceback object at 0x7f1afccf0320>
[DEBUG][Dummy-2] FCVisibleProcessContainer.on_done()
[DEBUG][Dummy-2] FCVisibleProcessContainer.on_done()
Traceback (most recent call last):
  File "/home/jean-sebastien/work/flatcam/FlatCAMWorker.py", line 34, in do_worker_task
  File "/home/jean-sebastien/work/flatcam/FlatCAMApp.py", line 1706, in open_gerber
    self.new_object("gerber", name, obj_init)
  File "/home/jean-sebastien/work/flatcam/FlatCAMApp.py", line 829, in new_object
    initialize(obj, self)
  File "/home/jean-sebastien/work/flatcam/FlatCAMApp.py", line 1680, in obj_init
    gerber_obj.parse_file(filename, follow=follow)
  File "/home/jean-sebastien/work/flatcam/camlib.py", line 1570, in parse_file
    self.parse_lines(line_generator(), follow=follow)
  File "/home/jean-sebastien/work/flatcam/camlib.py", line 2107, in parse_lines
    raise ParseError("Line %d: %s" % (line_num, gline), repr(err))
camlib.ParseError: ('Line 4380: X+9500Y+3000D03*', 'AttributeError("\'NoneType\' object has no attribute \'is_empty\'",)')

I've attached the input gerber file for reproducing the issue.

Gerber format: RS274X FlatCAM version used: 2354116e377976743369e37483c87f56aebbe86a Labcenter version: 8.1

Feel free to ask for more informations and/or to try fixes on my machine.

Best regards, Jean-Sébastien

Comments (3)

  1. Jean-Sebastien Leroy reporter

    Find below some information about the generated gerber (taken from Ares gerber generation logfile):

    Photoplotter Setup

    Format: RS274X, ASCII, 2.4, imperial, absolute, eob=*, LZO Notes: D=Diameter, S=Side, W=Width, H=Height, C=Chamfer

    D10 DIL W=100th H=60th C=12th FLASH D11 CIRCLE D=80th FLASH D12 SQUARE S=90th FLASH D13 SQUARE S=80th FLASH D14 CIRCLE D=90th FLASH D15 CIRCLE D=120th FLASH D16 CIRCLE D=8th DRAW D17 CIRCLE D=40th DRAW D18 CIRCLE D=23.6th DRAW D19 CIRCLE D=1.25th DRAW D70 CIRCLE D=10th DRAW D71 DIL W=120th H=80th C=12th FLASH D20 CIRCLE D=100th FLASH D21 SQUARE S=110th FLASH D22 SQUARE S=100th FLASH D23 CIRCLE D=110th FLASH D24 CIRCLE D=150th FLASH

    NC Drill Setup

    Format: ASCII, 2.4, imperial, absolute, eob=<CR><LF>, no zero suppression. Notes: Tool sizes are diameters. Layer sets are in brackets - 0=TOP, 15=BOTTOM, 1-14=INNER.

    T01 30th (0-15) T02 50th (0-15) T03 40th (0-15) T04 60th (0-15)

  2. Log in to comment