CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
443 stars 28 forks source link

getting access to PEmbroiderGraphics polylines #98

Open stephanschulz opened 3 years ago

stephanschulz commented 3 years ago

How would I go about getting access to all the polylines after the library generated them? I would like to manually reorder them so that

A: they are always executed from top to bottom

B: starting with the centre polylines and working its way to the left and right.

But I guess I would want to maintain the grouping to still make use of the optimization.

clef_2020_9_4_12_30_15

stephanschulz commented 3 years ago

Here the result of seed pushing without the above mentioned adjustments.

FYI, I realize this is way outside the scope of the embroidery focus. BUT this could be used by others to make sand animations??? https://youtu.be/Au_bYrTO1_w?t=25

2020-09-04 12 45 38

stephanschulz commented 3 years ago
for (int i=0; i<E.polylines.size(); i++) {
  //println(E.polylines.get(i)); 
  //println(E.colors.get(i));; 
  //println(E.cullGroups.get(i));; 

  for (int j=0; j<E.polylines.get(i).size(); j++) {

    PVector p =  E.polylines.get(i).get(j);
  }
}