Skip to main content

Troubleshooting

Common Errors

Duplicate Elements

Element ring1 already defined

  • Each element needs a unique ID
  • Use descriptive names: center_ring, petal1, etc.

Undefined Picot

Element ring2 only has 2 picots, cannot access picot3

  • Count your picots carefully
  • Remember picots are numbered starting from 1

Undefined Element

Reference to undefined element ring3

  • Make sure you've defined the element before referencing it
  • Check spelling of element names

Feasibility Warning

We should probably define parameters around physical feasibility

Ring tiny has only 2 stitches - may be too small

  • Rings need enough stitches to close properly
  • Consider adding more stitches for structural integrity

Best Practices

  1. Use descriptive element names
      // Good
      center_ring: R(6, p, 6, p, 6)
      petal1: R(4, p, 4)
      
      // Less clear
      ring1: R(6, p, 6, p, 6)
      ring2: R(4, p, 4)

  2. Name Important Picots
      center: R(4, p:join_here, 4, p:tip, 4)
      petal: R(3, join(center.join_here), 3, p, 3)
  3. Add comments for complex sections
       // Center motif with 8 connection points
       center: R(3, p, 3, p, 3, p, 3, p, 3, p, 3, p, 3, p, 3)
       
       // First petal connects to north point
       petal1: R(4, p, 4, join(center.picot1), 4, p, 4)
  4. Validate early and often
    • Run validation after adding each element
    • Fix errors before they compound
  5. Use consistent naming
    • Pick a naming scheme and stick to it
    • ring1, ring2, ring3 or center, petal1, petal2