Export as a series of X Y pixels to a text file?

General discussions about Inkscape.
roineust
Posts: 2
Joined: Thu Sep 26, 2013 9:36 am

Export as a series of X Y pixels to a text file?

Postby roineust » Thu Sep 26, 2013 11:40 pm

Hello!

I am building a robotics painting project - but am totally new to graphics and vector graphics.

Does anyone here know of free vector graphics software, that enables to export a vector drawing or chosen part of it, as a simple text file consisting of numbers, line after line, describing the X and Y pixels of the vector drawing?

Thanks a lot!

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Export as a series of X Y pixels to a text file?

Postby Lazur » Tue Oct 01, 2013 8:08 am

Hi there!

Sounds a great project.

As you are new to graphics, see this:
http://en.wikipedia.org/wiki/Vector_graphics

Basically vector graphics are described in a way of points and connecting lines-segments,
and the rest is just implementation.
Like, you can draw an image in inkscape, save it as an svg, open it with a browser for rendering,
and you can open the svg with a notepad to see it in a text format.

Inkscape is based on svg.
That format is so clear, that you can even draw some basic designs by using a notepad -like notepad++- only,
and saving it as an svg.

If you want to find out more about svg structure, go here:
http://www.w3.org/TR/SVG/

So inkscape saves exactly in a format that could work for you.
You could also try other cad softwares with different formats, knowing there are threads here
of vinyl cutters and alike, with dxf/plt formats.

I'm not sure how would you program the robotic parts, connecting it with a vector file.
Last edited by Lazur URH on Fri Nov 01, 2013 11:44 am, edited 1 time in total.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Export as a series of X Y pixels to a text file?

Postby ragstian » Tue Oct 01, 2013 10:30 am

Hi.

Just be aware that the origin in SVG is the UPPER left corner of the document ("canvas" in Inkscape lingo) and not as we have learned in math and engineering.

See here:
[url]http://commons.oreilly.com/wiki/index.php/SVG_Essentials/Coordinates
http://tutorials.jenkov.com/svg/svg-coo ... ystem.html[/url]

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Export as a series of X Y pixels to a text file?

Postby ragstian » Tue Oct 01, 2013 11:59 am

Hi roineust

Have a look at this; http://www.esuli.it/software/toxy/

I have installed the toXY extension and it works like a charm!

Another option is to use a programming language like python to "extract" the data you need from the SVG file.
When "toying" with robotics you will sooner or later "have" to do some programming!

Some interesting links;
http://homeshaoqun.blogspot.com/2013/07/watercolorbot-paints-its-way-to.html
http://www.gizmag.com/watercolorbot-painting-robot/28376/
http://www-users.cs.umn.edu/~stergios/papers/PathFollowingICRA02.pdf
http://www.factualworld.com/article/Autonomous_robot
http://www.fubiz.net/2013/07/10/robot-painting/

Have a look at the Eggbot where an Inkscape extension (written in python) processes the SVG file,
commands are then sent to a controller board on the Eggbot (a "primitive" robot or CNC (Computer Numerical Control) device),
the controller board then controls two stepper motors On the Eggbot to drive a pen arm and rotate an egg for some "nice" egg "drawings".
Example;
Image

More Eggbot info;http://shop.evilmadscientist.com/productsmenu/tinykitlist/171-egg-bot

Good Luck.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar


Return to “General Discussions”