-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AngledMarginPen._curveToOne fails #45
Comments
I'm trying to understand the intention of the code, but I can't figure it out.
|
Could |
I guess pens behaved differently a long time ago... so finally after 13 years it breaks... https://github.com/robotools/robofab/blob/master/Lib/robofab/pens/angledMarginPen.py will fix that pen! |
Thanks! |
Calling AngledMarginPen with a round shape (see example) causes a traceback.
This is a short script that gets to the problem right away. First
self._start
andself.currentPoint
to are initialised to None.Then
_moveTo
setsself._start
andself.currentPoint
to a point. Off to a good start!Let's add a curve point with
_curveToOne
.So
_curveToOne
calls_addMoveTo
which setsself.currentPoint
back to None. Oh no!Following
_curveToOne
callsgetCubicPoint
with currentPoint as argument and getCubicPoint tries to split it.I'm not sure what the
_addMoveTo
mechanism tries to achieve?If you don't trust the example calling private methods, this is a longer version if you want to see curveTo rather than _curveTo.
The text was updated successfully, but these errors were encountered: