Comments (7)
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.
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.
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.
@vmario89 I've merged the feature to keep occulted lines in a separate layer :)
from occult.
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.
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.
cool. thanks for notifying me. i am going to try this out asap =)
from occult.
Related Issues (11)
- API usage HOT 1
- `occult` doesn't preserve properties
- trim on page edges HOT 1
- Idea: Option to ignore ' fill="none" ' geometries HOT 2
- ShapelyDeprecationWarning: STRtree will be changed in 2.0.0 and will not be compatible with versions < 2. HOT 2
- Idea: Option to use geometry of overlapping shapes to make closed polygons on overlapped shapes HOT 1
- Handle GEOSException: IllegalArgumentException: Invalid number of points in LinearRing found 3 - must be 0 or >= 4
- Does not run on Windows 10 with Python 3.9 HOT 4
- Integration in InkScape HOT 2
- ValueError: zero-size array to reduction operation minimum which has no identity HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from occult.