Giter Club home page Giter Club logo

Comments (8)

sameer avatar sameer commented on May 27, 2024 1

I love this project, it's so much faster than any Python implementation I've found.
It even runs on my Raspberry Pi!

Haha that's nice to hear 🙂 I had some plans to compile this to WASM and host it for people who aren't familiar with/don't care for the toolchain setup but haven't gotten around to it yet.

Thanks for bringing these issues to my attention, I'll take a look. My hunch is something related to ellipses

from svg2gcode.

thomaskole avatar thomaskole commented on May 27, 2024 1

Awesome, I'll check out the fix!

from svg2gcode.

thomaskole avatar thomaskole commented on May 27, 2024

Also, it seems to go over the circles multiple times, even though they are just regular closed paths.

from svg2gcode.

sameer avatar sameer commented on May 27, 2024

Ok, I think I have a good idea of what's going on. Like with a couple of other similar issues, this ties back to the difference between SVG and GCode coordinate systems and how I've translated things.

from svg2gcode.

sameer avatar sameer commented on May 27, 2024

I've fixed the first issue with ellipses called out in c1e1974.

image

Two problems and solutions here:

  1. There is a bug in lyon_geom itself: the G1 moves produced by flattening the curve w/ a tolerance do not work at all with a negative sweep angle (see flattening_step). There are no tests for that method either which might explain how it has gone unnoticed for so long.
    • Solution: roundabout method where the ellipse is converted to cubic bezier segments, then flattened into line segments.
  2. There is some ambiguity around large-arc, sweep, and radii when moving between SVG and GCode coordinate systems. I ran into this previously and had a temporary fix of just inverting large-arc which worked at the time for my use case, but not everywhere.
    • Solution: For simplicity's sake just transform all the points that come out of the flattening. Not as performant but can revisit the math around swapping coordinate systems for elliptical arcs later.

from svg2gcode.

sameer avatar sameer commented on May 27, 2024

As for the second issue, I will check if it's still happening and create a separate tracking issue.

from svg2gcode.

sameer avatar sameer commented on May 27, 2024

Other issue doesn't seem to manifest. Now that I think about it those were probably also ellipses...so the solution is the same

from svg2gcode.

sameer avatar sameer commented on May 27, 2024

follow up from the dependency issue: that is now resolved by nical/lyon#662 and I've reverted the roundabout solution 1 in e9b23c1

from svg2gcode.

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.