How can get xml source svg from path in my inskape extension for edit?
Exactly as xml editor from Inskape ... but i want to get only this for edit and save as gcode:
M 66.523811,94.404755 H 139.09524 V 152.61309 H 66.523811 Z
I know that is possible have already exists a response at my question, but i search in this forum with my knowing words but i dont find anything, because i not have advanced knowledge about tecnical words.
I create this cnc https://www.youtube.com/watch?v=titu3T1fR_g ... is not big deal... but my clients is excited because is easy to programming!
So ... I modified potrace raster to svg from http://kilobtye.github.io/potrace/ to http://costycnc.it/img_nc/ ... and from path code i added some g01 text for create gcode file for my cnc... and working great!
Because is easy after to transform to gcode!
G01 X0 Y0
G01 X 66.523811
G01 X 66.523811 Y 94.404755
...
I know that this is a sample and primitive mode , but for me working and my clients that not have advanced knowledge about programming is excited!
Regards!
extension get and edit svg path
extension get and edit svg path
- Attachments
-
- forum.jpg (213.71 KiB) Viewed 2666 times
Re: extension get and edit svg path
Extensions development is explained here:
https://inkscape.org/en/develop/extensions/
Or you can also just open one of the extensions that come with Inkscape (any of the category that modifies a path would be suitable), and see how they do it.
https://inkscape.org/en/develop/extensions/
Or you can also just open one of the extensions that come with Inkscape (any of the category that modifies a path would be suitable), and see how they do it.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: extension get and edit svg path
Already i open some files from inskape or downloaded from internet ... but is more code and not can understand where is lines that can make that or have to much parametrs , and put me in difficulty ...
I download tons of tutorials but i not find exactly that i want:
A sample example for edit self.svg , file that actually in inskape !
Thanks anyways!
I download tons of tutorials but i not find exactly that i want:
A sample example for edit self.svg , file that actually in inskape !
Thanks anyways!
Re: extension get and edit svg path
See here for an example: https://gitlab.com/inkscape/inkscape/bl ... des.py#L85
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: extension get and edit svg path
I thing that i find in another topic exactly that i want!
http://www.inkscapeforum.com/viewtopic.php?t=8826#p31912
Thanks anyway for your response!
Regards!
Code: Select all
#The 'd' attribute is where the path data is stored as a string
pathData = node.get('d')
http://www.inkscapeforum.com/viewtopic.php?t=8826#p31912
Thanks anyway for your response!
Regards!
- Attachments
-
- ExportXY.zip
- (1.38 KiB) Downloaded 209 times
Re: extension get and edit svg path
... which is identical to what I linked to, two lines below...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: extension get and edit svg path
Yes... you are right!
but for me is a high diferrence when is explained!
Regards!
Code: Select all
d = node.get('d')
but for me is a high diferrence when is explained!
Regards!
Re: extension get and edit svg path
Now i begin study addnodes.py after i understand some things... thanks again!
I not understand what is mean [:]
I not understand what is mean [:]
Code: Select all
new[-1].append(next[:])
Re: extension get and edit svg path
Append a copy of 'next' to the last item of 'new'.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)