Dear PyX developpers,

   First of all I'd like to thank you for your wonderful package. I'm using it
to draw pieces of puzzle which are then sent to a laser-cutter and it does a
great job (greater than matplotlib for this problem in my opinion).

I'd like to report a small bug an to suggest a fix. The problem is the
following: I'm extracting some paths as border of letters from LateX and I
want to compute the intersection. The problem is that for some reason there is
an empty path extracted which is passed to intersect which is itself passed to
method normsubpath.segments() which doesn't accept empty pathes.

Here is the precise error message:

Traceback (most recent call last):
  File "bug.py", line 11, in <module>
    inter1, inter2 = p1.intersect(p2)
  File "/usr/lib/python2.7/site-packages/pyx/normpath.py", line 1692, in 
intersect
    for intersection in zip(*normsubpath_a.intersect(normsubpath_b)):
  File "/usr/lib/python2.7/site-packages/pyx/normpath.py", line 1079, in 
intersect
    closepoints_a = closepoints(self, intersections_a)
  File "/usr/lib/python2.7/site-packages/pyx/normpath.py", line 1037, in 
closepoints
    split = normsubpath.segments([0] + [intersection for intersection, index in 
intersections] + [len(normsubpath)])
  File "/usr/lib/python2.7/site-packages/pyx/normpath.py", line 1255, in 
segments
    segments = self.normsubpathitems[collectindex].segments(collectparams)
IndexError: list index out of range

I filed a report on sourceforge with a suggestion of fix.

Cheers,

Florent Hivert

------------------------------------------------------------------------------
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to