Comments (7)
fixed: 7099df3
btw, optimize shouldn't be used with SATIN, since it might flip the order of the centerline and the hatch, see #82
from pembroider.
@stephanschulz also, be aware that beginOptimize()/endOptimize() does exist, in case you need to combine SATIN with other stuff.
from pembroider.
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 :)
from pembroider.
- input is a bunch of binary images
- each image has a different color
- the missing parts do share the same color but are also part of the same binary image
- the second image is a illustrator file to show you the different layers.
from pembroider.
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);
}
from pembroider.
as soon as I add
E.optimize();
E.visualize(true, false, false);
E.printStats();
E.endDraw(); // write out the file
to your code I see the problem again
from pembroider.
thanks for the tips.
I saw E.optimize();
being used in the PEmbroider_satin_hatching_2
example. But now I know better.
thanks.
from pembroider.
Related Issues (20)
- compile with Eclipse HOT 3
- non-closed shapes with E.strokeMode(E.PERPENDICULAR) have connecting line HOT 2
- under layer support stitch HOT 1
- Request toggle to enable/disable generation of connecting lines HOT 3
- .jef file format causes machine confusion HOT 1
- Jump stitches not being cut, but stitched HOT 9
- no menu preview (but editor preview!) of .pes files on the Brother NV800E
- SVG Export leave connecting lines between shapes HOT 1
- Concentric fill error on imported images
- HatchSpine looks like dot pattern and less like lines HOT 1
- java.io.FileNotFoundException when running PEmbroider_stroke_outlines HOT 4
- Unexpected error when using culling in PEmbroider_bitmap_image_2 HOT 1
- .jef file displays badly on machine HOT 2
- simple E.rect problem HOT 2
- Inaccurate license information HOT 4
- layer names as metadata HOT 1
- option to avoid small bridge stitches HOT 10
- culling question. HOT 3
- getting access to PEmbroiderGraphics polylines HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pembroider.