Open stephanschulz opened 3 years ago
Hi @stephanschulz
I think a better alternative to culling is to use PEmbroiderBooleanGraphics. Culling is done after the whole design is baked into polylines, so it has to make guesses and compromises. It always look nicer if the correct shape is prepared in the first place (with PEmbroiderBooleanGraphics)
See:
Thanks for the advice. I am not sure if the library is able to accept PShape objects? Right now I am constructing my arrow shape from a bunch of vertices. In this specific case I could combine a triangle and a rectangle, but it would not work for more complicated shapes I guess.
PShape testShape;
BSG.testShape;
Syntax error, insert "VariableDeclarators" to complete LocalVariableDeclaration
HI @stephanschulz ,
Basically PEmbroiderBooleanGraphics is just a wrapper on PGraphics that's more specialized on binary images. It works exactly like regular PGraphics, and the syntax is also exactly the same, so to draw a PShape on it:
PShape testShape;
testShape.disableStyle();
BSG.fill(255);
BSG.image(testShape,0,0);
The idea is to just construct a binary image where white part should be stitched and black part is void. Then feed it to PEmbroider's image() function.
I am doing some Anton Stankowski inspired coding with shapes inside shapes. When using culling the distribution of the stitches is not as even as it is when not using culling. I guess that due to having different start and stop points for the polylines. Do you have any tips to counter act that effect and get a nice clean distributed look? Here two image with and without culling. thx
![anton_2020_8_28_10_26_38](https://user-images.githubusercontent.com/1054816/91579200-4340dd00-e919-11ea-976c-43c925ec7943.png)