Coder Social home page Coder Social logo

Comments (4)

zxsq-cc avatar zxsq-cc commented on May 22, 2024

Did some messing with this in inkscape. this version doesnt show the large ellipses in inkscape but does in vpype [...] view
this one has the objects on a layer. (was trying to recreate the 2a file that worked)

I believe it is an issue either with the size (the looks are enourmous, coordinates around 1million) or them being in root layer not a numbered layer

from vpype.

jimmymorris avatar jimmymorris commented on May 22, 2024

Found some more info out. It seemingly has issues with the transform attribute. If I run commands against the below file it hangs.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="700" height="1000">
    <ellipse cx="525" cy="750" rx="75" ry="75" fill="rgb(0, 0, 0)" stroke="none"></ellipse>
    <ellipse cx="478.3309524416879" cy="703.3309524416878" rx="66" ry="66"
      transform="rotate(-315 478.3309524416879 703.3309524416878)" stroke="rgb(0, 0, 0)"></ellipse>
</svg>

If I remove the transform then the read completes and is quick.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="700" height="1000">
    <ellipse cx="525" cy="750" rx="75" ry="75" fill="rgb(0, 0, 0)" stroke="none"></ellipse>
    <ellipse cx="478.3309524416879" cy="703.3309524416878" rx="66" ry="66" stroke="rgb(0, 0, 0)"></ellipse>
</svg>

from vpype.

abey79 avatar abey79 commented on May 22, 2024

The issue with this SVG is that the ellipse are physically HUUUUGE (edit: I really mean huge: 1.5km wide!!), so the conversion to polyline yields an enormous amount of segment. #88 will significantly improve the situation, but care is still required.

One way is to crop to the dimension (read doesn't do it yet although it probably should #94):

vpype -v read -m  my_work/users/input-2.svg crop 0 0 700 1000 show

Another way is to simplify upon read. With #88 this is not implicit anymore and -s must be used. #88 also introduces an option for multiprocessed SVG conversion, which should be used here:

vpype -v read -m -sp my_work/users/input-2.svg show

This still takes 1m40s on my computer to execute.

from vpype.

abey79 avatar abey79 commented on May 22, 2024

Finally, I've addressed #94 in #88, so the geometries are cropped by default. This file now reads fine with:

vpype -v read my_work/users/input-2.svg show

11s on my computer

image

from vpype.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.