Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: <Solved> D2S create mulit SVG files?
TuneWithHa-
mmer
Newbie
Posts: 12
Permalink
Post <Solved> D2S create mulit SVG files?
on: January 31, 2018, 02:39
Quote

Having a blast with D2S. Out of the box I could render an image and would get 6 nifty svg files to fiddle with.
Until I did something to the source file. No worries, just download again and unzip then back in the game.
Except. Now when I export there is only 1 svg with the pens on different layers. I can pick them apart in inkscape but I liked it better when D2S kicked out 6 individual svg files.
Question: How do I get D2S to kick out individual svg files for each pen?

TuneWithHa-
mmer
Newbie
Posts: 12
Permalink
Post Re: D2S create mulit SVG files?
on: February 2, 2018, 03:45
Quote

I moved the file generating lines inside the svg loop like so;

// Loop over pens backwards to display dark lines last.
// Then loop over all displayed lines.
for (int p=pen_count-1; p>=0; p--) {

String gname = "gcode\\gcode_" + basefile_selected + p + ".svg";
OUTPUT = createWriter(sketchPath("") + gname);
OUTPUT.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
OUTPUT.println("<svg width=\"" + svg_format(img.width * gcode_scale) + "mm\" height=\"" + svg_format(img.height * gcode_scale) + "mm\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">");

It seems to work. Keeping in mind that I read code like a first grader, have I done this right?

TuneWithHa-
mmer
Newbie
Posts: 12
Permalink
Post Re: D2S create mulit SVG files?
on: February 2, 2018, 15:16
Quote

Great, now I've broken something else.
I can generate 6 svg files that I can open, edit and save with inkscape but Polargraph Controller only opens 1 of them.
Output form D2S gives 6 files, each about 1.6 mb.
Polarshield only recognizes one of them, the others will not load.
Inkscape opens them and I can save each as a generic svg.
Polarshield only recognizes one of them, the others will not load. (Load Vector / Clear Vector button goes back to Clear Vector)
I'll try the same excercise with smaller origonal file.

***My original question stands; How did I run an unmodified D2S V2 and get 6 svg files? The file created was named like this svg_Abi_pen0_100.svg
Any help is appreciated.

TuneWithHa-
mmer
Newbie
Posts: 12
Permalink
Post Re: D2S create mulit SVG files?
on: February 2, 2018, 20:25
Quote

OK, I've determined that y'all updated D2s.
Github is not exactly straightforward.
Where can I find a copy of the previous rev?

Shorn
Beginner
Posts: 33
Permalink
Post Re: D2S create mulit SVG files?
on: February 2, 2018, 23:07
Quote

The version you want is in a github fork
https://github.com/jwcliff/Drawbot_image_to_gcode_v2

Hardware:
*Running an Arduino Nano reflashed with an Uno bootloader
*Modified knockoff GRBL CNC shield with knockoff DRV8825 step drivers
*400mA -200 step motors set to 16x microstepping
*2mm belt with 36 tooth drive gears
*Machine set to 1500 Max speed and 5000 motor acceleration

Software:
*Stock Polargraph Controller to make command queues
*D2S version 2
*Send.py on remote Raspberry Pi

TuneWithHa-
mmer
Newbie
Posts: 12
Permalink
Post Re: D2S create mulit SVG files?
on: February 3, 2018, 13:55
Quote

Wahoo! Thanks Shorn!

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.023 seconds.