pyx icon indicating copy to clipboard operation
pyx copied to clipboard

Parallel deformation of closed loops

Open NicolasW1 opened this issue 2 years ago • 0 comments

When trying to create a parallel circle, the parallel deformer fails for when the radius should be decreased.

import pyx

# works
arcargs = (0.0, 0.0, 1.0, 90, 449)
# does not work
arcargs = (0.0, 0.0, 1.0, 90, 450)

og_path = pyx.path.path(pyx.path.arc(*arcargs))
defo_path = pyx.deformer.parallel(0.1).deform(og_path)

c = pyx.canvas.canvas()
c.stroke(og_path)
c.stroke(defo_path, [pyx.color.rgb.red])
c.writePDFfile()

NicolasW1 avatar Dec 07 '23 14:12 NicolasW1