Giter Site home page Giter Site logo

optimization by --linemerge about vpype HOT 5 CLOSED

abey79 avatar abey79 commented on May 22, 2024
optimization by --linemerge

from vpype.

Comments (5)

ithinkido avatar ithinkido commented on May 22, 2024 1

yes the double lines are wanted. I just tried out the new version and it is perfect. Thanks, this is going to be very helpfull

from vpype.

abey79 avatar abey79 commented on May 22, 2024

linemerge doesn't attempt to simplify lines. When two lines' endings are close together, they are concatenated and their endings replaced by the mean point, so two collinear 1-segment lines are converted to a single, 3-point line. You want to use linesimplify after linemerge to remove those spurious points.

(Note: the Axidraw isn't at all affected by spurious points -- I'm surprised it's the case for other plotters.)

from vpype.

ithinkido avatar ithinkido commented on May 22, 2024

Have I understood this correctly, linemerge will produce a 3- point line (start , mean, end), and linesimplify will remove the mean point and produce a 2-point line ( start and end)?
Just tried with:
vpype read 1.svg linemerge --tolerance 0.1mm linesimplify linesort write --layer-label Pen%d --page-format 191x272mm 1_opt.svg
and I still have what looks like the mean point. Is there a way to output only start and end point lines?

from vpype.

abey79 avatar abey79 commented on May 22, 2024

On second look, I'm seeing issues with linemerge on your file, apparently an issue in Shapely. I've pushed a quick fix that seems to address the situation.

This is what happens now:

vpype read 1.svg linemerge show -dac -u mm

image

vpype read 1.svg linemerge linesimplify show -dac -u mm

image

Side note: while looking into that, I got confused with what happens inside the windows, until I realised that there are overlapping lines there. Is that on purpose?

from vpype.

abey79 avatar abey79 commented on May 22, 2024

shapely/shapely#911

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.