Cannot mirror geometry after cut

Issue #220 resolved
Lei Zheng created an issue

With the latest master branch, to reproduce the problem,

  1. Create a new geometry
  2. Edit the geometry, and draw a poly line
  3. Then draw a rectangle to cut the poly line
  4. Save the geometry object
  5. Go to double side tool
  6. Enter an arbitrary point, say (0,0), then hit mirror button
  7. Nothing happens, and the console shows
  File "c:\works\pcb\flatcam\code\flatcam\DblSidedTool.py", line 183, in on_mirror
    fcobj.mirror(axis, [px, py])
  File "c:\works\pcb\flatcam\code\flatcam\camlib.py", line 966, in mirror
    xscale, yscale, origin=(px, py))
  File "C:\WinPython-32bit-2.7.10.3\python-2.7.10\lib\site-packages\shapely\affinity.py", line 199, in scale
    return affine_transform(geom, matrix)
  File "C:\WinPython-32bit-2.7.10.3\python-2.7.10\lib\site-packages\shapely\affinity.py", line 46, in affine_transform
    if geom.is_empty:
AttributeError: 'list' object has no attribute 'is_empty'

Comments (4)

  1. Log in to comment