HBehrens / fixup_shaper_svg

Fixes malformed SVG to be compatible with Shaper Origin
MIT License
9 stars 3 forks source link

How to run the script in FreeCAD python console? #1

Open mrcg opened 5 months ago

mrcg commented 5 months ago

Hello, i want to use the script to make SVG exported files from FreeCAD compatible with Shaper Origin. Unfortunately i do not know how to run the script in the python console from FreeCAD to get the conversion done.

In which path i need to put the script? In which patch in need to put the SVG file so that the script can find it? How does the command in FreeCAD console look like including path information on windows pc?

Thanks for support. Br Chris

mrcg commented 5 months ago

I did not manage to get it working with command in FreeCAD, if this is possible at all. Finally i used the binary from this page and the script is working now. https://www.python.org/downloads/windows/

This may be useful information for others as well. Anyhow, if there is any solution to run it in FreeCAD i would be interested.

HBehrens commented 5 months ago

I am not aware of a way to run the script from within FreeCAD and was assuming the use of the script would have a basic Python setup.

May I ask:

1) Did you see the instruction in the readme? And if so, what was missing to more quickly steer you to the solution you finally picked?

Call the script from the terminal

python3 fixup_shaper_svg.py freecad_export.svg compatible_with_shaper.svg

2) Would you use a website where you could upload the original SVG to then download the processed SVG if it was linked from the Github project page?

mrcg commented 5 months ago

Hello, my feedback.

  1. Yes, i saw the instruction in the readme. But for me it was not clear which "terminal" was ment. Not everybody has a linux system with python available. Under FreeCAD there is also python console (view=>panel=>python console) and i was hoping this can be used so that no additional system (e.g. Linux VM, cygwin executables, etc) need to be used. After some testing i understood that it's not possible to be done in the python console and i need to have terminal with python available.
  2. Finally i made dos droplet on Windows using python.exe binary from python webpage. I just need to drag and drop the SVG out of FreeCAD to the droplet and the modified SVG will be created in the same folder.

Meanwhile i have opened ticket on Shaper asking for better SVG compatilibty. I think Shaper Origin do not need to be such strickt. All other SW which i am using is able to open the SVG files from FreeCAD, only with Origin it's not working. Why other can read the file but high end machine not? Answer so far not really promissing. Based on experience with Autopass i am not so confident that native support will come in near future, but hope dies last.