Comments (8)
Hello, could you provide the exact command used as well as the image in question?
from hatched.
Hi,
You bet!
vpype hatched --levels 64 128 192 -s 0.5 -p 4 starwars.jpg layout a4 show
from hatched.
from hatched.
Sorry for the response time.
This plug-in is indeed not very robust and this crash happens when the computed "zone" are geometrically too complex. It wouldn't be very difficult to improve but this is unfortunately rather low in my priority list.
The easiest way to deal with these errors is to use the --blur
parameter, e.g.:
vpype hatched --levels 64 128 200 -b 20 -p 4 -d starwars.jpg
Changing the levels can also help since the zone geometry is largely affected by them. Note that I use the -d
parameter so hatched displays a "debug" view of the zones.
from hatched.
from hatched.
Hi @abey79 I don't mind taking this one next. But I have no idea on the process to fix it. If you give me some lights I can pick this up and try to fix it
from hatched.
@mariana-s-fernandes Honestly, I don't recall what I had in mind when I wrote the comment above. Basically these errors arise when the shape of the various zones become too complex and somehow result in some invalid Shapely polygon. Smoothing the input image helps by simplifying the zones and reducing the risk of them becoming invalid for Shapely.
Properly handling this probably entails:
- Properly detecting the situation (e.g. checking for
.valid
at various steps, possibly identifying the nature of invalidity). - Fixing the shape. This is much tricker and I don't think there is any single good way of doing it. Maybe doing a tiny bit of double buffer (with positive then negative offset)? Maybe delete some probably-useless, tiny polygons from the input?
from hatched.
I have run the code above using the new hatched version (with the shapely updates) and I don't get the error. But I will test with other examples
from hatched.
Related Issues (10)
- Can't run example code on the command line HOT 4
- Install failed HOT 2
- Feature: add control on target output area size HOT 4
- Install breaks Qt HOT 8
- Improvement of algorithm's time performance
- Feature request: control angle of line hatching HOT 3
- New idea for hatched HOT 4
- Shapely 1.8.0 error - no output HOT 3
- Feature requests: variable number of layers, cross hatching and angle control, contour HOT 6
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 hatched.