knit_script.knit_script_interpreter.scope.gauged_sheet_schema package
Knit Script Gauged Sheet Schema Package
This package provides comprehensive sheet and layer management for multi-gauge knitting operations within the Knit Script interpreter. It handles the complex task of organizing and tracking loop positions across multiple virtual sheets on a knitting machine.
The gauged sheet system enables advanced knitting techniques by: - Managing multiple virtual sheets within a single gauge configuration. - Tracking loop positions and states across different needle beds. - Managing layer ordering and sheet peeling operations. - Providing automatic loop restoration and validation. - Supporting both standard and slider needle operations.
Core Components
- Gauged_Sheet_Record:
The primary orchestrator class that manages multiple sheets within a gauge configuration. Handles sheet peeling, layer management, and loop tracking across the entire gauge system.
- Sheet:
Individual sheet representation that tracks loop positions and provides access to needles belonging to that specific sheet within a gauge.
Key Features
- Multi-Sheet Management:
Create and manage multiple virtual sheets at a given gauge.
Maintain sheet-specific needle collections and loop records
- Layer Organization:
Dynamic layer positioning and reordering.
Forward/backward layer pushing operations.
Layer swapping between different sheet positions.
Front/back layer positioning utilities.
- Sheet Peeling Operations:
Automatic loop movement to access specific sheets.
Conflict detection and resolution during peeling.
Knitout instruction generation for machine operations.
Prevention of loop loss during sheet transitions.
- Loop State Management:
Comprehensive loop tracking and validation.
Detection of stacked loops and blocking conditions.
Automatic loop restoration after sheet operations.
Error handling for lost or misplaced loops.
- Needle Access Patterns:
Sheet-specific needle collections (front/back, standard/slider).
Loop-holding needle identification.
Cross-sheet needle position mapping.
Needle bed organization utilities.
Architecture Overview
Sheet Positioning: - Sheets are numbered from 0 to gauge-1. - Layer positions determine physical needle placement. - Lower layer values represent needles closer to the front. - Layer manipulation affects which sheets are accessible.
Error Handling
The package includes robust error handling for common knitting scenarios:
Lost_Sheet_Loops_Exception: Raised when loops are lost during operations.
Sheet_Peeling_Stacked_Loops_Exception: When loops are stacked incorrectly.
Sheet_Peeling_Blocked_Loops_Exception: When loops block access to sheets.
Sheet_Value_Exception: For invalid sheet numbers or configurations.
Submodules
- knit_script.knit_script_interpreter.scope.gauged_sheet_schema.Gauged_Sheet_Record module
Gauged_Sheet_RecordGauged_Sheet_Record.knitting_machineGauged_Sheet_Record.gaugeGauged_Sheet_Record.sheetsGauged_Sheet_Record.__init__()Gauged_Sheet_Record.record_needle()Gauged_Sheet_Record.peel_sheet_relative_to_active_sheet()Gauged_Sheet_Record.reset_to_sheet()Gauged_Sheet_Record.get_layer_at_position()Gauged_Sheet_Record.sheet_needles_at_needle_position()Gauged_Sheet_Record.set_layer_position()Gauged_Sheet_Record.swap_layer_at_positions()Gauged_Sheet_Record.push_layer_backward()Gauged_Sheet_Record.push_layer_forward()Gauged_Sheet_Record.set_layer_to_front()Gauged_Sheet_Record.set_layer_to_back()Gauged_Sheet_Record.front_needles()Gauged_Sheet_Record.back_needles()Gauged_Sheet_Record.front_sliders()Gauged_Sheet_Record.back_sliders()Gauged_Sheet_Record.front_loops()Gauged_Sheet_Record.back_loops()Gauged_Sheet_Record.front_slider_loops()Gauged_Sheet_Record.back_slider_loops()Gauged_Sheet_Record.all_needles()Gauged_Sheet_Record.all_sliders()Gauged_Sheet_Record.all_loops()Gauged_Sheet_Record.all_slider_loops()
- knit_script.knit_script_interpreter.scope.gauged_sheet_schema.Sheet module
SheetSheet.knitting_machineSheet.gaugeSheet.sheet_numberSheet.loop_recordSheet.__init__()Sheet.record_needle()Sheet.record_sheet()Sheet.sheet_needle()Sheet.get_matching_sheet_needle()Sheet.__eq__()Sheet.front_needles()Sheet.back_needles()Sheet.front_sliders()Sheet.back_sliders()Sheet.front_loops()Sheet.back_loops()Sheet.front_slider_loops()Sheet.back_slider_loops()Sheet.all_needles()Sheet.all_sliders()Sheet.all_loops()Sheet.all_slider_loops()
Sheet_Identifier