Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update: Edge Work Made Simple: Periphery Finder + INDEX_ARRAY + SORT_LABEL
#1
Hi All,

I made a major update to CrochetPARADE. It includes a couple of expansions to the language (see below) as well as a new tool: Find project periphery (in the Tools menu). The Periphery finder is all about making edge work (borders, edgings, joining, finishing rounds, attaching motifs, picking up stitches along a side, etc.) much less fiddly in CrochetPARADE.



In crochet, the periphery or border is where so many practical and decorative things happen. It’s where you add a clean border, where you join panels such as granny squares, where you pick up stitches along the side of rows, and where you often “finish” a shape. If you’ve ever added a border to a blanket or motif, you know the edge/finish step is basically its own mini-project. And even in plain “add a border” scenarios, picking up stitches evenly along an edge is one of those deceptively tricky steps that can make things ruffle or warp if you just “pick up everything.”

But if you’re not crocheting in the round, say you’re working rows with turns, attaching motifs (Irish crochet!), or anything where the boundary is built from ends of rows + possibly side posts + turning chains + joins, then the stitches that are consecutive along the boundary are often not consecutive in the order you crocheted them. That’s exactly what makes “crochet around the edge” annoying in a text-driven workflow: you need to find boundary stitches one-by-one, and if you want to label them sequentially (for example with something like A[k++]) it quickly turns into a “where am I on the edge?” scavenger hunt.

So this update is about giving CrochetPARADE a real periphery workflow: find it, visualize it, edit it when needed, and then label it in a way that makes it easy to work stitches in the periphery, and in a way that stays stable even as you keep editing/refactoring the project. (Which is the whole point of CrochetPARADE’s “precise text → 3D model workflow.)

1. Find project periphery

This adds a new workflow under **Tools → Find Project Periphery**.

Think of it as: **“show me the stitches that are on the outside edge of this piece, in the order I’d actually work them if I were crocheting along the edge.”**

That “in the order I’d actually work them” part is the key. In anything made with rows + turns (or motifs that get attached), the stitches that touch each other along the outside edge are often *not* next to each other in your written instructions. CrochetPARADE now finds the *edge stitches* for you and gives you an edge-walk order you can use for borders, joining, and finishing.

What you’ll see:

* One (or sometimes a few) **possible peripheries**. Pick one and CrochetPARADE highlights it on the 3D model so you can sanity-check it quickly.
* If your pattern text is expanded down to individual stitches, it can also **highlight those exact stitches in the editor** (so you can edit or label them precisely).

A typical “crocheter workflow” looks like:

* Build / calculate your project as usual.
* Run **Tools → Find Project Periphery**, pick the periphery that looks right, and check the highlight.
* If you want the periphery stitches highlighted in the text as well: run **Tools → Expand instructions** (select the option to “run twice”).
* Use the tool’s **Apply label to periphery stitches** section to stamp labels *around the edge in edge order*.

  * You can label them with a simple label (like `Edge`, which can be sorted in periphery-adjacent order using SORT_LABEL, see below) or a numbered label (like `Edge[k++]` or `Edge[k]; the latter could be indexed with an INDEX_ARRAY, see below).
  * There’s an option to reverse the order, which is handy depending on whether you want to go clockwise/counterclockwise around the piece.

And when the automatic periphery is *almost right* but you want to tweak it (lace holes, very openwork edges, multi-piece joins, “I only want this outer side”, etc.) there’s a **Custom Periphery editor**:

* You can define the periphery as a list of **pairs of stitches that are neighbors on the edge**, one per line, like:
  `stitch1 -- stitch2`
* CrochetPARADE will then treat that as a custom periphery and will try to walk it in order.
* With the editor open, you can **Alt+Click edges on the 3D model** to add them to the list, which is a nice “pick it off the model” way to fine-tune the boundary.


2. Update to the CrochetPARADE language: New labeling with INDEX_ARRAY and SORT_LABEL

This update is about one practical thing: labeling a set of stitches in a specific order without turning your whole pattern into a soup of stitches with labels such as sc.Edge[3] with numbers that are not sequential in the order they were worked in (but are sequential in some other sense, in periphery order for example).

So: CrochetPARADE now supports two ways to keep labels *ordered* in a way other than the order in which the labeled stitches were worked.

### A) INDEX_ARRAY

`INDEX_ARRAY:` lets you keep your stitch labels looking clean (like `Edge[k]`) while storing the actual list of numbers k *somewhere else*.

So let's say you want to mark the edge of the pattern in the example below:


6ch,turn
[sk,ch,5sc,turn
]*4

which is a simple single crochet swatch. The periphery is the first and last row as well as the edge pieces. Taking account of the turns, if one wants to label the stitches in sequential order around the periphery, one had to do it by hand before. Now with the periphery tool, one can Expand Instructions; Find project periphery and label stitches with Edge[k++] (or label of your choice) to get the following ugly mess:

[[[ch].Edge[9]],[[ch].Edge[10]],[[ch].Edge[11]],[[ch].Edge[12]],[[ch].Edge[13]],[[ch].Edge[14]]],turn
[sk,[[ch].Edge[15]],[sc,sc,sc,sc,[[sc].Edge[8]]],turn
],[sk,[[ch].Edge[7]],[sc,sc,sc,sc,[[sc].Edge[16]]],turn
],[sk,[[ch].Edge[17]],[sc,sc,sc,sc,[[sc].Edge[6]]],turn
],[sk,[[ch].Edge[5]],[[[sc].Edge[4]],[[sc].Edge[3]],[[sc].Edge[2]],[[sc].Edge[1]],[[sc].Edge[0]]],turn
]

with Edge[k] going sequentially from 0 to 17 around the periphery (taking account of the turn's). The indexed labels have their indices baked in. So, if you wanted to do Tools->Simplify instructions, the simplification will stumble because of the non-sequential indices (non-sequential in crochet order).  Even after selecting: "Attempt to simplify numerical indexing..." in the Simplify Instructions dialog, we get (after replacing the automatically generated index "vara" with "k" for brevity):

[ch].Edge[$k=9$k],5*[[ch].Edge[++k]],turn
sk,[ch].Edge[++k],4sc,[sc].Edge[$k=8$k],turn
sk,[ch].Edge[--k],4sc,[sc].Edge[$k=16$k],turn
sk,[ch].Edge[++k],4sc,[sc].Edge[$k=6$k],turn
sk,[ch].Edge[--k],5*[[sc].Edge[--k]],turn

With an INDEX_ARRAY, the above simplifies to (and yes, many of the square bracket can be deleted; this is what the code returns automatically):

INDEX_ARRAY:k={9,10,11,12,13,14,15,8,7,16,17,6,5,4,3,2,1,0}
6*[[ch].Edge[k]],3*[turn
sk,[ch].Edge[k],4sc,[sc].Edge[k]],turn
sk,[ch].Edge[k],5*[[sc].Edge[k]],turn

And in this case pattern simplifiction works much better as it sees the same label Edge[k] and the non-sequential indices are saved in the INDEX_ARRAY field.

And yes: the periphery tool generates this for you automatically when you label the periphery with something like `Edge[k]`. The steps are: Expand Instructions; Find project periphery and label stitches with Edge[k] (or label of your choice); Simplify Instructions.

### B) SORT_LABEL

Sometimes you don’t want indexed labels at all. You just want:

* “these stitches are the edge stitches,” labeled `Edge`,
* but you still want CrochetPARADE to remember the *order around the edge* (so later steps that say “work around Edge” by typing say 18*sc@Edge)

That’s what `SORT_LABEL:` is for.

It keeps the stitch text simple (for example using a label `.Edge`), while storing the “walk around the edge” order in a SORT_LABEL. For the example above, it takes the form:

SORT_LABEL:Edge={17,16,15,14,13,12,11,8,7,0,1,2,3,4,5,6,9,10}
6*[[ch].Edge],3*[turn
sk,[ch].Edge,4sc,[sc].Edge],turn
sk,[ch].Edge,5*[[sc].Edge],turn


And again: the periphery tool generates this automatically when you apply a non-numbered label to the periphery. The steps are: Expand Instructions; Find project periphery and label stitches with Edge (or label of your choice); Simplify Instructions.

If you want to mark different parts of the edge with different labels, use the Edit edges button in the periphery tool to delete edges that are not part of say the bottom/right/left/top edge. Each time you edit it, you an save it as a Custom periphery. Then you an apply separate labels to each part of the periphery. Here is an example of a swatch with Top and Bottom edges labeled, and separated edgings worked into them in different colors (once rendered, click on the 3d canvas, and press 'c' to see the colors):

COLOR:Yellow
6*[ch.Bottom],3*[turn
sk,ch,5sc],turn
sk,[ch].Top,5*[sc.Top],turn
SORT_LABEL:Top={0,1,2,3,4,5}
SORT_LABEL:Bottom={0,1,2,3,4,5}
COLOR:Blue
[start_at,ch,5sc]@Top
COLOR:Red
[start_at,ch,5sc]@Bottom

---

# Additionally (just mentioning these):

* The undo Ctrl+Z / Cmd+Z (and the redo Ctrl+Shift+Z or Ctrl+Y) is now a much better history tracker while editing patterns.

* The stitch highlighting mechanism (in the editor and the 3D canvas) is more robust and the different types of highlights have different colors.

* Improved error reporting.

* Produce errors when unsupported stitch labeling is used. The intention of the CrochetPARADE language has always been to use labels to mark groups of stitches that are single runs of adjacent stitches (not necessary sequentially worked, but still attached to each other). Morever, accidental attachment to stitches that have not been worked yet should not be allowed. The code until now was making some checks for those conditions but those are not robust. Now, the parser is much stricter and emits errors when non-adjacent stitches are labeled with one and the same label, or when one tries to crochet into the "future" (in stitches that are still to be worked).

* Improved and expanded Manual.


Attached Files Thumbnail(s)
   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)