-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text in SVG - the result is mirror-inverted #3
Comments
Sorry for the late reply. Thanks for reporting this Tom, I will add a note
about it to the documentation. The limitation makes sense given the way I
understand the underlying library, svgpathtools, to work: it is more of a
path string parser than a full SVG implementation.
…-- Paul
On Sat, Oct 12, 2019, 8:04 AM Tom-- ***@***.***> wrote:
Good Morning
*This is more a note than an issue, therefore I selected an issue title
which describes the visible result so it hopefully gets found by other
users who have similar results.*
Thank you very much!
for sharing your knowledge in your Blog and your source code!,
it is always amazing to see how mathematicians miraculously simplify
complex problems and develop solutions with surprisingly few lines of code.
Even your SVG drawing visualizer is great and the result can be
interpreted very fast.
The issue: penkit-optimize removes the source file <svg …> and <g
transform=…> elements
I tried to use penkit-optimize with AxiDraw, the handwriting machine
<https://axidraw.com> to optimize one page filled with Text (which was
converted from the TTF outline Text to Single Stroke with created 2650 SVG
Path elements) and the result is great:
InitialCost / GreedyCost = 19.47
InitialCost / VRPOptimizationCost = 22.05
Plotting time of the example below: 06:55 reduced to 01:51. Amazing.
Unfortunately, the result is mirror-inverted.
[image: Ex - penkit-optimize - Text, John C Lennox, Original vs Optimized]
<https://user-images.githubusercontent.com/8282673/66700782-141b8000-ecf5-11e9-82b3-d24c991518ea.png>
I've analyzed the issue and found that penkit-optimize removes the
original <svg …> and <g transform=…> elements. My source file (from
Inkscape) has this SVG definition:
<svg xmlns="http://www.w3.org/2000/svg"
width="210.000000mm" height="297.000000mm"
viewBox="0.000000 -0.000000 9921.000000 14031.000000">
<g transform="matrix(1,0,0,-1,0,14031.000000)">
Because the source uses <g transform=…> and penkit-optimize removes those
elements, the result is mirrored.
Yesterday I tried to fix it and to make penkit-optimize compatible with
the latest Google OR-Tools 7.3, but failed to start your Python Package
from the command line :-(.
Starting Python scripts is often a big annoyance for non Python
developers. Because I don't know Python, I probably wouldn't have reached
my goal within a useful time anyway.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AAALIXM3JNM6KRPK2USZHODQOG4NFA5CNFSM4JACTVKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRLVOYA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALIXPZNEKQKPGY4TRBH3LQOG4NFANCNFSM4JACTVKA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good Morning
This is more a note than an issue,
therefore I selected an issue title which describes the visible result so it hopefully gets found by other users who have similar results.
Thank you very much!
for sharing your knowledge in your Blog and your source code!,
it is always amazing to see how mathematicians miraculously simplify complex problems and develop solutions with surprisingly few lines of code.
Even your SVG drawing visualizer is great and the result can be interpreted very fast.
The issue:
penkit-optimize
removes the source file<svg …>
and<g transform=…>
elementsI tried to use
penkit-optimize
with AxiDraw, the handwriting machine to optimize one page filled with Text (which was converted from the TTF outline Text to Single Stroke with created 2650 SVG Path elements) and the result is great:Unfortunately, the result is mirror-inverted.
I've analyzed the issue and found that
penkit-optimize
removes the original<svg …>
and<g transform=…> elements
. My source file (from Inkscape) has this SVG definition:Because the source uses
<g transform=…>
andpenkit-optimize
removes those elements, the result is mirrored.Yesterday I tried to fix it and to make
penkit-optimize
compatible with the latest Google OR-Tools 7.3, but failed to start your Python Package from the command line :-(.Starting Python scripts is often a big annoyance for non Python developers. Because I don't know Python, I probably wouldn't have reached my goal within a useful time anyway.
The text was updated successfully, but these errors were encountered: