## Re: [PyX-devel] normsubpaths are closed

 Re: [PyX-devel] normsubpaths are closed From: Joerg Lehmann - 2005-09-09 11:02:19 ```Hi Michael! On 09.09.05, Michael Schindler wrote: > I have found a strange behaviour that I so not understand looking at > the code: > > >>> import pyx > >>> pyx.version.version > '0.8+' > >>> from pyx import * > >>> from pyx import normpath > >>> a = normpath.normcurve_pt(0,0, 1,1, 1,1, 1,0) > >>> b = normpath.normsubpath([a], 1.0e-5) > >>> print b > normsubpath([normcurve_pt(0, 0, 1, 1, 1, 1, 1, 0), normline_pt(1, 0, 0, 0)], closed=1) > > The normsubpath, when just created, is closed !!! > Can you help me here? Yup, you're passing 1.0e-5 to the closed argument of the normsubpath constructor. Don't do that :-) Use b = normpath.normsubpath([a], epsilon=1.0e-5) instead. Jörg ```

 [PyX-devel] normsubpaths are closed From: Michael Schindler - 2005-09-09 10:52:45 ```Hello Jörg, André, I have found a strange behaviour that I so not understand looking at the code: >>> import pyx >>> pyx.version.version '0.8+' >>> from pyx import * >>> from pyx import normpath >>> a = normpath.normcurve_pt(0,0, 1,1, 1,1, 1,0) >>> b = normpath.normsubpath([a], 1.0e-5) >>> print b normsubpath([normcurve_pt(0, 0, 1, 1, 1, 1, 1, 0), normline_pt(1, 0, 0, 0)], closed=1) The normsubpath, when just created, is closed !!! Can you help me here? Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```
 Re: [PyX-devel] normsubpaths are closed From: Joerg Lehmann - 2005-09-09 11:02:19 ```Hi Michael! On 09.09.05, Michael Schindler wrote: > I have found a strange behaviour that I so not understand looking at > the code: > > >>> import pyx > >>> pyx.version.version > '0.8+' > >>> from pyx import * > >>> from pyx import normpath > >>> a = normpath.normcurve_pt(0,0, 1,1, 1,1, 1,0) > >>> b = normpath.normsubpath([a], 1.0e-5) > >>> print b > normsubpath([normcurve_pt(0, 0, 1, 1, 1, 1, 1, 0), normline_pt(1, 0, 0, 0)], closed=1) > > The normsubpath, when just created, is closed !!! > Can you help me here? Yup, you're passing 1.0e-5 to the closed argument of the normsubpath constructor. Don't do that :-) Use b = normpath.normsubpath([a], epsilon=1.0e-5) instead. Jörg ```
 Re: [PyX-devel] normsubpaths are closed From: Michael Schindler - 2005-09-09 11:09:08 ```Hello Jörg, On 09.09.05, Joerg Lehmann wrote: > On 09.09.05, Michael Schindler wrote: > > >>> b = normpath.normsubpath([a], 1.0e-5) > > >>> print b > > normsubpath([normcurve_pt(0, 0, 1, 1, 1, 1, 1, 0), normline_pt(1, 0, 0, 0)], closed=1) > > > > The normsubpath, when just created, is closed !!! > > Yup, you're passing 1.0e-5 to the closed argument of the normsubpath > constructor. Don't do that :-) Use > > b = normpath.normsubpath([a], epsilon=1.0e-5) > > instead. Thanks! Stupid mistake! Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```