SebKuzminsky / pycam

Other
338 stars 99 forks source link

PyCAM Not Recognizing SVG "transform" Attribute Correctly. #183

Open TalkVideo opened 3 years ago

TalkVideo commented 3 years ago

GIMP-SVG-Letters Inkscape-SVG-Letters gimpdrawing.svg.txt inkscapedrawing.svg.txt

PyCAM Version: 0.0-unknown Commit ID: 4687f2f62bd75078a7b1b70339e9a5df75b64c63

Steps To Reproduce: In Inkscape 0.92: 1) File->New 2) Extensions->Render->Hershey Text 3) Enter Your Text And Typeset it. [Apply]. Font Chosen Was Sans 1-stroke 4) Select Text You Entered on Page. Edit->Resize Page to Selection. (This Step Is Optional). 5) Save File As SVG.

When You load that SVG File into PyCAM, all of the letters will be stacked on top of each other. (See Attached Screen Shot).

GIMP writes the SVG Path differently than Inkscape. (Compare Attached SVG Files). It uses "M" and "C" Co-Ordinates. The Inkscape file uses a "translate" directive to sequence each letter, but PyCAM ignores it.

In GIMP 2.10: 1) File->New 2) Create new File. Attached is 600 DPI, 600x600, 8-Bit Greyscale. 3) Add Text using Text Tool. Font Used was "Quicksand". 4) Layers Tab Right Click->Merge Down Text Layer Into Background. 5) Use Select By Color Tool To select your text. (Use Black Text, White Background). 6) Select->To Path 7) Paths Tab-> Right Click Export Path. (Save as SVG File). 8) Open SVG File from GIMP in PyCAM. Letters will be in order.

nseinlet commented 2 years ago

Which version of svg.path python module are you using?