Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read should (optionally?) crop geometries to the SVG bounds #94

Closed
abey79 opened this issue Nov 24, 2020 · 0 comments · Fixed by #88
Closed

read should (optionally?) crop geometries to the SVG bounds #94

abey79 opened this issue Nov 24, 2020 · 0 comments · Fixed by #88

Comments

@abey79
Copy link
Owner

abey79 commented Nov 24, 2020

No description provided.

abey79 added a commit that referenced this issue Nov 25, 2020
SVG read operation have been massively improved by replacing svgpathtools with svgelements and rewriting the parsing operations. Thanks a lot to @tatarize for his support in the process.

`read` command:
* Execution time drastically reduced in most cases.
* Improved robustness to various aspects of the SVG spec.
* Now geometries are cropped to the SVG dimension (can be disabled with `--no-crop`).
* Line simplification is no longer implicit and must be enabled with `--simplify`
* Line simplification is now applied only on curved elements (circle, arc, bezier, etc.) and element-by-element. Polygon/polylines are not affect by the simplification (use the `linesimplify` command if this is needed)
* Multiprocessed SVG parsing is now optionally available (`--parallel`). It should be only enabled for SVG with many curvy elements and when using `--simplify`. Other situation show no improvements.
* Proper support for SVG with missing or percentage width/height. Use the `--display-size` and `--display-landscape` options to specify the default size (corresponding to 100% width/height).
* Fixed error on with 0-radius arc elements

`write` command:
* Removed the rarely used `--single-path` option.
* Now uses <line>, <polyline> and <polygon> instead of <path>, which improves read time a lot if these SVG are reused in vpype.

Minor fixes:
* mypy added to pyproject.toml
* Added test for non-duplicate consecutive points
* Fixed test_file_* which wouldn't actually fail on error
* added many test SVG files
* test SVG files prefixed with _ are now ignored

Fixes #21 #31 #53 #71 #77 #87 #94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant