Stroking a stroke for laser cutting
in
Programming Questions
•
11 months ago
Hi,
I have written a simple program which generates a random snowflake style thing on screen. The idea is kids can generate their own unique snowflake and it gets cut out from an attached laser cutter.
I built the flakes as a series of line statements with a rotate after each branch is built.
I'm using the following to alter the thickness and styling of the above lines.
Unfortunately when output as pdf this is no good to the laser cutter as it wants a cut line to follow, i.e. a stroke of the stroke.
Rather than rewriting my program to output laser ready lines (i.e. manually achieve what the stroke commands are doing for me), is there a way to take the generated image and somehow apply a further stroke to the whole thing, so the PDF can be sent straight to the cutter? I'm expecting a no, but you never know.
I can post the whole thing if it's useful. It's quick and dirty...
Thanks,
Simon
I have written a simple program which generates a random snowflake style thing on screen. The idea is kids can generate their own unique snowflake and it gets cut out from an attached laser cutter.
I built the flakes as a series of line statements with a rotate after each branch is built.
- for (int i=0; i<6; i++) {
- line(0,0,0,mainstalkLength);
- int frondSeparation=stalkLength / numFronds;
- int frondStart=20;
- int newfrondLength=frondLength;
- // decorate
- for (int z=0; z<numFronds; z++) {
- line(0, 0, stalkLength, 0);
- //LHS
- line(frondStart, 0, frondStart+frondAngle, newfrondLength);
- //RHS
- line(frondStart, 0, frondStart+frondAngle, -newfrondLength);
- frondStart+=frondSeparation;
- newfrondLength=int(newfrondLength*frondDecay);
- }
- rotate(PI/3);
- }
I'm using the following to alter the thickness and styling of the above lines.
- strokeCap(strokeCap_);
- strokeJoin(strokeCap_);
- strokeWeight(strokeWeight_);
Unfortunately when output as pdf this is no good to the laser cutter as it wants a cut line to follow, i.e. a stroke of the stroke.
Rather than rewriting my program to output laser ready lines (i.e. manually achieve what the stroke commands are doing for me), is there a way to take the generated image and somehow apply a further stroke to the whole thing, so the PDF can be sent straight to the cutter? I'm expecting a no, but you never know.
I can post the whole thing if it's useful. It's quick and dirty...
Thanks,
Simon
1