Giter Site home page Giter Site logo

Comments (7)

LoicGoulefert avatar LoicGoulefert commented on June 18, 2024

Hi Mario !

The purpose of occult is to remove lines, or part of lines that are hidden by a polygon. I'm afraid that this plugin is not suited for removing overlapping lines. Maybe at some point I'll add an option to allow occult to do this, or maybe create another plugin dedicated to this task.

I'll update the README to clarify this !

from occult.

vmario89 avatar vmario89 commented on June 18, 2024

Hey, thanks for clarifying.

btw. do you think you could add a plugin option parameter to allow saving occulted lines in a separate layer instead removing them?

Having a plugin to remove common lines would be great. I never found any python routine which could do that. occult comes really near.

regards, Mario :-)

from occult.

LoicGoulefert avatar LoicGoulefert commented on June 18, 2024

Regarding the option to save occulted lines in a separate layer, this would be doable and would be a great addition to this plugin, I'll implement it soon !

A plugin to remove overlapping lines would be great too, but I'm not sure when I'll be able to implement it. I'll keep you updated on this :)

from occult.

LoicGoulefert avatar LoicGoulefert commented on June 18, 2024

@vmario89 I've merged the feature to keep occulted lines in a separate layer :)

from occult.

vmario89 avatar vmario89 commented on June 18, 2024

A plugin to remove overlapping lines would be great too, but I'm not sure when I'll be able to implement it. I'll keep you updated on this :)

i am trying to do such a tool chain with shapely at the moment. Its not so easy to do i think but i think we could do the following approach using vpype and/or inkscape together:

  • get all lines as collection into shapely (vpype)
  • find all intersection points of all lines. Add those points to an array if not present in that array yet (no duplicate intersection points)
  • split up each line with those intersection points. we need to check if the intersection point is on the line. So that would be the case if the distance from the intersection point is realy really small (effectively zero) and if this point is between starting point and end point
  • put all those split up segments to a new array and filter it for duplicate lines (same start and end point); or: combine all those lines to a merged one and run https://stadtfabrikanten.org/display/IFM/Purge+Duplicate+Path+Segments

regards, Mario

from occult.

LoicGoulefert avatar LoicGoulefert commented on June 18, 2024

Hi Mario, sorry for the delay.
I made a vpype plugin to deduplicate lines in a SVG file. It currently has a few edge cases where de-duplication doesn't work. Hopefully it can be useful to you !

from occult.

vmario89 avatar vmario89 commented on June 18, 2024

cool. thanks for notifying me. i am going to try this out asap =)

from occult.

Related Issues (11)

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.