Glyphs-Scripts
Glyphs-Scripts copied to clipboard
Interpolation > Short Segment Finder for G3
Throws a lot of errors like this in G3:
😬 ERROR in germandbls (layer: Black): Possible single-node path.
SEGMENT: "C: |(307,27)--(340,-2), (401,-16)--(483,-16)| >176,-43)0 obj:2"
SEGMENT LENGTH: 4
Traceback (most recent call last):
File "Short Segment Finder.py", line 138, in approxLengthOfSegment
p0,p1,p2,p3 = [p.pointValue() for p in segment]
File "Short Segment Finder.py", line 138, in <listcomp>
p0,p1,p2,p3 = [p.pointValue() for p in segment]
AttributeError: 'NSPoint' object has no attribute 'pointValue'
Path.segments
did return a list of NSArray
s that contained NSValue
s.
In G3 those segments are GSPathSegment
that contains the NSPoint
s directly. So remove all .pointValue()
.
removed, but unfortunately, another very weird thing happened: at least on my copy of G3 it freezes the app. I've made debugging checkpoints in the code (in code they are print statements) and tried to find any place that could cause the freeze.
So far no clue Short Segment Finder.py.zip