virtual_knitting_machine.machine_components.needles.Sheet_Identifier module

Module containing the Sheet_Identifier class for identifying sheets at a given gauge.

class Sheet_Identifier(sheet, gauge)[source]

Bases: object

Class used to identify sheets at a given gauge.

Parameters:
__init__(sheet, gauge)[source]
Parameters:
property sheet: int

Returns: int: The position of the sheet in the gauge.

property gauge: int

Returns: int: The number of active sheets.

get_needle(needle)[source]

Used to identify the sheet needle from a given base needle. :type needle: Needle :param needle: Needle to access from sheet. Maybe a sheet needle which will be retargeted to this sheet.

Returns:

The sheet needle at the given needle index and bed

Return type:

Sheet_Needle

needle(is_front, position)[source]

Gets a needle within the sheet with specified position

Parameters:
  • is_front (bool) – True if needle is on front bed.

  • position (bool) – The position within the sheet.

Returns:

The specified sheet needle.

Return type:

Sheet_Needle