Fills

class turtlethread.fills.Fill[source]

A class to represent a fill. This is a base class for other fill types. Given a list of points that make up a polygon, the fill() function should fill it in using the appropriate methods.

class turtlethread.fills.ScanlineFill(angle: str | int | float = 'auto', jump_at_edges: bool = False)[source]

The Scanline fill will create straight lines across the fill area to fill it up. Useful for small areas.

Parameters

angle: str | int | float (default=”auto”)

Angle of the lines, in radians. May also be the string ‘auto’. If ‘auto’, the program will automatically try the angles of 0, 45, 90, and 135 degrees, to minimize the number of jump stitches.

jump_at_edges: bool (default=False)

If True, the fill will do a jump stitch when it encounters an edge during fill, such as to cross from one area to another. This creates a cleaner fill with less stray stitches. Set to False by default as this may slow down embroidery significantly, due to the number of jump stitches involved.