Skip to content

xEmkayx/vec-svg-parser

Repository files navigation

INFO

You can also use the webeditor without downloading anything at https://xemkayx.github.io/vec-svg-parser-webapp/ Link to other repo.

Parse .vec files to .svg images

Render images from .vec files created by programs like "Pictures by PC" or "isycam". Syntax is limited to these languages. If you're a student that has to use these programs in school but has no access to those at home, you can simply parse your code with this script and see the result.

Example

Example image

os ADVSchild
ob 0,0,120,80
ma 0,0
da 0,80
da 120,80
da 120,0
da 0,0
ma 10,20
da 10,60
ma 10,70
es 10,10 270,360
ma 20,70
da 100,70
ma 110,70
es 10,10 180,270
ma 110,60
da 110,20
ma 110,10
es 10,10 90,180
ma 100,10
da 20,10
ma 10,10
es 10,10 0,90
co 3
ob 25,30,45,50
ma 25,30
da 35,50
da 45,30
ma 40,40
da 30,40
os D
ob 55,30,65,50
ma 55,30
da 60,30
ma 60,35
es 5,5 270,360
ma 65,35
da 65,45
ma 60,45
es 5,5 0,90
ma 60,50
da 55,50
da 55,30
os V
ob 75,30,95,50
ma 75,50
da 85,30
da 95,50
oe

How to use

Web Editor

There is a web-editor that works without having to create files. It's reachable via http://127.0.0.1:5000/editor

GUI

Start the GUI/Webgui and select the input image and output image filename and hit submit. The images are saved to the '/static/IMG/' folder

CLI

Run the parser.py file with these arguments:

  • -i, --input-file 'path/to/input/file'
  • -o, --output-file 'output_filename'

Installation

You need a valid python installation (I used Python3.11.2). If you want to use the webgui, you need to install the requirements via the requirements.txt file

About

parse .vec files (from pictures by pc) to svg image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published