-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
satin hatching does not catch all polygons #99
Comments
Hi @stephanschulz , I'm wondering what is your input to SATIN? Is the input polygons vertices, or binary images? Is each color input separately to SATIN, or is each polygon input separately to SATIN, or are they given all at the same time? Do the missing parts share the same color, and of what color should they actually be? What does gray values of the second grayscale image indicate, do they correspond to the colors of the first image? Thanks and sorry for so many questions, but I need the info to pinpoint the problem :) |
|
import java.io.*;
import processing.embroider.*;
PEmbroiderGraphics E;
void setup(){
size(800,800);
background(0);
E = new PEmbroiderGraphics(this);
String[] filenames = new File(dataPath("")).list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".png");
}
});
for (int i = 0; i < filenames.length; i++){
println("working on layer "+i+" ...");
PImage img = loadImage(dataPath(filenames[i]));
img.resize(width,height);
E.noStroke();
E.fill((int)random(100,255),(int)random(100,255),(int)random(100,255));
E.hatchSpacing(5);
E.hatchMode(E.SATIN);
E.image(img,0,0);
}
E.visualize(true,false,false);
} |
as soon as I add
to your code I see the problem again |
@stephanschulz also, be aware that beginOptimize()/endOptimize() does exist, in case you need to combine SATIN with other stuff. |
thanks for the tips. I saw thanks. |
I have many .png images which I all want to be executed with E.SATIN
But depending on the size of these images not all polygon shaped images get hatched.
Here the resulting file with the missing shapes circled.
this shows all the different shapes that should be executed.
Is it possible that the satin hatch get overwhelmed with too many shapes?
thx
The text was updated successfully, but these errors were encountered: