Giter Club home page Giter Club logo

Comments (2)

fullcontrol-xyz avatar fullcontrol-xyz commented on September 2, 2024 1

I love this preview! Using the svg from this gist to handle an svg exported from illustrator? Or a revised version of that gist?

https://gist.github.com/fullcontrol-xyz/fe80b7ae8af1f80eb601c3c1f480d8fe

Yep this happens when points are close together near a corner. It means the offset path function's code is nice and simple. One solution is to go through the offset path after creating it, segment by segment, and check for intersection with any segments in the near future of the path. E.g. Look 10 segments ahead. There are already functions to check for intersection between lines in the FullControl lab. Once you found out which segments intersect, you can replace the points in between with the intersection point. It'll take a little extra thought at the very beginning/end of the path, maybe looping through the end of the list back to the start somehow.

I'll look into the code sometime, but it might not be for a while. Please share if you develop your own. I can add it to lab.

from fullcontrol.

sweikert avatar sweikert commented on September 2, 2024 1

I have a customized version of the Gist. I want to be able to read individual objects from the SVG. Then I can specifically control how the path is printed later.

And my SVGs come from Illustrator. This is the easiest way for me to work with the points for paths.

from fullcontrol.

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.